updated the cookies functionality
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user