From d2e88b57d8f4a5b4cfd1cc47e89b6df774591c57 Mon Sep 17 00:00:00 2001 From: Robert Bond Date: Thu, 30 Apr 2026 16:25:03 +0000 Subject: [PATCH] Merged PR 2288: add in company name for appellant and autofill agent details in new appeal add in company name for appellant and autofill agent details in new appeal Related work items: #22842 --- .env.local | 18 +++++------ components/account/registerform.js | 21 ++++++++++--- components/case/media.js | 2 +- components/newappeal/aboutyou.js | 42 ++++++++++++++++++++++++-- locales/cy/account.json | 1 + locales/en/account.json | 1 + pages/api/endpoint/getsipsmedia_api.js | 2 +- 7 files changed, 69 insertions(+), 18 deletions(-) diff --git a/.env.local b/.env.local index 3fb9897f..b9c63e5f 100644 --- a/.env.local +++ b/.env.local @@ -18,8 +18,8 @@ CLIENT_SECRET = .Jf8Q~tKMObCJjhh_hy3J5AIctFrBalU4FS~tdxk RELAY_ROOT = https://ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net/ar-hc-lz-pedw-dev-uks-01/ RELAYURI = "ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net" RELAYPATH = "ar-hc-lz-pedw-dev-uks-01" -CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS" -CRMURL_VERSION = "v8.2" +CRMURL = "dv-pedw.crm11.dynamics.com" +CRMURL_VERSION = "v9.2" # //New Test CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1 @@ -139,10 +139,10 @@ NEXTAUTH_SECRET = SuperSecret # DATABASE_URL = sqlserver://sql-srv-plt-pedw-cnr-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword // dev test sql server -# DATABASE_URL = sqlserver://sql-srv-plt-pedw-dev-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword +DATABASE_URL = sqlserver://sql-srv-plt-pedw-dev-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword // test sql server - DATABASE_URL = sqlserver://sql-srv-plt-pedw-test-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword +DATABASE_URL = sqlserver://sql-srv-plt-pedw-test-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryPassword // Pre prod sql server # DATABASE_URL = sqlserver://sql-srv-plt-pedw-ppe-uks-01.database.windows.net:1433;database=PEDW;user=PedwSqlAdmin;password=GhWKr62F5sQ69dZx;encrypt=true;trustservercertificate=true;hostnameincertificate=*.database.windows.net;logintimeout=30;authentication=SqlPassword @@ -248,22 +248,22 @@ SHOW_DEBUG = true // DEV Connection string -//NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=4b7568b3-70bd-4591-9dc2-267c0a6501d1;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=447d38b5-5d40-4238-8fb3-0ef4741b3db1 +NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=4b7568b3-70bd-4591-9dc2-267c0a6501d1;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=447d38b5-5d40-4238-8fb3-0ef4741b3db1 APPLICATIONINSIGHTS_CONNECTIONSTRING = InstrumentationKey=7a06e24a-793c-47bc-8987-ce80f180e035;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=9906b6d0-b791-4add-8d53-c827a534e1d4 // Test Connection string -NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=cc60e8e7-5b30-4c2b-a176-8b96b21b12df;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=2a4094be-6fd1-46ab-a67d-5f241692b129 +# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=cc60e8e7-5b30-4c2b-a176-8b96b21b12df;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=2a4094be-6fd1-46ab-a67d-5f241692b129 // Preprod Connection string -//NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=7370f0f9-834d-4c7a-b3c4-9951fcad5ad2;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=04362cb7-6dfc-469e-8274-12243e8be851 +# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=7370f0f9-834d-4c7a-b3c4-9951fcad5ad2;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=04362cb7-6dfc-469e-8274-12243e8be851 -NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=a41b91bf-f7dc-4f44-bb66-a67df4eee435;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=473d0632-16f1-4065-8984-d6bac62402c0 +# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=a41b91bf-f7dc-4f44-bb66-a67df4eee435;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=473d0632-16f1-4065-8984-d6bac62402c0 // Prod Connection string -//NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=61f358c2-8075-4164-b897-17bc6dd31fee;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=0c297349-396b-4dc6-8b56-85f5c680adc6 +# NEXT_PUBLIC_APP_INSIGHT = InstrumentationKey=61f358c2-8075-4164-b897-17bc6dd31fee;IngestionEndpoint=https://ukwest-0.in.applicationinsights.azure.com/;LiveEndpoint=https://ukwest.livediagnostics.monitor.azure.com/;ApplicationId=0c297349-396b-4dc6-8b56-85f5c680adc6 HIDEERRORLOGS = false diff --git a/components/account/registerform.js b/components/account/registerform.js index be4cdac9..82607dd4 100644 --- a/components/account/registerform.js +++ b/components/account/registerform.js @@ -66,7 +66,7 @@ const RegisterForm = (props) => { setRegisterFormComplete, setAccountCreatedComplete, loggedInUserEmail, - emailaddress1, + emailaddress1 } = props; let { t, lang } = useTranslation(); @@ -199,6 +199,17 @@ const RegisterForm = (props) => { "account:register-new-account-phone-label" )} /> +
@@ -312,8 +323,8 @@ const mapStateToProps = (state, props) => { appealType: state.appealType, //form: state.form, initialValues: { - emailaddress1: props.loggedInUserEmail, - }, + emailaddress1: props.loggedInUserEmail + } }; }; @@ -321,7 +332,7 @@ const mapDispatchToProps = (dispatch) => { return { setCurrentSection: (currentSection) => { dispatch(setCurrentSection(currentSection)); - }, + } }; }; @@ -334,6 +345,6 @@ export default connect( reduxForm({ form: "accountRegisterForm", enableReinitialize: true, - destroyOnUnmount: false, + destroyOnUnmount: false })(RegisterForm) ); diff --git a/components/case/media.js b/components/case/media.js index 355ebcfe..86a78000 100644 --- a/components/case/media.js +++ b/components/case/media.js @@ -458,7 +458,7 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => { .filter((x) => x?.pinswg_publishtoweb) .map((item) => { const link = isWelsh - ? item.pinswg_mediaLinkCY + ? item.pinswg_videoplatformurlwelsh : item.pinswg_videoplatformurl; const videoId = extractYouTubeId(link); diff --git a/components/newappeal/aboutyou.js b/components/newappeal/aboutyou.js index 255c6aee..c9857a89 100644 --- a/components/newappeal/aboutyou.js +++ b/components/newappeal/aboutyou.js @@ -452,6 +452,14 @@ let AboutYou = (props) => { const isAgentSelected = appellantAgentValue == "846040001"; const isAppellantSelected = appellantAgentValue == "846040000"; + console.log( + "================", + props.initialValues.pinswg_typeofinvolvement + ); + + //props.initialValues.pinswg_typeofinvolvement === 846040000 && + // setIsAgent(true); + const yesNo = isWelsh ? ["Ydw", "Na"] : ["Yes", "No"]; const appellantAgent = isWelsh ? ["Apelydd", "Asiant"] @@ -499,11 +507,14 @@ let AboutYou = (props) => { if (isAgentSelected && isAgent == false) { updateField("caseForm", "pinswg_appellantfirstname", ""); updateField("caseForm", "pinswg_appellantlastname", ""); + updateField("caseForm", "company", ""); updateField("caseForm", "pinswg_appellantemailaddress", ""); updateField("caseForm", "pinswg_appellantaddress", ""); updateField("caseForm", "pinswg_appellantphonenumber", ""); setIsAgent(true); - } //else { + } + + //else { // updateField( // "caseForm", // "pinswg_appellantfirstname", @@ -602,6 +613,18 @@ let AboutYou = (props) => { )} maxFieldLength="200" /> + { state.accountDetails.accountDetails.firstname, pinswg_appellantlastname: state.accountDetails.accountDetails.lastname, + pinswg_appellantcompany: + state.accountDetails.accountDetails.company, pinswg_appellantemailaddress: state.accountDetails.accountDetails.emailaddress1, pinswg_appellantaddress: state.accountDetails.accountDetails.address1_composite, pinswg_appellantphonenumber: - state.accountDetails.accountDetails.telephone1 + state.accountDetails.accountDetails.telephone1, + pinswg_agentcompanyname: + state.accountDetails.accountDetails.company, + pinswg_agentfirstname: + state.accountDetails.accountDetails.firstname, + pinswg_agentlastname: state.accountDetails.accountDetails.lastname, + pinswg_agentemailaddress: + state.accountDetails.accountDetails.emailaddress1, + pinswg_agentaddress: + state.accountDetails.accountDetails.address1_composite, + pinswg_agentphonenumber: + state.accountDetails.accountDetails.telephone1, + pinswg_typeofinvolvement: + state.accountDetails.accountDetails.pinswg_typeofinvolvement } }; }; diff --git a/locales/cy/account.json b/locales/cy/account.json index 9602dfe0..cc6051ed 100644 --- a/locales/cy/account.json +++ b/locales/cy/account.json @@ -18,6 +18,7 @@ "register-new-account-email-address-label": "Cyfeiriad e-bost", "register-new-account-email-address-label-errormsg": "Rhowch gyfeiriad e-bost dilys", "register-new-account-phone-label": "Rhif ffôn", + "register-new-account-company-label": "Cwmni/Grŵp", "register-new-account-password-label": "Cyfrinair", "register-new-account-password-label-errormsg": "Cyfrinair", "register-new-account-confirm-password-label": "Cadarnhau cyfrinair", diff --git a/locales/en/account.json b/locales/en/account.json index 8075d789..ae2b33dd 100644 --- a/locales/en/account.json +++ b/locales/en/account.json @@ -18,6 +18,7 @@ "register-new-account-email-address-label": "Email address", "register-new-account-email-address-label-errormsg": "Enter a valid email address", "register-new-account-phone-label": "Telephone", + "register-new-account-company-label": "Company/Group", "register-new-account-password-label": "Password", "register-new-account-password-label-errormsg": "Password", "register-new-account-confirm-password-label": "Confirm password", diff --git a/pages/api/endpoint/getsipsmedia_api.js b/pages/api/endpoint/getsipsmedia_api.js index 91c973cd..1158417e 100644 --- a/pages/api/endpoint/getsipsmedia_api.js +++ b/pages/api/endpoint/getsipsmedia_api.js @@ -15,7 +15,7 @@ export default async function ApiProxy(req, res) { const queryUrl = "pinswg_eventrecordings?$count=true&$filter=_pinswg_regardingcase_value eq " + caseid + - " and pinswg_publishtoweb eq true&$select=pinswg_videoplatformurl,pinswg_eventrecordingid,pinswg_publishtoweb,pinswg_eventrecordingname,pinswg_eventrecordingpublisheddate,createdon"; + " and pinswg_publishtoweb eq true&$select=pinswg_videoplatformurl,pinswg_eventrecordingid,pinswg_publishtoweb,pinswg_eventrecordingname,pinswg_eventrecordingpublisheddate,createdon,pinswg_description,pinswg_videoplatformurlwelsh"; return relayGet({ queryUrl,