From c738d2bde9f22d350e714c922dc6e6e6d62a929a Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Thu, 15 May 2025 10:15:41 +0100 Subject: [PATCH] added nrw domain as env variable --- components/case/representation/index.js | 4 +--- pages/myportal/representation.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/components/case/representation/index.js b/components/case/representation/index.js index 418f3183..5df1aaf2 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -115,9 +115,7 @@ let MakeRepresentation = (props) => { // ? true // : false; - const isNRW = accountDetails.emailaddress1.includes("@rdbtech.co.uk") - ? true - : false; + const isNRW = currentView.caseReference?.isNRW; const setRepFileName = (values) => { //console.log("---------------\n", values); diff --git a/pages/myportal/representation.js b/pages/myportal/representation.js index ccfd4c63..49d71986 100644 --- a/pages/myportal/representation.js +++ b/pages/myportal/representation.js @@ -340,8 +340,20 @@ export const getServerSideProps = wrapper.getServerSideProps( "viewKey": "myRepresentations", }) ); + + console.log( + accountDetails, + "===================== is nrw", + accountDetails.emailaddress1.includes(process.env.NRWDOMAIN), + "===================== " + ); + store.dispatch( setCurrentReference({ + "isNRW": + accountDetails.emailaddress1.includes( + process.env.NRWDOMAIN + ) || false, "ticketnumber": searchResultsObj.value[0].ticketnumber, "currentReference": searchResultsObj.value[0].title, "currentType": "myRepresentations",