Merged PR 2279: passed in case customer email in search and update rep logic to stop non owne...

passed in case customer email in search and update rep logic to stop non owners rasing reps on other owners cases

Related work items: #22095
This commit is contained in:
Robert Bond
2026-04-28 12:00:12 +00:00
parent 843e6adee6
commit a25ab433a6
4 changed files with 17 additions and 3 deletions
+7 -2
View File
@@ -253,9 +253,14 @@ let MakeRepresentation = (props) => {
var detailsObj = {};
// const isAppellant =
// props.props.accountDetails.accountDetails.pinswg_typeofinvolvement ===
// 846040001;
const isAppellant =
props.props.accountDetails.accountDetails.pinswg_typeofinvolvement ===
846040001;
props.props.accountDetails.accountDetails.emailaddress1 ==
props.searchResultsObj?.searchResultsObj?.value[0].customerid_contact
.emailaddress1;
const capacityOptionsArr = [];
+6
View File
@@ -17,6 +17,12 @@ const CaseRepresentation = (props) => {
<div className="govuk-grid-row">
<div className="govuk-grid-column-full">
<Summary
isAppellant={
props.props.accountDetails.accountDetails
.emailaddress1 ===
props.searchResultsObj?.value?.[0]
?.customerid_contact?.emailaddress1
}
myCases={props.myCases}
myRepresentations={props.myRepresentations}
watchedCases={props.watchedCases}
+1 -1
View File
@@ -34,7 +34,7 @@ export default async function ApiProxy(req, res) {
const escapedSearchString = searchString.replace(/\'/g, "''");
const queryUrl =
"incidents?$select=pinswg_environmentalstatementlocation,pinswg_caseaddress,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
"incidents?$select=pinswg_environmentalstatementlocation,pinswg_caseaddress,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=customerid_contact($select=fullname,emailaddress1)&$filter=(contains(title, '" +
escapedSearchString +
"') or contains(ticketnumber, '" +
escapedSearchString +
+3
View File
@@ -394,6 +394,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
"appealType":
searchResultsObj.value[0].pinswg_appealcasetype,
"showLoginCheck": showLoginCheck,
"appellant":
searchResultsObj?.value[0].customerid_contact
?.emailaddress1,
"specialistProcess":
searchDetailsObj[0].value[0]
.pinswg_speacialistcaseprocess != null ||