uopdates to naming convention and date handling
This commit is contained in:
@@ -150,10 +150,16 @@ const TopThree = (props) => {
|
||||
"-" +
|
||||
datePart.split("-")[1] +
|
||||
"-" +
|
||||
datePart.split("-")[2]
|
||||
datePart.split("-")[2] +
|
||||
" " +
|
||||
datePart.split("-")[3].split("_")[0].slice(0, 2) +
|
||||
":" +
|
||||
datePart.split("-")[3].split("_")[0].slice(2, 4) +
|
||||
":" +
|
||||
datePart.split("-")[3].split("_")[0].slice(4, 6)
|
||||
);
|
||||
|
||||
return dateObj.toLocaleDateString();
|
||||
return dateObj.toLocaleString();
|
||||
};
|
||||
|
||||
let topThreeOnlyArr = showTopThreeArr.slice(0, 3);
|
||||
|
||||
@@ -27,7 +27,20 @@ const ViewAllResults = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const repRaisedDate = (datePart) => {
|
||||
var dateObj = new Date(datePart);
|
||||
var dateObj = new Date(
|
||||
datePart.split("-")[0] +
|
||||
"-" +
|
||||
datePart.split("-")[1] +
|
||||
"-" +
|
||||
datePart.split("-")[2] +
|
||||
" " +
|
||||
datePart.split("-")[3].split("_")[0].slice(0, 2) +
|
||||
":" +
|
||||
datePart.split("-")[3].split("_")[0].slice(2, 4) +
|
||||
":" +
|
||||
datePart.split("-")[3].split("_")[0].slice(4, 6)
|
||||
);
|
||||
|
||||
return dateObj.toLocaleString();
|
||||
};
|
||||
var resultsArr =
|
||||
@@ -493,7 +506,7 @@ const ViewAllResults = (props) => {
|
||||
transLookup
|
||||
) || "N/A"
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
? repRaisedDate(item.createdDate) // ? router.locale == "cy"
|
||||
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
||||
: // ? jsonpath(
|
||||
//
|
||||
// '$..[?(@.value=="' +
|
||||
|
||||
Reference in New Issue
Block a user