From f91cc1b9530b71658a35bcbb04a94e7fa8cbaf38 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 30 Jan 2025 14:08:48 +0000 Subject: [PATCH] added rep type on view all for clarity --- components/myportal/viewall.js | 229 ++++++++++++++++++--------------- 1 file changed, 123 insertions(+), 106 deletions(-) diff --git a/components/myportal/viewall.js b/components/myportal/viewall.js index c5682ac8..8e353e9e 100644 --- a/components/myportal/viewall.js +++ b/components/myportal/viewall.js @@ -148,117 +148,134 @@ const ViewAllResults = (props) => { {t("myportal:appeal-pending-label")} ) : ( - + { - currentView.viewKey == "watchedCases" && - setSearchResults( - props.watchedCases.watchedCases - ), - setSearchDetails( - props.watchedCases - .watchedCasesDetails - ), - setCurrentReference({ - "ticketnumber": - resultsArr[key].ticketnumber, - "currentReference": - currentView.viewKey != - "watchedCases" - ? currentView.viewKey == - "myRepresentations" + : "/case/" + + resultsArr[key].ticketnumber + } + onClick={() => { + currentView.viewKey == "watchedCases" && + setSearchResults( + props.watchedCases.watchedCases + ), + setSearchDetails( + props.watchedCases + .watchedCasesDetails + ), + setCurrentReference({ + "ticketnumber": + resultsArr[key] + .ticketnumber, + "currentReference": + currentView.viewKey != + "watchedCases" + ? currentView.viewKey == + "myRepresentations" + ? resultsArr[key] + .caseRef + : resultsArr[key] + .ticketnumber + : resultsArr[key][ + "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" + ], + + "currentType": + currentView.viewKey, + "incidentid": + currentView.viewKey != + "watchedCases" ? resultsArr[key] - .caseRef - : resultsArr[key] - .ticketnumber - : resultsArr[key][ - "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" - ], + .incidentid + : resultsArr[key][ + "_pinswg_watchedcase_value" + ], - "currentType": currentView.viewKey, - "incidentid": - currentView.viewKey != - "watchedCases" - ? resultsArr[key].incidentid - : resultsArr[key][ - "_pinswg_watchedcase_value" - ], - - "appealType": - resultsArr[key] - .pinswg_appealcasetype, - "repDetails": - currentView.viewKey == - "myRepresentations" && - resultsArr[key], - }), - setCurrentView({ - "viewName": currentView.viewName, - "viewKey": currentView.viewKey, - }); - }} - > - - {t( - "search:searchresults-case-reference-label" - )} - : - - {currentView.viewKey != "watchedCases" - ? currentView.viewKey == "myRepresentations" - ? resultsArr[key].caseRef - : resultsArr[key].ticketnumber - : resultsArr[key][ - "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" - ]} - + "appealType": + resultsArr[key] + .pinswg_appealcasetype, + "repDetails": + currentView.viewKey == + "myRepresentations" && + resultsArr[key], + }), + setCurrentView({ + "viewName": + currentView.viewName, + "viewKey": currentView.viewKey, + }); + }} + > + + {t( + "search:searchresults-case-reference-label" + )} + : + + {currentView.viewKey != "watchedCases" + ? currentView.viewKey == + "myRepresentations" + ? resultsArr[key].caseRef + : resultsArr[key].ticketnumber + : resultsArr[key][ + "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue" + ]} + + {currentView.viewKey == "myRepresentations" && ( + <> +
+ + {resultsArr[key].representationType} + + + )} + )} {/*