Merged PR 1122: only give link for published cases in my case card

only give link for published cases in my case card

Related work items: #7886
This commit is contained in:
Robert Bond
2024-04-10 14:44:08 +00:00
3 changed files with 166 additions and 143 deletions
+10 -1
View File
@@ -158,6 +158,13 @@ const TopThree = (props) => {
<div className="cardModuleDetails">
<div className="cardModuleReference">
<b>{t("myportal:case-reference")}:</b>
{topThreeType == "myCases" &&
showTopThreeArr[key].pinswg_publishtoweb === false ? (
<span>
{showTopThreeArr[key].ticketnumber}{" "}
<b> - Pending</b>
</span>
) : (
<Link
href={
topThreeType == "awaitingSubmission" ||
@@ -178,7 +185,8 @@ const TopThree = (props) => {
showTopThreeArr[key]
.pinswg_appealcasetype +
"&casereference=" +
showTopThreeArr[key].pinswg_title +
showTopThreeArr[key]
.pinswg_title +
"&inid=" +
showTopThreeArr[key].incidentid
: router.locale == "cy"
@@ -226,6 +234,7 @@ const TopThree = (props) => {
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]}{" "}
</Link>
)}
</div>
{/* {(topThreeType == "awaitingSubmission" ||
topThreeType == "watchedCases") && ( */}
+20 -6
View File
@@ -78,11 +78,18 @@ const ViewAllResults = (props) => {
resultsRowArr.push(
<div className="govuk-summary-list__row" key={key}>
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
{currentView.viewKey == "myCases" &&
resultsArr[key].pinswg_publishtoweb === false ? (
<div className="cardModuleReference">
{resultsArr[key].ticketnumber} <b> Pending</b>
</div>
) : (
<Link
href={
currentView.viewKey == "myRepresentations"
? {
pathname: "/myportal/representation",
pathname:
"/myportal/representation",
query: {
case: resultsArr[key].caseRef,
state: "edit",
@@ -122,25 +129,29 @@ const ViewAllResults = (props) => {
"ticketnumber":
resultsArr[key].ticketnumber,
"currentReference":
currentView.viewKey != "watchedCases"
currentView.viewKey !=
"watchedCases"
? currentView.viewKey ==
"myRepresentations"
? resultsArr[key].caseRef
: resultsArr[key].ticketnumber
: resultsArr[key]
.ticketnumber
: resultsArr[key][
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
],
"currentType": currentView.viewKey,
"incidentid":
currentView.viewKey != "watchedCases"
currentView.viewKey !=
"watchedCases"
? resultsArr[key].incidentid
: resultsArr[key][
"_pinswg_watchedcase_value"
],
"appealType":
resultsArr[key].pinswg_appealcasetype,
resultsArr[key]
.pinswg_appealcasetype,
"repDetails":
currentView.viewKey ==
"myRepresentations" &&
@@ -149,7 +160,9 @@ const ViewAllResults = (props) => {
}}
>
<span className="results-visually-hidden">
{t("search:searchresults-case-reference-label")}
{t(
"search:searchresults-case-reference-label"
)}
:
</span>
{currentView.viewKey != "watchedCases"
@@ -160,6 +173,7 @@ const ViewAllResults = (props) => {
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
]}
</Link>
)}
</dd>
<dd className="govuk-summary-list__value govuk-!-font-size-16">
<span className="results-visually-hidden">
+1 -1
View File
@@ -41,7 +41,7 @@ export default async function ApiProxy(req, res) {
var token = await getToken();
var queryUrl =
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
"incidents?$select=modifiedon,pinswg_publishtoweb,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_customerid_value eq " +
loggedInUserId +
" and servicestage eq 0 and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";