updated the cookies functionality

This commit is contained in:
2021-12-09 13:32:15 +00:00
parent 9c5c35fa4e
commit 0e18aa35b8
18 changed files with 507 additions and 182 deletions
+22 -12
View File
@@ -89,6 +89,24 @@ const TopThree = (props) => {
return Promise.all(detailsArr);
};
const getIncidentId = (topThreeType, objArr) => {
switch (topThreeType) {
case "myCases":
return objArr.incidentid;
break;
case "watchedCases":
return objArr._pinswg_watchedcase_value;
break;
case "myRepresentations":
return objArr.ticketnumber;
break;
case "awaitingSubmission":
break;
default:
// code block
}
};
let topThreeOnlyArr = showTopThreeArr.slice(0, 3);
Object.keys(topThreeOnlyArr).map((key, index) => {
topthreeRow.push(
@@ -126,18 +144,10 @@ const TopThree = (props) => {
],
"currentType": topThreeType,
"incidentid":
topThreeType != "watchedCases"
? topThreeType !=
"myRepresentations"
? showTopThreeArr[key]
._pinswg_case_value
: showTopThreeArr[key][
" _pinswg_watchedcase_value"
]
: showTopThreeArr[key][
" _pinswg_watchedcase_value"
],
"incidentid": getIncidentId(
topThreeType,
showTopThreeArr[key]
),
"appealType":
showTopThreeArr[key]