uopdates to naming convention and date handling

This commit is contained in:
2024-05-15 10:40:59 +01:00
parent 90e9c6335e
commit 9f3f1c996c
5 changed files with 31 additions and 53 deletions
+8 -2
View File
@@ -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);
+15 -2
View File
@@ -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=="' +