Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d36a56c4c9 | ||
|
|
ebed61799e | ||
|
|
670e98a0a1 | ||
|
|
b6ca73d76a | ||
|
|
7713fc3724 | ||
|
|
33f31ad3c8 | ||
|
|
8e21ec1dd7 | ||
|
|
d05e54c020 | ||
|
|
a43eb76e3a | ||
|
|
011be977a2 | ||
|
|
e3614dba7b | ||
|
|
ecd6075c3a | ||
|
|
f3a05db323 | ||
|
|
ffcccf8981 | ||
|
|
783786b9eb | ||
|
|
20eea5b128 | ||
|
|
869264b7fa | ||
|
|
d0f667ffbb | ||
|
|
f8b7f4fffd | ||
|
|
21f511c34b | ||
|
|
7c4ce131bf | ||
|
|
ddbf2116f5 | ||
|
|
5233f62d59 | ||
|
|
5f78a881c5 | ||
|
|
7f7d4daa8f | ||
|
|
e9d4b65a3d |
+8
-10
@@ -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/
|
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"
|
RELAYURI = "ar-ns-lz-pedw-dev-uks-01.servicebus.windows.net"
|
||||||
RELAYPATH = "ar-hc-lz-pedw-dev-uks-01"
|
RELAYPATH = "ar-hc-lz-pedw-dev-uks-01"
|
||||||
CRMURL = "dv-pedw.crm11.dynamics.com"
|
CRMURL = "devcrm2016.llcdt.gov.wales/DVPINS"
|
||||||
CRMURL_VERSION = "v9.2"
|
CRMURL_VERSION = "v8.2"
|
||||||
|
|
||||||
# //New Test
|
# //New Test
|
||||||
CLIENT_ID = d40b9373-96c2-4b04-8bd8-c2a2fe6444c1
|
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
|
# 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
|
// 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
|
// 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
|
// 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
|
# 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,7 +248,7 @@ SHOW_DEBUG = true
|
|||||||
|
|
||||||
|
|
||||||
// DEV Connection string
|
// 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
|
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
|
||||||
@@ -258,12 +258,12 @@ APPLICATIONINSIGHTS_CONNECTIONSTRING = InstrumentationKey=7a06e24a-793c-47bc-898
|
|||||||
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
|
// 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
|
// 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
|
HIDEERRORLOGS = false
|
||||||
@@ -272,5 +272,3 @@ SHOWSIPS = true
|
|||||||
|
|
||||||
ALLOWED_IPS=::1,203.0.113.42,198.51.100.17
|
ALLOWED_IPS=::1,203.0.113.42,198.51.100.17
|
||||||
UPLOAD_BATCH_COUNT = 5
|
UPLOAD_BATCH_COUNT = 5
|
||||||
|
|
||||||
NRWDOMAIN = rdbmedia.co.uk
|
|
||||||
+79
-55
@@ -476,19 +476,20 @@ export const createRepPDFBlob = async (
|
|||||||
? await blockBlobClient.uploadData(content)
|
? await blockBlobClient.uploadData(content)
|
||||||
: await blockBlobClient.uploadStream(content);
|
: await blockBlobClient.uploadStream(content);
|
||||||
|
|
||||||
const locationMap = [
|
let whichLocation =
|
||||||
{ key: "_IP_-_Comments_", value: "846040038" }, // most specific first
|
repName.indexOf("_IP_") > 0
|
||||||
{ key: "_IP_", value: "846040005" },
|
? "846040005"
|
||||||
{ key: "_Statement_", value: "846040002" },
|
: repName.indexOf("_Statement_") > 0
|
||||||
{ key: "_Questionnaire_", value: "846040001" },
|
? "846040002"
|
||||||
{ key: "_Comments", value: "846040003" },
|
: repName.indexOf("_Questionnaire_") > 0
|
||||||
{ key: "_Impact", value: "846040029" },
|
? "846040001"
|
||||||
{ key: "_Consultation_Response_", value: "846040036" }
|
: repName.indexOf("_Comments") > 0
|
||||||
];
|
? "846040003"
|
||||||
|
: repName.indexOf("_Impact") > 0
|
||||||
const whichLocation =
|
? "846040029"
|
||||||
locationMap.find((item) => repName.includes(item.key))?.value ||
|
: repName.indexOf("_Consultation_Response_") > 0
|
||||||
"846040002";
|
? "846040036"
|
||||||
|
: "846040002";
|
||||||
|
|
||||||
const tags = {
|
const tags = {
|
||||||
containerid: containerName,
|
containerid: containerName,
|
||||||
@@ -617,46 +618,71 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
|||||||
);
|
);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
const fieldName = files[prop][0].fieldName;
|
let whichLocation =
|
||||||
|
files[prop][0].fieldName.indexOf("_Statement_of_Case") >
|
||||||
const whichLocation =
|
0 ||
|
||||||
[
|
files[prop][0].fieldName.indexOf("_-_Statement_of_Case") >
|
||||||
// 1️⃣ LPA docs (grouped)
|
0 ||
|
||||||
{
|
files[prop][0].fieldName.indexOf("_-_Application_Form") >
|
||||||
match: [
|
0 ||
|
||||||
"_Statement_of_Case",
|
files[prop][0].fieldName.indexOf(
|
||||||
"_-_Statement_of_Case",
|
"_-_Site_Ownership_Certificate"
|
||||||
"_-_Application_Form",
|
) > 0 ||
|
||||||
"_-_Site_Ownership_Certificate",
|
files[prop][0].fieldName.indexOf("_-_Decision_Notice") >
|
||||||
"_-_Decision_Notice",
|
0 ||
|
||||||
"_-_Site_Location_Plan",
|
files[prop][0].fieldName.indexOf("_-_Site_Location_Plan") >
|
||||||
"_-_Plans_Drawing_Documents",
|
0 ||
|
||||||
"_-_Additional_Plans_Drawings_Documents",
|
files[prop][0].fieldName.indexOf(
|
||||||
"_-_Design_and_Access_Statement",
|
"_-_Plans_Drawing_Documents"
|
||||||
"_-_NSB_LPA_Additional_Documents",
|
) > 0 ||
|
||||||
"_-_LPA_Correspondence",
|
files[prop][0].fieldName.indexOf(
|
||||||
"_-_LPA_Original_Permission",
|
"_-_Additional_Plans_Drawings_Documents"
|
||||||
"_-_LPA's_Registration_Letter",
|
) > 0 ||
|
||||||
"_-_Environmental_Statement",
|
files[prop][0].fieldName.indexOf(
|
||||||
"_-_Cost_of_Application",
|
"_-_Design_and_Access_Statement"
|
||||||
"_-_Other_Relevant_Material",
|
) > 0 ||
|
||||||
"_-_S106_Agreement_or_Unilateral_Undertaking"
|
files[prop][0].fieldName.indexOf(
|
||||||
],
|
"_-_NSB_LPA_Additional_Documents"
|
||||||
value: "846040000"
|
) > 0 ||
|
||||||
},
|
files[prop][0].fieldName.indexOf("_-_LPA_Correspondence") >
|
||||||
{ match: ["_IP_-_Comments_"], value: "846040038" },
|
0 ||
|
||||||
{
|
files[prop][0].fieldName.indexOf(
|
||||||
match: ["_Consultation_Response_"],
|
"_-_LPA_Original_Permission"
|
||||||
value: "846040036"
|
) > 0 ||
|
||||||
},
|
files[prop][0].fieldName.indexOf(
|
||||||
{ match: ["_Questionnaire_"], value: "846040001" },
|
"_-_LPA's_Registration_Letter"
|
||||||
{ match: ["_Statement_"], value: "846040002" },
|
) > 0 ||
|
||||||
{ match: ["_Comments_"], value: "846040003" },
|
files[prop][0].fieldName.indexOf(
|
||||||
{ match: ["_Impact_"], value: "846040001" },
|
+"_-_Environmental_Statement"
|
||||||
{ match: ["_IP_"], value: "846040005" }
|
) > 0 ||
|
||||||
].find((rule) =>
|
files[prop][0].fieldName.indexOf("_-_Cost_of_Application") >
|
||||||
rule.match.some((key) => fieldName.includes(key))
|
0 ||
|
||||||
)?.value || "846040000";
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_Other_Relevant_Material"
|
||||||
|
) > 0 ||
|
||||||
|
files[prop][0].fieldName.indexOf(
|
||||||
|
"_-_S106_Agreement_or_Unilateral_Undertaking" > 0
|
||||||
|
)
|
||||||
|
? "846040000"
|
||||||
|
: files[prop][0].fieldName.indexOf("_IP_") > 0
|
||||||
|
? "846040005"
|
||||||
|
: files[prop][0].fieldName.indexOf("_Statement_") > 0
|
||||||
|
? "846040002"
|
||||||
|
: files[prop][0].fieldName.indexOf(
|
||||||
|
"_Questionnaire_"
|
||||||
|
) > 0
|
||||||
|
? "846040001"
|
||||||
|
: files[prop][0].fieldName.indexOf("_Comments_") >
|
||||||
|
0
|
||||||
|
? "846040003"
|
||||||
|
: files[prop][0].fieldName.indexOf("_Impact_") >
|
||||||
|
0
|
||||||
|
? "846040001"
|
||||||
|
: files[prop][0].fieldName.indexOf(
|
||||||
|
"_Consultation_Response_"
|
||||||
|
) > 0
|
||||||
|
? "846040036"
|
||||||
|
: "846040000";
|
||||||
|
|
||||||
const tags = {
|
const tags = {
|
||||||
containerid: containerName,
|
containerid: containerName,
|
||||||
@@ -777,8 +803,6 @@ export const uploadSingleFile = async (
|
|||||||
/_Statement_of_Case|_-_Statement_of_Case|_-_Application_Form|_-_Site_Ownership_Certificate|_-_Decision_Notice|_-_Site_Location_Plan|_-_Plans_Drawing_Documents|_-_Additional_Plans_Drawings_Documents|_-_Design_and_Access_Statement|_-_NSB_LPA_Additional_Documents|_-_LPA_Correspondence|_-_LPA_Original_Permission|_-_LPA's_Registration_Letter|_-_Environmental_Statement|_-_Cost_of_Application|_-_Other_Relevant_Material|_-_S106_Agreement_or_Unilateral_Undertaking/,
|
/_Statement_of_Case|_-_Statement_of_Case|_-_Application_Form|_-_Site_Ownership_Certificate|_-_Decision_Notice|_-_Site_Location_Plan|_-_Plans_Drawing_Documents|_-_Additional_Plans_Drawings_Documents|_-_Design_and_Access_Statement|_-_NSB_LPA_Additional_Documents|_-_LPA_Correspondence|_-_LPA_Original_Permission|_-_LPA's_Registration_Letter|_-_Environmental_Statement|_-_Cost_of_Application|_-_Other_Relevant_Material|_-_S106_Agreement_or_Unilateral_Undertaking/,
|
||||||
value: "846040000"
|
value: "846040000"
|
||||||
},
|
},
|
||||||
|
|
||||||
{ pattern: /_IP_-_Comments_/, value: "846040038" },
|
|
||||||
{ pattern: /_IP_/, value: "846040005" },
|
{ pattern: /_IP_/, value: "846040005" },
|
||||||
{ pattern: /_Statement_/, value: "846040002" },
|
{ pattern: /_Statement_/, value: "846040002" },
|
||||||
{ pattern: /_Questionnaire_/, value: "846040001" },
|
{ pattern: /_Questionnaire_/, value: "846040001" },
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export const getSelectQuery = (appealTypeName) => {
|
|||||||
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,pinswg_startdateofevent,pinswg_typeofevent";
|
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
case "pinswg_sipses":
|
case "pinswg_sipses":
|
||||||
// return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
// return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||||
return "&$select=pinswg_casedeadline,_pinswg_projecttype_value,pinswg_eiarequired,pinswg_anticipatedgridrefeasting,pinswg_anticipatedgridrefnorthing,_pinswg_appellant_value,pinswg_name,_pinswg_associatedlpa_value,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,statuscode,pinswg_casestage,_pinswg_sipscase_value,pinswg_writtenacceptanceofnotification,pinswg_validnoticeofintentiontosubmit,pinswg_deadlineforsubmissionofapplication,pinswg_screeningstartdate,pinswg_eiatargetdate,pinswg_targetextended,pinswg_directionissueddate,pinswg_eiarequired,pinswg_scopingstartdate,pinswg_scopingtargetdate,pinswg_scopingtargetextended,pinswg_scopingoutcomeissueddate,pinswg_essubmitted,pinswg_deemedmarinelicenseappliedfor,pinswg_validationdeadlineextension,pinswg_consultationopen,pinswg_consultationclose,pinswg_reportissuedtowelshministers,pinswg_decisionissuedtoapplicant,pinswg_decisionoutcome,pinswg_redetermination,pinswg_redeterminationconsultationdeadline";
|
return "&$select=_pinswg_projecttype_value,pinswg_eiarequired,pinswg_anticipatedgridrefeasting,pinswg_anticipatedgridrefnorthing,_pinswg_appellant_value,pinswg_name,_pinswg_associatedlpa_value,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,statuscode,pinswg_casestage,_pinswg_sipscase_value,pinswg_writtenacceptanceofnotification,pinswg_validnoticeofintentiontosubmit,pinswg_deadlineforsubmissionofapplication,pinswg_screeningstartdate,pinswg_eiatargetdate,pinswg_targetextended,pinswg_directionissueddate,pinswg_eiarequired,pinswg_scopingstartdate,pinswg_scopingtargetdate,pinswg_scopingtargetextended,pinswg_scopingoutcomeissueddate,pinswg_essubmitted,pinswg_deemedmarinelicenseappliedfor,pinswg_validationdeadlineextension,pinswg_casesuspensionstartdate,pinswg_casesuspensionenddate,pinswg_consultationopen,pinswg_consultationclose,pinswg_reportissuedtowelshministers,pinswg_decisionissuedtoapplicant,pinswg_decisionoutcome,pinswg_redetermination,pinswg_redeterminationconsultationdeadline";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -274,11 +274,3 @@ export const getPortalModuleDetailsProxy = (appealType, caseReference) => {
|
|||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCaseStatus = async (appealType, caseReference) => {
|
|
||||||
const route = buildFileQuery("/api/endpoint/getStatusCounts_api", {});
|
|
||||||
|
|
||||||
return getJson(withBaseUrl(BASE_URL, route)).catch((error) => {
|
|
||||||
consoleLogger(error);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ import {
|
|||||||
getPartSavedAppeal,
|
getPartSavedAppeal,
|
||||||
getIsPublishedbyID,
|
getIsPublishedbyID,
|
||||||
getPortalModuleDetails,
|
getPortalModuleDetails,
|
||||||
getPortalModuleDetailsProxy,
|
getPortalModuleDetailsProxy
|
||||||
getCaseStatus
|
|
||||||
} from "./caseDirectService";
|
} from "./caseDirectService";
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@@ -38,6 +37,5 @@ export {
|
|||||||
getPartSavedAppeal,
|
getPartSavedAppeal,
|
||||||
getIsPublishedbyID,
|
getIsPublishedbyID,
|
||||||
getPortalModuleDetails,
|
getPortalModuleDetails,
|
||||||
getPortalModuleDetailsProxy,
|
getPortalModuleDetailsProxy
|
||||||
getCaseStatus
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -274,14 +274,10 @@ export const sendRepCompleteMessage = async (
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setRepInvolvment = async (caseid, contactid, involvement) => {
|
export const setRepInvolvment = async (caseid, contactid) => {
|
||||||
var queryUrl = buildFileQuery("/api/file/createrepinvolvement_api");
|
var queryUrl = buildFileQuery("/api/file/createrepinvolvement_api");
|
||||||
|
|
||||||
var data = {
|
var data = { "incidentid": caseid, "contactid": contactid };
|
||||||
"incidentid": caseid,
|
|
||||||
"contactid": contactid,
|
|
||||||
"involvement": involvement
|
|
||||||
};
|
|
||||||
var config = {
|
var config = {
|
||||||
method: "post",
|
method: "post",
|
||||||
url: queryUrl,
|
url: queryUrl,
|
||||||
|
|||||||
@@ -1,94 +0,0 @@
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import { parseCookies, setCookie } from "nookies";
|
|
||||||
import { useEffect, useRef, useState } from "react";
|
|
||||||
|
|
||||||
const COOKIE_NAME = "pedwAiPolicyNoticeHidden";
|
|
||||||
const COOKIE_DAYS = 7;
|
|
||||||
|
|
||||||
export default function AIPolicyNotice() {
|
|
||||||
let { t } = useTranslation();
|
|
||||||
|
|
||||||
const [hasCheckedCookie, setHasCheckedCookie] = useState(false);
|
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
|
||||||
const dismissButtonRef = useRef(null);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const cookies = parseCookies();
|
|
||||||
const isHidden = cookies[COOKIE_NAME] === "true";
|
|
||||||
|
|
||||||
setIsOpen(!isHidden);
|
|
||||||
setHasCheckedCookie(true);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (isOpen && dismissButtonRef.current) {
|
|
||||||
dismissButtonRef.current.focus();
|
|
||||||
}
|
|
||||||
}, [isOpen]);
|
|
||||||
|
|
||||||
const dismissNotice = () => {
|
|
||||||
const now = new Date();
|
|
||||||
const expDate = new Date(now);
|
|
||||||
|
|
||||||
expDate.setDate(now.getDate() + COOKIE_DAYS);
|
|
||||||
|
|
||||||
setCookie(null, COOKIE_NAME, "true", {
|
|
||||||
path: "/",
|
|
||||||
expires: expDate
|
|
||||||
});
|
|
||||||
|
|
||||||
setIsOpen(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!hasCheckedCookie || !isOpen) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className="modal aiModal fade show"
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
padding: "1rem"
|
|
||||||
}}
|
|
||||||
aria-hidden={false}
|
|
||||||
>
|
|
||||||
<div className="modal-dialog" style={{ margin: 0 }}>
|
|
||||||
<div
|
|
||||||
className="modal-content govuk-!-padding-6"
|
|
||||||
role="dialog"
|
|
||||||
aria-modal="true"
|
|
||||||
aria-labelledby="ai-policy-notice-title"
|
|
||||||
>
|
|
||||||
<h2
|
|
||||||
id="ai-policy-notice-title"
|
|
||||||
className="govuk-heading-m govuk-!-margin-bottom-3"
|
|
||||||
>
|
|
||||||
{t("home:ai-policy-notice-title")}
|
|
||||||
</h2>
|
|
||||||
<p className="govuk-body">
|
|
||||||
{t("home:ai-policy-notice-paragraph-one")}
|
|
||||||
</p>
|
|
||||||
<p className="govuk-body govuk-!-margin-bottom-4">
|
|
||||||
{t("home:ai-policy-notice-paragraph-two")}
|
|
||||||
</p>
|
|
||||||
<button
|
|
||||||
ref={dismissButtonRef}
|
|
||||||
type="button"
|
|
||||||
className="govuk-button govuk-!-margin-bottom-0"
|
|
||||||
data-module="govuk-button"
|
|
||||||
onClick={dismissNotice}
|
|
||||||
>
|
|
||||||
{t("home:ai-policy-notice-dismiss-button")}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="modal-backdrop fade show"
|
|
||||||
style={{ opacity: 0.2 }}
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -140,12 +140,12 @@ const RenderPickList = ({
|
|||||||
input,
|
input,
|
||||||
optionsArr,
|
optionsArr,
|
||||||
meta: { touched, error },
|
meta: { touched, error },
|
||||||
errorMsg
|
errorMsg,
|
||||||
}) => {
|
}) => {
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
optionsArr = [
|
optionsArr = [
|
||||||
t("account:account-preferred-language-english") + ":846040001",
|
t("account:account-preferred-language-english") + ":846040001",
|
||||||
t("account:account-preferred-language-welsh") + ":846040000"
|
t("account:account-preferred-language-welsh") + ":846040000",
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -202,7 +202,7 @@ let PersonalDetails = (props) => {
|
|||||||
load,
|
load,
|
||||||
pristine,
|
pristine,
|
||||||
reset,
|
reset,
|
||||||
submitting
|
submitting,
|
||||||
} = props;
|
} = props;
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
|
|
||||||
@@ -324,8 +324,8 @@ let PersonalDetails = (props) => {
|
|||||||
label={t("account:account-telephone-label")}
|
label={t("account:account-telephone-label")}
|
||||||
/>
|
/>
|
||||||
<Field
|
<Field
|
||||||
name="pinswg_companyname"
|
name="company"
|
||||||
id="pinswg_companyname"
|
id="company"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
type="text"
|
type="text"
|
||||||
className="govuk-input govuk-input--width-20"
|
className="govuk-input govuk-input--width-20"
|
||||||
@@ -444,7 +444,7 @@ const mapStateToProps = (state) => {
|
|||||||
searchResultsObj: state.searchResultsObj,
|
searchResultsObj: state.searchResultsObj,
|
||||||
formData: state.formData,
|
formData: state.formData,
|
||||||
appealType: state.appealType,
|
appealType: state.appealType,
|
||||||
accountDetails: state.accountDetails
|
accountDetails: state.accountDetails,
|
||||||
//form: state.form,
|
//form: state.form,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -453,7 +453,7 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
return {
|
return {
|
||||||
setCurrentSection: (currentSection) => {
|
setCurrentSection: (currentSection) => {
|
||||||
dispatch(setCurrentSection(currentSection));
|
dispatch(setCurrentSection(currentSection));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -484,12 +484,12 @@ const selector = formValueSelector("personalDetailsForm"); // <-- same as form n
|
|||||||
PersonalDetails = reduxForm({
|
PersonalDetails = reduxForm({
|
||||||
form: "personalDetailsForm",
|
form: "personalDetailsForm",
|
||||||
enableReinitialize: true, // this is needed!!
|
enableReinitialize: true, // this is needed!!
|
||||||
destroyOnUnmount: false
|
destroyOnUnmount: false,
|
||||||
})(PersonalDetails);
|
})(PersonalDetails);
|
||||||
|
|
||||||
// You have to connect() to any reducers that you wish to connect to yourself
|
// You have to connect() to any reducers that you wish to connect to yourself
|
||||||
PersonalDetails = connect((state) => ({
|
PersonalDetails = connect((state) => ({
|
||||||
initialValues: state.accountDetails.accountDetails // pull initial values from account reducer
|
initialValues: state.accountDetails.accountDetails, // pull initial values from account reducer
|
||||||
}))(PersonalDetails);
|
}))(PersonalDetails);
|
||||||
|
|
||||||
export default PersonalDetails;
|
export default PersonalDetails;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
handleSubmit,
|
handleSubmit,
|
||||||
value,
|
value,
|
||||||
setPersonalDetailsComplete,
|
setPersonalDetailsComplete,
|
||||||
setAccountUpdatedComplete
|
setAccountUpdatedComplete,
|
||||||
} = props;
|
} = props;
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ const BuildCheckPersonalDetails = (props) => {
|
|||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{
|
{
|
||||||
props.props.props.form.personalDetailsForm.values
|
props.props.props.form.personalDetailsForm.values
|
||||||
.pinswg_companyname
|
.company
|
||||||
}
|
}
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__actions">
|
<dd className="govuk-summary-list__actions">
|
||||||
@@ -354,7 +354,7 @@ const mapStateToProps = (state) => {
|
|||||||
searchResultsObj: state.searchResultsObj,
|
searchResultsObj: state.searchResultsObj,
|
||||||
formData: state.formData,
|
formData: state.formData,
|
||||||
appealType: state.appealType,
|
appealType: state.appealType,
|
||||||
accountDetails: state.accountDetails
|
accountDetails: state.accountDetails,
|
||||||
//form: state.form,
|
//form: state.form,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -363,7 +363,7 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
return {
|
return {
|
||||||
setCurrentSection: (currentSection) => {
|
setCurrentSection: (currentSection) => {
|
||||||
dispatch(setCurrentSection(currentSection));
|
dispatch(setCurrentSection(currentSection));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ const PersonalDetailsComplete = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
doUpdate();
|
doUpdate();
|
||||||
}, [loggedinUserId, formValues, prefLang, userLang]);
|
}, [loggedinUserId, formValues, prefLang]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ const RegisterForm = (props) => {
|
|||||||
setRegisterFormComplete,
|
setRegisterFormComplete,
|
||||||
setAccountCreatedComplete,
|
setAccountCreatedComplete,
|
||||||
loggedInUserEmail,
|
loggedInUserEmail,
|
||||||
emailaddress1
|
emailaddress1,
|
||||||
} = props;
|
} = props;
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
|
|
||||||
@@ -199,17 +199,6 @@ const RegisterForm = (props) => {
|
|||||||
"account:register-new-account-phone-label"
|
"account:register-new-account-phone-label"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Field
|
|
||||||
name="company"
|
|
||||||
id="company"
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
validate={[required]}
|
|
||||||
label={t(
|
|
||||||
"account:register-new-account-company-label"
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset className="govuk-fieldset">
|
<fieldset className="govuk-fieldset">
|
||||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||||
@@ -323,8 +312,8 @@ const mapStateToProps = (state, props) => {
|
|||||||
appealType: state.appealType,
|
appealType: state.appealType,
|
||||||
//form: state.form,
|
//form: state.form,
|
||||||
initialValues: {
|
initialValues: {
|
||||||
emailaddress1: props.loggedInUserEmail
|
emailaddress1: props.loggedInUserEmail,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -332,7 +321,7 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
return {
|
return {
|
||||||
setCurrentSection: (currentSection) => {
|
setCurrentSection: (currentSection) => {
|
||||||
dispatch(setCurrentSection(currentSection));
|
dispatch(setCurrentSection(currentSection));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -345,6 +334,6 @@ export default connect(
|
|||||||
reduxForm({
|
reduxForm({
|
||||||
form: "accountRegisterForm",
|
form: "accountRegisterForm",
|
||||||
enableReinitialize: true,
|
enableReinitialize: true,
|
||||||
destroyOnUnmount: false
|
destroyOnUnmount: false,
|
||||||
})(RegisterForm)
|
})(RegisterForm)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,15 +28,9 @@ function AppealsTab(props) {
|
|||||||
const [fieldSortState, setfieldSortState] = useState("desc");
|
const [fieldSortState, setfieldSortState] = useState("desc");
|
||||||
const [loginToWatch, setLoginToWatch] = useState("true");
|
const [loginToWatch, setLoginToWatch] = useState("true");
|
||||||
|
|
||||||
const {
|
const searchDetailsObj = props.searchResultsObj.searchDetailsObj || {};
|
||||||
searchResultsObj: searchResultsState,
|
const resultsArr = props.searchResultsObj.searchResultsObj.value || [];
|
||||||
setSearchResults,
|
const searchResultsObj = props.searchResultsObj.searchResultsObj;
|
||||||
setSearchDetails
|
|
||||||
} = props;
|
|
||||||
|
|
||||||
const searchDetailsObj = searchResultsState.searchDetailsObj || {};
|
|
||||||
const resultsArr = searchResultsState.searchResultsObj.value || [];
|
|
||||||
const searchResultsObj = searchResultsState.searchResultsObj;
|
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -81,14 +75,20 @@ function AppealsTab(props) {
|
|||||||
fieldSort,
|
fieldSort,
|
||||||
selectedOption
|
selectedOption
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
setSearchResults(data);
|
props.setSearchResults(data); // ✅ use props, not import
|
||||||
return getSearchDetailsPaged(data).then((details) => {
|
return getSearchDetailsPaged(data).then((details) => {
|
||||||
setSearchDetails(details);
|
props.setSearchDetails(details); // ✅ use props, not import
|
||||||
setShowSpinnerState(false);
|
setShowSpinnerState(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[selectedOption, setSearchDetails, setSearchResults]
|
[
|
||||||
|
advancedSearch,
|
||||||
|
searchString,
|
||||||
|
selectedOption,
|
||||||
|
props.setSearchDetails,
|
||||||
|
props.setSearchResults
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -255,8 +255,6 @@ function AppealsTab(props) {
|
|||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"statuscode":
|
|
||||||
item.statuscode,
|
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
item.ticketnumber,
|
item.ticketnumber,
|
||||||
"currentReference":
|
"currentReference":
|
||||||
|
|||||||
@@ -936,16 +936,17 @@ const DocumentsTab = (props) => {
|
|||||||
)
|
)
|
||||||
.then((data) => data)
|
.then((data) => data)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
setDocumentDetails(data);
|
props.setDocumentDetails(data);
|
||||||
setShowSpinnerState(false);
|
setShowSpinnerState(false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
|
props.incidentid,
|
||||||
selectedOption,
|
selectedOption,
|
||||||
selectedDocumentType,
|
selectedDocumentType,
|
||||||
selectedWeeks,
|
selectedWeeks,
|
||||||
selectedDocumentOrigin,
|
selectedDocumentOrigin,
|
||||||
setDocumentDetails
|
props.setDocumentDetails
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -956,7 +957,7 @@ const DocumentsTab = (props) => {
|
|||||||
orderBy,
|
orderBy,
|
||||||
fieldSort
|
fieldSort
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
setDocumentDetails(data);
|
props.setDocumentDetails(data);
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1059,7 +1060,7 @@ const DocumentsTab = (props) => {
|
|||||||
selectedDocumentType,
|
selectedDocumentType,
|
||||||
selectedWeeks
|
selectedWeeks
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
setDocumentDetails(data);
|
props.setDocumentDetails(data);
|
||||||
setDocumentSearchState(true);
|
setDocumentSearchState(true);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
@@ -1071,11 +1072,13 @@ const DocumentsTab = (props) => {
|
|||||||
//const searchDocumentResultsObj = docDetailsObj();
|
//const searchDocumentResultsObj = docDetailsObj();
|
||||||
}, [
|
}, [
|
||||||
incidentid,
|
incidentid,
|
||||||
setDocumentDetails,
|
props.setDocumentDetails,
|
||||||
selectedOption,
|
selectedOption,
|
||||||
selectedDocumentType,
|
selectedDocumentType,
|
||||||
fieldSortState,
|
fieldSortState,
|
||||||
orderByState,
|
orderByState,
|
||||||
|
getDocumentTypes,
|
||||||
|
getOrigin,
|
||||||
getDocumentResults,
|
getDocumentResults,
|
||||||
lang,
|
lang,
|
||||||
selectedWeeks
|
selectedWeeks
|
||||||
@@ -1131,7 +1134,7 @@ const DocumentsTab = (props) => {
|
|||||||
<select
|
<select
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setSelectedWeeks(e.target.value);
|
setSelectedWeeks(e.target.value);
|
||||||
setCurrentPage(1);
|
props.setCurrentPage(1);
|
||||||
}}
|
}}
|
||||||
value={selectedWeeks}
|
value={selectedWeeks}
|
||||||
className="govuk-select"
|
className="govuk-select"
|
||||||
|
|||||||
+72
-115
@@ -3,16 +3,9 @@ import { setCurrentPage } from "../../store/currentView/action";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { formatDates } from "../utils";
|
import { formatDates } from "../utils";
|
||||||
import {
|
|
||||||
getLivePublishedEvent,
|
|
||||||
isEventLiveNow
|
|
||||||
} from "./summary/utils/liveEvent";
|
|
||||||
import { useRouter } from "next/router";
|
|
||||||
|
|
||||||
const EventsDetails = (props) => {
|
const EventsDetails = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
const router = useRouter();
|
|
||||||
const { locale } = router;
|
|
||||||
|
|
||||||
const EventView = (eventsArr) => {
|
const EventView = (eventsArr) => {
|
||||||
eventsArr = eventsArr.value;
|
eventsArr = eventsArr.value;
|
||||||
@@ -30,6 +23,8 @@ const EventsDetails = (props) => {
|
|||||||
return obj.hasOwnProperty(property) && obj[property] !== null;
|
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//console.log(eventsArr.length > 0);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
eventsArr.length > 0 && (
|
eventsArr.length > 0 && (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
@@ -68,26 +63,76 @@ const EventsDetails = (props) => {
|
|||||||
{item.pinswg_eventname}
|
{item.pinswg_eventname}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="eventColumn">
|
||||||
{hasOwnPropertyAndNotNull(
|
{hasOwnPropertyAndNotNull(
|
||||||
item,
|
item,
|
||||||
[
|
"pinswg_eventaddressline1"
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
|
||||||
]
|
|
||||||
) && (
|
) && (
|
||||||
|
<>
|
||||||
<div>
|
<div>
|
||||||
<b>
|
<b>
|
||||||
{t(
|
{t(
|
||||||
"case:event-type-of-event-label"
|
"case:event-address-label"
|
||||||
)}
|
)}
|
||||||
</b>
|
</b>
|
||||||
:{" "}
|
:
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
{
|
{
|
||||||
item[
|
item.pinswg_eventaddressline1
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
}
|
||||||
]
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddressline2"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddressline2
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresstown"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresstown
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresscounty"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresscounty
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{hasOwnPropertyAndNotNull(
|
||||||
|
item,
|
||||||
|
"pinswg_eventaddresscounty"
|
||||||
|
) && (
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
item.pinswg_eventaddresspostcode
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{/* type of event
|
||||||
|
start date date of event - end date of event
|
||||||
|
|
||||||
|
if virtual event no address showNoOfRecords
|
||||||
|
show event address */}
|
||||||
|
<div className="eventColumn">
|
||||||
{hasOwnPropertyAndNotNull(
|
{hasOwnPropertyAndNotNull(
|
||||||
item,
|
item,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
@@ -126,114 +171,26 @@ const EventsDetails = (props) => {
|
|||||||
<div className="eventColumn">
|
<div className="eventColumn">
|
||||||
{hasOwnPropertyAndNotNull(
|
{hasOwnPropertyAndNotNull(
|
||||||
item,
|
item,
|
||||||
"pinswg_eventaddressline1"
|
[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue",
|
||||||
|
]
|
||||||
) && (
|
) && (
|
||||||
<>
|
<div>
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: "flex"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<b>
|
<b>
|
||||||
{t(
|
{t(
|
||||||
"case:event-address-label"
|
"case:event-type-of-event-label"
|
||||||
)}
|
)}
|
||||||
</b>
|
</b>
|
||||||
:
|
:{" "}
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display:
|
|
||||||
"flex",
|
|
||||||
marginLeft:
|
|
||||||
"10px",
|
|
||||||
flexDirection:
|
|
||||||
"column"
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{hasOwnPropertyAndNotNull(
|
|
||||||
item,
|
|
||||||
"pinswg_eventaddressline1"
|
|
||||||
) && (
|
|
||||||
<span>
|
|
||||||
{
|
{
|
||||||
item.pinswg_eventaddressline1
|
item[
|
||||||
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{hasOwnPropertyAndNotNull(
|
|
||||||
item,
|
|
||||||
"pinswg_eventaddressline2"
|
|
||||||
) && (
|
|
||||||
<span>
|
|
||||||
{
|
|
||||||
item.pinswg_eventaddressline2
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{hasOwnPropertyAndNotNull(
|
|
||||||
item,
|
|
||||||
"pinswg_eventaddresstown"
|
|
||||||
) && (
|
|
||||||
<span>
|
|
||||||
{
|
|
||||||
item.pinswg_eventaddresstown
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{hasOwnPropertyAndNotNull(
|
|
||||||
item,
|
|
||||||
"pinswg_eventaddresscounty"
|
|
||||||
) && (
|
|
||||||
<span>
|
|
||||||
{
|
|
||||||
item.pinswg_eventaddresscounty
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{hasOwnPropertyAndNotNull(
|
|
||||||
item,
|
|
||||||
"pinswg_eventaddresscounty"
|
|
||||||
) && (
|
|
||||||
<span>
|
|
||||||
{
|
|
||||||
item.pinswg_eventaddresspostcode
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
{/* type of event
|
|
||||||
start date date of event - end date of event
|
|
||||||
|
|
||||||
if virtual event no address showNoOfRecords
|
|
||||||
show event address */}
|
|
||||||
|
|
||||||
{hasOwnPropertyAndNotNull(
|
|
||||||
item,
|
|
||||||
"pinswg_linktotheevent"
|
|
||||||
) &&
|
|
||||||
isEventLiveNow(item) && (
|
|
||||||
<div className="eventColumn">
|
|
||||||
<a
|
|
||||||
href={
|
|
||||||
locale === "en"
|
|
||||||
? item.pinswg_linktotheevent
|
|
||||||
: item.pinswg_linktotheeventstreamwelsh
|
|
||||||
}
|
|
||||||
className="govuk-link"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"case:live-event-link"
|
|
||||||
)}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
)}{" "}
|
)}{" "}
|
||||||
@@ -246,7 +203,7 @@ const EventsDetails = (props) => {
|
|||||||
|
|
||||||
const mapStateToProps = (state) => {
|
const mapStateToProps = (state) => {
|
||||||
return {
|
return {
|
||||||
...state
|
...state,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -257,7 +214,7 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
},
|
},
|
||||||
setCurrentPage: (currentPage) => {
|
setCurrentPage: (currentPage) => {
|
||||||
dispatch(setCurrentPage(currentPage));
|
dispatch(setCurrentPage(currentPage));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -447,19 +447,19 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const sourceMedia = mediaObj?.value;
|
const mediaArr = mediaObj?.value || [];
|
||||||
const isActive = whichTab ? whichTab === "case-media" : true;
|
const isActive = whichTab ? whichTab === "case-media" : true;
|
||||||
|
|
||||||
// Build list of playable items (publishable only)
|
// Build list of playable items (publishable only)
|
||||||
const videoItems = useMemo(() => {
|
const videoItems = useMemo(() => {
|
||||||
const isWelsh = router.locale === "cy";
|
const isWelsh = router.locale === "cy";
|
||||||
|
|
||||||
return (sourceMedia || [])
|
return (mediaArr || [])
|
||||||
.filter((x) => x?.pinswg_publishtoweb)
|
.filter((x) => x?.pinswg_publishtoweb)
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
const link = isWelsh
|
const link = isWelsh
|
||||||
? item.pinswg_videoplatformurlwelsh
|
? item.pinswg_mediaLinkCY
|
||||||
: item.pinswg_videoplatformurl;
|
: item.pinswg_mediaLinkEN;
|
||||||
|
|
||||||
const videoId = extractYouTubeId(link);
|
const videoId = extractYouTubeId(link);
|
||||||
if (!videoId) return null;
|
if (!videoId) return null;
|
||||||
@@ -468,19 +468,19 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
|
|||||||
key:
|
key:
|
||||||
item.pinswg_documentid ||
|
item.pinswg_documentid ||
|
||||||
item.pinswg_mediaid ||
|
item.pinswg_mediaid ||
|
||||||
`${item.pinswg_eventrecordingid}-${videoId}`,
|
`${item.pinswg_name}-${videoId}`,
|
||||||
videoId,
|
videoId,
|
||||||
name: item.pinswg_eventrecordingname || "Video",
|
name: item.pinswg_name || "Video",
|
||||||
description: item.pinswg_description || "",
|
description: item.pinswg_description || "",
|
||||||
// If you later store duration in CRM, map it here (e.g. "03:42")
|
// If you later store duration in CRM, map it here (e.g. "03:42")
|
||||||
duration: item.pinswg_duration || null,
|
duration: item.pinswg_duration || null,
|
||||||
thumbnailHQ: `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`,
|
thumbnailHQ: `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`,
|
||||||
thumbnailMax: `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`,
|
thumbnailMax: `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`,
|
||||||
raw: item
|
raw: item,
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
}, [sourceMedia, router.locale]);
|
}, [mediaArr, router.locale]);
|
||||||
|
|
||||||
const [selectedIndex, setSelectedIndex] = useState(0);
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
||||||
|
|
||||||
|
|||||||
@@ -2,22 +2,22 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
RenderCondtionalRadioList,
|
RenderCondtionalRadioList,
|
||||||
|
RenderPickList,
|
||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
shouldDisableButton
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
import RepresentationTypeSelectorBlock from "./elements/RepresentationTypeSelectorBlock";
|
|
||||||
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import {
|
import {
|
||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
setFilesForRepresentations
|
setFilesForRepresentations,
|
||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const ConsultationAgent = (props) => {
|
const ConsultationAgent = (props) => {
|
||||||
@@ -36,23 +36,9 @@ const ConsultationAgent = (props) => {
|
|||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations,
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed
|
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
const persistedRepresentationType =
|
|
||||||
currentView?.caseReference?.repDetails?.representationType;
|
|
||||||
const [typeSelectionConfirmed, setTypeSelectionConfirmed] = useState(
|
|
||||||
!!persistedRepresentationType
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (persistedRepresentationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
}
|
|
||||||
}, [persistedRepresentationType]);
|
|
||||||
|
|
||||||
if (JSON.stringify(formObj) != "{}") {
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
setRepFileName(formObj.representationForm.values);
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
@@ -77,43 +63,63 @@ const ConsultationAgent = (props) => {
|
|||||||
));
|
));
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
const selectedRepresentationType =
|
|
||||||
formObj?.representationForm?.values?.representationType ||
|
|
||||||
props.representationType;
|
|
||||||
|
|
||||||
const isTypeConfirmed =
|
|
||||||
!!selectedRepresentationType && typeSelectionConfirmed;
|
|
||||||
|
|
||||||
const selectedRepresentationTypeDisplay =
|
|
||||||
router.locale == "cy"
|
|
||||||
? selectedRepresentationType == "Questionnaire"
|
|
||||||
? "Holiadur"
|
|
||||||
: selectedRepresentationType == "Statement"
|
|
||||||
? "Datganiad"
|
|
||||||
: selectedRepresentationType == "Final comments"
|
|
||||||
? "Sylwadau terfynol"
|
|
||||||
: selectedRepresentationType
|
|
||||||
: selectedRepresentationType;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<RepresentationTypeSelectorBlock
|
<div className="govuk-grid-row">
|
||||||
t={t}
|
<div className="govuk-form-group">
|
||||||
headingText={t(
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
"myrepresentations:consultation-from-an-agent-heading"
|
"myrepresentations:consultation-from-an-agent-heading"
|
||||||
)}
|
)}
|
||||||
kindLabelText={t(
|
</h2>
|
||||||
|
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
"myrepresentations:kind-of-consultation-label"
|
"myrepresentations:kind-of-consultation-label"
|
||||||
)}
|
)}
|
||||||
isTypeSelected={isTypeConfirmed}
|
</label>
|
||||||
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
|
||||||
representationType={selectedRepresentationType}
|
<Field
|
||||||
setTypeSelectionConfirmed={setTypeSelectionConfirmed}
|
name="representationType"
|
||||||
onRepresentationTypeChange={onRepresentationTypeChange}
|
component={RenderPickList}
|
||||||
onTypeSelectionConfirmed={onTypeSelectionConfirmed}
|
datafieldname="representationType"
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
optionsArr={
|
||||||
|
appellantApplicantRepresentationArr
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
{isTypeConfirmed && (
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -140,7 +146,8 @@ const ConsultationAgent = (props) => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{selectedRepresentationType ==
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
"Consultation Response"
|
"Consultation Response"
|
||||||
? t(
|
? t(
|
||||||
"myrepresentations:enter-comment-label"
|
"myrepresentations:enter-comment-label"
|
||||||
@@ -153,7 +160,8 @@ const ConsultationAgent = (props) => {
|
|||||||
className="govuk-fieldset"
|
className="govuk-fieldset"
|
||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
{selectedRepresentationType ==
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
"Consultation Response" && (
|
"Consultation Response" && (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
@@ -257,7 +265,8 @@ const ConsultationAgent = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{isTypeConfirmed && (
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<button
|
<button
|
||||||
@@ -266,7 +275,7 @@ const ConsultationAgent = (props) => {
|
|||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
disabled={shouldDisableButton({
|
disabled={shouldDisableButton({
|
||||||
props,
|
props,
|
||||||
formObj
|
formObj,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}
|
{t("common:continue-button")}
|
||||||
@@ -340,7 +349,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
|
|
||||||
setFilesForRepresentations: (fileList) => {
|
setFilesForRepresentations: (fileList) => {
|
||||||
dispatch(setFilesForRepresentations(fileList));
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
@@ -350,6 +359,6 @@ export default connect(
|
|||||||
reduxForm({
|
reduxForm({
|
||||||
form: "representationForm",
|
form: "representationForm",
|
||||||
enableReinitialize: true,
|
enableReinitialize: true,
|
||||||
destroyOnUnmount: false
|
destroyOnUnmount: false,
|
||||||
})(ConsultationAgent)
|
})(ConsultationAgent)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,21 +2,21 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
|
RenderPickList,
|
||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
shouldDisableButton
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
import RepresentationTypeSelectorBlock from "./elements/RepresentationTypeSelectorBlock";
|
|
||||||
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import {
|
import {
|
||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
setFilesForRepresentations
|
setFilesForRepresentations,
|
||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const ConsultationAppellant = (props) => {
|
const ConsultationAppellant = (props) => {
|
||||||
@@ -35,23 +35,9 @@ const ConsultationAppellant = (props) => {
|
|||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations,
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed
|
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
const persistedRepresentationType =
|
|
||||||
currentView?.caseReference?.repDetails?.representationType;
|
|
||||||
const [typeSelectionConfirmed, setTypeSelectionConfirmed] = useState(
|
|
||||||
!!persistedRepresentationType
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (persistedRepresentationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
}
|
|
||||||
}, [persistedRepresentationType]);
|
|
||||||
|
|
||||||
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
||||||
|
|
||||||
if (JSON.stringify(formObj) != "{}") {
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
@@ -76,47 +62,66 @@ const ConsultationAppellant = (props) => {
|
|||||||
index === self.findIndex((t) => t.name === value.name)
|
index === self.findIndex((t) => t.name === value.name)
|
||||||
);
|
);
|
||||||
|
|
||||||
const selectedRepresentationType =
|
|
||||||
formObj?.representationForm?.values?.representationType ||
|
|
||||||
props.representationType;
|
|
||||||
|
|
||||||
const isTypeConfirmed =
|
|
||||||
!!selectedRepresentationType && typeSelectionConfirmed;
|
|
||||||
|
|
||||||
const selectedRepresentationTypeDisplay =
|
|
||||||
router.locale == "cy"
|
|
||||||
? selectedRepresentationType == "Questionnaire"
|
|
||||||
? "Holiadur"
|
|
||||||
: selectedRepresentationType == "Statement"
|
|
||||||
? "Datganiad"
|
|
||||||
: selectedRepresentationType == "Final comments"
|
|
||||||
? "Sylwadau terfynol"
|
|
||||||
: selectedRepresentationType
|
|
||||||
: selectedRepresentationType;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<RepresentationTypeSelectorBlock
|
<div className="govuk-grid-row">
|
||||||
t={t}
|
<div className="govuk-form-group">
|
||||||
headingText={t(
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
"myrepresentations:consultation-from-an-appellant-heading"
|
"myrepresentations:consultation-from-an-appellant-heading"
|
||||||
)}
|
)}
|
||||||
kindLabelText={t(
|
</h2>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
"myrepresentations:kind-of-consultation-label"
|
"myrepresentations:kind-of-consultation-label"
|
||||||
)}
|
)}
|
||||||
isTypeSelected={isTypeConfirmed}
|
</label>
|
||||||
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
<Field
|
||||||
representationType={selectedRepresentationType}
|
name="representationType"
|
||||||
setTypeSelectionConfirmed={setTypeSelectionConfirmed}
|
component={RenderPickList}
|
||||||
onRepresentationTypeChange={onRepresentationTypeChange}
|
datafieldname="representationType"
|
||||||
onTypeSelectionConfirmed={onTypeSelectionConfirmed}
|
optionsArr={
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
appellantApplicantRepresentationArr
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
{isTypeConfirmed && (
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{selectedRepresentationType ==
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
"Consultation Response"
|
"Consultation Response"
|
||||||
? t("myrepresentations:enter-comment-label")
|
? t("myrepresentations:enter-comment-label")
|
||||||
: t(
|
: t(
|
||||||
@@ -127,7 +132,8 @@ const ConsultationAppellant = (props) => {
|
|||||||
className="govuk-fieldset"
|
className="govuk-fieldset"
|
||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
{selectedRepresentationType ==
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
"Consultation Response" && (
|
"Consultation Response" && (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
@@ -227,7 +233,8 @@ const ConsultationAppellant = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isTypeConfirmed && (
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<button
|
<button
|
||||||
@@ -236,7 +243,7 @@ const ConsultationAppellant = (props) => {
|
|||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
disabled={shouldDisableButton({
|
disabled={shouldDisableButton({
|
||||||
props,
|
props,
|
||||||
formObj
|
formObj,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}
|
{t("common:continue-button")}
|
||||||
@@ -246,6 +253,7 @@ const ConsultationAppellant = (props) => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setRepresentationCapacity();
|
setRepresentationCapacity();
|
||||||
props.updateField(
|
props.updateField(
|
||||||
|
"representationForm",
|
||||||
"representationType",
|
"representationType",
|
||||||
""
|
""
|
||||||
);
|
);
|
||||||
@@ -313,7 +321,7 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
|
|
||||||
setFilesForRepresentations: (fileList) => {
|
setFilesForRepresentations: (fileList) => {
|
||||||
dispatch(setFilesForRepresentations(fileList));
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -324,6 +332,6 @@ export default connect(
|
|||||||
reduxForm({
|
reduxForm({
|
||||||
form: "representationForm",
|
form: "representationForm",
|
||||||
enableReinitialize: true,
|
enableReinitialize: true,
|
||||||
destroyOnUnmount: false
|
destroyOnUnmount: false,
|
||||||
})(ConsultationAppellant)
|
})(ConsultationAppellant)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,22 +2,22 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
RenderCondtionalRadioList,
|
RenderCondtionalRadioList,
|
||||||
|
RenderPickList,
|
||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
shouldDisableButton
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
import RepresentationTypeSelectorBlock from "./elements/RepresentationTypeSelectorBlock";
|
|
||||||
|
|
||||||
import { useDropzone } from "react-dropzone";
|
import { useDropzone } from "react-dropzone";
|
||||||
import {
|
import {
|
||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
setFilesForRepresentations
|
setFilesForRepresentations,
|
||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const ConsultationInterestedPartyPerson = (props) => {
|
const ConsultationInterestedPartyPerson = (props) => {
|
||||||
@@ -35,25 +35,11 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations,
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed
|
|
||||||
} = props;
|
} = props;
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
const persistedRepresentationType =
|
|
||||||
props.currentView?.caseReference?.repDetails?.representationType;
|
|
||||||
const [typeSelectionConfirmed, setTypeSelectionConfirmed] = useState(
|
|
||||||
!!persistedRepresentationType
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (persistedRepresentationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
}
|
|
||||||
}, [persistedRepresentationType]);
|
|
||||||
|
|
||||||
if (JSON.stringify(formObj) != "{}") {
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
setRepFileName(formObj.representationForm.values);
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
@@ -76,46 +62,67 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
{file.path} - {file.size} bytes
|
{file.path} - {file.size} bytes
|
||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
|
|
||||||
const selectedRepresentationType =
|
|
||||||
formObj?.representationForm?.values?.representationType ||
|
|
||||||
props.representationType;
|
|
||||||
|
|
||||||
const isTypeConfirmed =
|
|
||||||
!!selectedRepresentationType && typeSelectionConfirmed;
|
|
||||||
|
|
||||||
const selectedRepresentationTypeDisplay =
|
|
||||||
router.locale == "cy"
|
|
||||||
? selectedRepresentationType == "Questionnaire"
|
|
||||||
? "Holiadur"
|
|
||||||
: selectedRepresentationType == "Statement"
|
|
||||||
? "Datganiad"
|
|
||||||
: selectedRepresentationType == "Final comments"
|
|
||||||
? "Sylwadau terfynol"
|
|
||||||
: selectedRepresentationType
|
|
||||||
: selectedRepresentationType;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<RepresentationTypeSelectorBlock
|
<div className="govuk-grid-row">
|
||||||
t={t}
|
<div className="govuk-form-group">
|
||||||
headingText={t(
|
{typeof formObj.representationForm.values
|
||||||
|
.representationType == "undefined" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
|
<>
|
||||||
|
<h2 className="govuk-heading-m ">
|
||||||
|
{t(
|
||||||
"myrepresentations:consultation-from-an-interested-person-heading"
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
)}
|
)}
|
||||||
kindLabelText={t(
|
</h2>
|
||||||
|
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
"myrepresentations:kind-of-consultation-label"
|
"myrepresentations:kind-of-consultation-label"
|
||||||
)}
|
)}
|
||||||
isTypeSelected={isTypeConfirmed}
|
</label>
|
||||||
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
|
||||||
representationType={selectedRepresentationType}
|
<Field
|
||||||
setTypeSelectionConfirmed={setTypeSelectionConfirmed}
|
name="representationType"
|
||||||
onRepresentationTypeChange={onRepresentationTypeChange}
|
component={RenderPickList}
|
||||||
onTypeSelectionConfirmed={onTypeSelectionConfirmed}
|
datafieldname="representationType"
|
||||||
optionsArr={interestedPersonRepresentationArr}
|
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t("myrepresentations:select-an-option-label")}
|
optionsArr={
|
||||||
|
interestedPersonRepresentationArr
|
||||||
|
}
|
||||||
|
errorMsg={t(
|
||||||
|
"myrepresentations:select-an-option-label"
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
{isTypeConfirmed && (
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -127,7 +134,7 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
t(
|
t(
|
||||||
"myrepresentations:questionnaire-yes"
|
"myrepresentations:questionnaire-yes"
|
||||||
),
|
),
|
||||||
t("myrepresentations:questionnaire-no")
|
t("myrepresentations:questionnaire-no"),
|
||||||
]}
|
]}
|
||||||
id="representationOnBehalfOf"
|
id="representationOnBehalfOf"
|
||||||
className="govuk-radios__input"
|
className="govuk-radios__input"
|
||||||
@@ -147,7 +154,8 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{selectedRepresentationType ==
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
"Consultation Response"
|
"Consultation Response"
|
||||||
? t(
|
? t(
|
||||||
"myrepresentations:enter-comment-label"
|
"myrepresentations:enter-comment-label"
|
||||||
@@ -161,7 +169,8 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
aria-describedby="commentBox-hint"
|
aria-describedby="commentBox-hint"
|
||||||
>
|
>
|
||||||
{" "}
|
{" "}
|
||||||
{selectedRepresentationType ==
|
{formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
"Consultation Response" && (
|
"Consultation Response" && (
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<Field
|
<Field
|
||||||
@@ -265,7 +274,8 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{isTypeConfirmed && (
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
<button
|
<button
|
||||||
@@ -274,7 +284,7 @@ const ConsultationInterestedPartyPerson = (props) => {
|
|||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
disabled={shouldDisableButton({
|
disabled={shouldDisableButton({
|
||||||
props,
|
props,
|
||||||
formObj
|
formObj,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{t("common:continue-button")}
|
{t("common:continue-button")}
|
||||||
@@ -353,7 +363,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
dispatch(change(form, field, newValue)),
|
dispatch(change(form, field, newValue)),
|
||||||
setFilesForRepresentations: (fileList) => {
|
setFilesForRepresentations: (fileList) => {
|
||||||
dispatch(setFilesForRepresentations(fileList));
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
@@ -363,6 +373,6 @@ export default connect(
|
|||||||
reduxForm({
|
reduxForm({
|
||||||
form: "representationForm",
|
form: "representationForm",
|
||||||
enableReinitialize: true,
|
enableReinitialize: true,
|
||||||
destroyOnUnmount: false
|
destroyOnUnmount: false,
|
||||||
})(ConsultationInterestedPartyPerson)
|
})(ConsultationInterestedPartyPerson)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,134 +1,17 @@
|
|||||||
import { Field } from "redux-form";
|
import { Field } from "redux-form";
|
||||||
import router from "next/router";
|
|
||||||
import Link from "next/link";
|
|
||||||
|
|
||||||
const getRepresentationTypeHint = (option, t) => {
|
import { RenderPickList } from "../representationElements";
|
||||||
const map = {
|
|
||||||
"Statement": t("myrepresentations:rep-type-statement-hint"),
|
|
||||||
"Final comments": t("myrepresentations:rep-type-final-comments-hint"),
|
|
||||||
"Questionnaire": t("myrepresentations:rep-type-questionnaire-hint"),
|
|
||||||
"Consultation Response": t(
|
|
||||||
"myrepresentations:rep-type-consultation-hint"
|
|
||||||
),
|
|
||||||
"Local Impact Report": t("myrepresentations:rep-type-lir-hint"),
|
|
||||||
"Marine Impact Report": t("myrepresentations:rep-type-mir-hint")
|
|
||||||
};
|
|
||||||
|
|
||||||
return map[option] || "";
|
|
||||||
};
|
|
||||||
|
|
||||||
const getRepresentationTypeLabel = (option) => {
|
|
||||||
if (router.locale !== "cy") {
|
|
||||||
return option;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (option === "Questionnaire") {
|
|
||||||
return "Holiadur";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (option === "Statement") {
|
|
||||||
return "Datganiad";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (option === "Final comments") {
|
|
||||||
return "Sylwadau terfynol";
|
|
||||||
}
|
|
||||||
|
|
||||||
return option;
|
|
||||||
};
|
|
||||||
|
|
||||||
const RenderRepresentationTypeRadioList = ({
|
|
||||||
name,
|
|
||||||
optionsArr,
|
|
||||||
errorMsg,
|
|
||||||
onRepresentationTypeChange,
|
|
||||||
input,
|
|
||||||
meta: { touched, error }
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
touched && error
|
|
||||||
? "govuk-form-group govuk-form-group--error"
|
|
||||||
: "govuk-form-group"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{touched && error && (
|
|
||||||
<span id={`${name}-error`} className="govuk-error-message">
|
|
||||||
<span className="govuk-visually-hidden">Error:</span>{" "}
|
|
||||||
{errorMsg}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="govuk-radios govuk-radios--small">
|
|
||||||
{optionsArr.map((option, index) => {
|
|
||||||
const optionId = `${name}_${index}`;
|
|
||||||
const hintId = `${optionId}-hint`;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={option.value || optionId}
|
|
||||||
className="govuk-radios__item representation-type-option"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
className="govuk-radios__input"
|
|
||||||
id={optionId}
|
|
||||||
name={input.name}
|
|
||||||
type="radio"
|
|
||||||
value={option.value}
|
|
||||||
checked={input.value === option.value}
|
|
||||||
onChange={() => input.onChange(option.value)}
|
|
||||||
aria-describedby={
|
|
||||||
option.hint ? hintId : undefined
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<label
|
|
||||||
className="govuk-label govuk-radios__label govuk-!-font-weight-bold "
|
|
||||||
htmlFor={optionId}
|
|
||||||
>
|
|
||||||
{option.label}
|
|
||||||
|
|
||||||
{option.hint && (
|
|
||||||
<div
|
|
||||||
id={hintId}
|
|
||||||
className="govuk-hint govuk-!-margin-top-2"
|
|
||||||
>
|
|
||||||
{option.hint}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
const RepresentationTypeSelectorBlock = ({
|
const RepresentationTypeSelectorBlock = ({
|
||||||
t,
|
t,
|
||||||
headingText,
|
headingText,
|
||||||
kindLabelText,
|
kindLabelText,
|
||||||
isTypeSelected,
|
isTypeSelected,
|
||||||
selectedTypeDisplay,
|
selectedTypeDisplay,
|
||||||
representationType,
|
|
||||||
setTypeSelectionConfirmed,
|
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed,
|
|
||||||
optionsArr,
|
optionsArr,
|
||||||
validate,
|
validate,
|
||||||
errorMsg
|
errorMsg
|
||||||
}) => {
|
}) => {
|
||||||
const enhancedOptions = (optionsArr || [])
|
|
||||||
.filter((option) => option && option !== "Select...")
|
|
||||||
.map((option) => ({
|
|
||||||
value: option,
|
|
||||||
label: getRepresentationTypeLabel(option),
|
|
||||||
hint: getRepresentationTypeHint(option, t)
|
|
||||||
}));
|
|
||||||
|
|
||||||
const hasSelectableOptions = enhancedOptions.length > 0;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -137,59 +20,20 @@ const RepresentationTypeSelectorBlock = ({
|
|||||||
<h2 className="govuk-heading-m ">{headingText}</h2>
|
<h2 className="govuk-heading-m ">{headingText}</h2>
|
||||||
|
|
||||||
<label
|
<label
|
||||||
className="govuk-label govuk-body-m govuk-!-margin-bottom-2"
|
className="govuk-label govuk-body-m"
|
||||||
htmlFor="representationType"
|
htmlFor="representationType"
|
||||||
>
|
>
|
||||||
{kindLabelText}
|
{kindLabelText}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
{hasSelectableOptions ? (
|
|
||||||
<>
|
|
||||||
<Field
|
<Field
|
||||||
name="representationType"
|
name="representationType"
|
||||||
component={
|
component={RenderPickList}
|
||||||
RenderRepresentationTypeRadioList
|
datafieldname="representationType"
|
||||||
}
|
|
||||||
onRepresentationTypeChange={
|
|
||||||
onRepresentationTypeChange
|
|
||||||
}
|
|
||||||
validate={validate}
|
validate={validate}
|
||||||
optionsArr={enhancedOptions}
|
optionsArr={optionsArr}
|
||||||
errorMsg={errorMsg}
|
errorMsg={errorMsg}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-button"
|
|
||||||
data-module="govuk-button"
|
|
||||||
disabled={!representationType}
|
|
||||||
onClick={() => {
|
|
||||||
if (representationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
onTypeSelectionConfirmed &&
|
|
||||||
onTypeSelectionConfirmed(
|
|
||||||
representationType
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{t("common:continue-button")}
|
|
||||||
</button>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<p className="govuk-body">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:representation-type-unavailable-label"
|
|
||||||
)}
|
|
||||||
</p>
|
|
||||||
<Link className="govuk-link" href="/">
|
|
||||||
{t(
|
|
||||||
"myrepresentations:return-home-link-label"
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<label className="govuk-label govuk-body-m">
|
<label className="govuk-label govuk-body-m">
|
||||||
|
|||||||
@@ -52,20 +52,12 @@ import {
|
|||||||
buildSubmitEnrichedValues,
|
buildSubmitEnrichedValues,
|
||||||
runFinalisationSequence
|
runFinalisationSequence
|
||||||
} from "./utils/finalisationBoundary";
|
} from "./utils/finalisationBoundary";
|
||||||
import {
|
|
||||||
buildRepresentationContext,
|
|
||||||
buildRepsArrFromContext
|
|
||||||
} from "./utils/buildRepsArrRules";
|
|
||||||
|
|
||||||
let MakeRepresentation = (props) => {
|
let MakeRepresentation = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const [savingStatus, setSavingStatus] = useState(false);
|
const [savingStatus, setSavingStatus] = useState(false);
|
||||||
const [finaliseAppealProcess, setFinaliseAppealProcess] = useState(false);
|
const [finaliseAppealProcess, setFinaliseAppealProcess] = useState(false);
|
||||||
const [representationTypeConfirmed, setRepresentationTypeConfirmed] =
|
|
||||||
useState(
|
|
||||||
!!props?.currentView?.caseReference?.repDetails?.representationType
|
|
||||||
);
|
|
||||||
|
|
||||||
//const [questionnaireCount, setQuestionnaireCount] = useState(0);
|
//const [questionnaireCount, setQuestionnaireCount] = useState(0);
|
||||||
|
|
||||||
@@ -257,14 +249,9 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
var detailsObj = {};
|
var detailsObj = {};
|
||||||
|
|
||||||
// const isAppellant =
|
|
||||||
// props.props.accountDetails.accountDetails.pinswg_typeofinvolvement ===
|
|
||||||
// 846040001;
|
|
||||||
|
|
||||||
const isAppellant =
|
const isAppellant =
|
||||||
props.props.accountDetails.accountDetails.emailaddress1 ==
|
props.props.accountDetails.accountDetails.pinswg_typeofinvolvement ===
|
||||||
props.searchResultsObj?.searchResultsObj?.value[0].customerid_contact
|
846040001;
|
||||||
.emailaddress1;
|
|
||||||
|
|
||||||
const capacityOptionsArr = [];
|
const capacityOptionsArr = [];
|
||||||
|
|
||||||
@@ -316,25 +303,259 @@ let MakeRepresentation = (props) => {
|
|||||||
const safeDetailsObj = detailsObj || {};
|
const safeDetailsObj = detailsObj || {};
|
||||||
const safeResultsObj = resultsObj || {};
|
const safeResultsObj = resultsObj || {};
|
||||||
|
|
||||||
|
// blocked out build reps arr for refactoring
|
||||||
|
// const buildRepsArr = (detailsObj) => {
|
||||||
|
// const buildArr = [];
|
||||||
|
// const todaysDate = new Date();
|
||||||
|
|
||||||
|
// const isDNS = appealType === 846040011;
|
||||||
|
// const isSIPS = appealType === 846040002;
|
||||||
|
// const isIP = true;
|
||||||
|
|
||||||
|
// const isAppellant =
|
||||||
|
// props.props.accountDetails.accountDetails
|
||||||
|
// .pinswg_typeofinvolvement === 846040001;
|
||||||
|
|
||||||
|
// // Determine key dates based on appeal type
|
||||||
|
// const startDate = new Date(
|
||||||
|
// isDNS
|
||||||
|
// ? detailsObj.pinswg_applicationacceptedasvalid
|
||||||
|
// : detailsObj.pinswg_startdate || detailsObj.pinswg_startdates
|
||||||
|
// );
|
||||||
|
|
||||||
|
// const questionnaireDate = new Date(
|
||||||
|
// isDNS
|
||||||
|
// ? detailsObj.pinswg_endofrepresentationperiod
|
||||||
|
// : detailsObj.pinswg_questionnaireduedate
|
||||||
|
// );
|
||||||
|
// questionnaireDate.setHours(23, 59, 59, 999);
|
||||||
|
|
||||||
|
// const finalCommentsDate = new Date(
|
||||||
|
// isDNS
|
||||||
|
// ? detailsObj.pinswg_endofrepresentationperiod
|
||||||
|
// : detailsObj.pinswg_finalcommentsduedate
|
||||||
|
// );
|
||||||
|
// finalCommentsDate.setHours(23, 59, 59, 999);
|
||||||
|
|
||||||
|
// const statementDueDate = new Date(
|
||||||
|
// isDNS
|
||||||
|
// ? detailsObj.pinswg_endofrepresentationperiod
|
||||||
|
// : detailsObj.pinswg_statementduedate ||
|
||||||
|
// detailsObj.pinswg_statementsduedate
|
||||||
|
// );
|
||||||
|
// statementDueDate.setHours(23, 59, 59, 999);
|
||||||
|
|
||||||
|
// // Shared condition
|
||||||
|
// const isWithin = (start, end) =>
|
||||||
|
// todaysDate >= start && todaysDate <= end;
|
||||||
|
// const notAppeal = (...types) => !types.includes(appealType);
|
||||||
|
|
||||||
|
// // Questionnaire
|
||||||
|
// if (
|
||||||
|
// isLPA &&
|
||||||
|
// notAppeal(846040019, 846040011, 846040015, 846040016) &&
|
||||||
|
// isWithin(startDate, finalCommentsDate)
|
||||||
|
// ) {
|
||||||
|
// buildArr.push("Questionnaire");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // DNS LPA Documents
|
||||||
|
// if (
|
||||||
|
// isLPA &&
|
||||||
|
// isDNS &&
|
||||||
|
// appealType !== 846040019 &&
|
||||||
|
// isWithin(startDate, finalCommentsDate)
|
||||||
|
// ) {
|
||||||
|
// buildArr.push("Local Impact Report", "Statement");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Non-DNS Statement
|
||||||
|
// if (
|
||||||
|
// !isDNS &&
|
||||||
|
// appealType !== 846040004 &&
|
||||||
|
// isWithin(startDate, statementDueDate)
|
||||||
|
// ) {
|
||||||
|
// buildArr.push("Statement");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // DNS Non-LPA Statement
|
||||||
|
// if (isDNS && !isLPA && isWithin(startDate, statementDueDate)) {
|
||||||
|
// buildArr.push("Statement");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Final Comments
|
||||||
|
// const isSpecialistNonHearing =
|
||||||
|
// currentView.caseReference.specialistProcess !== 846040001;
|
||||||
|
|
||||||
|
// if (
|
||||||
|
// (appealType !== 846040004 ||
|
||||||
|
// (appealType === 846040015 && isSpecialistNonHearing)) &&
|
||||||
|
// isWithin(statementDueDate, finalCommentsDate)
|
||||||
|
// ) {
|
||||||
|
// buildArr.push("Final comments");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (
|
||||||
|
// appealType === 846040004 &&
|
||||||
|
// isSpecialistNonHearing &&
|
||||||
|
// isWithin(statementDueDate, finalCommentsDate)
|
||||||
|
// ) {
|
||||||
|
// buildArr.push("Final comments");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Remove "Statement" for LPA Advert Part 3 (no statement)
|
||||||
|
// if (
|
||||||
|
// isLPA &&
|
||||||
|
// appealType === 846040018 &&
|
||||||
|
// currentView.caseReference.specialistProcess === 846040000
|
||||||
|
// ) {
|
||||||
|
// const index = buildArr.indexOf("Statement");
|
||||||
|
// if (index !== -1) buildArr.splice(index, 1);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // SIPS-related documents
|
||||||
|
// if (isSIPS) {
|
||||||
|
// const capacity = repCapacityType();
|
||||||
|
// if (capacity === "appellant") {
|
||||||
|
// buildArr.push("Consultation Response");
|
||||||
|
// } else {
|
||||||
|
// buildArr.push("Consultation Response", "Local Impact Report");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (isNRW) {
|
||||||
|
// buildArr.push("Marine Impact Report");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return buildArr;
|
||||||
|
// };
|
||||||
|
|
||||||
const buildRepsArr = (detailsObj) => {
|
const buildRepsArr = (detailsObj) => {
|
||||||
const isCaseOwner =
|
const buildArr = [];
|
||||||
props.props.accountDetails.accountDetails.emailaddress1 ==
|
const todaysDate = new Date();
|
||||||
props.searchResultsObj?.searchResultsObj?.value[0]
|
|
||||||
.customerid_contact.emailaddress1;
|
|
||||||
|
|
||||||
const ctx = buildRepresentationContext({
|
const isDNS = appealType === 846040011;
|
||||||
detailsObj,
|
const isSIPS = appealType === 846040002;
|
||||||
appealType,
|
const specialistProcess = currentView.caseReference.specialistProcess;
|
||||||
specialistProcess: currentView.caseReference.specialistProcess,
|
|
||||||
involvementType:
|
const isSpecialistNonHearing = specialistProcess !== 846040001;
|
||||||
|
|
||||||
|
const involvementType =
|
||||||
props.props?.accountDetails?.accountDetails
|
props.props?.accountDetails?.accountDetails
|
||||||
?.pinswg_typeofinvolvement,
|
?.pinswg_typeofinvolvement;
|
||||||
selectedCapacity: repCapacityType(),
|
|
||||||
isCaseOwner,
|
|
||||||
isNRW
|
|
||||||
});
|
|
||||||
|
|
||||||
return buildRepsArrFromContext(ctx);
|
const isAppellant = involvementType === 846040001;
|
||||||
|
const isAgent = involvementType === 846040000;
|
||||||
|
const isIP = involvementType === 846040061;
|
||||||
|
//const isLPA = involvementType === 846040000;
|
||||||
|
|
||||||
|
const startDate = new Date(
|
||||||
|
isDNS
|
||||||
|
? detailsObj.pinswg_applicationacceptedasvalid
|
||||||
|
: detailsObj.pinswg_startdate || detailsObj.pinswg_startdates
|
||||||
|
);
|
||||||
|
|
||||||
|
const finalCommentsDate = new Date(
|
||||||
|
isDNS
|
||||||
|
? detailsObj.pinswg_endofrepresentationperiod
|
||||||
|
: detailsObj.pinswg_finalcommentsduedate
|
||||||
|
);
|
||||||
|
finalCommentsDate.setHours(23, 59, 59, 999);
|
||||||
|
|
||||||
|
const statementDueDate = new Date(
|
||||||
|
isDNS
|
||||||
|
? detailsObj.pinswg_endofrepresentationperiod
|
||||||
|
: detailsObj.pinswg_statementduedate ||
|
||||||
|
detailsObj.pinswg_statementsduedate
|
||||||
|
);
|
||||||
|
statementDueDate.setHours(23, 59, 59, 999);
|
||||||
|
|
||||||
|
const isWithin = (start, end) =>
|
||||||
|
todaysDate >= start && todaysDate <= end;
|
||||||
|
|
||||||
|
const addRep = (value) => {
|
||||||
|
if (!buildArr.includes(value)) {
|
||||||
|
buildArr.push(value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const canAddQuestionnaire =
|
||||||
|
isLPA &&
|
||||||
|
![846040019, 846040011, 846040015, 846040016].includes(
|
||||||
|
appealType
|
||||||
|
) &&
|
||||||
|
isWithin(startDate, finalCommentsDate);
|
||||||
|
|
||||||
|
if (canAddQuestionnaire) {
|
||||||
|
addRep("Questionnaire");
|
||||||
|
}
|
||||||
|
|
||||||
|
const isLpaAdvertPart3NoStatement =
|
||||||
|
isLPA &&
|
||||||
|
appealType === 846040018 &&
|
||||||
|
specialistProcess === 846040000;
|
||||||
|
|
||||||
|
const canAddDnsLpaDocs =
|
||||||
|
isLPA &&
|
||||||
|
isDNS &&
|
||||||
|
appealType !== 846040019 &&
|
||||||
|
!isAppellant &&
|
||||||
|
isWithin(startDate, finalCommentsDate);
|
||||||
|
|
||||||
|
if (canAddDnsLpaDocs) {
|
||||||
|
addRep("Local Impact Report");
|
||||||
|
addRep("Statement");
|
||||||
|
}
|
||||||
|
|
||||||
|
const canAddStatementForNonDns =
|
||||||
|
!isDNS &&
|
||||||
|
appealType !== 846040004 &&
|
||||||
|
!isLpaAdvertPart3NoStatement &&
|
||||||
|
!isAppellant &&
|
||||||
|
isWithin(startDate, statementDueDate);
|
||||||
|
|
||||||
|
if (canAddStatementForNonDns) {
|
||||||
|
addRep("Statement");
|
||||||
|
}
|
||||||
|
|
||||||
|
const canAddStatementForDnsNonLpa =
|
||||||
|
isDNS &&
|
||||||
|
!isLPA &&
|
||||||
|
!isAppellant &&
|
||||||
|
isWithin(startDate, statementDueDate);
|
||||||
|
|
||||||
|
if (canAddStatementForDnsNonLpa) {
|
||||||
|
addRep("Statement");
|
||||||
|
}
|
||||||
|
|
||||||
|
const canSubmitFinalComments = isAppellant || isAgent || isIP || isLPA;
|
||||||
|
|
||||||
|
const canAddFinalComments =
|
||||||
|
canSubmitFinalComments &&
|
||||||
|
isWithin(statementDueDate, finalCommentsDate) &&
|
||||||
|
(appealType !== 846040004 || isSpecialistNonHearing);
|
||||||
|
|
||||||
|
// IP and Agents and LPA can do final comments.
|
||||||
|
|
||||||
|
if (canAddFinalComments) {
|
||||||
|
addRep("Final comments");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isSIPS) {
|
||||||
|
const capacity = repCapacityType();
|
||||||
|
|
||||||
|
addRep("Consultation Response");
|
||||||
|
|
||||||
|
if (capacity !== "appellant") {
|
||||||
|
addRep("Local Impact Report");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNRW) {
|
||||||
|
addRep("Marine Impact Report");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return buildArr;
|
||||||
};
|
};
|
||||||
|
|
||||||
const repCapacityType = () => {
|
const repCapacityType = () => {
|
||||||
@@ -365,10 +586,7 @@ let MakeRepresentation = (props) => {
|
|||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setCurrentReference,
|
setCurrentReference
|
||||||
onRepresentationTypeChange: () =>
|
|
||||||
setRepresentationTypeConfirmed(false),
|
|
||||||
onTypeSelectionConfirmed: () => setRepresentationTypeConfirmed(true)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const { controlKey } = resolveRepresentationControlKey({
|
const { controlKey } = resolveRepresentationControlKey({
|
||||||
@@ -874,29 +1092,15 @@ let MakeRepresentation = (props) => {
|
|||||||
// Prepare data object for upload
|
// Prepare data object for upload
|
||||||
const dataObj = cleanedValues;
|
const dataObj = cleanedValues;
|
||||||
|
|
||||||
const caseFolderReference =
|
|
||||||
props.caseReference ||
|
|
||||||
dataObj.ticketnumber ||
|
|
||||||
currentView?.caseReference?.ticketnumber ||
|
|
||||||
currentView?.caseReference?.currentReference ||
|
|
||||||
dataObj.caseRef ||
|
|
||||||
"";
|
|
||||||
|
|
||||||
// Update links on values
|
// Update links on values
|
||||||
const updatedValues = updateLinks(cleanedValues);
|
const updatedValues = updateLinks(cleanedValues);
|
||||||
|
|
||||||
const resolvedContainerID =
|
|
||||||
updatedValues.containerID ||
|
|
||||||
dataObj.containerID ||
|
|
||||||
props?.props?.accountDetails?.containerID ||
|
|
||||||
props?.props?.accountDetails?.accountDetails?.containerID;
|
|
||||||
|
|
||||||
// Perform file upload and return the promise
|
// Perform file upload and return the promise
|
||||||
return uploadRepFiles(
|
return uploadRepFiles(
|
||||||
dataObj,
|
dataObj,
|
||||||
[{}],
|
[{}],
|
||||||
resolvedContainerID,
|
updatedValues.containerID,
|
||||||
`${caseFolderReference}/${dataObj.repfile_name}`
|
`${props.caseReference}/${dataObj.repfile_name}`
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -904,7 +1108,7 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
const isQuestionnaire =
|
const isQuestionnaire =
|
||||||
formObj?.representationForm?.values?.representationType ===
|
formObj?.representationForm?.values?.representationType ===
|
||||||
"Questionnaire" && representationTypeConfirmed;
|
"Questionnaire";
|
||||||
|
|
||||||
const appealIsConsultation = appealType === 846040002;
|
const appealIsConsultation = appealType === 846040002;
|
||||||
const appealIsLocalImpact =
|
const appealIsLocalImpact =
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
@@ -36,24 +36,10 @@ const RepAgent = (props) => {
|
|||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed
|
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
const persistedRepresentationType =
|
|
||||||
currentView?.caseReference?.repDetails?.representationType;
|
|
||||||
const [typeSelectionConfirmed, setTypeSelectionConfirmed] = useState(
|
|
||||||
!!persistedRepresentationType
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (persistedRepresentationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
}
|
|
||||||
}, [persistedRepresentationType]);
|
|
||||||
|
|
||||||
if (JSON.stringify(formObj) != "{}") {
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
setRepFileName(formObj.representationForm.values);
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
@@ -78,23 +64,23 @@ const RepAgent = (props) => {
|
|||||||
));
|
));
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
const selectedRepresentationType =
|
const hasTypeSelectionInline =
|
||||||
formObj?.representationForm?.values?.representationType ||
|
typeof formObj.representationForm.values.representationType ==
|
||||||
props.representationType;
|
"undefined" && props.representationType != "Select...";
|
||||||
|
|
||||||
const isTypeConfirmed =
|
|
||||||
!!selectedRepresentationType && typeSelectionConfirmed;
|
|
||||||
|
|
||||||
const selectedRepresentationTypeDisplay =
|
const selectedRepresentationTypeDisplay =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? selectedRepresentationType == "Questionnaire"
|
? formObj.representationForm.values.representationType ==
|
||||||
|
"Questionnaire"
|
||||||
? "Holiadur"
|
? "Holiadur"
|
||||||
: selectedRepresentationType == "Statement"
|
: formObj.representationForm.values.representationType ==
|
||||||
|
"Statement"
|
||||||
? "Datganiad"
|
? "Datganiad"
|
||||||
: selectedRepresentationType == "Final comments"
|
: formObj.representationForm.values.representationType ==
|
||||||
|
"Final comments"
|
||||||
? "Sylwadau terfynol"
|
? "Sylwadau terfynol"
|
||||||
: selectedRepresentationType
|
: formObj.representationForm.values.representationType
|
||||||
: selectedRepresentationType;
|
: formObj.representationForm.values.representationType;
|
||||||
|
|
||||||
const handleSaveExit = () => {
|
const handleSaveExit = () => {
|
||||||
let valuesObj = props.props.props.form[props.form].values || {};
|
let valuesObj = props.props.props.form[props.form].values || {};
|
||||||
@@ -112,15 +98,13 @@ const RepAgent = (props) => {
|
|||||||
"myrepresentations:representation-from-an-agent-heading"
|
"myrepresentations:representation-from-an-agent-heading"
|
||||||
)}
|
)}
|
||||||
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
||||||
isTypeSelected={isTypeConfirmed}
|
isTypeSelected={!hasTypeSelectionInline}
|
||||||
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
||||||
representationType={selectedRepresentationType}
|
|
||||||
setTypeSelectionConfirmed={setTypeSelectionConfirmed}
|
|
||||||
onRepresentationTypeChange={onRepresentationTypeChange}
|
|
||||||
onTypeSelectionConfirmed={onTypeSelectionConfirmed}
|
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
optionsArr={appellantApplicantRepresentationArr}
|
||||||
/>
|
/>
|
||||||
{isTypeConfirmed && (
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -243,7 +227,8 @@ const RepAgent = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{isTypeConfirmed && (
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
<RepresentationActionButtons
|
<RepresentationActionButtons
|
||||||
t={t}
|
t={t}
|
||||||
locale={router.locale}
|
locale={router.locale}
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
|
RenderPickList,
|
||||||
RenderRichMultiline,
|
RenderRichMultiline,
|
||||||
shouldDisableButton
|
shouldDisableButton
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
@@ -35,24 +36,10 @@ const RepAppellant = (props) => {
|
|||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed
|
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
const persistedRepresentationType =
|
|
||||||
currentView?.caseReference?.repDetails?.representationType;
|
|
||||||
const [typeSelectionConfirmed, setTypeSelectionConfirmed] = useState(
|
|
||||||
!!persistedRepresentationType
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (persistedRepresentationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
}
|
|
||||||
}, [persistedRepresentationType]);
|
|
||||||
|
|
||||||
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
||||||
|
|
||||||
if (JSON.stringify(formObj) != "{}") {
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
@@ -77,23 +64,23 @@ const RepAppellant = (props) => {
|
|||||||
index === self.findIndex((t) => t.name === value.name)
|
index === self.findIndex((t) => t.name === value.name)
|
||||||
);
|
);
|
||||||
|
|
||||||
const selectedRepresentationType =
|
const hasTypeSelectionInline =
|
||||||
formObj?.representationForm?.values?.representationType ||
|
typeof formObj.representationForm.values.representationType ==
|
||||||
props.representationType;
|
"undefined" && props.representationType != "Select...";
|
||||||
|
|
||||||
const isTypeConfirmed =
|
|
||||||
!!selectedRepresentationType && typeSelectionConfirmed;
|
|
||||||
|
|
||||||
const selectedRepresentationTypeDisplay =
|
const selectedRepresentationTypeDisplay =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? selectedRepresentationType == "Questionnaire"
|
? formObj.representationForm.values.representationType ==
|
||||||
|
"Questionnaire"
|
||||||
? "Holiadur"
|
? "Holiadur"
|
||||||
: selectedRepresentationType == "Statement"
|
: formObj.representationForm.values.representationType ==
|
||||||
|
"Statement"
|
||||||
? "Datganiad"
|
? "Datganiad"
|
||||||
: selectedRepresentationType == "Final comments"
|
: formObj.representationForm.values.representationType ==
|
||||||
|
"Final comments"
|
||||||
? "Sylwadau terfynol"
|
? "Sylwadau terfynol"
|
||||||
: selectedRepresentationType
|
: formObj.representationForm.values.representationType
|
||||||
: selectedRepresentationType;
|
: formObj.representationForm.values.representationType;
|
||||||
|
|
||||||
const handleSaveExit = () => {
|
const handleSaveExit = () => {
|
||||||
let valuesObj = props.props.props.form[props.form].values || {};
|
let valuesObj = props.props.props.form[props.form].values || {};
|
||||||
@@ -111,15 +98,13 @@ const RepAppellant = (props) => {
|
|||||||
"myrepresentations:representation-from-an-appellant-heading"
|
"myrepresentations:representation-from-an-appellant-heading"
|
||||||
)}
|
)}
|
||||||
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
||||||
isTypeSelected={isTypeConfirmed}
|
isTypeSelected={!hasTypeSelectionInline}
|
||||||
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
||||||
representationType={selectedRepresentationType}
|
|
||||||
setTypeSelectionConfirmed={setTypeSelectionConfirmed}
|
|
||||||
onRepresentationTypeChange={onRepresentationTypeChange}
|
|
||||||
onTypeSelectionConfirmed={onTypeSelectionConfirmed}
|
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
optionsArr={appellantApplicantRepresentationArr}
|
||||||
/>
|
/>
|
||||||
{isTypeConfirmed && (
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
@@ -235,7 +220,8 @@ const RepAppellant = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isTypeConfirmed && (
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
<RepresentationActionButtons
|
<RepresentationActionButtons
|
||||||
t={t}
|
t={t}
|
||||||
locale={router.locale}
|
locale={router.locale}
|
||||||
|
|||||||
@@ -66,8 +66,7 @@ const RepComplete = (props) => {
|
|||||||
(props.props.currentView.representationMessageSent != true &&
|
(props.props.currentView.representationMessageSent != true &&
|
||||||
(setRepInvolvment(
|
(setRepInvolvment(
|
||||||
props.props.currentView.caseReference.incidentid,
|
props.props.currentView.caseReference.incidentid,
|
||||||
props.props.props.props.accountDetails.accountDetails.contactid,
|
props.props.props.props.accountDetails.accountDetails.contactid
|
||||||
props.props.currentView.representationCapacity
|
|
||||||
),
|
),
|
||||||
sendRepCompleteMessage(
|
sendRepCompleteMessage(
|
||||||
props.props.props.props.accountDetails.containerID,
|
props.props.props.props.accountDetails.containerID,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, change, reduxForm } from "redux-form";
|
import { Field, change, reduxForm } from "redux-form";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||||
import {
|
import {
|
||||||
@@ -35,26 +35,12 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
updateRepresentation,
|
updateRepresentation,
|
||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed
|
|
||||||
} = props;
|
} = props;
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
const persistedRepresentationType =
|
|
||||||
props.currentView?.caseReference?.repDetails?.representationType;
|
|
||||||
const [typeSelectionConfirmed, setTypeSelectionConfirmed] = useState(
|
|
||||||
!!persistedRepresentationType
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (persistedRepresentationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
}
|
|
||||||
}, [persistedRepresentationType]);
|
|
||||||
|
|
||||||
if (JSON.stringify(formObj) != "{}") {
|
if (JSON.stringify(formObj) != "{}") {
|
||||||
setRepFileName(formObj.representationForm.values);
|
setRepFileName(formObj.representationForm.values);
|
||||||
|
|
||||||
@@ -78,23 +64,23 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
</li>
|
</li>
|
||||||
));
|
));
|
||||||
|
|
||||||
const selectedRepresentationType =
|
const hasTypeSelectionInline =
|
||||||
formObj?.representationForm?.values?.representationType ||
|
typeof formObj.representationForm.values.representationType ==
|
||||||
props.representationType;
|
"undefined" && props.representationType != "Select...";
|
||||||
|
|
||||||
const isTypeConfirmed =
|
|
||||||
!!selectedRepresentationType && typeSelectionConfirmed;
|
|
||||||
|
|
||||||
const selectedRepresentationTypeDisplay =
|
const selectedRepresentationTypeDisplay =
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? selectedRepresentationType == "Questionnaire"
|
? formObj.representationForm.values.representationType ==
|
||||||
|
"Questionnaire"
|
||||||
? "Holiadur"
|
? "Holiadur"
|
||||||
: selectedRepresentationType == "Statement"
|
: formObj.representationForm.values.representationType ==
|
||||||
|
"Statement"
|
||||||
? "Datganiad"
|
? "Datganiad"
|
||||||
: selectedRepresentationType == "Final comments"
|
: formObj.representationForm.values.representationType ==
|
||||||
|
"Final comments"
|
||||||
? "Sylwadau terfynol"
|
? "Sylwadau terfynol"
|
||||||
: selectedRepresentationType
|
: formObj.representationForm.values.representationType
|
||||||
: selectedRepresentationType;
|
: formObj.representationForm.values.representationType;
|
||||||
|
|
||||||
const handleSaveExit = () => {
|
const handleSaveExit = () => {
|
||||||
let valuesObj = props.props.props.form[props.form].values || {};
|
let valuesObj = props.props.props.form[props.form].values || {};
|
||||||
@@ -112,17 +98,15 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
"myrepresentations:consultation-from-an-interested-person-heading"
|
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||||
)}
|
)}
|
||||||
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
||||||
isTypeSelected={isTypeConfirmed}
|
isTypeSelected={!hasTypeSelectionInline}
|
||||||
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
||||||
representationType={selectedRepresentationType}
|
|
||||||
setTypeSelectionConfirmed={setTypeSelectionConfirmed}
|
|
||||||
onRepresentationTypeChange={onRepresentationTypeChange}
|
|
||||||
onTypeSelectionConfirmed={onTypeSelectionConfirmed}
|
|
||||||
optionsArr={interestedPersonRepresentationArr}
|
optionsArr={interestedPersonRepresentationArr}
|
||||||
validate={[required]}
|
validate={[required]}
|
||||||
errorMsg={t("myrepresentations:select-an-option-label")}
|
errorMsg={t("myrepresentations:select-an-option-label")}
|
||||||
/>
|
/>
|
||||||
{isTypeConfirmed && (
|
{(typeof props.representationType != "undefined" ||
|
||||||
|
typeof formObj.representationForm.values
|
||||||
|
.representationType != "undefined") && (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
@@ -229,7 +213,8 @@ const RepInterestedPartyPerson = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{isTypeConfirmed && (
|
{typeof formObj.representationForm.values.representationType !=
|
||||||
|
"undefined" && (
|
||||||
<RepresentationActionButtons
|
<RepresentationActionButtons
|
||||||
t={t}
|
t={t}
|
||||||
locale={router.locale}
|
locale={router.locale}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import { useState, useEffect } from "react";
|
|||||||
import {
|
import {
|
||||||
FileUploadField,
|
FileUploadField,
|
||||||
RenderMultiline,
|
RenderMultiline,
|
||||||
shouldDisableButton
|
RenderPickList,
|
||||||
|
shouldDisableButton,
|
||||||
} from "./representationElements";
|
} from "./representationElements";
|
||||||
import RepresentationTypeSelectorBlock from "./elements/RepresentationTypeSelectorBlock";
|
|
||||||
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
||||||
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
||||||
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations,
|
||||||
setCurrentPage,
|
setCurrentPage,
|
||||||
setCurrentReference
|
setCurrentReference,
|
||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
let RepLPA = (props) => {
|
let RepLPA = (props) => {
|
||||||
@@ -49,8 +49,6 @@ let RepLPA = (props) => {
|
|||||||
setSavingStatus,
|
setSavingStatus,
|
||||||
savingStatus,
|
savingStatus,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations,
|
||||||
onRepresentationTypeChange,
|
|
||||||
onTypeSelectionConfirmed
|
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
|
|
||||||
@@ -61,36 +59,6 @@ let RepLPA = (props) => {
|
|||||||
));
|
));
|
||||||
const required = (value) => (value ? undefined : "Required");
|
const required = (value) => (value ? undefined : "Required");
|
||||||
|
|
||||||
const persistedRepresentationType =
|
|
||||||
currentView?.caseReference?.repDetails?.representationType;
|
|
||||||
const [typeSelectionConfirmed, setTypeSelectionConfirmed] = useState(
|
|
||||||
!!persistedRepresentationType
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (persistedRepresentationType) {
|
|
||||||
setTypeSelectionConfirmed(true);
|
|
||||||
}
|
|
||||||
}, [persistedRepresentationType]);
|
|
||||||
|
|
||||||
const selectedRepresentationType =
|
|
||||||
formObj?.representationForm?.values?.representationType ||
|
|
||||||
props.representationType;
|
|
||||||
|
|
||||||
const isTypeConfirmed =
|
|
||||||
!!selectedRepresentationType && typeSelectionConfirmed;
|
|
||||||
|
|
||||||
const selectedRepresentationTypeDisplay =
|
|
||||||
router.locale == "cy"
|
|
||||||
? selectedRepresentationType == "Questionnaire"
|
|
||||||
? "Holiadur"
|
|
||||||
: selectedRepresentationType == "Statement"
|
|
||||||
? "Datganiad"
|
|
||||||
: selectedRepresentationType == "Final comments"
|
|
||||||
? "Sylwadau terfynol"
|
|
||||||
: selectedRepresentationType
|
|
||||||
: selectedRepresentationType;
|
|
||||||
|
|
||||||
const whichQuestionnaire = () => {
|
const whichQuestionnaire = () => {
|
||||||
{
|
{
|
||||||
switch (currentView.caseReference.appealType) {
|
switch (currentView.caseReference.appealType) {
|
||||||
@@ -215,7 +183,7 @@ let RepLPA = (props) => {
|
|||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
json: setCaseDetailsObj,
|
json: setCaseDetailsObj,
|
||||||
eval: true
|
eval: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
let setCaseResultssObj = router.query.hasOwnProperty("state")
|
||||||
@@ -234,7 +202,7 @@ let RepLPA = (props) => {
|
|||||||
currentView.caseReference.currentReference +
|
currentView.caseReference.currentReference +
|
||||||
'")]',
|
'")]',
|
||||||
json: setCaseResultssObj,
|
json: setCaseResultssObj,
|
||||||
eval: true
|
eval: true,
|
||||||
});
|
});
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
@@ -257,26 +225,62 @@ let RepLPA = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<RepresentationTypeSelectorBlock
|
|
||||||
t={t}
|
|
||||||
headingText={t(
|
|
||||||
"myrepresentations:representation-from-an-lpa-heading"
|
|
||||||
)}
|
|
||||||
kindLabelText={t("myrepresentations:kind-of-rep-label")}
|
|
||||||
isTypeSelected={isTypeConfirmed}
|
|
||||||
selectedTypeDisplay={selectedRepresentationTypeDisplay}
|
|
||||||
representationType={selectedRepresentationType}
|
|
||||||
setTypeSelectionConfirmed={setTypeSelectionConfirmed}
|
|
||||||
onRepresentationTypeChange={onRepresentationTypeChange}
|
|
||||||
onTypeSelectionConfirmed={onTypeSelectionConfirmed}
|
|
||||||
optionsArr={appellantApplicantRepresentationArr}
|
|
||||||
validate={[required]}
|
|
||||||
errorMsg={t("myrepresentations:select-an-option-label")}
|
|
||||||
/>
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-form-group">
|
<div className="govuk-form-group">
|
||||||
{isTypeConfirmed &&
|
{!_.has(
|
||||||
(selectedRepresentationType != "Questionnaire" ? (
|
formObj["representationForm"],
|
||||||
|
["values", "representationType"] ||
|
||||||
|
typeof props.currentView.caseReference.repDetails !=
|
||||||
|
"undefined"
|
||||||
|
) ? (
|
||||||
|
<>
|
||||||
|
<label
|
||||||
|
className="govuk-label govuk-body-m"
|
||||||
|
htmlFor="representationType"
|
||||||
|
>
|
||||||
|
{t(
|
||||||
|
"myrepresentations:representation-from-an-lpa-heading"
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<Field
|
||||||
|
id="representationType"
|
||||||
|
name="representationType"
|
||||||
|
component={RenderPickList}
|
||||||
|
datafieldname="representationType"
|
||||||
|
optionsArr={appellantApplicantRepresentationArr}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<label className="govuk-label govuk-body-m">
|
||||||
|
{t("myrepresentations:representation-type")}:{" "}
|
||||||
|
{router.locale == "cy"
|
||||||
|
? formObj.representationForm.values
|
||||||
|
.representationType == "Questionnaire"
|
||||||
|
? "Holiadur"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType == "Statement"
|
||||||
|
? "Datganiad"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType ==
|
||||||
|
"Final comments"
|
||||||
|
? "Sylwadau terfynol"
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType
|
||||||
|
: formObj.representationForm.values
|
||||||
|
.representationType}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-form-group">
|
||||||
|
{(_.has(formObj["representationForm"], [
|
||||||
|
"values",
|
||||||
|
"representationType",
|
||||||
|
]) ||
|
||||||
|
typeof props.representationType != "undefined") &&
|
||||||
|
(props.representationType != "Questionnaire" &&
|
||||||
|
props.representationType != "Select..." ? (
|
||||||
<>
|
<>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("myrepresentations:enter-comment-label")}
|
{t("myrepresentations:enter-comment-label")}
|
||||||
@@ -350,8 +354,7 @@ let RepLPA = (props) => {
|
|||||||
"myrepresentations:add-files-label"
|
"myrepresentations:add-files-label"
|
||||||
)}
|
)}
|
||||||
ticketnumber={
|
ticketnumber={
|
||||||
props.currentView.caseReference
|
props.currentView.caseReference.ticketnumber
|
||||||
.ticketnumber
|
|
||||||
}
|
}
|
||||||
hint={"sdsd"}
|
hint={"sdsd"}
|
||||||
fileList={
|
fileList={
|
||||||
@@ -398,8 +401,9 @@ let RepLPA = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-button-group">
|
<div className="govuk-button-group">
|
||||||
{isTypeConfirmed &&
|
{(typeof props.representationType != "undefined" ||
|
||||||
selectedRepresentationType == "Questionnaire" && (
|
_.has(formObj, "values", "representationType")) &&
|
||||||
|
props.representationType == "Questionnaire" && (
|
||||||
<>
|
<>
|
||||||
{showQuestionnaireSection <
|
{showQuestionnaireSection <
|
||||||
questionnaireCount && (
|
questionnaireCount && (
|
||||||
@@ -439,14 +443,14 @@ let RepLPA = (props) => {
|
|||||||
// top: 0,
|
// top: 0,
|
||||||
// behavior: "smooth",
|
// behavior: "smooth",
|
||||||
// });
|
// });
|
||||||
(setRepFileName(
|
setRepFileName(
|
||||||
props.formObj[
|
props.formObj[
|
||||||
"representationForm"
|
"representationForm"
|
||||||
].values
|
].values
|
||||||
),
|
),
|
||||||
setShowQuestionnaireSection(
|
setShowQuestionnaireSection(
|
||||||
showQuestionnaireSection - 1
|
showQuestionnaireSection - 1
|
||||||
));
|
);
|
||||||
}}
|
}}
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
>
|
>
|
||||||
@@ -499,8 +503,9 @@ let RepLPA = (props) => {
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}{" "}
|
)}{" "}
|
||||||
{isTypeConfirmed &&
|
{(typeof props.representationType != "undefined" ||
|
||||||
selectedRepresentationType != "Questionnaire" && (
|
_.has(formObj, "values", "representationType")) &&
|
||||||
|
props.representationType != "Questionnaire" && (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
@@ -508,7 +513,7 @@ let RepLPA = (props) => {
|
|||||||
data-module="govuk-button"
|
data-module="govuk-button"
|
||||||
disabled={shouldDisableButton({
|
disabled={shouldDisableButton({
|
||||||
props,
|
props,
|
||||||
formObj
|
formObj,
|
||||||
})}
|
})}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
let valuesObj =
|
let valuesObj =
|
||||||
@@ -607,7 +612,7 @@ RepLPA = connect((state) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
procedureType,
|
procedureType,
|
||||||
representationType
|
representationType,
|
||||||
};
|
};
|
||||||
})(RepLPA);
|
})(RepLPA);
|
||||||
|
|
||||||
@@ -620,7 +625,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
},
|
},
|
||||||
setCurrentReference: (currentReference) => {
|
setCurrentReference: (currentReference) => {
|
||||||
dispatch(setCurrentReference(currentReference));
|
dispatch(setCurrentReference(currentReference));
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => {
|
const mapStateToProps = (state, props) => {
|
||||||
@@ -636,7 +641,8 @@ const mapStateToProps = (state, props) => {
|
|||||||
],
|
],
|
||||||
"firstname":
|
"firstname":
|
||||||
props.props.props.accountDetails.accountDetails.firstname,
|
props.props.props.accountDetails.accountDetails.firstname,
|
||||||
"lastname": props.props.props.accountDetails.accountDetails.lastname
|
"lastname":
|
||||||
|
props.props.props.accountDetails.accountDetails.lastname,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
@@ -647,7 +653,7 @@ const mapStateToProps = (state, props) => {
|
|||||||
currentView: state.currentView,
|
currentView: state.currentView,
|
||||||
myRepresentations: state.myRepresentations,
|
myRepresentations: state.myRepresentations,
|
||||||
watchedCases: state.watchedCases,
|
watchedCases: state.watchedCases,
|
||||||
initialValues: initialValuesTemp
|
initialValues: initialValuesTemp,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -658,6 +664,6 @@ export default connect(
|
|||||||
reduxForm({
|
reduxForm({
|
||||||
form: "representationForm",
|
form: "representationForm",
|
||||||
enableReinitialize: true,
|
enableReinitialize: true,
|
||||||
destroyOnUnmount: false
|
destroyOnUnmount: false,
|
||||||
})(RepLPA)
|
})(RepLPA)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,224 +0,0 @@
|
|||||||
export const APPEAL_TYPES = {
|
|
||||||
SIPS: 846040002,
|
|
||||||
DNS: 846040011,
|
|
||||||
HOUSEHOLDER: 846040004,
|
|
||||||
ADVERT: 846040018,
|
|
||||||
EXCLUDE_QUESTIONNAIRE_1: 846040019,
|
|
||||||
EXCLUDE_QUESTIONNAIRE_2: 846040015,
|
|
||||||
EXCLUDE_QUESTIONNAIRE_3: 846040016
|
|
||||||
};
|
|
||||||
|
|
||||||
export const SPECIALIST_PROCESS = {
|
|
||||||
WRITTEN_REPS: 846040000,
|
|
||||||
HEARING: 846040001
|
|
||||||
};
|
|
||||||
|
|
||||||
export const INVOLVEMENT_TYPES = {
|
|
||||||
LPA: 846040012
|
|
||||||
};
|
|
||||||
|
|
||||||
export const REPRESENTATION_OPTIONS = {
|
|
||||||
QUESTIONNAIRE: "Questionnaire",
|
|
||||||
STATEMENT: "Statement",
|
|
||||||
FINAL_COMMENTS: "Final comments",
|
|
||||||
CONSULTATION_RESPONSE: "Consultation Response",
|
|
||||||
LOCAL_IMPACT_REPORT: "Local Impact Report",
|
|
||||||
MARINE_IMPACT_REPORT: "Marine Impact Report"
|
|
||||||
};
|
|
||||||
|
|
||||||
const isValidDate = (date) =>
|
|
||||||
date instanceof Date && !Number.isNaN(date.getTime());
|
|
||||||
|
|
||||||
const toDateOrNull = (value) => {
|
|
||||||
const date = new Date(value);
|
|
||||||
return isValidDate(date) ? date : null;
|
|
||||||
};
|
|
||||||
|
|
||||||
const endOfDay = (date) => {
|
|
||||||
if (!isValidDate(date)) return null;
|
|
||||||
const next = new Date(date);
|
|
||||||
next.setHours(23, 59, 59, 999);
|
|
||||||
return next;
|
|
||||||
};
|
|
||||||
|
|
||||||
const isWithinWindow = (now, start, end) => {
|
|
||||||
if (!isValidDate(now) || !isValidDate(start) || !isValidDate(end)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return now >= start && now <= end;
|
|
||||||
};
|
|
||||||
|
|
||||||
const normalizeCapacity = (value) =>
|
|
||||||
(value || "")
|
|
||||||
.toString()
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "");
|
|
||||||
|
|
||||||
export const buildRepresentationContext = ({
|
|
||||||
detailsObj = {},
|
|
||||||
appealType,
|
|
||||||
specialistProcess,
|
|
||||||
involvementType,
|
|
||||||
selectedCapacity,
|
|
||||||
isCaseOwner,
|
|
||||||
isNRW,
|
|
||||||
now = new Date()
|
|
||||||
}) => {
|
|
||||||
const isDNS = appealType === APPEAL_TYPES.DNS;
|
|
||||||
|
|
||||||
const startDate = toDateOrNull(
|
|
||||||
isDNS
|
|
||||||
? detailsObj.pinswg_applicationacceptedasvalid
|
|
||||||
: detailsObj.pinswg_startdate || detailsObj.pinswg_startdates
|
|
||||||
);
|
|
||||||
|
|
||||||
const statementDueDate = endOfDay(
|
|
||||||
toDateOrNull(
|
|
||||||
isDNS
|
|
||||||
? detailsObj.pinswg_endofrepresentationperiod
|
|
||||||
: detailsObj.pinswg_statementduedate ||
|
|
||||||
detailsObj.pinswg_statementsduedate
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
const finalCommentsDueDate = endOfDay(
|
|
||||||
toDateOrNull(
|
|
||||||
isDNS
|
|
||||||
? detailsObj.pinswg_endofrepresentationperiod
|
|
||||||
: detailsObj.pinswg_finalcommentsduedate
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
const capacity = normalizeCapacity(selectedCapacity);
|
|
||||||
const isLPA = involvementType === INVOLVEMENT_TYPES.LPA;
|
|
||||||
|
|
||||||
return {
|
|
||||||
appealType,
|
|
||||||
specialistProcess,
|
|
||||||
isDNS,
|
|
||||||
isSIPS: appealType === APPEAL_TYPES.SIPS,
|
|
||||||
isLPA,
|
|
||||||
isNRW: !!isNRW,
|
|
||||||
isCaseOwner: !!isCaseOwner,
|
|
||||||
isSelectedAppellant: capacity === "appellant",
|
|
||||||
isSelectedAgent: capacity === "agent",
|
|
||||||
isSelectedInterestedParty: capacity === "interestedparty",
|
|
||||||
now,
|
|
||||||
startDate,
|
|
||||||
statementDueDate,
|
|
||||||
finalCommentsDueDate
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const addQuestionnaire = (options, ctx) => {
|
|
||||||
const excludedTypes = [
|
|
||||||
APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_1,
|
|
||||||
APPEAL_TYPES.DNS,
|
|
||||||
APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_2,
|
|
||||||
APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_3
|
|
||||||
];
|
|
||||||
|
|
||||||
const canAdd =
|
|
||||||
ctx.isLPA &&
|
|
||||||
!excludedTypes.includes(ctx.appealType) &&
|
|
||||||
isWithinWindow(ctx.now, ctx.startDate, ctx.finalCommentsDueDate);
|
|
||||||
|
|
||||||
if (canAdd) {
|
|
||||||
options.add(REPRESENTATION_OPTIONS.QUESTIONNAIRE);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const addStatements = (options, ctx) => {
|
|
||||||
const isLpaAdvertPart3NoStatement =
|
|
||||||
ctx.isLPA &&
|
|
||||||
ctx.appealType === APPEAL_TYPES.ADVERT &&
|
|
||||||
ctx.specialistProcess === SPECIALIST_PROCESS.WRITTEN_REPS;
|
|
||||||
|
|
||||||
const canAddDnsLpaDocs =
|
|
||||||
ctx.isLPA &&
|
|
||||||
ctx.isDNS &&
|
|
||||||
ctx.appealType !== APPEAL_TYPES.EXCLUDE_QUESTIONNAIRE_1 &&
|
|
||||||
!ctx.isCaseOwner &&
|
|
||||||
isWithinWindow(ctx.now, ctx.startDate, ctx.finalCommentsDueDate);
|
|
||||||
|
|
||||||
if (canAddDnsLpaDocs) {
|
|
||||||
options.add(REPRESENTATION_OPTIONS.LOCAL_IMPACT_REPORT);
|
|
||||||
options.add(REPRESENTATION_OPTIONS.STATEMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
const canAddStatementForNonDns =
|
|
||||||
!ctx.isDNS &&
|
|
||||||
ctx.appealType !== APPEAL_TYPES.HOUSEHOLDER &&
|
|
||||||
!isLpaAdvertPart3NoStatement &&
|
|
||||||
!ctx.isCaseOwner &&
|
|
||||||
isWithinWindow(ctx.now, ctx.startDate, ctx.statementDueDate);
|
|
||||||
|
|
||||||
if (canAddStatementForNonDns) {
|
|
||||||
options.add(REPRESENTATION_OPTIONS.STATEMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
const canAddStatementForDnsNonLpa =
|
|
||||||
ctx.isDNS &&
|
|
||||||
!ctx.isLPA &&
|
|
||||||
!ctx.isCaseOwner &&
|
|
||||||
isWithinWindow(ctx.now, ctx.startDate, ctx.statementDueDate);
|
|
||||||
|
|
||||||
if (canAddStatementForDnsNonLpa) {
|
|
||||||
options.add(REPRESENTATION_OPTIONS.STATEMENT);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const addFinalComments = (options, ctx) => {
|
|
||||||
const canSubmitFinalCommentsDefault =
|
|
||||||
ctx.isSelectedAppellant ||
|
|
||||||
ctx.isSelectedAgent ||
|
|
||||||
ctx.isSelectedInterestedParty ||
|
|
||||||
ctx.isLPA;
|
|
||||||
|
|
||||||
const canSubmitFinalComments = ctx.isDNS
|
|
||||||
? ctx.isLPA
|
|
||||||
: canSubmitFinalCommentsDefault;
|
|
||||||
|
|
||||||
const isSpecialistNonHearing =
|
|
||||||
ctx.specialistProcess !== SPECIALIST_PROCESS.HEARING;
|
|
||||||
|
|
||||||
const finalCommentsWindowStart = ctx.isDNS
|
|
||||||
? ctx.startDate
|
|
||||||
: ctx.statementDueDate;
|
|
||||||
|
|
||||||
const canAdd =
|
|
||||||
canSubmitFinalComments &&
|
|
||||||
isWithinWindow(
|
|
||||||
ctx.now,
|
|
||||||
finalCommentsWindowStart,
|
|
||||||
ctx.finalCommentsDueDate
|
|
||||||
) &&
|
|
||||||
(ctx.appealType !== APPEAL_TYPES.HOUSEHOLDER || isSpecialistNonHearing);
|
|
||||||
|
|
||||||
if (canAdd) {
|
|
||||||
options.add(REPRESENTATION_OPTIONS.FINAL_COMMENTS);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const addConsultation = (options, ctx) => {
|
|
||||||
if (!ctx.isSIPS) return;
|
|
||||||
|
|
||||||
options.add(REPRESENTATION_OPTIONS.CONSULTATION_RESPONSE);
|
|
||||||
|
|
||||||
if (!ctx.isSelectedAppellant) {
|
|
||||||
options.add(REPRESENTATION_OPTIONS.LOCAL_IMPACT_REPORT);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx.isNRW) {
|
|
||||||
options.add(REPRESENTATION_OPTIONS.MARINE_IMPACT_REPORT);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export const buildRepsArrFromContext = (ctx) => {
|
|
||||||
const options = new Set();
|
|
||||||
addQuestionnaire(options, ctx);
|
|
||||||
addStatements(options, ctx);
|
|
||||||
addFinalComments(options, ctx);
|
|
||||||
addConsultation(options, ctx);
|
|
||||||
return [...options];
|
|
||||||
};
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
import { setEventDetails } from "../../store/searchOutput/action";
|
|
||||||
import { setCurrentPage } from "../../store/currentView/action";
|
|
||||||
import { connect } from "react-redux";
|
|
||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import { formatDates } from "../utils";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { getStagesForAppealType } from "./summary/utils/caseStagesByAppealType";
|
|
||||||
|
|
||||||
const statusClassMap = {
|
|
||||||
complete: "govuk-tag govuk-!-margin-top-2",
|
|
||||||
"in-progress": "govuk-tag govuk-tag--yellow govuk-!-margin-top-2",
|
|
||||||
"not-started": "govuk-tag govuk-tag--grey govuk-!-margin-top-2",
|
|
||||||
blocked: "govuk-tag govuk-tag--red govuk-!-margin-top-2"
|
|
||||||
};
|
|
||||||
|
|
||||||
const statusTextMap = {
|
|
||||||
complete: "status-complete",
|
|
||||||
"in-progress": "status-in-progress",
|
|
||||||
"not-started": "status-not-started",
|
|
||||||
blocked: "status-blocked"
|
|
||||||
};
|
|
||||||
|
|
||||||
const StatusDetails = (props) => {
|
|
||||||
let { t } = useTranslation();
|
|
||||||
|
|
||||||
const stages = getStagesForAppealType(
|
|
||||||
props.currentView?.caseReference?.appealType,
|
|
||||||
props.currentView?.caseReference?.statuscode
|
|
||||||
);
|
|
||||||
|
|
||||||
const EventView = (eventsArr) => {
|
|
||||||
eventsArr = eventsArr.value;
|
|
||||||
|
|
||||||
return eventsArr.map((item, key) => {
|
|
||||||
<div>{item.pinswg_name}</div>;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const eventsArr = props.eventsObj?.value || [];
|
|
||||||
|
|
||||||
// event publishiing flag set to true displa
|
|
||||||
|
|
||||||
function hasOwnPropertyAndNotNull(obj, property) {
|
|
||||||
return obj.hasOwnProperty(property) && obj[property] !== null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [expandAll, setExpandAll] = useState(null);
|
|
||||||
// null = use default (in-progress open)
|
|
||||||
// true = force open all
|
|
||||||
// false = force close all
|
|
||||||
|
|
||||||
const handleToggleAll = () => {
|
|
||||||
setExpandAll((prev) => (prev === true ? false : true));
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-grid-row">
|
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<h2 className="govuk-heading-m ">
|
|
||||||
{t("case:status-title")}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="govuk-!-margin-bottom-3 govuk-link watchCase govuk-!-font-size-16 "
|
|
||||||
onClick={handleToggleAll}
|
|
||||||
>
|
|
||||||
{expandAll === true
|
|
||||||
? t("case:status-hide-all-label")
|
|
||||||
: t("case:status-show-all-label")}
|
|
||||||
</button>
|
|
||||||
<ul className="govuk-task-list">
|
|
||||||
{stages.map((stage) => {
|
|
||||||
const isDefaultOpen =
|
|
||||||
stage.status === "in-progress";
|
|
||||||
|
|
||||||
const isOpen =
|
|
||||||
expandAll === null ? isDefaultOpen : expandAll;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<li
|
|
||||||
className="govuk-task-list__item"
|
|
||||||
key={stage.id}
|
|
||||||
>
|
|
||||||
<div className="govuk-task-list__name-and-hint">
|
|
||||||
{stage.descriptionKey && (
|
|
||||||
<details
|
|
||||||
className="govuk-details govuk-!-margin-top-2 govuk-!-margin-bottom-2"
|
|
||||||
open={isOpen}
|
|
||||||
>
|
|
||||||
<summary className="govuk-details__summary">
|
|
||||||
<span className="govuk-details__summary-text">
|
|
||||||
{t(
|
|
||||||
`case-stages:${stage.titleKey}`
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
</summary>
|
|
||||||
<div className="govuk-details__text">
|
|
||||||
{t(
|
|
||||||
`case-stages:${stage.descriptionKey}`
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
className="govuk-task-list__status "
|
|
||||||
id={`${stage.id}-status`}
|
|
||||||
>
|
|
||||||
<strong
|
|
||||||
className={
|
|
||||||
statusClassMap[stage.status] ||
|
|
||||||
"govuk-tag govuk-tag--grey govuk-!-margin-top-2"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
`case-stages:${
|
|
||||||
statusTextMap[
|
|
||||||
stage.status
|
|
||||||
] || "status-not-started"
|
|
||||||
}`
|
|
||||||
)}
|
|
||||||
</strong>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const mapStateToProps = (state) => {
|
|
||||||
return {
|
|
||||||
...state
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
|
||||||
return {
|
|
||||||
setEventDetails: (eventsObj) => {
|
|
||||||
dispatch(setEventDetails(eventsObj));
|
|
||||||
},
|
|
||||||
setCurrentPage: (currentPage) => {
|
|
||||||
dispatch(setCurrentPage(currentPage));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(StatusDetails);
|
|
||||||
@@ -9,7 +9,6 @@ import transLookup from "../../data/lookuptranslations.json";
|
|||||||
import Documents from "./documents";
|
import Documents from "./documents";
|
||||||
import EventsDetails from "./events";
|
import EventsDetails from "./events";
|
||||||
import MediaDetails from "./media";
|
import MediaDetails from "./media";
|
||||||
import StatusDetails from "./status";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
createWatchedCases,
|
createWatchedCases,
|
||||||
@@ -33,10 +32,6 @@ import {
|
|||||||
import { signIn, useSession } from "next-auth/react";
|
import { signIn, useSession } from "next-auth/react";
|
||||||
import { destroyCookie, parseCookies, setCookie } from "nookies";
|
import { destroyCookie, parseCookies, setCookie } from "nookies";
|
||||||
import { getFormCollectionByID, getDetailsProxy } from "../utils";
|
import { getFormCollectionByID, getDetailsProxy } from "../utils";
|
||||||
import {
|
|
||||||
getLivePublishedEvent,
|
|
||||||
isEventLiveNow
|
|
||||||
} from "./summary/utils/liveEvent";
|
|
||||||
|
|
||||||
import * as CaseTypes from "./summaryTypes"; // ✅ must match filename exactly
|
import * as CaseTypes from "./summaryTypes"; // ✅ must match filename exactly
|
||||||
import {
|
import {
|
||||||
@@ -316,20 +311,6 @@ const CaseSummary = (props) => {
|
|||||||
|
|
||||||
let hasEndDate = typeof d != "undefined";
|
let hasEndDate = typeof d != "undefined";
|
||||||
|
|
||||||
const hasEventsTabData =
|
|
||||||
isObjectNotEmpty(props, "eventsObj") &&
|
|
||||||
Array.isArray(props.eventsObj?.value) &&
|
|
||||||
props.eventsObj.value.length > 0;
|
|
||||||
|
|
||||||
const hasMediaTabData =
|
|
||||||
isObjectNotEmpty(props, "mediaObj") &&
|
|
||||||
Array.isArray(props.mediaObj?.value) &&
|
|
||||||
props.mediaObj.value.length > 0;
|
|
||||||
|
|
||||||
const livePublishedEvent = hasEventsTabData
|
|
||||||
? getLivePublishedEvent(props.eventsObj)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
let point = {};
|
let point = {};
|
||||||
let siteCoords = {};
|
let siteCoords = {};
|
||||||
let center = {};
|
let center = {};
|
||||||
@@ -368,47 +349,6 @@ const CaseSummary = (props) => {
|
|||||||
showDetails == true ? (
|
showDetails == true ? (
|
||||||
<>
|
<>
|
||||||
<div className="govuk-frontend-supported">
|
<div className="govuk-frontend-supported">
|
||||||
{livePublishedEvent && (
|
|
||||||
<div
|
|
||||||
className="govuk-notification-banner govuk-!-margin-bottom-6"
|
|
||||||
role="region"
|
|
||||||
aria-labelledby="live-event-title"
|
|
||||||
data-module="govuk-notification-banner"
|
|
||||||
>
|
|
||||||
<div className="govuk-notification-banner__header">
|
|
||||||
<h2
|
|
||||||
className="govuk-notification-banner__title"
|
|
||||||
id="live-event-title"
|
|
||||||
>
|
|
||||||
{t("case:live-event-subheading")}
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
<div className="govuk-notification-banner__content">
|
|
||||||
<p className="govuk-notification-banner__heading">
|
|
||||||
{t("case:live-event-copy")}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{livePublishedEvent.pinswg_eventname && (
|
|
||||||
<p className="govuk-body">
|
|
||||||
{livePublishedEvent.pinswg_eventname}
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<a
|
|
||||||
href={
|
|
||||||
locale === "en"
|
|
||||||
? livePublishedEvent.pinswg_linktotheevent
|
|
||||||
: livePublishedEvent.pinswg_linktotheeventstreamwelsh
|
|
||||||
}
|
|
||||||
className="govuk-link govuk-link--no-visited-state"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
{t("case:live-event-link")}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||||
@@ -423,7 +363,6 @@ const CaseSummary = (props) => {
|
|||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="govuk-tabs" data-module="govuk-tabs">
|
<div className="govuk-tabs" data-module="govuk-tabs">
|
||||||
<h2 className="govuk-tabs__title">Contents</h2>
|
<h2 className="govuk-tabs__title">Contents</h2>
|
||||||
<ul className="govuk-tabs__list">
|
<ul className="govuk-tabs__list">
|
||||||
@@ -509,7 +448,7 @@ const CaseSummary = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
{hasEventsTabData && (
|
{isObjectNotEmpty(props, "eventsObj") && (
|
||||||
<li
|
<li
|
||||||
className={
|
className={
|
||||||
whichTab == "case-events"
|
whichTab == "case-events"
|
||||||
@@ -529,7 +468,7 @@ const CaseSummary = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
{hasMediaTabData && (
|
{isObjectNotEmpty(props, "mediaObj") && (
|
||||||
<li
|
<li
|
||||||
className={
|
className={
|
||||||
whichTab == "case-media"
|
whichTab == "case-media"
|
||||||
@@ -566,21 +505,6 @@ const CaseSummary = (props) => {
|
|||||||
{t("case:summary-tab-documents-label")}
|
{t("case:summary-tab-documents-label")}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li
|
|
||||||
className={
|
|
||||||
whichTab == "case-status"
|
|
||||||
? "govuk-tabs__list-item govuk-tabs__list-item--selected"
|
|
||||||
: "govuk-tabs__list-item "
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<a
|
|
||||||
className="govuk-tabs__tab"
|
|
||||||
href="#case-status"
|
|
||||||
onClick={() => setWhichTab("case-status")}
|
|
||||||
>
|
|
||||||
{t("case:status-title")}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
@@ -1954,7 +1878,7 @@ const CaseSummary = (props) => {
|
|||||||
.PrimaryIdAttribute == "pinswg_sipscase" && (
|
.PrimaryIdAttribute == "pinswg_sipscase" && (
|
||||||
<EIADetails props={props} />
|
<EIADetails props={props} />
|
||||||
)}
|
)}
|
||||||
{hasEventsTabData && (
|
{isObjectNotEmpty(props, "eventsObj") && (
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
whichTab == "case-events"
|
whichTab == "case-events"
|
||||||
@@ -1967,7 +1891,7 @@ const CaseSummary = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{hasMediaTabData && (
|
{isObjectNotEmpty(props, "mediaObj") && (
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
whichTab == "case-media"
|
whichTab == "case-media"
|
||||||
@@ -2004,16 +1928,6 @@ const CaseSummary = (props) => {
|
|||||||
showFilteredDocs={props.showFilteredDocs}
|
showFilteredDocs={props.showFilteredDocs}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
className={
|
|
||||||
whichTab == "case-status"
|
|
||||||
? "govuk-tabs__panel "
|
|
||||||
: "govuk-tabs__panel govuk-tabs__panel--hidden"
|
|
||||||
}
|
|
||||||
id="case-status"
|
|
||||||
>
|
|
||||||
<StatusDetails />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@@ -2078,12 +1992,10 @@ const CaseSummary = (props) => {
|
|||||||
) : null;
|
) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fallbackIncidentId = setCaseQueryObj?.value?.[0]?.incidentid;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const linkCaseObj = async () => {
|
const linkCaseObj = async () => {
|
||||||
let docObj = await getLinkedCases(
|
let docObj = await getLinkedCases(
|
||||||
incidentid || fallbackIncidentId
|
incidentid || setCaseQueryObj.value[0].incidentid
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
setCurrentLinkedCases(data);
|
setCurrentLinkedCases(data);
|
||||||
@@ -2094,7 +2006,7 @@ const CaseSummary = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const linkedCases = linkCaseObj();
|
const linkedCases = linkCaseObj();
|
||||||
}, [incidentid, fallbackIncidentId, setCurrentLinkedCases]);
|
}, [incidentid, setCurrentLinkedCases]);
|
||||||
|
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
let expDate = new Date(now);
|
let expDate = new Date(now);
|
||||||
|
|||||||
@@ -1,882 +0,0 @@
|
|||||||
const slugify = (value) =>
|
|
||||||
value
|
|
||||||
.toString()
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/[^a-z0-9]+/g, "-")
|
|
||||||
.replace(/^-|-$/g, "");
|
|
||||||
|
|
||||||
const buildStages = (stages) =>
|
|
||||||
stages.map((stage) => ({
|
|
||||||
id: slugify(stage.titleKey),
|
|
||||||
...stage
|
|
||||||
}));
|
|
||||||
|
|
||||||
export const stagesByCaseType = {
|
|
||||||
DNS: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040001,
|
|
||||||
titleKey: "pre-application",
|
|
||||||
descriptionKey: "pre-application-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040002,
|
|
||||||
titleKey: "environmental-impact-assessment-scoping",
|
|
||||||
descriptionKey: "environmental-impact-assessment-scoping-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040003,
|
|
||||||
titleKey: "notification",
|
|
||||||
descriptionKey: "notification-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040004,
|
|
||||||
titleKey: "acceptance-checking",
|
|
||||||
descriptionKey: "acceptance-checking-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040005,
|
|
||||||
titleKey: "invalid-submission",
|
|
||||||
descriptionKey: "invalid-submission-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040006,
|
|
||||||
titleKey: "consultation",
|
|
||||||
descriptionKey: "consultation-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040007,
|
|
||||||
titleKey: "re-consultation",
|
|
||||||
descriptionKey: "re-consultation-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040008,
|
|
||||||
titleKey: "reporting",
|
|
||||||
descriptionKey: "reporting-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040009,
|
|
||||||
titleKey: "inspectors-decision",
|
|
||||||
descriptionKey: "inspectors-decision-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040011,
|
|
||||||
titleKey: "report-to-ministers",
|
|
||||||
descriptionKey: "report-to-ministers-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040012,
|
|
||||||
titleKey: "minister-s-decision",
|
|
||||||
descriptionKey: "minister-s-decision-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-application"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
SIP: "DNS",
|
|
||||||
|
|
||||||
PLANNING_S78: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040014,
|
|
||||||
titleKey: "appeal-submitted",
|
|
||||||
descriptionKey: "appeal-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040015,
|
|
||||||
titleKey: "appeal-registered",
|
|
||||||
descriptionKey: "appeal-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040016,
|
|
||||||
titleKey: "appeal-validated",
|
|
||||||
descriptionKey: "appeal-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 1,
|
|
||||||
titleKey: "case-in-progress",
|
|
||||||
descriptionKey: "case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040017,
|
|
||||||
titleKey: "questionnaire-lpa-to-notify",
|
|
||||||
descriptionKey: "questionnaire-lpa-to-notify-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040018,
|
|
||||||
titleKey: "representations-period",
|
|
||||||
descriptionKey: "representations-period-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040020,
|
|
||||||
titleKey: "event",
|
|
||||||
descriptionKey: "event-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
CONDITIONS_73_79: "PLANNING_S78",
|
|
||||||
LBCAC: "PLANNING_S78",
|
|
||||||
LDCS: "PLANNING_S78",
|
|
||||||
PLANNING_OBLIGATIONS_S106: "PLANNING_S78",
|
|
||||||
PRIOR_NOTIFICATION: "PLANNING_S78",
|
|
||||||
|
|
||||||
HAS: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040014,
|
|
||||||
titleKey: "appeal-submitted",
|
|
||||||
descriptionKey: "appeal-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040015,
|
|
||||||
titleKey: "appeal-registered",
|
|
||||||
descriptionKey: "appeal-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040016,
|
|
||||||
titleKey: "appeal-validated",
|
|
||||||
descriptionKey: "appeal-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 1,
|
|
||||||
titleKey: "case-in-progress",
|
|
||||||
descriptionKey: "case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
CALL_INS: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040023,
|
|
||||||
titleKey: "application-called-in",
|
|
||||||
descriptionKey: "application-called-in-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040043,
|
|
||||||
titleKey: "application-registered",
|
|
||||||
descriptionKey: "application-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040024,
|
|
||||||
titleKey: "application-validated",
|
|
||||||
descriptionKey: "application-validated-desc-callin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 1,
|
|
||||||
titleKey: "case-in-progress",
|
|
||||||
descriptionKey: "case-in-progress-desc-callin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040025,
|
|
||||||
titleKey: "lpa-to-notify",
|
|
||||||
descriptionKey: "lpa-to-notify-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040018,
|
|
||||||
titleKey: "representations-period",
|
|
||||||
descriptionKey: "representations-period-desc-callin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc-callin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040020,
|
|
||||||
titleKey: "event",
|
|
||||||
descriptionKey: "event-desc-callin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040028,
|
|
||||||
titleKey: "report-issued-to-welsh-ministers",
|
|
||||||
descriptionKey: "report-issued-to-welsh-ministers-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040012,
|
|
||||||
titleKey: "minister-s-decision",
|
|
||||||
descriptionKey: "minister-s-decision-desc-callin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-callin"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
ENFORCEMENT: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040014,
|
|
||||||
titleKey: "appeal-submitted",
|
|
||||||
descriptionKey: "appeal-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040015,
|
|
||||||
titleKey: "appeal-registered",
|
|
||||||
descriptionKey: "appeal-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040029,
|
|
||||||
titleKey: "fee-due",
|
|
||||||
descriptionKey: "fee-due-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040030,
|
|
||||||
titleKey: "validated",
|
|
||||||
descriptionKey: "appeal-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 1,
|
|
||||||
titleKey: "case-in-progress",
|
|
||||||
descriptionKey: "case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040017,
|
|
||||||
titleKey: "questionnaire-lpa-to-notify",
|
|
||||||
descriptionKey: "questionnaire-lpa-to-notify-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040018,
|
|
||||||
titleKey: "representations-period",
|
|
||||||
descriptionKey: "representations-period-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040020,
|
|
||||||
titleKey: "event",
|
|
||||||
descriptionKey: "event-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
ENFORCEMENT_LISTED_BUILDING: "ENFORCEMENT",
|
|
||||||
MAINTENANCE_OF_LAND: "ENFORCEMENT",
|
|
||||||
|
|
||||||
RIGHTS_OF_WAY_SCHEDULE_14: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040014,
|
|
||||||
titleKey: "appeal-submitted",
|
|
||||||
descriptionKey: "appeal-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040015,
|
|
||||||
titleKey: "appeal-registered",
|
|
||||||
descriptionKey: "appeal-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040016,
|
|
||||||
titleKey: "appeal-validated",
|
|
||||||
descriptionKey: "appeal-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040031,
|
|
||||||
titleKey: "appeal-start-case-in-progress",
|
|
||||||
descriptionKey: "case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040032,
|
|
||||||
titleKey: "statements-representations-period",
|
|
||||||
descriptionKey: "statements-representations-period-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-application"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
RIGHTS_OF_WAY_ORDERS: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040033,
|
|
||||||
titleKey: "order-submitted",
|
|
||||||
descriptionKey: "order-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040034,
|
|
||||||
titleKey: "order-submission-registered",
|
|
||||||
descriptionKey: "order-submission-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040035,
|
|
||||||
titleKey: "order-submission-validated",
|
|
||||||
descriptionKey: "order-submission-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040036,
|
|
||||||
titleKey: "case-started-case-in-progress",
|
|
||||||
descriptionKey: "case-started-case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040010,
|
|
||||||
titleKey: "statements",
|
|
||||||
descriptionKey: "statements-desc-order"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc-order"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040037,
|
|
||||||
titleKey: "event-site-visit",
|
|
||||||
descriptionKey: "event-site-visit-desc-order"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-order"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
REQUESTS_FOR_DIRECTION: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040042,
|
|
||||||
titleKey: "application-submitted",
|
|
||||||
descriptionKey: "application-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040043,
|
|
||||||
titleKey: "application-registered",
|
|
||||||
descriptionKey: "application-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040036,
|
|
||||||
titleKey: "application-start-case-in-progress",
|
|
||||||
descriptionKey: "application-start-case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040010,
|
|
||||||
titleKey: "statements",
|
|
||||||
descriptionKey: "statements-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "statements-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-application"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
ADVERTS: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040014,
|
|
||||||
titleKey: "appeal-submitted",
|
|
||||||
descriptionKey: "appeal-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040015,
|
|
||||||
titleKey: "appeal-registered",
|
|
||||||
descriptionKey: "appeal-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040016,
|
|
||||||
titleKey: "appeal-validated",
|
|
||||||
descriptionKey: "appeal-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040036,
|
|
||||||
titleKey: "case-started-case-in-progress",
|
|
||||||
descriptionKey: "case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040017,
|
|
||||||
titleKey: "questionnaire-lpa-to-notify",
|
|
||||||
descriptionKey: "questionnaire-lpa-to-notify-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040010,
|
|
||||||
titleKey: "statements",
|
|
||||||
descriptionKey: "statements-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
HEDGEROW_TPO: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040014,
|
|
||||||
titleKey: "appeal-submitted",
|
|
||||||
descriptionKey: "appeal-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040015,
|
|
||||||
titleKey: "appeal-registered",
|
|
||||||
descriptionKey: "appeal-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040016,
|
|
||||||
titleKey: "appeal-validated",
|
|
||||||
descriptionKey: "appeal-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040031,
|
|
||||||
titleKey: "appeal-start-case-in-progress",
|
|
||||||
descriptionKey: "case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040017,
|
|
||||||
titleKey: "questionnaire-lpa-to-notify",
|
|
||||||
descriptionKey: "questionnaire-lpa-to-notify-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040032,
|
|
||||||
titleKey: "statements-representations-period",
|
|
||||||
descriptionKey: "statements-representations-period-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
COMMON_LAND: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040042,
|
|
||||||
titleKey: "application-submitted",
|
|
||||||
descriptionKey: "application-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040043,
|
|
||||||
titleKey: "application-registered",
|
|
||||||
descriptionKey: "application-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040024,
|
|
||||||
titleKey: "application-validated",
|
|
||||||
descriptionKey: "application-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040031,
|
|
||||||
titleKey: "application-start-case-in-progress",
|
|
||||||
descriptionKey: "application-start-case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040038,
|
|
||||||
titleKey: "applicant-statement-on-representations",
|
|
||||||
descriptionKey: "applicant-statement-on-representations-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040039,
|
|
||||||
titleKey: "representatives-comment",
|
|
||||||
descriptionKey: "representatives-comment-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040027,
|
|
||||||
titleKey: "applicants-final-comment",
|
|
||||||
descriptionKey: "applicants-final-comment-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040037,
|
|
||||||
titleKey: "event-site-visit",
|
|
||||||
descriptionKey: "event-site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040022,
|
|
||||||
titleKey: "decision-issued",
|
|
||||||
descriptionKey: "decision-issued-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-application"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
COMPULSORY_PURCHASE_ORDERS: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040033,
|
|
||||||
titleKey: "order-submitted",
|
|
||||||
descriptionKey: "order-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040040,
|
|
||||||
titleKey: "order-registered",
|
|
||||||
descriptionKey: "order-submission-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040041,
|
|
||||||
titleKey: "order-validated",
|
|
||||||
descriptionKey: "order-submission-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 1,
|
|
||||||
titleKey: "case-in-progress",
|
|
||||||
descriptionKey: "case-started-case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040010,
|
|
||||||
titleKey: "statements",
|
|
||||||
descriptionKey: "statements-desc-order"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040019,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc-cpo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040037,
|
|
||||||
titleKey: "event-site-visit",
|
|
||||||
descriptionKey: "event-site-visit-desc-order"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040011,
|
|
||||||
titleKey: "report-to-ministers",
|
|
||||||
descriptionKey: "report-to-ministers-desc-cpo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-order"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
ELECTRICITY_ACT: "PLANNING_S78",
|
|
||||||
HARBOUR_REVISION_ORDER: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040033,
|
|
||||||
titleKey: "order-submitted",
|
|
||||||
descriptionKey: "order-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040040,
|
|
||||||
titleKey: "order-registered",
|
|
||||||
descriptionKey: "order-submission-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040041,
|
|
||||||
titleKey: "order-validated",
|
|
||||||
descriptionKey: "order-submission-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 1,
|
|
||||||
titleKey: "case-in-progress",
|
|
||||||
descriptionKey: "case-started-case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040010,
|
|
||||||
titleKey: "statements",
|
|
||||||
descriptionKey: "statements-desc-order"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040055,
|
|
||||||
titleKey: "final-comments",
|
|
||||||
descriptionKey: "final-comments-desc-cpo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040037,
|
|
||||||
titleKey: "event-site-visit",
|
|
||||||
descriptionKey: "event-site-visit-desc-order"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040056,
|
|
||||||
titleKey: "report-to-ministers",
|
|
||||||
descriptionKey: "report-to-ministers-desc-cpo"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040060,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-order"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
TRANSPORT_WORKS: "PLANNING_S78",
|
|
||||||
|
|
||||||
WAYLEAVE: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040042,
|
|
||||||
titleKey: "application-submitted",
|
|
||||||
descriptionKey: "application-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040043,
|
|
||||||
titleKey: "application-registered",
|
|
||||||
descriptionKey: "application-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040024,
|
|
||||||
titleKey: "application-validated",
|
|
||||||
descriptionKey: "application-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 1,
|
|
||||||
titleKey: "case-in-progress",
|
|
||||||
descriptionKey: "application-start-case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040021,
|
|
||||||
titleKey: "site-visit",
|
|
||||||
descriptionKey: "site-visit-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040044,
|
|
||||||
titleKey: "report-to-desnz",
|
|
||||||
descriptionKey: "report-to-desnz-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040013,
|
|
||||||
titleKey: "case-closed",
|
|
||||||
descriptionKey: "case-closed-desc-application"
|
|
||||||
}
|
|
||||||
]),
|
|
||||||
|
|
||||||
NON_VALIDATION: buildStages([
|
|
||||||
{
|
|
||||||
stageId: 846040014,
|
|
||||||
titleKey: "appeal-submitted",
|
|
||||||
descriptionKey: "appeal-submitted-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040015,
|
|
||||||
titleKey: "appeal-registered",
|
|
||||||
descriptionKey: "appeal-registered-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040016,
|
|
||||||
titleKey: "appeal-validated",
|
|
||||||
descriptionKey: "appeal-validated-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040045,
|
|
||||||
titleKey: "case-in-progress-assessment",
|
|
||||||
descriptionKey: "case-in-progress-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040046,
|
|
||||||
titleKey: "decision-outcome",
|
|
||||||
descriptionKey: "decision-outcome-desc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
stageId: 846040060,
|
|
||||||
titleKey: "case-closed-nonval",
|
|
||||||
descriptionKey: "case-closed-desc"
|
|
||||||
}
|
|
||||||
])
|
|
||||||
};
|
|
||||||
|
|
||||||
export const caseTypeAliases = {
|
|
||||||
// Planning S78 group
|
|
||||||
S78: "PLANNING_S78",
|
|
||||||
PLANNING_78: "PLANNING_S78",
|
|
||||||
PLANNING_S78: "PLANNING_S78",
|
|
||||||
CONDITIONS_73_79: "CONDITIONS_73_79",
|
|
||||||
LBCAC: "LBCAC",
|
|
||||||
LDCS: "LDCS",
|
|
||||||
PLANNING_OBLIGATIONS_S106: "PLANNING_OBLIGATIONS_S106",
|
|
||||||
PRIOR_NOTIFICATION: "PRIOR_NOTIFICATION",
|
|
||||||
|
|
||||||
// Other types
|
|
||||||
HAS: "HAS",
|
|
||||||
CALL_INS: "CALL_INS",
|
|
||||||
CALL_IN: "CALL_INS",
|
|
||||||
ENFORCEMENT: "ENFORCEMENT",
|
|
||||||
ENFORCEMENT_LISTED_BUILDING: "ENFORCEMENT_LISTED_BUILDING",
|
|
||||||
MAINTENANCE_OF_LAND: "MAINTENANCE_OF_LAND",
|
|
||||||
RIGHTS_OF_WAY_SCHEDULE_14: "RIGHTS_OF_WAY_SCHEDULE_14",
|
|
||||||
RIGHTS_OF_WAY_ORDERS: "RIGHTS_OF_WAY_ORDERS",
|
|
||||||
REQUESTS_FOR_DIRECTION: "REQUESTS_FOR_DIRECTION",
|
|
||||||
ADVERTS: "ADVERTS",
|
|
||||||
HEDGEROW_TPO: "HEDGEROW_TPO",
|
|
||||||
COMMON_LAND: "COMMON_LAND",
|
|
||||||
COMPULSORY_PURCHASE_ORDERS: "COMPULSORY_PURCHASE_ORDERS",
|
|
||||||
ELECTRICITY_ACT: "ELECTRICITY_ACT",
|
|
||||||
HARBOUR_REVISION_ORDER: "HARBOUR_REVISION_ORDER",
|
|
||||||
TRANSPORT_WORKS: "TRANSPORT_WORKS",
|
|
||||||
WAYLEAVE: "WAYLEAVE",
|
|
||||||
NON_VALIDATION: "NON_VALIDATION",
|
|
||||||
DNS: "DNS",
|
|
||||||
SIP: "SIP"
|
|
||||||
};
|
|
||||||
|
|
||||||
const normaliseCaseType = (caseType) =>
|
|
||||||
caseType
|
|
||||||
?.toString()
|
|
||||||
.trim()
|
|
||||||
.toUpperCase()
|
|
||||||
.replace(/&/g, "AND")
|
|
||||||
.replace(/[^A-Z0-9]+/g, "_")
|
|
||||||
.replace(/^_|_$/g, "");
|
|
||||||
|
|
||||||
const resolveStages = (caseTypeOrAppealTypeId) => {
|
|
||||||
const appealTypeKey =
|
|
||||||
caseTypeKeyByAppealTypeId[Number(caseTypeOrAppealTypeId)];
|
|
||||||
|
|
||||||
const normalised = normaliseCaseType(caseTypeOrAppealTypeId);
|
|
||||||
|
|
||||||
const key = appealTypeKey || caseTypeAliases[normalised] || normalised;
|
|
||||||
|
|
||||||
const entry = stagesByCaseType[key];
|
|
||||||
|
|
||||||
if (!entry) return [];
|
|
||||||
|
|
||||||
if (typeof entry === "string") {
|
|
||||||
return stagesByCaseType[entry] || [];
|
|
||||||
}
|
|
||||||
|
|
||||||
return entry;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getStagesForAppealType = (caseType, currentStageId) => {
|
|
||||||
const stages = resolveStages(caseType);
|
|
||||||
const currentStageNumber = Number(currentStageId);
|
|
||||||
|
|
||||||
const currentIndex = stages.findIndex(
|
|
||||||
(stage) => Number(stage.stageId) === currentStageNumber
|
|
||||||
);
|
|
||||||
|
|
||||||
return stages.map((stage, index) => ({
|
|
||||||
...stage,
|
|
||||||
status:
|
|
||||||
currentIndex === -1
|
|
||||||
? "not-started"
|
|
||||||
: index < currentIndex
|
|
||||||
? "complete"
|
|
||||||
: index === currentIndex
|
|
||||||
? "in-progress"
|
|
||||||
: "not-started"
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
export const caseTypeKeyByAppealTypeId = {
|
|
||||||
846040000: "PLANNING_S78",
|
|
||||||
846040001: "CONDITIONS_73_79",
|
|
||||||
846040002: "SIP",
|
|
||||||
846040003: "PLANNING_OBLIGATIONS_S106",
|
|
||||||
846040004: "HAS",
|
|
||||||
846040005: "ENFORCEMENT",
|
|
||||||
846040006: "ENFORCEMENT_LISTED_BUILDING",
|
|
||||||
846040007: "MAINTENANCE_OF_LAND",
|
|
||||||
846040008: "LDCS",
|
|
||||||
846040009: "PLANNING_S78",
|
|
||||||
846040010: "CALL_INS",
|
|
||||||
846040011: "DNS",
|
|
||||||
846040012: "ELECTRICITY_ACT",
|
|
||||||
846040013: "TRANSPORT_WORKS",
|
|
||||||
846040014: "HARBOUR_REVISION_ORDER",
|
|
||||||
846040015: "RIGHTS_OF_WAY_SCHEDULE_14",
|
|
||||||
846040016: "COMMON_LAND",
|
|
||||||
846040017: "HEDGEROW_TPO",
|
|
||||||
846040018: "ADVERTS",
|
|
||||||
846040019: "COMPULSORY_PURCHASE_ORDERS",
|
|
||||||
846040020: "PLANNING_S78",
|
|
||||||
846040021: "WAYLEAVE",
|
|
||||||
846040024: "NON_VALIDATION",
|
|
||||||
846040025: "LBCAC"
|
|
||||||
};
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
export function isEventLiveNow(item) {
|
|
||||||
if (!item?.pinswg_dateeventrequested) return false;
|
|
||||||
|
|
||||||
const now = new Date();
|
|
||||||
const start = new Date(item.pinswg_dateeventrequested);
|
|
||||||
|
|
||||||
if (isNaN(start.getTime())) return false;
|
|
||||||
|
|
||||||
const endDateValue =
|
|
||||||
item.pinswg_enddateofevent || item.pinswg_enddateoftheevent;
|
|
||||||
|
|
||||||
if (endDateValue) {
|
|
||||||
const end = new Date(endDateValue);
|
|
||||||
if (isNaN(end.getTime())) return false;
|
|
||||||
|
|
||||||
end.setHours(23, 59, 59, 999);
|
|
||||||
|
|
||||||
return now >= start && now <= end;
|
|
||||||
}
|
|
||||||
|
|
||||||
const endOfStartDay = new Date(start);
|
|
||||||
endOfStartDay.setHours(23, 59, 59, 999);
|
|
||||||
|
|
||||||
return now >= start && now <= endOfStartDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getLivePublishedEvent(eventsObj) {
|
|
||||||
const eventsArr = eventsObj?.value || [];
|
|
||||||
|
|
||||||
return eventsArr.find(
|
|
||||||
(item) =>
|
|
||||||
item.pinswg_eventpublishflag &&
|
|
||||||
item.pinswg_linktotheevent &&
|
|
||||||
isEventLiveNow(item)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_advertsid = (props) => {
|
const Pinswg_advertsid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -65,16 +64,20 @@ const Pinswg_advertsid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
<>
|
router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_callinss77id = (props) => {
|
const Pinswg_callinss77id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -44,16 +43,20 @@ const Pinswg_callinss77id = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
<>
|
router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_commonlandid = (props) => {
|
const Pinswg_commonlandid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -44,16 +43,20 @@ const Pinswg_commonlandid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
<>
|
router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_communityinfrastructurelevyid = (props) => {
|
const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -44,16 +43,20 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
<>
|
router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
import GoogleMapComponent from "../../mapping/";
|
import GoogleMapComponent from "../../mapping/";
|
||||||
|
|
||||||
@@ -25,7 +24,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
|
|
||||||
point = new OSPoint(
|
point = new OSPoint(
|
||||||
detailsObj.pinswg_anticipatedgridreferencenorthingtext,
|
detailsObj.pinswg_anticipatedgridreferencenorthingtext,
|
||||||
detailsObj.pinswg_anticipatedgridreferenceeastingtext
|
detailsObj.pinswg_anticipatedgridreferenceeastingtext,
|
||||||
);
|
);
|
||||||
siteCoords = point.toOSGB36();
|
siteCoords = point.toOSGB36();
|
||||||
//console.log(siteCoords);
|
//console.log(siteCoords);
|
||||||
@@ -36,7 +35,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
: parseFloat(siteCoords.latitude),
|
: parseFloat(siteCoords.latitude),
|
||||||
lng: isNaN(parseFloat(siteCoords.longitude))
|
lng: isNaN(parseFloat(siteCoords.longitude))
|
||||||
? -3.437989
|
? -3.437989
|
||||||
: parseFloat(siteCoords.longitude)
|
: parseFloat(siteCoords.longitude),
|
||||||
};
|
};
|
||||||
|
|
||||||
const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
|
const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
|
||||||
@@ -59,7 +58,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{getBilingualText(
|
{getBilingualText(
|
||||||
detailsObj.pinswg_projectdescription,
|
detailsObj.pinswg_projectdescription,
|
||||||
router.locale
|
router.locale,
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,7 +67,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "40vh",
|
height: "40vh",
|
||||||
width: "100%"
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GoogleMapComponent
|
<GoogleMapComponent
|
||||||
@@ -96,10 +95,11 @@ const Pinswg_dnsid = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-case-type-label"
|
label={t("case:summary-case-type-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -109,23 +109,28 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -133,7 +138,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: (
|
: (
|
||||||
<a
|
<a
|
||||||
@@ -141,7 +146,7 @@ const Pinswg_dnsid = (props) => {
|
|||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
href={
|
href={
|
||||||
detailsObj.pinswg_webaddress.indexOf(
|
detailsObj.pinswg_webaddress.indexOf(
|
||||||
"https://"
|
"https://",
|
||||||
)
|
)
|
||||||
? "https://" +
|
? "https://" +
|
||||||
detailsObj.pinswg_webaddress
|
detailsObj.pinswg_webaddress
|
||||||
@@ -154,31 +159,45 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</a>
|
</a>
|
||||||
) ||
|
) ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -186,21 +205,24 @@ const Pinswg_dnsid = (props) => {
|
|||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
transLookup,
|
||||||
)
|
)
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-procedure-label"
|
label={t("case:summary-procedure-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -210,15 +232,17 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
@@ -253,10 +277,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-type-of-event-label"
|
"case:summary-type-of-event-label",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -266,58 +293,68 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-start-event-date-label"
|
"case:summary-start-event-date-label",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdateofevent"
|
"pinswg_startdateofevent",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-event-date-label"
|
label={t("case:summary-event-date-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -333,13 +370,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -352,49 +389,54 @@ const Pinswg_dnsid = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateofdecision
|
detailsObj.pinswg_dateofdecision,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateofdecision
|
detailsObj.pinswg_dateofdecision,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t(
|
||||||
"case:summary-case-link-status-label"
|
"case:summary-case-link-status-label",
|
||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents"
|
"numberofchildincidents",
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
0
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-case-link-status-not-linked"
|
"case:summary-case-link-status-not-linked",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-case-link-status-not-linked"
|
"case:summary-case-link-status-not-linked",
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -403,13 +445,13 @@ const Pinswg_dnsid = (props) => {
|
|||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t(
|
{t(
|
||||||
"case:summary-linked-cases-label"
|
"case:summary-linked-cases-label",
|
||||||
)}
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView
|
props.currentView
|
||||||
.linkedCaseReferences
|
.linkedCaseReferences,
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -467,305 +509,370 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_writtenacceptanceofnotification
|
detailsObj.pinswg_writtenacceptanceofnotification,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_writtenacceptanceofnotification
|
detailsObj.pinswg_writtenacceptanceofnotification,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_deadlineforsubmissionofapplication
|
detailsObj.pinswg_deadlineforsubmissionofapplication,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_deadlineforsubmissionofapplication
|
detailsObj.pinswg_deadlineforsubmissionofapplication,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateofsubmissionofapplication
|
detailsObj.pinswg_dateofsubmissionofapplication,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateofsubmissionofapplication
|
detailsObj.pinswg_dateofsubmissionofapplication,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid",
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid
|
detailsObj.pinswg_applicationrejectedasinvalid,
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationacceptedasvalid
|
detailsObj.pinswg_applicationacceptedasvalid,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_applicationacceptedasvalid
|
detailsObj.pinswg_applicationacceptedasvalid,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid",
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid
|
detailsObj.pinswg_applicationrejectedasinvalid,
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid
|
detailsObj.pinswg_applicationrejectedasinvalid,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_applicationrejectedasinvalid
|
detailsObj.pinswg_applicationrejectedasinvalid,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_endofrepresentationperiod
|
detailsObj.pinswg_endofrepresentationperiod,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_endofrepresentationperiod
|
detailsObj.pinswg_endofrepresentationperiod,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication",
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
detailsObj.pinswg_dateofrequesttovarytheapplication,
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
detailsObj.pinswg_dateofrequesttovarytheapplication,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
detailsObj.pinswg_dateofrequesttovarytheapplication,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication",
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
detailsObj.pinswg_confirmrequesttovaryapplication,
|
||||||
) &&
|
) &&
|
||||||
(_.has(
|
(_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication",
|
||||||
) &&
|
) &&
|
||||||
_.isEmpty(
|
_.isEmpty(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
detailsObj.pinswg_rejectrequesttovaryapplication,
|
||||||
) ? (
|
) ? (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
detailsObj.pinswg_confirmrequesttovaryapplication,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
detailsObj.pinswg_confirmrequesttovaryapplication,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
))}
|
))}
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication",
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
detailsObj.pinswg_rejectrequesttovaryapplication,
|
||||||
) &&
|
) &&
|
||||||
(_.has(
|
(_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication",
|
||||||
) &&
|
) &&
|
||||||
_.isEmpty(
|
_.isEmpty(
|
||||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
detailsObj.pinswg_confirmrequesttovaryapplication,
|
||||||
) ? (
|
) ? (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
detailsObj.pinswg_rejectrequesttovaryapplication,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
detailsObj.pinswg_rejectrequesttovaryapplication,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
))}
|
))}
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates",
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_suspensionstartdates
|
detailsObj.pinswg_suspensionstartdates,
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_suspensionstartdates
|
detailsObj.pinswg_suspensionstartdates,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_suspensionstartdates
|
detailsObj.pinswg_suspensionstartdates,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_suspensionenddates
|
detailsObj.pinswg_suspensionenddates,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_suspensionenddates
|
detailsObj.pinswg_suspensionenddates,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_reportdueby
|
detailsObj.pinswg_reportdueby,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_reportdueby
|
detailsObj.pinswg_reportdueby,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t("case:summary-suspension-dates")}
|
label={t("case:summary-suspension-dates")}
|
||||||
@@ -789,50 +896,60 @@ const Pinswg_dnsid = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment",
|
||||||
)
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{_.has(
|
{_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate",
|
||||||
) &&
|
) &&
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_withdrawndate
|
detailsObj.pinswg_withdrawndate,
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-withdrawn-date"
|
"case:summary-withdrawn-date",
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
!_.isEmpty(
|
!_.isEmpty(
|
||||||
detailsObj.pinswg_withdrawndate
|
detailsObj.pinswg_withdrawndate,
|
||||||
)
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_withdrawndate
|
detailsObj.pinswg_withdrawndate,
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label",
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_electricityactid = (props) => {
|
const Pinswg_electricityactid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -63,10 +62,11 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-case-type-label"
|
label={t("case:summary-case-type-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -76,7 +76,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -84,28 +84,42 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -121,7 +135,9 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -141,10 +157,11 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-procedure-label"
|
label={t("case:summary-procedure-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -154,18 +171,23 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-type-of-event-label"
|
"case:summary-type-of-event-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -175,16 +197,21 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -194,7 +221,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -202,7 +229,9 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -218,7 +247,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -245,7 +274,7 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents"
|
"numberofchildincidents",
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
0
|
0
|
||||||
@@ -279,10 +308,13 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-recommendation-label"
|
"case:summary-case-recommendation-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -290,20 +322,25 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -311,13 +348,15 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -332,10 +371,11 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-event-date-label"
|
label={t("case:summary-event-date-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
@@ -352,13 +392,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casedecisiondate"
|
"pinswg_casedecisiondate"
|
||||||
@@ -375,14 +420,22 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
@@ -399,13 +452,20 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
@@ -422,13 +482,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
@@ -445,13 +510,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-decisions"
|
"case:summary-date-of-decisions"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
@@ -468,13 +538,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
@@ -491,13 +566,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
@@ -514,13 +594,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-project-published-to-website"
|
"case:summary-date-project-published-to-website"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateprojectpublishedonwebsite"
|
"pinswg_dateprojectpublishedonwebsite"
|
||||||
@@ -537,13 +622,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
@@ -560,13 +650,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
@@ -583,13 +678,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
@@ -606,13 +706,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-confirmed"
|
"case:summary-procedure-confirmed"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_procedureconfirmed"
|
"pinswg_procedureconfirmed"
|
||||||
@@ -629,13 +734,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
@@ -652,11 +762,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
@@ -673,13 +788,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-suspension-dates"
|
label={t("case:summary-suspension-dates")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensiondates"
|
"pinswg_suspensiondates"
|
||||||
@@ -696,13 +814,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
@@ -719,13 +842,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
@@ -742,13 +870,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
@@ -765,11 +898,16 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-withdrawn-date")}
|
label={t("case:summary-withdrawn-date")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
@@ -786,13 +924,18 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
@@ -809,7 +952,9 @@ const Pinswg_electricityactid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -44,16 +43,20 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
<>
|
router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,34 +230,50 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -244,14 +283,25 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -261,16 +311,22 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -296,16 +352,25 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -315,8 +380,11 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -340,9 +408,13 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -352,14 +424,24 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateoftheevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateoftheevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -369,13 +451,20 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -385,8 +474,10 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_environmentalpermittingid = (props) => {
|
const Pinswg_environmentalpermittingid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -199,18 +222,19 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: jsonpath({
|
: jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -218,10 +242,12 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
}) ||
|
}) ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -232,34 +258,50 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -269,14 +311,25 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -286,16 +339,22 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -321,16 +380,25 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -340,8 +408,11 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -365,9 +436,13 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -377,14 +452,24 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateofevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateofevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -394,13 +479,20 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -410,8 +502,10 @@ const Pinswg_environmentalpermittingid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_harbourrevisionorderid = (props) => {
|
const Pinswg_harbourrevisionorderid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -63,10 +62,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-case-type-label"
|
label={t("case:summary-case-type-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -76,7 +76,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -84,28 +84,42 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-eia-required-label"
|
"case:summary-eia-required-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -121,7 +135,9 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -141,10 +157,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-procedure-label"
|
label={t("case:summary-procedure-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -154,16 +171,21 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -173,7 +195,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -181,7 +203,9 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -197,7 +221,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -224,7 +248,7 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, [
|
{_.has(casesObj, [
|
||||||
"numberofchildincidents"
|
"numberofchildincidents",
|
||||||
])
|
])
|
||||||
? casesObj.numberofchildincidents >
|
? casesObj.numberofchildincidents >
|
||||||
0
|
0
|
||||||
@@ -258,10 +282,13 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-recommendation-label"
|
"case:summary-case-recommendation-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -269,20 +296,25 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
detailsObj.pinswg_recommendation +
|
detailsObj.pinswg_recommendation +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_recommendation ||
|
: detailsObj.pinswg_recommendation ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -290,13 +322,15 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
detailsObj.pinswg_webaddress +
|
detailsObj.pinswg_webaddress +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj.pinswg_webaddress ||
|
: detailsObj.pinswg_webaddress ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -311,10 +345,11 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-event-date-label"
|
label={t("case:summary-event-date-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateeventrequested"
|
"pinswg_dateeventrequested"
|
||||||
@@ -331,13 +366,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casedecisiondate"
|
"pinswg_casedecisiondate"
|
||||||
@@ -354,14 +394,22 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-accepted-as-valid"
|
"case:summary-application-accepted-as-valid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationacceptedasvalid"
|
"pinswg_applicationacceptedasvalid"
|
||||||
@@ -378,13 +426,20 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-application-rejected-as-invalid"
|
"case:summary-application-rejected-as-invalid"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_applicationrejectedasinvalid"
|
"pinswg_applicationrejectedasinvalid"
|
||||||
@@ -401,13 +456,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-confirm-request-to-vary-application"
|
"case:summary-confirm-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_confirmrequesttovaryapplication"
|
"pinswg_confirmrequesttovaryapplication"
|
||||||
@@ -424,13 +484,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-decisions"
|
"case:summary-date-of-decisions"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
@@ -447,13 +512,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-request-to-vary"
|
"case:summary-date-of-request-to-vary"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofrequesttovarytheapplication"
|
"pinswg_dateofrequesttovarytheapplication"
|
||||||
@@ -470,13 +540,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-of-submission-of-application"
|
"case:summary-date-of-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofsubmissionofapplication"
|
"pinswg_dateofsubmissionofapplication"
|
||||||
@@ -493,13 +568,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-date-project-published-to-website"
|
"case:summary-date-project-published-to-website"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateprojectpublishedonwebsite"
|
"pinswg_dateprojectpublishedonwebsite"
|
||||||
@@ -516,13 +596,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
@@ -539,13 +624,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-end-of-representation-period"
|
"case:summary-end-of-representation-period"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_endofrepresentationperiod"
|
"pinswg_endofrepresentationperiod"
|
||||||
@@ -562,13 +652,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-inspector-report-submission-to-welsh-government"
|
"case:summary-inspector-report-submission-to-welsh-government"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||||
@@ -585,13 +680,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-procedure-confirmed"
|
"case:summary-procedure-confirmed"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_procedureconfirmed"
|
"pinswg_procedureconfirmed"
|
||||||
@@ -608,13 +708,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-reject-request-to-vary-application"
|
"case:summary-reject-request-to-vary-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_rejectrequesttovaryapplication"
|
"pinswg_rejectrequesttovaryapplication"
|
||||||
@@ -631,11 +736,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-report-due-by")}
|
label={t("case:summary-report-due-by")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportdueby"
|
"pinswg_reportdueby"
|
||||||
@@ -652,13 +762,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-suspension-dates"
|
label={t("case:summary-suspension-dates")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensiondates"
|
"pinswg_suspensiondates"
|
||||||
@@ -675,13 +788,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-end-dates"
|
"case:summary-suspension-end-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionenddates"
|
"pinswg_suspensionenddates"
|
||||||
@@ -698,13 +816,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-suspension-start-dates"
|
"case:summary-suspension-start-dates"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_suspensionstartdates"
|
"pinswg_suspensionstartdates"
|
||||||
@@ -721,13 +844,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||||
@@ -744,11 +872,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-withdrawn-date")}
|
label={t("case:summary-withdrawn-date")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_withdrawndate"
|
"pinswg_withdrawndate"
|
||||||
@@ -765,13 +898,18 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
@@ -788,7 +926,9 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,19 +33,24 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={"Specialist Case Process"}
|
label={"Specialist Case Process"}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
|
||||||
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -54,33 +59,43 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
value={router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
}
|
eval: true,
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -92,13 +107,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -107,17 +125,18 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -126,17 +145,18 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -145,13 +165,15 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -167,7 +189,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -188,11 +210,16 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -208,11 +235,14 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -220,18 +250,19 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: jsonpath({
|
: jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -239,10 +270,12 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
}) ||
|
}) ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -253,34 +286,50 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -290,14 +339,25 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -307,16 +367,22 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -342,16 +408,25 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -361,8 +436,11 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -386,9 +464,13 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -398,14 +480,24 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateoftheevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateoftheevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -415,13 +507,20 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -431,8 +530,10 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_householderappealhasid = (props) => {
|
const Pinswg_householderappealhasid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -44,16 +43,20 @@ const Pinswg_householderappealhasid = (props) => {
|
|||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
value={
|
||||||
<>
|
router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,34 +230,50 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -244,14 +283,25 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -261,16 +311,22 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -296,16 +352,25 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -315,8 +380,11 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -340,9 +408,13 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -352,14 +424,24 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateoftheevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateoftheevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -369,13 +451,20 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -385,8 +474,10 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_ldpid = (props) => {
|
const Pinswg_ldpid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_ldpid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,34 +33,44 @@ const Pinswg_ldpid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
|
||||||
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -69,17 +79,19 @@ const Pinswg_ldpid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -88,17 +100,18 @@ const Pinswg_ldpid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -107,13 +120,15 @@ const Pinswg_ldpid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -129,7 +144,7 @@ const Pinswg_ldpid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -150,11 +165,16 @@ const Pinswg_ldpid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -170,11 +190,14 @@ const Pinswg_ldpid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -190,34 +213,50 @@ const Pinswg_ldpid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -227,14 +266,25 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -244,16 +294,22 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -279,16 +335,25 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -298,8 +363,11 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -323,9 +391,13 @@ const Pinswg_ldpid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -335,14 +407,24 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateofevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateofevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -352,13 +434,20 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -368,8 +457,10 @@ const Pinswg_ldpid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_listedbuildingandconservationrid = (props) => {
|
const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,34 +230,50 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -244,14 +283,25 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -261,16 +311,22 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -296,16 +352,25 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -315,8 +380,11 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -340,9 +408,13 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -352,14 +424,24 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_starttimeofevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_starttimeofevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_starttimeofevent
|
detailsObj.pinswg_starttimeofevent
|
||||||
)
|
)
|
||||||
@@ -369,13 +451,20 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -385,8 +474,10 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_maintenanceoflands217id = (props) => {
|
const Pinswg_maintenanceoflands217id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,34 +230,50 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -244,14 +283,25 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -261,16 +311,22 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -296,16 +352,25 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -315,8 +380,11 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -340,9 +408,13 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -352,14 +424,24 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateofevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateofevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -369,13 +451,20 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -385,8 +474,10 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_miscellaneouscasewordid = (props) => {
|
const Pinswg_miscellaneouscasewordid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -199,18 +222,19 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: jsonpath({
|
: jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -218,10 +242,12 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
}) ||
|
}) ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -232,34 +258,50 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -269,14 +311,25 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -286,16 +339,22 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -321,16 +380,25 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -340,8 +408,11 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -365,9 +436,13 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -377,14 +452,24 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateofevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateofevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -394,13 +479,20 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -410,8 +502,10 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_nonvalidationid = (props) => {
|
const Pinswg_nonvalidationid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,8 +21,11 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -33,33 +35,67 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
{/* <SummaryRow
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
value={
|
||||||
|
router.locale == "cy"
|
||||||
|
? jsonpath({path:
|
||||||
|
'$..[?(@ && @.value=="' +
|
||||||
|
detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
|
json: transLookup,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: detailsObj[
|
||||||
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
}
|
||||||
|
/> */}
|
||||||
|
<SummaryRow
|
||||||
|
|
||||||
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -69,13 +105,17 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -91,7 +131,7 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -118,32 +158,55 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_validdate")
|
_.has(detailsObj, "pinswg_validdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_validdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_validdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_validdate
|
detailsObj.pinswg_validdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
_.has(detailsObj, "pinswg_decisionissueddate")
|
|
||||||
|
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_decisionissueddate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_decisionissueddate
|
detailsObj.pinswg_decisionissueddate
|
||||||
)
|
)
|
||||||
@@ -153,8 +216,14 @@ const Pinswg_nonvalidationid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
|
"case:summary-no-date-entered-label"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayValue, getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_planningappeals78id = (props) => {
|
const Pinswg_planningappeals78id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -42,23 +41,35 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -72,11 +83,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -91,11 +107,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -113,11 +134,16 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -133,7 +159,9 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -168,8 +196,11 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
@@ -181,7 +212,9 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -226,8 +259,11 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
@@ -245,15 +281,24 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-questionnaire-due-date-label"
|
|
||||||
)}
|
label={t("case:summary-questionnaire-due-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -264,14 +309,24 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-statement-interested-party-due-date-label"
|
"case:summary-statement-interested-party-due-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
@@ -283,7 +338,11 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
@@ -324,9 +383,18 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-final-comments-date-label")}
|
label={t("case:summary-final-comments-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -337,7 +405,11 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -385,8 +457,14 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
/> */}
|
/> */}
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdatetimeiftheevent"
|
"pinswg_startdatetimeiftheevent"
|
||||||
@@ -401,15 +479,22 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{detailsObj.pinswg_typeofevent == 846040002 ||
|
{detailsObj.pinswg_typeofevent == 846040002 ||
|
||||||
detailsObj.pinswg_typeofevent == 846040007 ||
|
detailsObj.pinswg_typeofevent == 846040007 ||
|
||||||
detailsObj.pinswg_typeofevent == 846040012 ||
|
detailsObj.pinswg_typeofevent == 846040012 ||
|
||||||
detailsObj.pinswg_typeofevent == 846040009 ? (
|
detailsObj.pinswg_typeofevent == 846040009 ? (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-event-time-label")}
|
label={t("case:summary-start-event-time-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_startdatetimeiftheevent"
|
"pinswg_startdatetimeiftheevent"
|
||||||
@@ -427,7 +512,9 @@ const Pinswg_planningappeals78id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
""
|
""
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_planningconditionss73s79id = (props) => {
|
const Pinswg_planningconditionss73s79id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -42,23 +41,35 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
|
eval: true
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -72,11 +83,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t("case:summary-to-be-confirmed-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -91,11 +107,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -110,11 +131,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -130,7 +156,9 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -207,8 +235,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(detailsObj.pinswg_startdate)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
@@ -226,15 +257,24 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-questionnaire-due-date-label"
|
|
||||||
)}
|
label={t("case:summary-questionnaire-due-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -245,12 +285,22 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-statement-due-date-label")}
|
label={t("case:summary-statement-due-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
_.has(detailsObj, "pinswg_statementduedate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
@@ -262,14 +312,22 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-interested-party-date-label"
|
|
||||||
)}
|
label={t("case:summary-interested-party-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
@@ -297,15 +355,28 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
|
||||||
|
_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -316,7 +387,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -342,8 +417,11 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
}
|
}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
_.has(detailsObj, "pinswg_dateeventrequested")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
@@ -355,12 +433,20 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-start-event-date-label")}
|
label={t("case:summary-start-event-date-label")}
|
||||||
|
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_startdateofevent")
|
_.has(detailsObj, "pinswg_startdateofevent")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
@@ -372,11 +458,18 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
_.has(detailsObj, "pinswg_casedecisiondate")
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
@@ -388,7 +481,9 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
|||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t("case:summary-no-date-entered-label")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_planningobligationappeals106id = (props) => {
|
const Pinswg_planningobligationappeals106id = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,34 +230,50 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -244,14 +283,25 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -261,16 +311,22 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -296,16 +352,25 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -315,8 +380,11 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -340,9 +408,13 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -352,14 +424,24 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateoftheevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateoftheevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -369,13 +451,20 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -385,8 +474,10 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_rowid = (props) => {
|
const Pinswg_rowid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_rowid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,19 +33,24 @@ const Pinswg_rowid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={"Specialist Case Process"}
|
label={"Specialist Case Process"}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
|
||||||
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -54,33 +59,43 @@ const Pinswg_rowid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
|
||||||
{getCaseLpaDisplayLines({
|
value={router.locale == "cy"
|
||||||
casesObj,
|
? jsonpath({
|
||||||
detailsObj,
|
path:
|
||||||
locale: router.locale,
|
'$..[?(@ && @.value=="' +
|
||||||
transLookup
|
casesObj[
|
||||||
}).map((name) => (
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
<div key={name}>{name}</div>
|
] +
|
||||||
))}
|
'")].value_cy',
|
||||||
</>
|
json: transLookup,
|
||||||
}
|
eval: true,
|
||||||
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -92,13 +107,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -107,17 +125,18 @@ const Pinswg_rowid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -126,17 +145,18 @@ const Pinswg_rowid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -145,13 +165,15 @@ const Pinswg_rowid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -167,7 +189,7 @@ const Pinswg_rowid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -188,11 +210,16 @@ const Pinswg_rowid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -208,11 +235,14 @@ const Pinswg_rowid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -220,18 +250,19 @@ const Pinswg_rowid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: jsonpath({
|
: jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -239,10 +270,12 @@ const Pinswg_rowid = (props) => {
|
|||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
}) ||
|
}) ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -253,34 +286,50 @@ const Pinswg_rowid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -290,14 +339,25 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -307,16 +367,22 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -342,16 +408,25 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -361,8 +436,11 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -386,9 +464,13 @@ const Pinswg_rowid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -398,14 +480,24 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateoftheevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateoftheevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateoftheevent
|
detailsObj.pinswg_startdateoftheevent
|
||||||
)
|
)
|
||||||
@@ -415,13 +507,20 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -431,8 +530,10 @@ const Pinswg_rowid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
import GoogleMapComponent from "../../mapping";
|
import GoogleMapComponent from "../../mapping";
|
||||||
|
|
||||||
@@ -29,15 +28,6 @@ const Pinswg_sipscase = (props) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const extensions =
|
|
||||||
detailsObj.pinswg_CaseDeadlineExtension_pinswg_sips || [];
|
|
||||||
|
|
||||||
const latest = extensions.sort(
|
|
||||||
(a, b) =>
|
|
||||||
new Date(b.pinswg_newcasedeadline) -
|
|
||||||
new Date(a.pinswg_newcasedeadline)
|
|
||||||
)[0];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{detailsObj.pinswg_projectdescription != null ? (
|
{detailsObj.pinswg_projectdescription != null ? (
|
||||||
@@ -96,10 +86,11 @@ const Pinswg_sipscase = (props) => {
|
|||||||
|
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-case-type-label"
|
label={t("case:summary-case-type-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -115,7 +106,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -123,8 +116,11 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"_pinswg_projecttype_value"
|
"_pinswg_projecttype_value"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={"Project Type"}
|
label={"Project Type"}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -140,16 +136,21 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{detailsObj.pinswg_webaddress != null && (
|
{detailsObj.pinswg_webaddress != null && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-website-label"
|
"case:summary-case-website-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -178,7 +179,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{/* <div className="govuk-summary-list__row">
|
{/* <div className="govuk-summary-list__row">
|
||||||
@@ -187,26 +190,32 @@ const Pinswg_sipscase = (props) => {
|
|||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value"></dd>
|
<dd className="govuk-summary-list__value"></dd>
|
||||||
</div> */}
|
</div> */}
|
||||||
<SummaryRow
|
|
||||||
label={t("case:summary-lpa-label")}
|
<div className="govuk-summary-list__row">
|
||||||
value={
|
<dt className="govuk-summary-list__key">
|
||||||
<>
|
{t("case:summary-lpa-label")}
|
||||||
{getCaseLpaDisplayLines({
|
</dt>
|
||||||
casesObj,
|
<dd className="govuk-summary-list__value">
|
||||||
detailsObj,
|
{router.locale == "cy"
|
||||||
locale: router.locale,
|
? jsonpath(
|
||||||
|
'$..[?(@.value=="' +
|
||||||
|
casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] +
|
||||||
|
'")].value_cy',
|
||||||
transLookup
|
transLookup
|
||||||
}).map((name) => (
|
)
|
||||||
<div key={name}>{name}</div>
|
: casesObj[
|
||||||
))}
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
</>
|
] || ""}
|
||||||
}
|
</dd>
|
||||||
/>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t(
|
|
||||||
"case:summary-procedure-label"
|
label={t("case:summary-procedure-label")}
|
||||||
)}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -222,11 +231,16 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={"ES Submitted"}
|
label={"ES Submitted"}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -242,13 +256,16 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={
|
|
||||||
"Deemed Marine License Applied for"
|
label={"Deemed Marine License Applied for"}
|
||||||
}
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
router.locale == "cy"
|
router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
@@ -264,7 +281,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
t(
|
t(
|
||||||
"case:summary-to-be-confirmed-label"
|
"case:summary-to-be-confirmed-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
@@ -403,10 +422,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-date-label"
|
"case:summary-decision-date-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_dateofdecision"
|
"pinswg_dateofdecision"
|
||||||
@@ -423,7 +445,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-information-to-date-label"
|
"case:summary-no-information-to-date-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
@@ -494,58 +518,20 @@ const Pinswg_sipscase = (props) => {
|
|||||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||||
{t("case:summary-dates-label")}
|
{t("case:summary-dates-label")}
|
||||||
</h3>
|
</h3>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<h4 className="govuk-heading-s ">
|
||||||
<SummaryRow
|
|
||||||
label={"Case deadline"}
|
|
||||||
value={(() => {
|
|
||||||
const fallback = t(
|
|
||||||
"case:summary-awaiting-information-label"
|
|
||||||
);
|
|
||||||
|
|
||||||
const extensions =
|
|
||||||
detailsObj.pinswg_CaseDeadlineExtension_pinswg_sips ||
|
|
||||||
[];
|
|
||||||
|
|
||||||
const latestExtension =
|
|
||||||
extensions
|
|
||||||
.filter(
|
|
||||||
(extension) =>
|
|
||||||
!_.isEmpty(
|
|
||||||
extension.pinswg_newcasedeadline
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.sort(
|
|
||||||
(a, b) =>
|
|
||||||
new Date(
|
|
||||||
b.pinswg_newcasedeadline
|
|
||||||
) -
|
|
||||||
new Date(
|
|
||||||
a.pinswg_newcasedeadline
|
|
||||||
)
|
|
||||||
)[0];
|
|
||||||
|
|
||||||
const dateToDisplay =
|
|
||||||
latestExtension
|
|
||||||
? latestExtension.pinswg_newcasedeadline
|
|
||||||
: detailsObj.pinswg_casedeadline;
|
|
||||||
|
|
||||||
return !_.isEmpty(dateToDisplay)
|
|
||||||
? formatDates(dateToDisplay)
|
|
||||||
: fallback;
|
|
||||||
})()}
|
|
||||||
/>
|
|
||||||
</dl>
|
|
||||||
<h4 className="govuk-heading-s">
|
|
||||||
{t(
|
{t(
|
||||||
"case:summary-pre-submission-sub-title"
|
"case:summary-pre-submission-sub-title"
|
||||||
)}
|
)}
|
||||||
</h4>
|
</h4>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validnoticeofintentiontosubmit"
|
"pinswg_validnoticeofintentiontosubmit"
|
||||||
@@ -562,13 +548,18 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-written-acceptance-of-notice"
|
"case:summary-written-acceptance-of-notice"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_writtenacceptanceofnotification"
|
"pinswg_writtenacceptanceofnotification"
|
||||||
@@ -585,13 +576,18 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-deadline-for-submission-of-application"
|
"case:summary-deadline-for-submission-of-application"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_deadlineforsubmissionofapplication"
|
"pinswg_deadlineforsubmissionofapplication"
|
||||||
@@ -608,7 +604,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
@@ -637,10 +635,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_validationdeadlineextension"
|
"pinswg_validationdeadlineextension"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-validation-deadline-extension"
|
"case:summary-validation-deadline-extension"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_validationdeadlineextension"
|
"pinswg_validationdeadlineextension"
|
||||||
@@ -657,7 +658,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -665,10 +668,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_casesuspensionstartdate"
|
"pinswg_casesuspensionstartdate"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-suspension-start-date"
|
"case:summary-case-suspension-start-date"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casesuspensionstartdate"
|
"pinswg_casesuspensionstartdate"
|
||||||
@@ -685,7 +691,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -693,10 +701,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_casesuspensionenddate"
|
"pinswg_casesuspensionenddate"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-suspension-end-date"
|
"case:summary-case-suspension-end-date"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_casesuspensionenddate"
|
"pinswg_casesuspensionenddate"
|
||||||
@@ -713,7 +724,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -744,10 +757,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_reportissuedtowelshministers"
|
"pinswg_reportissuedtowelshministers"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-report-issued-to-welsh-ministers"
|
"case:summary-report-issued-to-welsh-ministers"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_reportissuedtowelshministers"
|
"pinswg_reportissuedtowelshministers"
|
||||||
@@ -764,7 +780,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -772,10 +790,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_decisionissuedtoapplicant"
|
"pinswg_decisionissuedtoapplicant"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-issued-to-applicant"
|
"case:summary-decision-issued-to-applicant"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_decisionissuedtoapplicant"
|
"pinswg_decisionissuedtoapplicant"
|
||||||
@@ -792,7 +813,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -800,10 +823,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_decisionoutcome"
|
"pinswg_decisionoutcome"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-decision-outcome"
|
"case:summary-decision-outcome"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_decisionoutcome"
|
"pinswg_decisionoutcome"
|
||||||
@@ -820,7 +846,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
@@ -844,10 +872,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_redetermination"
|
"pinswg_redetermination"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-post-decision-redetermination-label"
|
"case:summary-post-decision-redetermination-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_redetermination@OData.Community.Display.V1.FormattedValue"
|
"pinswg_redetermination@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -866,7 +897,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{hasValidKey(
|
{hasValidKey(
|
||||||
@@ -874,10 +907,13 @@ const Pinswg_sipscase = (props) => {
|
|||||||
"pinswg_redeterminationconsultationdeadline"
|
"pinswg_redeterminationconsultationdeadline"
|
||||||
) && (
|
) && (
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-post-decision-redetermination-deadline-label"
|
"case:summary-post-decision-redetermination-deadline-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
value={
|
value={
|
||||||
|
|
||||||
_.has(
|
_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_redeterminationconsultationdeadline"
|
"pinswg_redeterminationconsultationdeadline"
|
||||||
@@ -894,7 +930,9 @@ const Pinswg_sipscase = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-awaiting-information-label"
|
"case:summary-awaiting-information-label"
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
|||||||
import transLookup from "../../../data/lookuptranslations.json";
|
import transLookup from "../../../data/lookuptranslations.json";
|
||||||
import SummaryCard from "../summary/components/SummaryCard";
|
import SummaryCard from "../summary/components/SummaryCard";
|
||||||
import SummaryRow from "../summary/components/SummaryRow";
|
import SummaryRow from "../summary/components/SummaryRow";
|
||||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
|
||||||
|
|
||||||
const Pinswg_wayleaveid = (props) => {
|
const Pinswg_wayleaveid = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -22,9 +21,10 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-case-type-label")}
|
label={t("case:summary-case-type-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -33,33 +33,41 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-lpa-label")}
|
label={t("case:summary-lpa-label")}
|
||||||
value={
|
|
||||||
<>
|
value={router.locale == "cy"
|
||||||
{getCaseLpaDisplayLines({
|
? jsonpath({
|
||||||
casesObj,
|
path:
|
||||||
detailsObj,
|
'$..[?(@ && @.value=="' +
|
||||||
locale: router.locale,
|
casesObj[
|
||||||
transLookup
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
}).map((name) => (
|
] +
|
||||||
<div key={name}>{name}</div>
|
'")].value_cy',
|
||||||
))}
|
json: transLookup,
|
||||||
</>
|
eval: true,
|
||||||
}
|
})
|
||||||
|
: casesObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] || ""}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-eia-required-label")}
|
label={t("case:summary-eia-required-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
detailsObj[
|
detailsObj[
|
||||||
@@ -71,13 +79,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-to-be-confirmed-label")
|
t(
|
||||||
}
|
"case:summary-to-be-confirmed-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-procedure-label")}
|
label={t("case:summary-procedure-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -86,17 +97,18 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-type-of-event-label")}
|
label={t("case:summary-type-of-event-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -105,17 +117,18 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||||
] || ""
|
] || ""}
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-status-label")}
|
label={t("case:summary-status-label")}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
@@ -124,13 +137,15 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: casesObj[
|
: casesObj[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
] ||
|
] ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
@@ -146,7 +161,7 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
] +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: detailsObj[
|
: detailsObj[
|
||||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||||
@@ -167,11 +182,16 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 && (
|
{casesObj.numberofchildincidents > 0 && (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-case-link-status-label")}
|
{t(
|
||||||
|
"case:summary-case-link-status-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{_.has(casesObj, ["numberofchildincidents"])
|
{_.has(casesObj, [
|
||||||
? casesObj.numberofchildincidents > 0
|
"numberofchildincidents",
|
||||||
|
])
|
||||||
|
? casesObj.numberofchildincidents >
|
||||||
|
0
|
||||||
? t(
|
? t(
|
||||||
"case:summary-case-link-status-linked"
|
"case:summary-case-link-status-linked"
|
||||||
)
|
)
|
||||||
@@ -187,11 +207,14 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
{casesObj.numberofchildincidents > 0 ? (
|
{casesObj.numberofchildincidents > 0 ? (
|
||||||
<div className="govuk-summary-list__row">
|
<div className="govuk-summary-list__row">
|
||||||
<dt className="govuk-summary-list__key">
|
<dt className="govuk-summary-list__key">
|
||||||
{t("case:summary-linked-cases-label")}
|
{t(
|
||||||
|
"case:summary-linked-cases-label"
|
||||||
|
)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd className="govuk-summary-list__value">
|
<dd className="govuk-summary-list__value">
|
||||||
{linkedCasesList(
|
{linkedCasesList(
|
||||||
props.currentView.linkedCaseReferences
|
props.currentView
|
||||||
|
.linkedCaseReferences
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@@ -199,18 +222,19 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
""
|
""
|
||||||
)}
|
)}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-case-relevant-authoritylabel"
|
"case:summary-case-relevant-authoritylabel"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
router.locale == "cy"
|
value={router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.pinswg_lpa=="' +
|
'$..[?(@ && @.pinswg_lpa=="' +
|
||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: jsonpath({
|
: jsonpath({
|
||||||
path:
|
path:
|
||||||
@@ -218,10 +242,12 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
detailsObj.pinswg_relevantauthorityname +
|
detailsObj.pinswg_relevantauthorityname +
|
||||||
'")].value',
|
'")].value',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
}) ||
|
}) ||
|
||||||
t("case:summary-no-date-entered-label")
|
t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
@@ -232,34 +258,50 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
>
|
>
|
||||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-start-date-label")}
|
label={t("case:summary-start-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdate")
|
value={_.has(detailsObj, "pinswg_startdate")
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdate)
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdate
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: _.has(detailsObj, "pinswg_startdates")
|
: _.has(
|
||||||
? !_.isEmpty(detailsObj.pinswg_startdates)
|
detailsObj,
|
||||||
|
"pinswg_startdates"
|
||||||
|
)
|
||||||
|
? !_.isEmpty(
|
||||||
|
detailsObj.pinswg_startdates
|
||||||
|
)
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_startdates
|
detailsObj.pinswg_startdates
|
||||||
)
|
)
|
||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-questionnaire-due-date-label"
|
"case:summary-questionnaire-due-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_questionnaireduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_questionnaireduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_questionnaireduedate
|
detailsObj.pinswg_questionnaireduedate
|
||||||
)
|
)
|
||||||
@@ -269,14 +311,25 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-statement-due-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_statementduedate")
|
label={t(
|
||||||
|
"case:summary-statement-due-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_statementduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
@@ -286,16 +339,22 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-interested-party-date-label"
|
"case:summary-interested-party-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(
|
|
||||||
|
value={_.has(
|
||||||
detailsObj,
|
detailsObj,
|
||||||
"pinswg_otherpartiesstatement"
|
"pinswg_otherpartiesstatement"
|
||||||
)
|
)
|
||||||
@@ -321,16 +380,25 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
|
|
||||||
label={t(
|
label={t(
|
||||||
"case:summary-applicant-final-comments-date-label"
|
"case:summary-applicant-final-comments-date-label"
|
||||||
)}
|
)}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_finalcommentsduedate")
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
detailsObj.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
@@ -340,8 +408,11 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
{/* <SummaryRow
|
{/* <SummaryRow
|
||||||
label={t(
|
label={t(
|
||||||
@@ -365,9 +436,13 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
)}
|
)}
|
||||||
/> */}
|
/> */}
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-event-date-label")}
|
label={t("case:summary-event-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_dateeventrequested")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_dateeventrequested"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_dateeventrequested
|
detailsObj.pinswg_dateeventrequested
|
||||||
)
|
)
|
||||||
@@ -377,14 +452,24 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
label={t("case:summary-start-event-date-label")}
|
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_startdateofevent")
|
label={t(
|
||||||
|
"case:summary-start-event-date-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_startdateofevent"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_startdateofevent
|
detailsObj.pinswg_startdateofevent
|
||||||
)
|
)
|
||||||
@@ -394,13 +479,20 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<SummaryRow
|
<SummaryRow
|
||||||
|
|
||||||
label={t("case:summary-decision-date-label")}
|
label={t("case:summary-decision-date-label")}
|
||||||
value={
|
|
||||||
_.has(detailsObj, "pinswg_casedecisiondate")
|
value={_.has(
|
||||||
|
detailsObj,
|
||||||
|
"pinswg_casedecisiondate"
|
||||||
|
)
|
||||||
? !_.isEmpty(
|
? !_.isEmpty(
|
||||||
detailsObj.pinswg_casedecisiondate
|
detailsObj.pinswg_casedecisiondate
|
||||||
)
|
)
|
||||||
@@ -410,8 +502,10 @@ const Pinswg_wayleaveid = (props) => {
|
|||||||
: t(
|
: t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)
|
)
|
||||||
: t("case:summary-no-date-entered-label")
|
: t(
|
||||||
}
|
"case:summary-no-date-entered-label"
|
||||||
|
)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</dl>
|
</dl>
|
||||||
</SummaryCard>
|
</SummaryCard>
|
||||||
|
|||||||
+10
-2
@@ -7,7 +7,7 @@ import { connect } from "react-redux";
|
|||||||
import Banner from "../components/banner";
|
import Banner from "../components/banner";
|
||||||
import { setLogout } from "../store/accountDetails/action";
|
import { setLogout } from "../store/accountDetails/action";
|
||||||
|
|
||||||
import { performPortalSignOut } from "../lib/auth/sessionClient";
|
import { signOut } from "next-auth/react";
|
||||||
|
|
||||||
const Header = (props) => {
|
const Header = (props) => {
|
||||||
let { t, lang } = useTranslation();
|
let { t, lang } = useTranslation();
|
||||||
@@ -84,7 +84,15 @@ const Header = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleLogout = () => {
|
const handleLogout = () => {
|
||||||
performPortalSignOut(locale);
|
console.info("////////////\n" + "logout" + "\n////////////");
|
||||||
|
(window.localStorage.clear(),
|
||||||
|
destroyCookie(null, "next-auth.csrf-token", { path: "/" }),
|
||||||
|
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||||
|
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||||
|
destroyCookie(null, "pinsUser", { path: "/" }),
|
||||||
|
signOut({
|
||||||
|
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout"
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
//const switchLocale = locale === "en" ? "cy" : "en";
|
//const switchLocale = locale === "en" ? "cy" : "en";
|
||||||
|
|||||||
+10
-2
@@ -2,6 +2,7 @@ import { signOut } from "next-auth/react";
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import { destroyCookie } from "nookies";
|
||||||
import TimeOut from "../components/timeout";
|
import TimeOut from "../components/timeout";
|
||||||
import AwaitingSubmissionFromBlob from "./myportal/awaitingsubmissionfromblob";
|
import AwaitingSubmissionFromBlob from "./myportal/awaitingsubmissionfromblob";
|
||||||
|
|
||||||
@@ -16,7 +17,6 @@ import MySubmittedReps from "./myportal/mysubmittedrepresentations";
|
|||||||
import ServiceBanner from "./myportal/servicebanner";
|
import ServiceBanner from "./myportal/servicebanner";
|
||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||||
import transLookup from "../data/lookuptranslations.json";
|
import transLookup from "../data/lookuptranslations.json";
|
||||||
import { performPortalSignOut } from "../lib/auth/sessionClient";
|
|
||||||
|
|
||||||
const MyPortal = (props) => {
|
const MyPortal = (props) => {
|
||||||
const { showFileUpload, showLoginCheck, docsOffline } = props;
|
const { showFileUpload, showLoginCheck, docsOffline } = props;
|
||||||
@@ -26,7 +26,15 @@ const MyPortal = (props) => {
|
|||||||
const { locale } = router;
|
const { locale } = router;
|
||||||
|
|
||||||
const handleLogout = () => {
|
const handleLogout = () => {
|
||||||
performPortalSignOut({ locale, signOutFn: signOut });
|
console.info("////////////\n" + "logout" + "\n////////////");
|
||||||
|
(window.localStorage.clear(),
|
||||||
|
destroyCookie(null, "next-auth.csrf-token", { path: "/" }),
|
||||||
|
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||||
|
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||||
|
destroyCookie(null, "pinsUser", { path: "/" }),
|
||||||
|
signOut({
|
||||||
|
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout"
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
const isLPA =
|
const isLPA =
|
||||||
|
|||||||
@@ -353,8 +353,8 @@ const AwaitingSubmissionFromBlob = (props) => {
|
|||||||
<h3 className="heading-small card-heading">
|
<h3 className="heading-small card-heading">
|
||||||
{t("myportal:awatitingsubmission-card-title")}
|
{t("myportal:awatitingsubmission-card-title")}
|
||||||
</h3>
|
</h3>
|
||||||
<TopThreeRow />
|
|
||||||
|
|
||||||
|
<TopThreeRow />
|
||||||
{props.awaitingSubmissionFromBlob["@odata.count"] > 1 && (
|
{props.awaitingSubmissionFromBlob["@odata.count"] > 1 && (
|
||||||
<div className="cardVieAll">
|
<div className="cardVieAll">
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const MyRepresentations = (props) => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentView({
|
setCurrentView({
|
||||||
"viewName": "My Representations",
|
"viewName": "My Representations",
|
||||||
"viewKey": "myRepresentations"
|
"viewKey": "myRepresentations",
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -65,7 +65,7 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
return {
|
return {
|
||||||
setCurrentView: (currentView) => {
|
setCurrentView: (currentView) => {
|
||||||
dispatch(setCurrentView(currentView));
|
dispatch(setCurrentView(currentView));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const MyRepresentations = (props) => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentView({
|
setCurrentView({
|
||||||
"viewName": "My Representations",
|
"viewName": "My Representations",
|
||||||
"viewKey": "myRepresentations"
|
"viewKey": "myRepresentations",
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -64,7 +64,7 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
return {
|
return {
|
||||||
setCurrentView: (currentView) => {
|
setCurrentView: (currentView) => {
|
||||||
dispatch(setCurrentView(currentView));
|
dispatch(setCurrentView(currentView));
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import router from "next/router";
|
import router from "next/router";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { performPortalSignOut } from "../../lib/auth/sessionClient";
|
import { destroyCookie } from "nookies";
|
||||||
|
import { signOut } from "next-auth/react";
|
||||||
|
|
||||||
const ServiceBanner = (props) => {
|
const ServiceBanner = (props) => {
|
||||||
props = props.props;
|
props = props.props;
|
||||||
@@ -18,14 +19,23 @@ const ServiceBanner = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleLogout = (locale) => {
|
const handleLogout = (locale) => {
|
||||||
performPortalSignOut(locale);
|
console.info("////////////\n" + "logout" + "\n////////////");
|
||||||
|
window.localStorage.clear(),
|
||||||
|
destroyCookie(null, "next-auth.csrf-token"),
|
||||||
|
{ path: "/" },
|
||||||
|
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||||
|
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||||
|
destroyCookie(null, "pinsUser", { path: "/" }),
|
||||||
|
signOut({
|
||||||
|
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout",
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const portalLogoLink = [
|
const portalLogoLink = [
|
||||||
"/myportal/[appealtypes]",
|
"/myportal/[appealtypes]",
|
||||||
"/newappeal",
|
"/newappeal",
|
||||||
"/newappeal/[appealtypes]",
|
"/newappeal/[appealtypes]",
|
||||||
"/myportal/representation"
|
"/myportal/representation",
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<div className="servicebanner myportal govuk-!-margin-bottom-4">
|
<div className="servicebanner myportal govuk-!-margin-bottom-4">
|
||||||
|
|||||||
@@ -314,8 +314,6 @@ const TopThree = (props) => {
|
|||||||
]
|
]
|
||||||
),
|
),
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"statuscode":
|
|
||||||
showTopThreeArr[key].statuscode,
|
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
.ticketnumber,
|
.ticketnumber,
|
||||||
|
|||||||
@@ -218,8 +218,6 @@ const TopThree = (props) => {
|
|||||||
data-id={index}
|
data-id={index}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"statuscode":
|
|
||||||
showTopThreeArr[key].statuscode,
|
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
showTopThreeArr[key].ticketnumber,
|
showTopThreeArr[key].ticketnumber,
|
||||||
"currentReference":
|
"currentReference":
|
||||||
@@ -238,12 +236,8 @@ const TopThree = (props) => {
|
|||||||
? "/fymhorth/representation"
|
? "/fymhorth/representation"
|
||||||
: "/myportal/representation",
|
: "/myportal/representation",
|
||||||
query: {
|
query: {
|
||||||
case:
|
case: showTopThreeArr[key]
|
||||||
showTopThreeArr[key]
|
.ticketnumber,
|
||||||
.ticketnumber ||
|
|
||||||
showTopThreeArr[key].caseRef ||
|
|
||||||
showTopThreeArr[key]
|
|
||||||
.pinswg_name,
|
|
||||||
state: "edit",
|
state: "edit",
|
||||||
created:
|
created:
|
||||||
showTopThreeArr[key]
|
showTopThreeArr[key]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { parseCookies } from "nookies";
|
import { parseCookies } from "nookies";
|
||||||
import { useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import {
|
import {
|
||||||
deleteAwaitingSubmissionsFromBlob,
|
deleteAwaitingSubmissionsFromBlob,
|
||||||
@@ -98,7 +98,7 @@ const ViewAllResults = (props) => {
|
|||||||
const isWatchedCases = currentViewKey === "watchedCases";
|
const isWatchedCases = currentViewKey === "watchedCases";
|
||||||
const isMyCases = currentViewKey === "myCases";
|
const isMyCases = currentViewKey === "myCases";
|
||||||
|
|
||||||
const resultsArr = isAwaitingSubmissionDetails
|
var resultsArr = isAwaitingSubmissionDetails
|
||||||
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
||||||
: isMySubmittedReps
|
: isMySubmittedReps
|
||||||
? props[currentViewKey][currentViewKey]
|
? props[currentViewKey][currentViewKey]
|
||||||
@@ -286,7 +286,6 @@ const ViewAllResults = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"statuscode": item.statuscode ?? null,
|
|
||||||
ticketnumber: item.ticketnumber,
|
ticketnumber: item.ticketnumber,
|
||||||
currentReference: getCurrentReference(item),
|
currentReference: getCurrentReference(item),
|
||||||
currentType: currentViewKey,
|
currentType: currentViewKey,
|
||||||
@@ -452,10 +451,10 @@ const ViewAllResults = (props) => {
|
|||||||
const renderLineBreak = valueToDisplay && idx < 4; // Only insert <br> if it's not the last element
|
const renderLineBreak = valueToDisplay && idx < 4; // Only insert <br> if it's not the last element
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span key={`${field}-${idx}`}>
|
<>
|
||||||
{valueToDisplay}
|
{valueToDisplay}
|
||||||
{renderLineBreak && <br />}
|
{renderLineBreak && <br />}
|
||||||
</span>
|
</>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</dd>
|
</dd>
|
||||||
@@ -845,12 +844,15 @@ const ViewAllResults = (props) => {
|
|||||||
//setShowSpinnerState(true);
|
//setShowSpinnerState(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSearchPageResults = (pageNumber, orderBy, fieldSort) => {
|
const getSearchPageResults = useCallback(
|
||||||
|
(pageNumber, orderBy, fieldSort) => {
|
||||||
//console.log(advancedSearch, searchString, pageNumber);
|
//console.log(advancedSearch, searchString, pageNumber);
|
||||||
//console.log(pageNumber, orderBy, fieldSort);
|
//console.log(pageNumber, orderBy, fieldSort);
|
||||||
resultsArr.sort(dynamicSort(orderBy, fieldSort));
|
resultsArr.sort(dynamicSort(orderBy, fieldSort));
|
||||||
//console.log(resultsArr);
|
//console.log(resultsArr);
|
||||||
};
|
},
|
||||||
|
[selectedOption]
|
||||||
|
);
|
||||||
|
|
||||||
function dynamicSort(property, order) {
|
function dynamicSort(property, order) {
|
||||||
var sort_order = 1;
|
var sort_order = 1;
|
||||||
|
|||||||
@@ -452,14 +452,6 @@ let AboutYou = (props) => {
|
|||||||
const isAgentSelected = appellantAgentValue == "846040001";
|
const isAgentSelected = appellantAgentValue == "846040001";
|
||||||
const isAppellantSelected = appellantAgentValue == "846040000";
|
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 yesNo = isWelsh ? ["Ydw", "Na"] : ["Yes", "No"];
|
||||||
const appellantAgent = isWelsh
|
const appellantAgent = isWelsh
|
||||||
? ["Apelydd", "Asiant"]
|
? ["Apelydd", "Asiant"]
|
||||||
@@ -507,14 +499,11 @@ let AboutYou = (props) => {
|
|||||||
if (isAgentSelected && isAgent == false) {
|
if (isAgentSelected && isAgent == false) {
|
||||||
updateField("caseForm", "pinswg_appellantfirstname", "");
|
updateField("caseForm", "pinswg_appellantfirstname", "");
|
||||||
updateField("caseForm", "pinswg_appellantlastname", "");
|
updateField("caseForm", "pinswg_appellantlastname", "");
|
||||||
updateField("caseForm", "company", "");
|
|
||||||
updateField("caseForm", "pinswg_appellantemailaddress", "");
|
updateField("caseForm", "pinswg_appellantemailaddress", "");
|
||||||
updateField("caseForm", "pinswg_appellantaddress", "");
|
updateField("caseForm", "pinswg_appellantaddress", "");
|
||||||
updateField("caseForm", "pinswg_appellantphonenumber", "");
|
updateField("caseForm", "pinswg_appellantphonenumber", "");
|
||||||
setIsAgent(true);
|
setIsAgent(true);
|
||||||
}
|
} //else {
|
||||||
|
|
||||||
//else {
|
|
||||||
// updateField(
|
// updateField(
|
||||||
// "caseForm",
|
// "caseForm",
|
||||||
// "pinswg_appellantfirstname",
|
// "pinswg_appellantfirstname",
|
||||||
@@ -613,17 +602,6 @@ let AboutYou = (props) => {
|
|||||||
)}
|
)}
|
||||||
maxFieldLength="200"
|
maxFieldLength="200"
|
||||||
/>
|
/>
|
||||||
<Field
|
|
||||||
name={"pinswg_appellantcompany"}
|
|
||||||
id={"pinswg_appellantcompany"}
|
|
||||||
component={RenderTextfield}
|
|
||||||
type="text"
|
|
||||||
className="govuk-input govuk-input--width-20"
|
|
||||||
label={t(
|
|
||||||
"newappeal:about-you-agent-contact-details-companyname-label"
|
|
||||||
)}
|
|
||||||
maxFieldLength="200"
|
|
||||||
/>
|
|
||||||
<Field
|
<Field
|
||||||
name={"pinswg_appellantaddress"}
|
name={"pinswg_appellantaddress"}
|
||||||
id={"pinswg_appellantaddress"}
|
id={"pinswg_appellantaddress"}
|
||||||
@@ -911,27 +889,12 @@ const mapStateToProps = (state) => {
|
|||||||
state.accountDetails.accountDetails.firstname,
|
state.accountDetails.accountDetails.firstname,
|
||||||
pinswg_appellantlastname:
|
pinswg_appellantlastname:
|
||||||
state.accountDetails.accountDetails.lastname,
|
state.accountDetails.accountDetails.lastname,
|
||||||
pinswg_appellantcompany:
|
|
||||||
state.accountDetails.accountDetails.pinswg_companyname,
|
|
||||||
pinswg_appellantemailaddress:
|
pinswg_appellantemailaddress:
|
||||||
state.accountDetails.accountDetails.emailaddress1,
|
state.accountDetails.accountDetails.emailaddress1,
|
||||||
pinswg_appellantaddress:
|
pinswg_appellantaddress:
|
||||||
state.accountDetails.accountDetails.address1_composite,
|
state.accountDetails.accountDetails.address1_composite,
|
||||||
pinswg_appellantphonenumber:
|
pinswg_appellantphonenumber:
|
||||||
state.accountDetails.accountDetails.telephone1,
|
state.accountDetails.accountDetails.telephone1
|
||||||
pinswg_agentcompanyname:
|
|
||||||
state.accountDetails.accountDetails.pinswg_companyname,
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -375,8 +375,8 @@ let BuildSection = (props) => {
|
|||||||
doc,
|
doc,
|
||||||
whichField
|
whichField
|
||||||
);
|
);
|
||||||
// console.log(errorFieldLabel[0]?.value);
|
|
||||||
return errorFieldLabel[0]?.value;
|
return errorFieldLabel[0].value;
|
||||||
};
|
};
|
||||||
|
|
||||||
let errorItems = [];
|
let errorItems = [];
|
||||||
@@ -405,10 +405,10 @@ let BuildSection = (props) => {
|
|||||||
<div className="govuk-grid-column-two-thirds wgForm ">
|
<div className="govuk-grid-column-two-thirds wgForm ">
|
||||||
<SectionHeader title={FieldsTranslations(titles[0].value)} />
|
<SectionHeader title={FieldsTranslations(titles[0].value)} />
|
||||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||||
{/* <ErrorSummary
|
<ErrorSummary
|
||||||
hasErrors={hasErrors == true}
|
hasErrors={hasErrors == true}
|
||||||
errorItems={getErrorItems()}
|
errorItems={getErrorItems()}
|
||||||
/> */}
|
/>
|
||||||
<BuildRow
|
<BuildRow
|
||||||
rowXML={rowXML}
|
rowXML={rowXML}
|
||||||
whichSection={props.whichSection}
|
whichSection={props.whichSection}
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ let CompleteAppeal = (props) => {
|
|||||||
const legacyProps = props.props;
|
const legacyProps = props.props;
|
||||||
const legacyFormState = legacyProps.form;
|
const legacyFormState = legacyProps.form;
|
||||||
const legacyAccountDetails = legacyProps.accountDetails;
|
const legacyAccountDetails = legacyProps.accountDetails;
|
||||||
const router = useRouter();
|
|
||||||
const { locale } = router;
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let incidentId = props.appealType.caseReference.incidentid;
|
let incidentId = props.appealType.caseReference.incidentid;
|
||||||
@@ -79,12 +77,14 @@ let CompleteAppeal = (props) => {
|
|||||||
legacyAccountDetails.loggedinUserId,
|
legacyAccountDetails.loggedinUserId,
|
||||||
props.appealType.appealTypeID,
|
props.appealType.appealTypeID,
|
||||||
legacyAccountDetails.loggedinUserEmail,
|
legacyAccountDetails.loggedinUserEmail,
|
||||||
legacyAccountDetails.containerID,
|
legacyAccountDetails.containerID
|
||||||
router.locale
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
formXML,
|
formXML,
|
||||||
sectionCount,
|
sectionCount,
|
||||||
|
|||||||
@@ -17,12 +17,6 @@ const CaseRepresentation = (props) => {
|
|||||||
<div className="govuk-grid-row">
|
<div className="govuk-grid-row">
|
||||||
<div className="govuk-grid-column-full">
|
<div className="govuk-grid-column-full">
|
||||||
<Summary
|
<Summary
|
||||||
isAppellant={
|
|
||||||
props.props.accountDetails.accountDetails
|
|
||||||
.emailaddress1 ===
|
|
||||||
props.searchResultsObj?.value?.[0]
|
|
||||||
?.customerid_contact?.emailaddress1
|
|
||||||
}
|
|
||||||
myCases={props.myCases}
|
myCases={props.myCases}
|
||||||
myRepresentations={props.myRepresentations}
|
myRepresentations={props.myRepresentations}
|
||||||
watchedCases={props.watchedCases}
|
watchedCases={props.watchedCases}
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import {
|
|||||||
getWatchedCasesProxy
|
getWatchedCasesProxy
|
||||||
} from "../../actions/services/portalService";
|
} from "../../actions/services/portalService";
|
||||||
import RepsOnResults from "./repsonresults";
|
import RepsOnResults from "./repsonresults";
|
||||||
import LiveLink from "./liveLink";
|
|
||||||
|
|
||||||
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||||
|
|
||||||
@@ -395,13 +394,6 @@ const SearchResults = (props) => {
|
|||||||
<RepsOnResults
|
<RepsOnResults
|
||||||
detailsObj={detailsObj}
|
detailsObj={detailsObj}
|
||||||
/>
|
/>
|
||||||
<LiveLink
|
|
||||||
detailsObj={detailsObj}
|
|
||||||
appealType={
|
|
||||||
item.pinswg_appealcasetype
|
|
||||||
}
|
|
||||||
locale={locale}
|
|
||||||
/>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
@@ -898,23 +890,20 @@ const SearchResults = (props) => {
|
|||||||
|
|
||||||
setCurrentPage(pageNumber);
|
setCurrentPage(pageNumber);
|
||||||
|
|
||||||
let sortedResults = [];
|
resultsArr = _.sortBy(resultsArr, [
|
||||||
setResultsArr((previousResults) => {
|
|
||||||
sortedResults = _.sortBy(previousResults, [
|
|
||||||
function (o) {
|
function (o) {
|
||||||
return o[orderBy];
|
return o[orderBy];
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
fieldSort == "desc" && sortedResults.reverse();
|
fieldSort == "desc" && resultsArr.reverse();
|
||||||
return sortedResults;
|
|
||||||
});
|
|
||||||
|
|
||||||
setShowSpinnerState(false);
|
setShowSpinnerState(false);
|
||||||
|
setResultsArr(resultsArr);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"================================\n",
|
"================================\n",
|
||||||
sortedResults,
|
resultsArr,
|
||||||
"sort done",
|
"sort done",
|
||||||
"\n=================================\n"
|
"\n=================================\n"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ import useTranslation from "next-translate/useTranslation";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Field, formValueSelector, reduxForm } from "redux-form";
|
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import transLookup from "../../data/lookuptranslations.json";
|
|
||||||
|
|
||||||
import { getCaseStatus } from "../../actions/services/caseDirectService";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
|
|
||||||
const required = (errorMsg) => (value) =>
|
const required = (errorMsg) => (value) =>
|
||||||
value || typeof value === "number" ? undefined : errorMsg;
|
value || typeof value === "number" ? undefined : errorMsg;
|
||||||
@@ -122,7 +120,7 @@ const RenderCaseStatusList = ({
|
|||||||
optionsObj,
|
optionsObj,
|
||||||
meta: { touched, error },
|
meta: { touched, error },
|
||||||
label,
|
label,
|
||||||
errormsg
|
errormsg,
|
||||||
}) => {
|
}) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -173,13 +171,19 @@ const RenderCaseStatusList = ({
|
|||||||
? ""
|
? ""
|
||||||
: _.isEmpty(optionsObj[key])
|
: _.isEmpty(optionsObj[key])
|
||||||
? ""
|
? ""
|
||||||
: _.isEmpty(
|
: _.isEmpty(optionsObj[key].value)
|
||||||
optionsObj[key].value
|
|
||||||
)
|
|
||||||
? ""
|
? ""
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? `${optionsObj[key].value_cy} (${optionsObj[key].caseCount || 0})`
|
? jsonpath({
|
||||||
: `${optionsObj[key].value} (${optionsObj[key].caseCount || 0})` ||
|
path:
|
||||||
|
'$..[?(@ && @.statuscode=="' +
|
||||||
|
optionsObj[key]
|
||||||
|
.statuscode +
|
||||||
|
'")].value_cy',
|
||||||
|
json: optionsObj,
|
||||||
|
eval: true,
|
||||||
|
})
|
||||||
|
: optionsObj[key].value ||
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -207,7 +211,7 @@ let AdvancedSearch = (props) => {
|
|||||||
error,
|
error,
|
||||||
pristine,
|
pristine,
|
||||||
reset,
|
reset,
|
||||||
submitting
|
submitting,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const appealOptionsObj =
|
const appealOptionsObj =
|
||||||
@@ -225,11 +229,6 @@ let AdvancedSearch = (props) => {
|
|||||||
? props.LPAData.LPAData.value
|
? props.LPAData.LPAData.value
|
||||||
: [{}];
|
: [{}];
|
||||||
|
|
||||||
const caseStatusObject =
|
|
||||||
props?.LPAData?.caseStatusObj?.length > 0
|
|
||||||
? props.LPAData.caseStatusObj
|
|
||||||
: [{}];
|
|
||||||
|
|
||||||
const RenderLPAList = ({
|
const RenderLPAList = ({
|
||||||
name,
|
name,
|
||||||
id,
|
id,
|
||||||
@@ -237,7 +236,7 @@ let AdvancedSearch = (props) => {
|
|||||||
optionsObj,
|
optionsObj,
|
||||||
meta: { touched, error },
|
meta: { touched, error },
|
||||||
label,
|
label,
|
||||||
errormsg
|
errormsg,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -292,7 +291,7 @@ let AdvancedSearch = (props) => {
|
|||||||
.name +
|
.name +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: optionsObj[key].name ||
|
: optionsObj[key].name ||
|
||||||
t(
|
t(
|
||||||
@@ -315,7 +314,7 @@ let AdvancedSearch = (props) => {
|
|||||||
optionsObj,
|
optionsObj,
|
||||||
meta: { touched, error },
|
meta: { touched, error },
|
||||||
label,
|
label,
|
||||||
errormsg
|
errormsg,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -373,9 +372,7 @@ let AdvancedSearch = (props) => {
|
|||||||
: optionsObj[key]
|
: optionsObj[key]
|
||||||
.attributevalue +
|
.attributevalue +
|
||||||
"," +
|
"," +
|
||||||
optionsObj[
|
optionsObj[key].value
|
||||||
key
|
|
||||||
].value
|
|
||||||
.replace(
|
.replace(
|
||||||
/(\band|[\s\-\+\(\)\,\&])/g,
|
/(\band|[\s\-\+\(\)\,\&])/g,
|
||||||
""
|
""
|
||||||
@@ -388,23 +385,20 @@ let AdvancedSearch = (props) => {
|
|||||||
: _.isEmpty(optionsObj[key])
|
: _.isEmpty(optionsObj[key])
|
||||||
? ""
|
? ""
|
||||||
: _.isEmpty(
|
: _.isEmpty(
|
||||||
optionsObj[key]
|
optionsObj[key].value
|
||||||
.value
|
|
||||||
)
|
)
|
||||||
? ""
|
? ""
|
||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? jsonpath({
|
? jsonpath({
|
||||||
path:
|
path:
|
||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
optionsObj[
|
optionsObj[key]
|
||||||
key
|
.value +
|
||||||
].value +
|
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true,
|
||||||
})
|
})
|
||||||
: optionsObj[key]
|
: optionsObj[key].value ||
|
||||||
.value ||
|
|
||||||
t(
|
t(
|
||||||
"case:summary-no-date-entered-label"
|
"case:summary-no-date-entered-label"
|
||||||
)}
|
)}
|
||||||
@@ -424,7 +418,7 @@ let AdvancedSearch = (props) => {
|
|||||||
optionsObj,
|
optionsObj,
|
||||||
meta: { touched, error },
|
meta: { touched, error },
|
||||||
label,
|
label,
|
||||||
errormsg
|
errormsg,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -504,9 +498,7 @@ let AdvancedSearch = (props) => {
|
|||||||
: router.locale == "cy"
|
: router.locale == "cy"
|
||||||
? jsonpath(
|
? jsonpath(
|
||||||
'$..[?(@.value=="' +
|
'$..[?(@.value=="' +
|
||||||
optionsObj[
|
optionsObj[key]
|
||||||
key
|
|
||||||
]
|
|
||||||
.pinswg_name +
|
.pinswg_name +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
transLookup
|
transLookup
|
||||||
@@ -558,7 +550,7 @@ let AdvancedSearch = (props) => {
|
|||||||
|
|
||||||
searchString +=
|
searchString +=
|
||||||
values.statusCode != null
|
values.statusCode != null
|
||||||
? "statuscode=" + values.statusCode + "&"
|
? "statuscode=" + values.projecttype + "&"
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
searchString +=
|
searchString +=
|
||||||
@@ -602,7 +594,7 @@ let AdvancedSearch = (props) => {
|
|||||||
t(
|
t(
|
||||||
"myportal:searchcases-validation-minlength"
|
"myportal:searchcases-validation-minlength"
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
]}
|
]}
|
||||||
className="govuk-input govuk-!-width-two-thirds"
|
className="govuk-input govuk-!-width-two-thirds"
|
||||||
component={RenderTextfield}
|
component={RenderTextfield}
|
||||||
@@ -627,7 +619,7 @@ let AdvancedSearch = (props) => {
|
|||||||
t(
|
t(
|
||||||
"myportal:searchcases-validation-minlength"
|
"myportal:searchcases-validation-minlength"
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
]}
|
]}
|
||||||
className="govuk-input govuk-!-width-two-thirds"
|
className="govuk-input govuk-!-width-two-thirds"
|
||||||
component={RenderLPATextfield}
|
component={RenderLPATextfield}
|
||||||
@@ -689,7 +681,40 @@ let AdvancedSearch = (props) => {
|
|||||||
name="statusCode"
|
name="statusCode"
|
||||||
id="statusCode"
|
id="statusCode"
|
||||||
component={RenderCaseStatusList}
|
component={RenderCaseStatusList}
|
||||||
optionsObj={caseStatusObject}
|
optionsObj={[
|
||||||
|
{
|
||||||
|
"value": "In Progress",
|
||||||
|
"value_cy": "Ar y gweill",
|
||||||
|
"statuscode": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "On Hold",
|
||||||
|
"value_cy": "Ar Dal",
|
||||||
|
"statuscode": 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value":
|
||||||
|
"Waiting for details",
|
||||||
|
"value_cy":
|
||||||
|
"Aros am fanylion",
|
||||||
|
"statuscode": 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Researching",
|
||||||
|
"value_cy": "Ymchwilio",
|
||||||
|
"statuscode": 4,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Case Closed",
|
||||||
|
"value_cy": "Achos ar Gau",
|
||||||
|
"statuscode": 5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Cancelled",
|
||||||
|
"value_cy": "Wedi'i ganslo",
|
||||||
|
"statuscode": 6,
|
||||||
|
},
|
||||||
|
]}
|
||||||
//validate={[required]}
|
//validate={[required]}
|
||||||
label={t(
|
label={t(
|
||||||
"search:case-status-label"
|
"search:case-status-label"
|
||||||
@@ -810,7 +835,7 @@ const mapStateToProps = (state) => {
|
|||||||
myCases: state.myCases,
|
myCases: state.myCases,
|
||||||
watchedCases: state.watchedCases,
|
watchedCases: state.watchedCases,
|
||||||
myRepresentations: state.myRepresentations,
|
myRepresentations: state.myRepresentations,
|
||||||
awaitingSubmission: state.awaitingSubmission
|
awaitingSubmission: state.awaitingSubmission,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -824,7 +849,7 @@ AdvancedSearch = connect((state) => {
|
|||||||
const appealTypesValue = selector(state, "appealTypes");
|
const appealTypesValue = selector(state, "appealTypes");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
appealTypesValue
|
appealTypesValue,
|
||||||
};
|
};
|
||||||
})(AdvancedSearch);
|
})(AdvancedSearch);
|
||||||
|
|
||||||
@@ -834,6 +859,6 @@ export default connect(
|
|||||||
)(
|
)(
|
||||||
reduxForm({
|
reduxForm({
|
||||||
form: "advancedSearchForm",
|
form: "advancedSearchForm",
|
||||||
destroyOnUnmount: false
|
destroyOnUnmount: false,
|
||||||
})(AdvancedSearch)
|
})(AdvancedSearch)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { connect } from "react-redux";
|
|||||||
import transLookup from "../../data/lookuptranslations.json";
|
import transLookup from "../../data/lookuptranslations.json";
|
||||||
import PaginationControl from "./pagination";
|
import PaginationControl from "./pagination";
|
||||||
import RepsOnResults from "./repsonresults";
|
import RepsOnResults from "./repsonresults";
|
||||||
import LiveLink from "./liveLink";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getBasicDNSSearchPaged,
|
getBasicDNSSearchPaged,
|
||||||
@@ -439,8 +438,6 @@ const DNSSearchResults = (props) => {
|
|||||||
className="govuk-link--no-underline"
|
className="govuk-link--no-underline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"statuscode":
|
|
||||||
item.statuscode,
|
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
item.ticketnumber,
|
item.ticketnumber,
|
||||||
"currentReference":
|
"currentReference":
|
||||||
@@ -471,13 +468,6 @@ const DNSSearchResults = (props) => {
|
|||||||
item.pinswg_appealcasetype
|
item.pinswg_appealcasetype
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<LiveLink
|
|
||||||
detailsObj={detailsObj}
|
|
||||||
appealType={
|
|
||||||
item.pinswg_appealcasetype
|
|
||||||
}
|
|
||||||
locale={locale}
|
|
||||||
/>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
@@ -949,20 +939,6 @@ const DNSSearchResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body">
|
|
||||||
{t("dnsApplications:page-intro-list-item-3")}
|
|
||||||
<a
|
|
||||||
href={t(
|
|
||||||
"dnsApplications:page-intro-list-item-3-link"
|
|
||||||
)}
|
|
||||||
rel="noreferrer noopener"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
{t(
|
|
||||||
"dnsApplications:page-intro-list-item-3-link"
|
|
||||||
)}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showMap == "true" && (
|
{showMap == "true" && (
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
import useTranslation from "next-translate/useTranslation";
|
|
||||||
import { getLivePublishedEvent } from "../case/summary/utils/liveEvent";
|
|
||||||
|
|
||||||
const LiveLink = ({ detailsObj, locale }) => {
|
|
||||||
let { t } = useTranslation();
|
|
||||||
|
|
||||||
const eventsObj = {
|
|
||||||
value: detailsObj?.pinswg_sips_pinswg_sipsevent || []
|
|
||||||
};
|
|
||||||
|
|
||||||
const liveEvent = getLivePublishedEvent(eventsObj);
|
|
||||||
|
|
||||||
if (!liveEvent) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="govuk-!-margin-top-3">
|
|
||||||
<a
|
|
||||||
href={
|
|
||||||
locale === "en"
|
|
||||||
? liveEvent.pinswg_linktotheevent
|
|
||||||
: liveEvent.pinswg_linktotheeventstreamwelsh
|
|
||||||
}
|
|
||||||
className="govuk-link"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
{t("case:live-event-link")}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default LiveLink;
|
|
||||||
@@ -7,11 +7,6 @@ const RepsOnResults = (props) => {
|
|||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
const detailsObj = props.detailsObj;
|
const detailsObj = props.detailsObj;
|
||||||
const isLPA = Boolean(props?.isLPA);
|
|
||||||
const appealType = props?.appealType || detailsObj?.appealType;
|
|
||||||
const specialistProcess =
|
|
||||||
detailsObj?.pinswg_speacialistcaseprocess ||
|
|
||||||
detailsObj?.pinswg_specialistcaseprocess;
|
|
||||||
|
|
||||||
function showReps(startDate, endDate) {
|
function showReps(startDate, endDate) {
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
@@ -37,18 +32,22 @@ const RepsOnResults = (props) => {
|
|||||||
return isLPA ? true : false;
|
return isLPA ? true : false;
|
||||||
|
|
||||||
case 846040015:
|
case 846040015:
|
||||||
return specialistProcess == 846040001
|
return props.searchDetailsObj[0].value[0]
|
||||||
|
.pinswg_specialistcaseprocess == 846040001
|
||||||
? showReps(
|
? showReps(
|
||||||
detailsObj.pinswg_startdate,
|
props.searchDetailsObj[0].value[0].pinswg_startdate,
|
||||||
detailsObj.pinswg_finalcommentsduedate
|
props.searchDetailsObj[0].value[0]
|
||||||
|
.pinswg_finalcommentsduedate
|
||||||
)
|
)
|
||||||
: true;
|
: true;
|
||||||
|
|
||||||
case 846040018:
|
case 846040018:
|
||||||
let shouldShow =
|
let shouldShow =
|
||||||
specialistProcess == 846040000 && isLPA
|
props.searchDetailsObj[0].value[0]
|
||||||
|
.pinswg_speacialistcaseprocess == 846040000 && isLPA
|
||||||
? true
|
? true
|
||||||
: specialistProcess == 846040001
|
: props.searchDetailsObj[0].value[0]
|
||||||
|
.pinswg_speacialistcaseprocess == 846040001
|
||||||
? true
|
? true
|
||||||
: false;
|
: false;
|
||||||
|
|
||||||
@@ -56,8 +55,8 @@ const RepsOnResults = (props) => {
|
|||||||
|
|
||||||
case 846040019:
|
case 846040019:
|
||||||
return showReps(
|
return showReps(
|
||||||
detailsObj.pinswg_startdate,
|
props.searchDetailsObj[0].value[0].pinswg_startdate,
|
||||||
detailsObj.pinswg_statementduedate
|
props.searchDetailsObj[0].value[0].pinswg_statementduedate
|
||||||
);
|
);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -123,7 +122,7 @@ const RepsOnResults = (props) => {
|
|||||||
)}
|
)}
|
||||||
</Link> */}
|
</Link> */}
|
||||||
<div className="govuk-body govuk-!-font-size-14">
|
<div className="govuk-body govuk-!-font-size-14">
|
||||||
{appealType == 846040002
|
{props.appealType == 846040002
|
||||||
? t(
|
? t(
|
||||||
"case:summary-consultation-open-label"
|
"case:summary-consultation-open-label"
|
||||||
)
|
)
|
||||||
@@ -132,7 +131,9 @@ const RepsOnResults = (props) => {
|
|||||||
)}{" "}
|
)}{" "}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : !isLPA && appealType == 846040004 ? (
|
) : !isLPA &&
|
||||||
|
props.currentView.caseReference.appealType ==
|
||||||
|
846040004 ? (
|
||||||
""
|
""
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
@@ -146,7 +147,10 @@ const RepsOnResults = (props) => {
|
|||||||
detailsObj.pinswg_startdate
|
detailsObj.pinswg_startdate
|
||||||
),
|
),
|
||||||
endDate:
|
endDate:
|
||||||
appealType == 846040019
|
props.currentView
|
||||||
|
.caseReference
|
||||||
|
.appealType ==
|
||||||
|
846040019
|
||||||
? formatDates(
|
? formatDates(
|
||||||
detailsObj.pinswg_statementduedate
|
detailsObj.pinswg_statementduedate
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ import {
|
|||||||
|
|
||||||
import { sendGAEvent } from "@next/third-parties/google";
|
import { sendGAEvent } from "@next/third-parties/google";
|
||||||
import RepsOnResults from "./repsonresults";
|
import RepsOnResults from "./repsonresults";
|
||||||
import LiveLink from "./liveLink";
|
|
||||||
import { query } from "jsonpath";
|
import { query } from "jsonpath";
|
||||||
|
|
||||||
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||||
@@ -422,8 +421,6 @@ const SearchResults = (props) => {
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"statuscode":
|
|
||||||
item.statuscode,
|
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
item.ticketnumber,
|
item.ticketnumber,
|
||||||
"currentReference":
|
"currentReference":
|
||||||
@@ -481,13 +478,6 @@ const SearchResults = (props) => {
|
|||||||
item.pinswg_appealcasetype
|
item.pinswg_appealcasetype
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<LiveLink
|
|
||||||
detailsObj={detailsObj}
|
|
||||||
appealType={
|
|
||||||
item.pinswg_appealcasetype
|
|
||||||
}
|
|
||||||
locale={locale}
|
|
||||||
/>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
<span className="results-visually-hidden">
|
<span className="results-visually-hidden">
|
||||||
@@ -688,7 +678,7 @@ const SearchResults = (props) => {
|
|||||||
'$..[?(@ && @.value=="' +
|
'$..[?(@ && @.value=="' +
|
||||||
item[
|
item[
|
||||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||||
].trim() +
|
] +
|
||||||
'")].value_cy',
|
'")].value_cy',
|
||||||
json: transLookup,
|
json: transLookup,
|
||||||
eval: true
|
eval: true
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
import { signOut } from "next-auth/react";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import { destroyCookie } from "nookies";
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useIdleTimer } from "react-idle-timer";
|
import { useIdleTimer } from "react-idle-timer";
|
||||||
import TimeoutModal from "./timeoutmodal";
|
import TimeoutModal from "./timeoutmodal";
|
||||||
import { performPortalSignOut } from "../../lib/auth/sessionClient";
|
|
||||||
|
|
||||||
const TimeOut = (props) => {
|
const TimeOut = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -19,7 +20,15 @@ const TimeOut = (props) => {
|
|||||||
|
|
||||||
const onIdle = () => {
|
const onIdle = () => {
|
||||||
setState("Idle");
|
setState("Idle");
|
||||||
performPortalSignOut(locale);
|
console.info("////////////\n" + "logout" + "\n////////////");
|
||||||
|
window.localStorage.clear(),
|
||||||
|
destroyCookie(null, "next-auth.csrf-token", { path: "/" }),
|
||||||
|
destroyCookie(null, "next-auth.callback-url", { path: "/" }),
|
||||||
|
destroyCookie(null, "pedw_locale", { path: "/" }),
|
||||||
|
destroyCookie(null, "pinsUser", { path: "/" }),
|
||||||
|
signOut({
|
||||||
|
callbackUrl: locale == "cy" ? "/cy/allgofnodi" : "/logout",
|
||||||
|
});
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -39,7 +48,7 @@ const TimeOut = (props) => {
|
|||||||
onPrompt,
|
onPrompt,
|
||||||
timeout,
|
timeout,
|
||||||
promptBeforeIdle,
|
promptBeforeIdle,
|
||||||
throttle: 500
|
throttle: 500,
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -80,14 +89,14 @@ const TimeOut = (props) => {
|
|||||||
<div
|
<div
|
||||||
className={open ? "modal fade show" : "modal fade"}
|
className={open ? "modal fade show" : "modal fade"}
|
||||||
style={{
|
style={{
|
||||||
display: open ? "flex" : "none"
|
display: open ? "flex" : "none",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="modal-dialog">
|
<div className="modal-dialog">
|
||||||
<div className="modal-content">
|
<div className="modal-content">
|
||||||
<h3>
|
<h3>
|
||||||
{t("common:login-modal-message", {
|
{t("common:login-modal-message", {
|
||||||
remaining: remaining
|
remaining: remaining,
|
||||||
})}
|
})}
|
||||||
</h3>
|
</h3>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -1,287 +0,0 @@
|
|||||||
export const statusValues = [
|
|
||||||
{
|
|
||||||
"value": "Acceptance Checking",
|
|
||||||
"value_cy": "Gwirio derbyn",
|
|
||||||
"statuscode": 846040004
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Registered",
|
|
||||||
"value_cy": "Apêl wedi’i chofrestru",
|
|
||||||
"statuscode": 846040015
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Submitted",
|
|
||||||
"value_cy": "Apêl wedi’i chyflwyno",
|
|
||||||
"statuscode": 846040014
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Validated",
|
|
||||||
"value_cy": "Apêl wedi’i dilysu",
|
|
||||||
"statuscode": 846040016
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Applicants Final Comment",
|
|
||||||
"value_cy": "Sylw terfynol yr ymgeisydd",
|
|
||||||
"statuscode": 846040027
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Called-In",
|
|
||||||
"value_cy": "Cais wedi’i alw i mewn",
|
|
||||||
"statuscode": 846040023
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Validated",
|
|
||||||
"value_cy": "Cais wedi’i ddilysu",
|
|
||||||
"statuscode": 846040024
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case in Progress",
|
|
||||||
"value_cy": "Achos ar y gweill",
|
|
||||||
"statuscode": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Consultation",
|
|
||||||
"value_cy": "Ymgynghoriad",
|
|
||||||
"statuscode": 846040006
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Environmental Impact Assessment Scoping",
|
|
||||||
"value_cy": "Cwmpasu Asesiad o’r Effaith Amgylcheddol",
|
|
||||||
"statuscode": 846040002
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Inspector(s) Decision",
|
|
||||||
"value_cy": "Penderfyniad yr arolygydd/arolygwyr",
|
|
||||||
"statuscode": 846040009
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Invalid Submission",
|
|
||||||
"value_cy": "Cyflwyniad annilys",
|
|
||||||
"statuscode": 846040005
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Notification",
|
|
||||||
"value_cy": "Hysbysiad",
|
|
||||||
"statuscode": 846040003
|
|
||||||
},
|
|
||||||
{ "value": "On Hold", "value_cy": "Ar Dal", "statuscode": 2 },
|
|
||||||
{
|
|
||||||
"value": "Pre-Application",
|
|
||||||
"value_cy": "Cyn gwneud cais",
|
|
||||||
"statuscode": 846040001
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Questionnaire / LPA to Notify",
|
|
||||||
"value_cy": "Holiadur / ACLl i hysbysu",
|
|
||||||
"statuscode": 846040017
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Re-Consultation",
|
|
||||||
"value_cy": "Ail-ymgynghoriad",
|
|
||||||
"statuscode": 846040007
|
|
||||||
},
|
|
||||||
{ "value": "Researching", "value_cy": "Ymchwilio", "statuscode": 4 },
|
|
||||||
{
|
|
||||||
"value": "Report to Ministers",
|
|
||||||
"value_cy": "Adroddiad i Weinidogion",
|
|
||||||
"statuscode": 846040011
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Statements",
|
|
||||||
"value_cy": "Datganiadau",
|
|
||||||
"statuscode": 846040010
|
|
||||||
},
|
|
||||||
{ "value": "Reporting", "value_cy": "Adrodd", "statuscode": 846040008 },
|
|
||||||
{
|
|
||||||
"value": "Waiting for Details",
|
|
||||||
"value_cy": "Aros am fanylion",
|
|
||||||
"statuscode": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Minister's Decision",
|
|
||||||
"value_cy": "Penderfyniad y Gweinidog",
|
|
||||||
"statuscode": 846040012
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Representations Period",
|
|
||||||
"value_cy": "Cyfnod sylwadau",
|
|
||||||
"statuscode": 846040018
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Final Comments",
|
|
||||||
"value_cy": "Sylwadau terfynol",
|
|
||||||
"statuscode": 846040019
|
|
||||||
},
|
|
||||||
{ "value": "Event", "value_cy": "Digwyddiad", "statuscode": 846040020 },
|
|
||||||
{
|
|
||||||
"value": "Site Visit",
|
|
||||||
"value_cy": "Ymweliad safle",
|
|
||||||
"statuscode": 846040021
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Decision Issued",
|
|
||||||
"value_cy": "Penderfyniad wedi’i gyhoeddi",
|
|
||||||
"statuscode": 846040022
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "LPA to Notify",
|
|
||||||
"value_cy": "ACLl i hysbysu",
|
|
||||||
"statuscode": 846040025
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Report Issued to Welsh Ministers",
|
|
||||||
"value_cy": "Adroddiad wedi’i gyhoeddi i Weinidogion Cymru",
|
|
||||||
"statuscode": 846040028
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Fee Due",
|
|
||||||
"value_cy": "Ffi yn ddyledus",
|
|
||||||
"statuscode": 846040029
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Validated",
|
|
||||||
"value_cy": "Wedi’i ddilysu",
|
|
||||||
"statuscode": 846040030
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Start / Case in Progress",
|
|
||||||
"value_cy": "Apêl wedi dechrau / achos ar y gweill",
|
|
||||||
"statuscode": 846040031
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Statements/Representations Period",
|
|
||||||
"value_cy": "Cyfnod datganiadau/sylwadau",
|
|
||||||
"statuscode": 846040032
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Submitted",
|
|
||||||
"value_cy": "Gorchymyn wedi’i gyflwyno",
|
|
||||||
"statuscode": 846040033
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Submission Registered",
|
|
||||||
"value_cy": "Cyflwyniad gorchymyn wedi’i gofrestru",
|
|
||||||
"statuscode": 846040034
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Submission Validated",
|
|
||||||
"value_cy": "Cyflwyniad gorchymyn wedi’i ddilysu",
|
|
||||||
"statuscode": 846040035
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case started/Case in Progress",
|
|
||||||
"value_cy": "Achos wedi dechrau / achos ar y gweill",
|
|
||||||
"statuscode": 846040036
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Event/Site Visit",
|
|
||||||
"value_cy": "Digwyddiad/ymweliad safle",
|
|
||||||
"statuscode": 846040037
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Applicant Statement on Representations",
|
|
||||||
"value_cy": "Datganiad yr ymgeisydd ar sylwadau",
|
|
||||||
"statuscode": 846040038
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Representatives Comment",
|
|
||||||
"value_cy": "Sylw’r cynrychiolwyr",
|
|
||||||
"statuscode": 846040039
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Registered",
|
|
||||||
"value_cy": "Gorchymyn wedi’i gofrestru",
|
|
||||||
"statuscode": 846040040
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Validated",
|
|
||||||
"value_cy": "Gorchymyn wedi’i ddilysu",
|
|
||||||
"statuscode": 846040041
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Representations Period",
|
|
||||||
"value_cy": "Cyfnod sylwadau",
|
|
||||||
"statuscode": 846040047
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Submitted",
|
|
||||||
"value_cy": "Cais wedi’i gyflwyno",
|
|
||||||
"statuscode": 846040042
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Registered",
|
|
||||||
"value_cy": "Cais wedi’i gofrestru",
|
|
||||||
"statuscode": 846040043
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Report to DESNZ",
|
|
||||||
"value_cy": "Adroddiad i DESNZ",
|
|
||||||
"statuscode": 846040044
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case in Progress / Assessment",
|
|
||||||
"value_cy": "Achos ar y gweill / asesiad",
|
|
||||||
"statuscode": 846040045
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Decision / Outcome",
|
|
||||||
"value_cy": "Penderfyniad / canlyniad",
|
|
||||||
"statuscode": 846040046
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Final Comments",
|
|
||||||
"value_cy": "Sylwadau terfynol",
|
|
||||||
"statuscode": 846040048
|
|
||||||
},
|
|
||||||
{ "value": "Event", "value_cy": "Digwyddiad", "statuscode": 846040049 },
|
|
||||||
{
|
|
||||||
"value": "Minister's Decision",
|
|
||||||
"value_cy": "Penderfyniad y Gweinidog",
|
|
||||||
"statuscode": 846040050
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case started/Case in Progress",
|
|
||||||
"value_cy": "Achos wedi dechrau / achos ar y gweill",
|
|
||||||
"statuscode": 846040051
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Statements",
|
|
||||||
"value_cy": "Datganiadau",
|
|
||||||
"statuscode": 846040052
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Validated",
|
|
||||||
"value_cy": "Cais wedi’i ddilysu",
|
|
||||||
"statuscode": 846040053
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appliation Start / Case in Progress",
|
|
||||||
"value_cy": "Cais wedi dechrau / achos ar y gweill",
|
|
||||||
"statuscode": 846040054
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Final Comments",
|
|
||||||
"value_cy": "Sylwadau terfynol",
|
|
||||||
"statuscode": 846040055
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Report to Ministers",
|
|
||||||
"value_cy": "Adroddiad i Weinidogion",
|
|
||||||
"statuscode": 846040056
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Validated",
|
|
||||||
"value_cy": "Cais wedi’i ddilysu",
|
|
||||||
"statuscode": 846040057
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case in Progress",
|
|
||||||
"value_cy": "Achos ar y gweill",
|
|
||||||
"statuscode": 846040058
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case Submitted",
|
|
||||||
"value_cy": "Achos wedi’i gyflwyno",
|
|
||||||
"statuscode": 846040061
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
|
||||||
|
|
||||||
const translateLpaName = ({ name, locale, transLookup }) => {
|
|
||||||
if (!name) return "";
|
|
||||||
|
|
||||||
if (locale !== "cy") return name;
|
|
||||||
|
|
||||||
return (
|
|
||||||
jsonpath({
|
|
||||||
path: '$..[?(@ && @.value=="' + name + '")].value_cy',
|
|
||||||
json: transLookup,
|
|
||||||
eval: true
|
|
||||||
})?.[0] || name
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getCaseLpaNames = ({
|
|
||||||
casesObj,
|
|
||||||
detailsObj,
|
|
||||||
locale,
|
|
||||||
transLookup
|
|
||||||
}) => {
|
|
||||||
if (!casesObj) return [];
|
|
||||||
|
|
||||||
const primaryLpaName =
|
|
||||||
casesObj[
|
|
||||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
] || "";
|
|
||||||
|
|
||||||
const translatedPrimaryLpaName = translateLpaName({
|
|
||||||
name: primaryLpaName,
|
|
||||||
locale,
|
|
||||||
transLookup
|
|
||||||
});
|
|
||||||
|
|
||||||
const additionalLpaNames = (detailsObj.additionalLPAs || []).map((lpa) =>
|
|
||||||
translateLpaName({
|
|
||||||
name: lpa?.name || "",
|
|
||||||
locale,
|
|
||||||
transLookup
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
return [
|
|
||||||
...new Set(
|
|
||||||
[translatedPrimaryLpaName, ...additionalLpaNames].filter(Boolean)
|
|
||||||
)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getCaseLpaDisplayValue = ({
|
|
||||||
casesObj,
|
|
||||||
detailsObj,
|
|
||||||
locale,
|
|
||||||
transLookup
|
|
||||||
}) => {
|
|
||||||
return getCaseLpaNames({ casesObj, detailsObj, locale, transLookup }).join(
|
|
||||||
", "
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getCaseLpaDisplayLines = ({
|
|
||||||
casesObj,
|
|
||||||
locale,
|
|
||||||
detailsObj,
|
|
||||||
transLookup
|
|
||||||
}) => {
|
|
||||||
return getCaseLpaNames({ casesObj, detailsObj, locale, transLookup });
|
|
||||||
};
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# Auth & Session Reliability Notes
|
|
||||||
|
|
||||||
Last updated: 2026-05-13
|
|
||||||
|
|
||||||
## Known issue
|
|
||||||
|
|
||||||
Users are intermittently prompted to sign in again despite apparently valid prior session state.
|
|
||||||
|
|
||||||
## Confirmed risk contributors in code
|
|
||||||
|
|
||||||
1. Duplicated logout/cookie clearing logic across multiple components.
|
|
||||||
2. Mixed callback cookie names in runtime history (`next-auth.callback-url` and `__Secure-next-auth.callback-url`).
|
|
||||||
3. Redirect URL parsing that could fail hard on malformed/unexpected URL inputs.
|
|
||||||
4. Hard SSR redirects to `/auth/signin` on missing/transient upstream account/contact states.
|
|
||||||
|
|
||||||
## Stabilisation changes started
|
|
||||||
|
|
||||||
- Added `lib/auth/sessionClient.js`:
|
|
||||||
- normalized cookie/session artifact cleanup
|
|
||||||
- shared signed-out callback path by locale
|
|
||||||
- shared `performPortalSignOut(...)` helper
|
|
||||||
- Adopted helper in:
|
|
||||||
- `components/timeout/index.js`
|
|
||||||
- `components/myportal/servicebanner.js`
|
|
||||||
- `components/header.js`
|
|
||||||
- Updated NextAuth callback locale detection to check both callback cookie variants.
|
|
||||||
- Hardened NextAuth URL append and redirect parsing fallbacks.
|
|
||||||
|
|
||||||
## Remaining auth hardening backlog
|
|
||||||
|
|
||||||
1. Migrate remaining logout implementations to shared helper.
|
|
||||||
2. Add request-correlation-safe auth diagnostics (no secrets/tokens).
|
|
||||||
3. Evaluate session TTL/update strategy (`maxAge`, `updateAge`) with production evidence.
|
|
||||||
4. Add env validation checks for `NEXTAUTH_URL`, `CY_API_ROOT`, proxy/header assumptions.
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# Current Platform State (PEDW) — feature/restart-from-sips
|
|
||||||
|
|
||||||
Last updated: 2026-05-13
|
|
||||||
|
|
||||||
## Summary
|
|
||||||
|
|
||||||
PEDW is in a **late-stage refactor stabilization** phase.
|
|
||||||
|
|
||||||
- New Appeal refactor stream (Slices 1–8) is complete per tracker/state docs.
|
|
||||||
- Representations stream remains structurally complex and only partially decomposed.
|
|
||||||
- Platform architecture direction remains valid: bounded, behaviour-preserving slices.
|
|
||||||
|
|
||||||
## What is complete
|
|
||||||
|
|
||||||
- New Appeal slice stream documented complete (`context/refactor-tracker.md`, `context/newappeal-refactor-current-state.md`).
|
|
||||||
- Significant route/breadcrumb decomposition and helper extraction completed.
|
|
||||||
- Broad endpoint contract hardening completed across key clusters.
|
|
||||||
|
|
||||||
## What is incomplete
|
|
||||||
|
|
||||||
- Auth/session reliability hardening (intermittent re-signin prompts).
|
|
||||||
- SSR loader resilience normalization across myportal/representation/new appeal.
|
|
||||||
- Logging hardening consistency in auth/file/account-sensitive paths.
|
|
||||||
- Remaining decomposition hotspots (`components/elements/index.js`, representation flow internals).
|
|
||||||
|
|
||||||
## Operational risk profile (current)
|
|
||||||
|
|
||||||
Top active risks:
|
|
||||||
|
|
||||||
1. Auth/session intermittency (callback/cookie/SSR timing interplay).
|
|
||||||
2. Fragile nested state assumptions in loader-heavy paths.
|
|
||||||
3. Production log noise and inconsistent redaction patterns.
|
|
||||||
4. Manual effort burden for EN/CY parity and journey regression checks.
|
|
||||||
|
|
||||||
## Notes on stale/legacy guidance
|
|
||||||
|
|
||||||
- Some context docs still describe pre-refactor representation baseline; treat those as historical unless updated by active slice evidence.
|
|
||||||
- Legacy commented code remains in active files (especially journey files) and should be treated as cleanup debt, not source-of-truth runtime behaviour.
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# Performance & Stability Baseline (Phase 1)
|
|
||||||
|
|
||||||
Last updated: 2026-05-13
|
|
||||||
|
|
||||||
## Baseline observations
|
|
||||||
|
|
||||||
### Performance
|
|
||||||
|
|
||||||
- Loader-heavy pages (myportal/representation/new appeal) perform multiple external calls per SSR request.
|
|
||||||
- Form XML is read/normalized repeatedly from disk in SSR path.
|
|
||||||
- Some large components still combine orchestration + rendering, increasing rerender work.
|
|
||||||
|
|
||||||
### Stability
|
|
||||||
|
|
||||||
- Several SSR/data paths assume nested API response shapes without guard rails.
|
|
||||||
- Representation resume/new loader had crash/redirect fragility around missing contact/representation objects.
|
|
||||||
- Logging noise can mask actionable failure signals.
|
|
||||||
|
|
||||||
## Changes started in this phase
|
|
||||||
|
|
||||||
1. Added in-memory XML cache in `lib/forms/readFormXml.js` (safe, process-local).
|
|
||||||
2. Added null/redirect guards in `lib/representation/pageLoaders.js` for missing user/contact and missing representation entry.
|
|
||||||
3. Began auth-path de-duplication and redirect hardening (see auth reliability doc).
|
|
||||||
|
|
||||||
## Next baseline improvements
|
|
||||||
|
|
||||||
1. Add guarded defaults in remaining loader paths (`loadNewAppealPage`, myportal page loaders).
|
|
||||||
2. Introduce structured non-sensitive SSR failure telemetry for dependency failures.
|
|
||||||
3. Expand bounded concurrency/parallelism where safe and contract-preserving.
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
# Phase 1 Stabilisation Plan (Execution Start)
|
|
||||||
|
|
||||||
Last updated: 2026-05-14
|
|
||||||
|
|
||||||
## Goal
|
|
||||||
|
|
||||||
Reduce operational risk without changing PEDW business behaviour.
|
|
||||||
|
|
||||||
## Priority order
|
|
||||||
|
|
||||||
1. **Auth/session reliability**
|
|
||||||
2. **SSR/data-loading resilience**
|
|
||||||
3. **Logging/observability hardening**
|
|
||||||
4. **Low-risk performance improvements**
|
|
||||||
|
|
||||||
## Slice plan
|
|
||||||
|
|
||||||
### Slice P0.1 (started)
|
|
||||||
|
|
||||||
- Centralize client-side signout/cookie cleanup into shared helper.
|
|
||||||
- Replace duplicated logout logic in timeout and portal/header surfaces.
|
|
||||||
|
|
||||||
Status: completed across timeout, header, service banner, myportal, furtherdetails, and auth error paths.
|
|
||||||
|
|
||||||
### Slice P0.2 (started)
|
|
||||||
|
|
||||||
- Harden NextAuth redirect/locale callback handling.
|
|
||||||
- Add safer URL parsing fallback behaviour.
|
|
||||||
|
|
||||||
Status: completed with callback-cookie parity support and redacted diagnostics.
|
|
||||||
|
|
||||||
### Slice P1.1 (started)
|
|
||||||
|
|
||||||
- Add defensive null and redirect handling in representation SSR loader path.
|
|
||||||
|
|
||||||
Status: expanded to new appeal, myportal appeal, and representation loader guard hardening.
|
|
||||||
|
|
||||||
### Slice P3.1 (started)
|
|
||||||
|
|
||||||
- Add in-memory XML read cache for form XML to reduce repeated disk read/normalization cost.
|
|
||||||
|
|
||||||
Status: completed.
|
|
||||||
|
|
||||||
## Immediate slices status (updated)
|
|
||||||
|
|
||||||
1. Add defensive wrappers for external dependency failures in new-appeal/myportal/representation SSR loaders (fallback redirects + safe defaults).
|
|
||||||
- Status: completed.
|
|
||||||
2. Expand focused tests around loader negative paths (missing query/session/cookie/search result branches).
|
|
||||||
- Status: completed with dedicated phase22 suites for newappeal, myportal, and representation loaders.
|
|
||||||
3. Add lightweight diagnostics for SSR loader dependency failures (redacted, non-sensitive).
|
|
||||||
- Status: completed.
|
|
||||||
4. Reduce remaining low-value commented legacy blocks in active flow files where behaviour is already covered by tests.
|
|
||||||
- Status: completed for active myportal case-ticket page path.
|
|
||||||
|
|
||||||
## Next recommended Phase 1 closure slices
|
|
||||||
|
|
||||||
1. Add targeted loader-dependency-failure tests (thrown service errors -> safe redirect) for newappeal/myportal/representation loaders.
|
|
||||||
- Status: in progress (newappeal + myportal dependency-failure tests added; representation search-miss redirect coverage added).
|
|
||||||
2. Perform a focused pass on remaining active flow files for stale commented code/debug remnants and remove where behaviour is covered.
|
|
||||||
- Status: in progress (myportal case-ticket path completed; further active-flow pass still open).
|
|
||||||
3. Refresh current-platform-state/auth-session-reliability notes with latest implemented slices and residual risks.
|
|
||||||
- Status: not started.
|
|
||||||
+13
-240
@@ -188,268 +188,41 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"statusCodes": [
|
"statusCodes": [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
"value": "Pre-Application",
|
"value": "Active",
|
||||||
"value_cy": "Cyn Ymgeisio",
|
"value_cy": "Gweithredol",
|
||||||
"statuscode": 1
|
"statuscode": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Notification",
|
"value": "In Progress",
|
||||||
"value_cy": "Hysbysiad",
|
"value_cy": "Ar Waith",
|
||||||
"statuscode": 2
|
"statuscode": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Acceptance Checking",
|
"value": "On Hold",
|
||||||
"value_cy": "Gwirio Derbyn",
|
"value_cy": "Wedi’i Ohirio",
|
||||||
"statuscode": 3
|
"statuscode": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Invalid Submission",
|
"value": "Waiting for a Decision",
|
||||||
"value_cy": "Cyflwyniad Annilys",
|
"value_cy": "Aros am Benderfyniad",
|
||||||
"statuscode": 4
|
"statuscode": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Consultation",
|
"value": "Researching",
|
||||||
"value_cy": "Ymgynghoriad",
|
"value_cy": "Ymchwilio",
|
||||||
"statuscode": 5
|
"statuscode": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"value": "Re-Consultation",
|
"value": "Problem Solved",
|
||||||
"value_cy": "Ail-Ymgynghoriad",
|
"value_cy": "Problem wedi’i Datrys",
|
||||||
"statuscode": 6
|
"statuscode": 6
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"value": "Reporting",
|
|
||||||
"value_cy": "Adrodd",
|
|
||||||
"statuscode": 7
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Inspector(s) Decision",
|
|
||||||
"value_cy": "Penderfyniad yr Arolygydd(ion)",
|
|
||||||
"statuscode": 8
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Report to Ministers",
|
|
||||||
"value_cy": "Adroddiad i Weinidogion",
|
|
||||||
"statuscode": 9
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Minister's Decision",
|
|
||||||
"value_cy": "Penderfyniad y Gweinidog",
|
|
||||||
"statuscode": 10
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"value": "Case Closed",
|
"value": "Case Closed",
|
||||||
"value_cy": "Achos ar Gau",
|
"value_cy": "Achos ar Gau",
|
||||||
"statuscode": 11
|
"statuscode": 6
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Submitted",
|
|
||||||
"value_cy": "Apêl wedi’i Chyflwyno",
|
|
||||||
"statuscode": 12
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Registered",
|
|
||||||
"value_cy": "Apêl wedi’i Chofrestru",
|
|
||||||
"statuscode": 13
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Validated",
|
|
||||||
"value_cy": "Apêl wedi’i Dilysu",
|
|
||||||
"statuscode": 14
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case in Progress",
|
|
||||||
"value_cy": "Achos ar Waith",
|
|
||||||
"statuscode": 15
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Questionnaire / LPA to Notify",
|
|
||||||
"value_cy": "Holiadur / Awdurdod Cynllunio Lleol i’w Hysbysu",
|
|
||||||
"statuscode": 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Representations Period",
|
|
||||||
"value_cy": "Cyfnod Cynrychioliadau",
|
|
||||||
"statuscode": 17
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Final Comments",
|
|
||||||
"value_cy": "Sylwadau Terfynol",
|
|
||||||
"statuscode": 18
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Event",
|
|
||||||
"value_cy": "Digwyddiad",
|
|
||||||
"statuscode": 19
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Site Visit",
|
|
||||||
"value_cy": "Ymweliad Safle",
|
|
||||||
"statuscode": 20
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Decision Issued",
|
|
||||||
"value_cy": "Penderfyniad wedi’i Gyhoeddi",
|
|
||||||
"statuscode": 21
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Called-In",
|
|
||||||
"value_cy": "Cais wedi’i Alw i Mewn",
|
|
||||||
"statuscode": 22
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Registered",
|
|
||||||
"value_cy": "Cais wedi’i Gofrestru",
|
|
||||||
"statuscode": 23
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Validated",
|
|
||||||
"value_cy": "Cais wedi’i Ddilysu",
|
|
||||||
"statuscode": 24
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "LPA to Notify",
|
|
||||||
"value_cy": "Awdurdod Cynllunio Lleol i’w Hysbysu",
|
|
||||||
"statuscode": 25
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Report Issued to Welsh Ministers",
|
|
||||||
"value_cy": "Adroddiad wedi’i Gyhoeddi i Weinidogion Cymru",
|
|
||||||
"statuscode": 26
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Fee Due",
|
|
||||||
"value_cy": "Ffi’n Ddyledus",
|
|
||||||
"statuscode": 27
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Validated",
|
|
||||||
"value_cy": "Dilyswyd",
|
|
||||||
"statuscode": 28
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Appeal Start / Case in Progress",
|
|
||||||
"value_cy": "Cais Wedi'i Ddechrau/Achos Ar Y Gweill",
|
|
||||||
"statuscode": 29
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Statements/Representations Period",
|
|
||||||
"value_cy": "Cyfnod Datganiadau/Sylwadau",
|
|
||||||
"statuscode": 30
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Submitted",
|
|
||||||
"value_cy": "Gorchymyn wedi’i Gyflwyno",
|
|
||||||
"statuscode": 31
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Submission Registered",
|
|
||||||
"value_cy": "Cyflwyniad Gorchymyn wedi’i Gofrestru",
|
|
||||||
"statuscode": 32
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Submission Validated",
|
|
||||||
"value_cy": "Cyflwyniad Gorchymyn wedi’i Ddilysu",
|
|
||||||
"statuscode": 33
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case started/Case in Progress",
|
|
||||||
"value_cy": "Achos wedi Dechrau/Achos ar Waith",
|
|
||||||
"statuscode": 34
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Statements",
|
|
||||||
"value_cy": "Datganiadau",
|
|
||||||
"statuscode": 35
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Event/Site Visit",
|
|
||||||
"value_cy": "Digwyddiad/Ymweliad Safle",
|
|
||||||
"statuscode": 36
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Submitted",
|
|
||||||
"value_cy": "Cais wedi’i Gyflwyno",
|
|
||||||
"statuscode": 37
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Application Start/Case In Progress",
|
|
||||||
"value_cy": "Dechrau Cais/Achos ar Waith",
|
|
||||||
"statuscode": 38
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Applicant Statement on Representations",
|
|
||||||
"value_cy": "Datganiad yr Ymgeisydd ar Sylwadau",
|
|
||||||
"statuscode": 39
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Representatives Comment",
|
|
||||||
"value_cy": "Sylw Cynrychiolydd",
|
|
||||||
"statuscode": 40
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Applicants Final Comment",
|
|
||||||
"value_cy": "Sylw Terfynol yr Ymgeisydd",
|
|
||||||
"statuscode": 41
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Registered",
|
|
||||||
"value_cy": "Gorchymyn wedi’i Gofrestru",
|
|
||||||
"statuscode": 42
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Order Validated",
|
|
||||||
"value_cy": "Gorchymyn wedi’i Ddilysu",
|
|
||||||
"statuscode": 43
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Report to DESNZ",
|
|
||||||
"value_cy": "Adroddiad i DESNZ",
|
|
||||||
"statuscode": 44
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case in Progress / Assessment",
|
|
||||||
"value_cy": "Achos ar Waith / Asesiad",
|
|
||||||
"statuscode": 45
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Decision / Outcome",
|
|
||||||
"value_cy": "Penderfyniad / Canlyniad",
|
|
||||||
"statuscode": 46
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Complete",
|
|
||||||
"value_cy": "Wedi’i Gwblhau",
|
|
||||||
"statuscode": 47
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "In progress",
|
|
||||||
"value_cy": "Ar Waith",
|
|
||||||
"statuscode": 48
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Not started",
|
|
||||||
"value_cy": "Heb Ddechrau",
|
|
||||||
"statuscode": 49
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Blocked",
|
|
||||||
"value_cy": "Wedi’i Rwystro",
|
|
||||||
"statuscode": 50
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Environmental Impact Assessment Scoping",
|
|
||||||
"value_cy": "Cwmpasu Asesiad Effaith Amgylcheddol",
|
|
||||||
"statuscode": "51"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": "Case Closed - Decision Issued",
|
|
||||||
"value_cy": "Achos Ar Gau - Penderfyniad Wedi'i Gyhoeddi",
|
|
||||||
"statuscode": "52"
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
],
|
],
|
||||||
"pinswg_decision": [
|
"pinswg_decision": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,14 +21,13 @@ module.exports = {
|
|||||||
"/myportal/advancedsearch": ["search", "myportal"],
|
"/myportal/advancedsearch": ["search", "myportal"],
|
||||||
"/myportal/advancedsearchresults": ["search", "myportal", "case"],
|
"/myportal/advancedsearchresults": ["search", "myportal", "case"],
|
||||||
"/myportal/searchresults": ["search", "myportal", "case"],
|
"/myportal/searchresults": ["search", "myportal", "case"],
|
||||||
"/myportal/case": ["case", "home", "case-stages"],
|
"/myportal/case": ["case"],
|
||||||
"/myportal/case/[ticketnumber]": ["case", "myportal", "case-stages"],
|
"/myportal/case/[ticketnumber]": ["case", "myportal"],
|
||||||
"/myportal/dnsapplications": [
|
"/myportal/dnsapplications": [
|
||||||
"search",
|
"search",
|
||||||
"dnsCommon",
|
"dnsCommon",
|
||||||
"dnsApplications",
|
"dnsApplications",
|
||||||
"case",
|
"case"
|
||||||
"case-stages"
|
|
||||||
],
|
],
|
||||||
"/myportal/dnsdetails": [
|
"/myportal/dnsdetails": [
|
||||||
"case",
|
"case",
|
||||||
@@ -37,22 +36,16 @@ module.exports = {
|
|||||||
"dnsApplications"
|
"dnsApplications"
|
||||||
],
|
],
|
||||||
"/myportal/dns/*": ["dnsCommon", "case", "common"],
|
"/myportal/dns/*": ["dnsCommon", "case", "common"],
|
||||||
"/myportal/dns/[developmentName]": [
|
"/myportal/dns/[developmentName]": ["dnsCommon", "case", "common"],
|
||||||
"dnsCommon",
|
|
||||||
"case",
|
|
||||||
"common",
|
|
||||||
,
|
|
||||||
"case-stages"
|
|
||||||
],
|
|
||||||
"/advancedsearch": ["search", "myportal"],
|
"/advancedsearch": ["search", "myportal"],
|
||||||
"/advancedsearchresults": ["search", "case"],
|
"/advancedsearchresults": ["search", "case"],
|
||||||
"/searchresults": ["search", "case"],
|
"/searchresults": ["search", "case"],
|
||||||
"/addresssearch": ["search", "case", "myportal"],
|
"/addresssearch": ["search", "case", "myportal"],
|
||||||
"/addresssearchresults": ["search", "case", "myportal"],
|
"/addresssearchresults": ["search", "case", "myportal"],
|
||||||
"/viewall": ["search"],
|
"/viewall": ["search"],
|
||||||
"/case": ["case", "home", "case-stages"],
|
"/case": ["case", "home"],
|
||||||
"/case/*": ["case", "home"],
|
"/case/*": ["case", "home"],
|
||||||
"/case/[ticketnumber]": ["case", "home", "case-stages"],
|
"/case/[ticketnumber]": ["case", "home"],
|
||||||
"/case/id/[incident]": ["case", "home"],
|
"/case/id/[incident]": ["case", "home"],
|
||||||
"/myportal/representation": [
|
"/myportal/representation": [
|
||||||
"case",
|
"case",
|
||||||
@@ -70,14 +63,9 @@ module.exports = {
|
|||||||
"/newappeal/*": ["newappeal", "home"],
|
"/newappeal/*": ["newappeal", "home"],
|
||||||
"/newappeal/[appealtypes]": ["newappeal", "home", "myportal"],
|
"/newappeal/[appealtypes]": ["newappeal", "home", "myportal"],
|
||||||
"/newappeal/selectappeal": ["newappeal", "home"],
|
"/newappeal/selectappeal": ["newappeal", "home"],
|
||||||
"/dns/*": ["dnsCommon", "case", "common", "case-stages"],
|
"/dns/*": ["dnsCommon", "case", "common"],
|
||||||
"/dns/[developmentName]": [
|
"/dns/[developmentName]": ["dnsCommon", "case", "common"],
|
||||||
"dnsCommon",
|
"/dns": ["dnsCommon", "dnsHome"],
|
||||||
"case",
|
|
||||||
"common",
|
|
||||||
"case-stages"
|
|
||||||
],
|
|
||||||
"/dns": ["dnsCommon", "dnsHome", , "case-stages"],
|
|
||||||
"/dns/applications": ["dnsCommon", "dnsApplications"],
|
"/dns/applications": ["dnsCommon", "dnsApplications"],
|
||||||
"/dns/application-view": ["dnsCommon", "dnsApplicationView"],
|
"/dns/application-view": ["dnsCommon", "dnsApplicationView"],
|
||||||
"/dnsapplications": ["search", "dnsCommon", "dnsApplications", "case"],
|
"/dnsapplications": ["search", "dnsCommon", "dnsApplications", "case"],
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
import { getSession } from "next-auth/react";
|
|
||||||
import { consoleLogger } from "../../actions/core/logger";
|
|
||||||
|
|
||||||
const signinRedirect = {
|
|
||||||
destination: "/auth/signin",
|
|
||||||
permanent: false
|
|
||||||
};
|
|
||||||
|
|
||||||
const buildSigninRedirectResult = () => ({ redirect: signinRedirect });
|
|
||||||
|
|
||||||
export async function resolveMyPortalAuthContext(ctx, options = {}) {
|
|
||||||
const {
|
|
||||||
loggerName = "MyPortalAuthGuard",
|
|
||||||
noSessionMessage = "myportal loader missing session; redirecting to signin",
|
|
||||||
noSessionUserMessage = "myportal loader missing session user identity; redirecting to signin",
|
|
||||||
noPinsUserMessage = "myportal loader missing pinsUser cookie; redirecting to signin"
|
|
||||||
} = options;
|
|
||||||
|
|
||||||
const session = await getSession(ctx);
|
|
||||||
|
|
||||||
if (!session) {
|
|
||||||
consoleLogger({
|
|
||||||
name: loggerName,
|
|
||||||
reasonCode: "NO_SESSION",
|
|
||||||
message: noSessionMessage
|
|
||||||
});
|
|
||||||
return { ok: false, redirect: buildSigninRedirectResult().redirect };
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!session?.user?.id || !session?.user?.email) {
|
|
||||||
consoleLogger({
|
|
||||||
name: loggerName,
|
|
||||||
reasonCode: "NO_SESSION_USER",
|
|
||||||
message: noSessionUserMessage,
|
|
||||||
hasSessionUserId: !!session?.user?.id,
|
|
||||||
hasSessionUserEmail: !!session?.user?.email
|
|
||||||
});
|
|
||||||
return { ok: false, redirect: buildSigninRedirectResult().redirect };
|
|
||||||
}
|
|
||||||
|
|
||||||
const pinsUser = ctx?.req?.cookies?.pinsUser;
|
|
||||||
if (!pinsUser) {
|
|
||||||
consoleLogger({
|
|
||||||
name: loggerName,
|
|
||||||
reasonCode: "NO_PINSUSER_COOKIE",
|
|
||||||
message: noPinsUserMessage
|
|
||||||
});
|
|
||||||
return { ok: false, redirect: buildSigninRedirectResult().redirect };
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
ok: true,
|
|
||||||
session,
|
|
||||||
sessionUserId: session.user.id,
|
|
||||||
sessionUserEmail: session.user.email,
|
|
||||||
pinsUser
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
import { destroyCookie } from "nookies";
|
|
||||||
import { signOut } from "next-auth/react";
|
|
||||||
|
|
||||||
const AUTH_COOKIE_CANDIDATES = [
|
|
||||||
"next-auth.csrf-token",
|
|
||||||
"next-auth.callback-url",
|
|
||||||
"__Secure-next-auth.callback-url",
|
|
||||||
"pedw_locale",
|
|
||||||
"pinsUser"
|
|
||||||
];
|
|
||||||
|
|
||||||
export const buildSignedOutCallbackUrl = (locale) =>
|
|
||||||
locale === "cy" ? "/cy/allgofnodi" : "/logout";
|
|
||||||
|
|
||||||
const resolveSignOutArgs = (args) => {
|
|
||||||
if (typeof args === "string") {
|
|
||||||
return {
|
|
||||||
locale: args,
|
|
||||||
callbackUrl: undefined,
|
|
||||||
signOutFn: signOut
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
locale: args?.locale,
|
|
||||||
callbackUrl: args?.callbackUrl,
|
|
||||||
signOutFn: args?.signOutFn || signOut
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const clearSessionArtifacts = () => {
|
|
||||||
if (typeof window !== "undefined") {
|
|
||||||
window.localStorage.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
AUTH_COOKIE_CANDIDATES.forEach((cookieName) => {
|
|
||||||
destroyCookie(null, cookieName, { path: "/" });
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const performPortalSignOut = async (args) => {
|
|
||||||
const { locale, callbackUrl, signOutFn } = resolveSignOutArgs(args);
|
|
||||||
clearSessionArtifacts();
|
|
||||||
return signOutFn({
|
|
||||||
callbackUrl: callbackUrl || buildSignedOutCallbackUrl(locale)
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
const xmlCache = new Map();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads /data/formsxml/{appealtypes}.xml and normalises it.
|
* Reads /data/formsxml/{appealtypes}.xml and normalises it.
|
||||||
* Returns { xmlStr } or throws on missing file.
|
* Returns { xmlStr } or throws on missing file.
|
||||||
@@ -14,12 +12,6 @@ export function readFormXml(appealtypes) {
|
|||||||
const configDirectory = path.resolve(process.cwd(), "data/formsxml");
|
const configDirectory = path.resolve(process.cwd(), "data/formsxml");
|
||||||
const filePath = path.join(configDirectory, `${appealtypes}.xml`);
|
const filePath = path.join(configDirectory, `${appealtypes}.xml`);
|
||||||
|
|
||||||
const cacheKey = filePath;
|
|
||||||
const cached = xmlCache.get(cacheKey);
|
|
||||||
if (cached) {
|
|
||||||
return { xmlStr: cached, filePath, fromCache: true };
|
|
||||||
}
|
|
||||||
|
|
||||||
let xmlStr = fs.readFileSync(filePath, "utf8");
|
let xmlStr = fs.readFileSync(filePath, "utf8");
|
||||||
|
|
||||||
// Keep existing normalisation behaviour
|
// Keep existing normalisation behaviour
|
||||||
@@ -28,7 +20,5 @@ export function readFormXml(appealtypes) {
|
|||||||
xmlStr = xmlStr.replace(/> <"/g, "><");
|
xmlStr = xmlStr.replace(/> <"/g, "><");
|
||||||
xmlStr = xmlStr.toString();
|
xmlStr = xmlStr.toString();
|
||||||
|
|
||||||
xmlCache.set(cacheKey, xmlStr);
|
|
||||||
|
|
||||||
return { xmlStr, filePath };
|
return { xmlStr, filePath };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
getProgressFromBlob
|
getProgressFromBlob
|
||||||
} from "../../actions/services/documentService";
|
} from "../../actions/services/documentService";
|
||||||
import { getPersonalAccount } from "../../actions/services/accountService";
|
import { getPersonalAccount } from "../../actions/services/accountService";
|
||||||
import { consoleLogger, getIP } from "../../actions/core/logger";
|
import { getIP } from "../../actions/core/logger";
|
||||||
|
|
||||||
import { readFormXml } from "../forms/readFormXml";
|
import { readFormXml } from "../forms/readFormXml";
|
||||||
import { requireQueryParams } from "../routing/requireQueryParams";
|
import { requireQueryParams } from "../routing/requireQueryParams";
|
||||||
@@ -32,42 +32,11 @@ export async function loadMyPortalAppealPage(ctx) {
|
|||||||
"casereference"
|
"casereference"
|
||||||
]);
|
]);
|
||||||
if (!required.ok) {
|
if (!required.ok) {
|
||||||
consoleLogger({
|
|
||||||
name: "MyPortalAppealLoaderMissingQuery",
|
|
||||||
message:
|
|
||||||
"loadMyPortalAppealPage missing required query params; redirecting",
|
|
||||||
hasAppealType: !!query?.appealtypes,
|
|
||||||
hasAppealTypeId: !!query?.apt,
|
|
||||||
hasCaseReference: !!query?.casereference
|
|
||||||
});
|
|
||||||
return { redirect: required.redirect };
|
return { redirect: required.redirect };
|
||||||
}
|
}
|
||||||
|
|
||||||
const session = await getSession(ctx);
|
const session = await getSession(ctx);
|
||||||
if (!session) {
|
if (!session) {
|
||||||
consoleLogger({
|
|
||||||
name: "MyPortalAppealLoaderAuthGuard",
|
|
||||||
reasonCode: "NO_SESSION",
|
|
||||||
message:
|
|
||||||
"loadMyPortalAppealPage missing session; redirecting to signin"
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/auth/signin",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!session?.user?.id || !session?.user?.email) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "MyPortalAppealLoaderAuthGuard",
|
|
||||||
reasonCode: "NO_SESSION_USER",
|
|
||||||
message:
|
|
||||||
"loadMyPortalAppealPage missing session user identity; redirecting to signin",
|
|
||||||
hasUserId: !!session?.user?.id,
|
|
||||||
hasUserEmail: !!session?.user?.email
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
redirect: {
|
redirect: {
|
||||||
destination: "/auth/signin",
|
destination: "/auth/signin",
|
||||||
@@ -81,79 +50,21 @@ export async function loadMyPortalAppealPage(ctx) {
|
|||||||
const loggedInUserIdent = session.user.id;
|
const loggedInUserIdent = session.user.id;
|
||||||
const loggedInUserEmail = session.user.email;
|
const loggedInUserEmail = session.user.email;
|
||||||
|
|
||||||
if (!loggedInUser) {
|
const accountDetails = await getPersonalAccount(loggedInUser);
|
||||||
consoleLogger({
|
|
||||||
name: "MyPortalAppealLoaderAuthGuard",
|
|
||||||
reasonCode: "NO_PINSUSER_COOKIE",
|
|
||||||
message:
|
|
||||||
"loadMyPortalAppealPage missing pinsUser cookie; redirecting to signin"
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/auth/signin",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch config + blob assets in parallel
|
// Fetch config + blob assets in parallel
|
||||||
let appealTypeData;
|
const [appealTypeData, mandatoryFieldsData, pickListData, blobList] =
|
||||||
let mandatoryFieldsData;
|
await Promise.all([
|
||||||
let pickListData;
|
|
||||||
let blobList;
|
|
||||||
let blobProgress;
|
|
||||||
let accountDetails;
|
|
||||||
|
|
||||||
try {
|
|
||||||
[
|
|
||||||
appealTypeData,
|
|
||||||
mandatoryFieldsData,
|
|
||||||
pickListData,
|
|
||||||
blobList,
|
|
||||||
blobProgress,
|
|
||||||
accountDetails
|
|
||||||
] = await Promise.all([
|
|
||||||
getAppealsTypesForNewAppeal(),
|
getAppealsTypesForNewAppeal(),
|
||||||
getMandatoryFields(query.appealtypes),
|
getMandatoryFields(query.appealtypes),
|
||||||
getPickLists(query.appealtypes),
|
getPickLists(query.appealtypes),
|
||||||
getFilesFromBlob(loggedInUserIdent, query.casereference),
|
getFilesFromBlob(loggedInUserIdent, query.casereference)
|
||||||
getProgressFromBlob(loggedInUserIdent, query.casereference),
|
|
||||||
getPersonalAccount(loggedInUser)
|
|
||||||
]);
|
]);
|
||||||
} catch (_error) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "MyPortalAppealLoaderDependencyFailure",
|
|
||||||
reasonCode: "UPSTREAM_FAILURE",
|
|
||||||
message:
|
|
||||||
"loadMyPortalAppealPage dependency fetch failed; redirecting to /myportal",
|
|
||||||
appealType: query?.appealtypes,
|
|
||||||
hasCaseReference: !!query?.casereference,
|
|
||||||
error: _error?.message
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!accountDetails || accountDetails?.errorCode) {
|
const blobProgress = await getProgressFromBlob(
|
||||||
consoleLogger({
|
loggedInUserIdent,
|
||||||
name: "MyPortalAppealLoaderContactGuard",
|
query.casereference
|
||||||
reasonCode: "CONTACT_LOOKUP_FAILED",
|
);
|
||||||
message:
|
|
||||||
"loadMyPortalAppealPage account contact lookup failed; redirecting to signin",
|
|
||||||
hasAccountDetails: !!accountDetails,
|
|
||||||
hasErrorCode: !!accountDetails?.errorCode
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/auth/signin",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Optional: awaiting-submission view setup when query.key exists
|
// Optional: awaiting-submission view setup when query.key exists
|
||||||
let awaitingSubmissionFromBlob = null;
|
let awaitingSubmissionFromBlob = null;
|
||||||
@@ -163,24 +74,7 @@ export async function loadMyPortalAppealPage(ctx) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let xmlStr = "";
|
const { xmlStr } = readFormXml(query.appealtypes);
|
||||||
try {
|
|
||||||
xmlStr = readFormXml(query.appealtypes).xmlStr;
|
|
||||||
} catch (_error) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "MyPortalAppealLoaderXmlReadFailure",
|
|
||||||
message:
|
|
||||||
"loadMyPortalAppealPage XML read failed; redirecting to /myportal",
|
|
||||||
appealType: query?.appealtypes,
|
|
||||||
error: _error?.message
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
session,
|
session,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const mergeWithExistingFilesList = (buildAppealFilesArray, values) => {
|
export const mergeWithExistingFilesList = (buildAppealFilesArray, values) => {
|
||||||
return Object.prototype.hasOwnProperty.call(values, "filesList")
|
return values.hasOwnProperty("filesList")
|
||||||
? (buildAppealFilesArray.concat(values.filesList),
|
? (buildAppealFilesArray.concat(values.filesList),
|
||||||
buildAppealFilesArray.filter(function (item, idx) {
|
buildAppealFilesArray.filter(function (item, idx) {
|
||||||
return item.name;
|
return item.name;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
} from "../../actions/services/referenceDataService";
|
} from "../../actions/services/referenceDataService";
|
||||||
import { getProgressFromBlob } from "../../actions/services/documentService";
|
import { getProgressFromBlob } from "../../actions/services/documentService";
|
||||||
import { getPersonalAccount } from "../../actions/services/accountService";
|
import { getPersonalAccount } from "../../actions/services/accountService";
|
||||||
import { consoleLogger, getIP } from "../../actions/core/logger";
|
import { getIP } from "../../actions/core/logger";
|
||||||
import { readFormXml } from "../forms/readFormXml";
|
import { readFormXml } from "../forms/readFormXml";
|
||||||
import { requireQueryParams } from "../routing/requireQueryParams";
|
import { requireQueryParams } from "../routing/requireQueryParams";
|
||||||
|
|
||||||
@@ -29,28 +29,6 @@ export async function loadNewAppealPage(ctx) {
|
|||||||
|
|
||||||
const session = await getSession(ctx);
|
const session = await getSession(ctx);
|
||||||
if (!session) {
|
if (!session) {
|
||||||
consoleLogger({
|
|
||||||
name: "NewAppealLoaderAuthGuard",
|
|
||||||
reasonCode: "NO_SESSION",
|
|
||||||
message: "loadNewAppealPage missing session; redirecting to signin"
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/auth/signin",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!session?.user?.id || !session?.user?.email) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "NewAppealLoaderAuthGuard",
|
|
||||||
reasonCode: "NO_SESSION_USER",
|
|
||||||
message:
|
|
||||||
"loadNewAppealPage missing session user identity; redirecting to signin",
|
|
||||||
hasSessionUserId: !!session?.user?.id,
|
|
||||||
hasSessionUserEmail: !!session?.user?.email
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
redirect: {
|
redirect: {
|
||||||
destination: "/auth/signin",
|
destination: "/auth/signin",
|
||||||
@@ -64,76 +42,17 @@ export async function loadNewAppealPage(ctx) {
|
|||||||
const loggedInUserIdent = session.user.id;
|
const loggedInUserIdent = session.user.id;
|
||||||
const loggedInUserEmail = session.user.email;
|
const loggedInUserEmail = session.user.email;
|
||||||
|
|
||||||
if (!loggedInUser) {
|
const [appealTypeData, mandatoryFieldsData, pickListData] =
|
||||||
consoleLogger({
|
await Promise.all([
|
||||||
name: "NewAppealLoaderAuthGuard",
|
|
||||||
reasonCode: "NO_PINSUSER_COOKIE",
|
|
||||||
message:
|
|
||||||
"loadNewAppealPage missing pinsUser cookie identity; redirecting to signin"
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/auth/signin",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
let appealTypeData;
|
|
||||||
let mandatoryFieldsData;
|
|
||||||
let pickListData;
|
|
||||||
let blobProgress;
|
|
||||||
let accountDetails;
|
|
||||||
|
|
||||||
try {
|
|
||||||
[
|
|
||||||
appealTypeData,
|
|
||||||
mandatoryFieldsData,
|
|
||||||
pickListData,
|
|
||||||
blobProgress,
|
|
||||||
accountDetails
|
|
||||||
] = await Promise.all([
|
|
||||||
getAppealsTypesForNewAppeal(),
|
getAppealsTypesForNewAppeal(),
|
||||||
getMandatoryFields(query.appealtypes),
|
getMandatoryFields(query.appealtypes),
|
||||||
getPickLists(query.appealtypes),
|
getPickLists(query.appealtypes)
|
||||||
getProgressFromBlob(loggedInUserIdent, query.id),
|
|
||||||
getPersonalAccount(loggedInUser)
|
|
||||||
]);
|
]);
|
||||||
} catch (_error) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "NewAppealLoaderDependencyFailure",
|
|
||||||
message:
|
|
||||||
"loadNewAppealPage dependency fetch failed; redirecting to /myportal",
|
|
||||||
appealType: query?.appealtypes,
|
|
||||||
hasCaseId: !!query?.id,
|
|
||||||
error: _error?.message
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
let xmlStr = "";
|
const blobProgress = await getProgressFromBlob(loggedInUserIdent, query.id);
|
||||||
try {
|
const accountDetails = await getPersonalAccount(loggedInUser);
|
||||||
xmlStr = readFormXml(query.appealtypes).xmlStr;
|
|
||||||
} catch (_error) {
|
const { xmlStr } = readFormXml(query.appealtypes);
|
||||||
consoleLogger({
|
|
||||||
name: "NewAppealLoaderXmlReadFailure",
|
|
||||||
message:
|
|
||||||
"loadNewAppealPage XML read failed; redirecting to /myportal",
|
|
||||||
appealType: query?.appealtypes,
|
|
||||||
error: _error?.message
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
session,
|
session,
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
} from "../../actions/services/caseService";
|
} from "../../actions/services/caseService";
|
||||||
import { getRepsFromBlob } from "../../actions/services/documentService";
|
import { getRepsFromBlob } from "../../actions/services/documentService";
|
||||||
import { getBasicSearch } from "../../actions/services/searchService";
|
import { getBasicSearch } from "../../actions/services/searchService";
|
||||||
import { consoleLogger } from "../../actions/core/logger";
|
|
||||||
import {
|
import {
|
||||||
getFormCollectionByID,
|
getFormCollectionByID,
|
||||||
getSearchDetails
|
getSearchDetails
|
||||||
@@ -42,7 +41,7 @@ const getDetails = (resultsObj, detailsType) => {
|
|||||||
detailsType == "mySubmittedReps" ? resultsObj : resultsObj.value;
|
detailsType == "mySubmittedReps" ? resultsObj : resultsObj.value;
|
||||||
|
|
||||||
if (detailsType == "myRepresentations") {
|
if (detailsType == "myRepresentations") {
|
||||||
resultsObj.map((searchDetail) => {
|
const repsObj = resultsObj.map((searchDetail, index) => {
|
||||||
detailsArr.push(
|
detailsArr.push(
|
||||||
getCase(searchDetail["incidentID"]).then((data) => {
|
getCase(searchDetail["incidentID"]).then((data) => {
|
||||||
let caseID = "";
|
let caseID = "";
|
||||||
@@ -76,21 +75,19 @@ const getDetails = (resultsObj, detailsType) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let detArr = Promise.all(detailsArr);
|
let detArr = Promise.all(detailsArr);
|
||||||
|
console.log(detArr);
|
||||||
return detArr;
|
return detArr;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const loadRepresentationBootstrap = async ({ ctx }) => {
|
export const loadRepresentationBootstrap = async ({ ctx }) => {
|
||||||
const { query } = ctx;
|
const { query } = ctx;
|
||||||
|
console.log("The query", query);
|
||||||
|
|
||||||
let thisSession = await getSession(ctx);
|
let thisSession = await getSession(ctx);
|
||||||
let loggedInUser = null;
|
let loggedInUser = {};
|
||||||
|
|
||||||
if (!thisSession) {
|
if (!thisSession) {
|
||||||
consoleLogger({
|
console.log("not has sesssion.......");
|
||||||
name: "RepresentationLoaderMissingSession",
|
|
||||||
message:
|
|
||||||
"loadRepresentationBootstrap missing session; redirecting to signin"
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
redirect: {
|
redirect: {
|
||||||
destination: "/auth/signin",
|
destination: "/auth/signin",
|
||||||
@@ -98,28 +95,22 @@ export const loadRepresentationBootstrap = async ({ ctx }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
loggedInUser = await getPortalLogin(thisSession.user.email);
|
[loggedInUser] = await Promise.all([
|
||||||
loggedInUser = loggedInUser?.value?.[0]?.contactid || null;
|
await getPortalLogin(thisSession.user.email)
|
||||||
}
|
]);
|
||||||
|
|
||||||
if (!loggedInUser) {
|
console.log(
|
||||||
consoleLogger({
|
"=====//////////=====",
|
||||||
name: "RepresentationLoaderMissingContact",
|
thisSession,
|
||||||
message:
|
thisSession.user.email,
|
||||||
"loadRepresentationBootstrap missing CRM contact id; redirecting to signin",
|
loggedInUser
|
||||||
hasSessionEmail: !!thisSession?.user?.email
|
);
|
||||||
});
|
loggedInUser = loggedInUser.value[0].contactid;
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/auth/signin",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const [accountDetails, myRepresentations] = await Promise.all([
|
const [accountDetails, myRepresentations] = await Promise.all([
|
||||||
getPersonalAccount(loggedInUser),
|
await getPersonalAccount(loggedInUser),
|
||||||
getRepsFromBlob(thisSession.user.id)
|
await getRepsFromBlob(thisSession.user.id)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const myRepresentationsDetails = await getDetails(
|
const myRepresentationsDetails = await getDetails(
|
||||||
@@ -127,8 +118,10 @@ export const loadRepresentationBootstrap = async ({ ctx }) => {
|
|||||||
"myRepresentations"
|
"myRepresentations"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(accountDetails);
|
||||||
|
|
||||||
const isLPA =
|
const isLPA =
|
||||||
accountDetails?.[
|
accountDetails[
|
||||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||||
] == "LPA"
|
] == "LPA"
|
||||||
? true
|
? true
|
||||||
@@ -155,26 +148,8 @@ export const loadExistingRepresentation = async ({ store, ctx, bootstrap }) => {
|
|||||||
isLPA
|
isLPA
|
||||||
} = bootstrap;
|
} = bootstrap;
|
||||||
|
|
||||||
const searchResultsObj = await getBasicSearch(query.case);
|
console.log("is lpa?:", isLPA);
|
||||||
if (!searchResultsObj?.value?.[0]) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "RepresentationExistingMissingSearchResult",
|
|
||||||
message:
|
|
||||||
"loadExistingRepresentation missing search result; redirecting to myportal",
|
|
||||||
hasCaseQuery: !!query?.case
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
|
||||||
|
|
||||||
store.dispatch(setSearchResults(searchResultsObj));
|
|
||||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
|
||||||
store.dispatch(setContainerID(thisSession.user.id));
|
store.dispatch(setContainerID(thisSession.user.id));
|
||||||
store.dispatch(setMyRepresentations(myRepresentations));
|
store.dispatch(setMyRepresentations(myRepresentations));
|
||||||
store.dispatch(setMyRepresentationsDetails(myRepresentationsDetails));
|
store.dispatch(setMyRepresentationsDetails(myRepresentationsDetails));
|
||||||
@@ -184,26 +159,11 @@ export const loadExistingRepresentation = async ({ store, ctx, bootstrap }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const result = findObjectByKeyValue(
|
const result = findObjectByKeyValue(
|
||||||
myRepresentations?.value || [],
|
myRepresentations.value,
|
||||||
"repfile_name",
|
"repfile_name",
|
||||||
query.created
|
query.created
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!result) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "RepresentationExistingMissingBlobEntry",
|
|
||||||
message:
|
|
||||||
"loadExistingRepresentation missing representation blob entry; redirecting to myportal",
|
|
||||||
hasCreatedQuery: !!query?.created
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"ticketnumber":
|
"ticketnumber":
|
||||||
@@ -220,7 +180,7 @@ export const loadExistingRepresentation = async ({ store, ctx, bootstrap }) => {
|
|||||||
store.dispatch(setRepresentationCapacity(result.representationCapacity));
|
store.dispatch(setRepresentationCapacity(result.representationCapacity));
|
||||||
|
|
||||||
const repsFileListObj = await getRepsFilesBlobs(
|
const repsFileListObj = await getRepsFilesBlobs(
|
||||||
result.containerID || thisSession.user.id,
|
result.containerID,
|
||||||
result.ticketnumber || result.caseRef,
|
result.ticketnumber || result.caseRef,
|
||||||
result.repfile_name
|
result.repfile_name
|
||||||
);
|
);
|
||||||
@@ -241,21 +201,6 @@ export const loadNewRepresentation = async ({ store, ctx, bootstrap }) => {
|
|||||||
const { thisSession, accountDetails } = bootstrap;
|
const { thisSession, accountDetails } = bootstrap;
|
||||||
|
|
||||||
const searchResultsObj = await getBasicSearch(query.case);
|
const searchResultsObj = await getBasicSearch(query.case);
|
||||||
if (!searchResultsObj?.value?.[0]) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "RepresentationNewMissingSearchResult",
|
|
||||||
message:
|
|
||||||
"loadNewRepresentation missing search result; redirecting to myportal",
|
|
||||||
hasCaseQuery: !!query?.case
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||||
|
|
||||||
store.dispatch(setContainerID(thisSession.user.id));
|
store.dispatch(setContainerID(thisSession.user.id));
|
||||||
@@ -269,26 +214,31 @@ export const loadNewRepresentation = async ({ store, ctx, bootstrap }) => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
accountDetails,
|
||||||
|
"===================== is nrw",
|
||||||
|
accountDetails.emailaddress1.includes(process.env.NRWDOMAIN),
|
||||||
|
"===================== "
|
||||||
|
);
|
||||||
|
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
setCurrentReference({
|
setCurrentReference({
|
||||||
"isNRW":
|
"isNRW":
|
||||||
accountDetails?.emailaddress1?.includes(
|
accountDetails.emailaddress1.includes(process.env.NRWDOMAIN) ||
|
||||||
process.env.NRWDOMAIN
|
false,
|
||||||
) || false,
|
"ticketnumber": searchResultsObj.value[0].ticketnumber,
|
||||||
"ticketnumber": searchResultsObj?.value?.[0]?.ticketnumber,
|
"currentReference": searchResultsObj.value[0].title,
|
||||||
"currentReference": searchResultsObj?.value?.[0]?.title,
|
|
||||||
"currentType": "myRepresentations",
|
"currentType": "myRepresentations",
|
||||||
"incidentid": searchResultsObj?.value?.[0]?.incidentid,
|
"incidentid": searchResultsObj.value[0].incidentid,
|
||||||
"appealType": searchResultsObj?.value?.[0]?.pinswg_appealcasetype,
|
"appealType": searchResultsObj.value[0].pinswg_appealcasetype,
|
||||||
"specialistProcess":
|
"specialistProcess":
|
||||||
searchDetailsObj?.[0]?.value?.[0]
|
searchDetailsObj[0].value[0].pinswg_speacialistcaseprocess !=
|
||||||
?.pinswg_speacialistcaseprocess != null ||
|
null ||
|
||||||
searchDetailsObj?.[0]?.value?.[0]
|
searchDetailsObj[0].value[0].pinswg_specialistcaseprocess !=
|
||||||
?.pinswg_specialistcaseprocess != null
|
null
|
||||||
? searchDetailsObj?.[0]?.value?.[0]
|
? searchDetailsObj[0].value[0]
|
||||||
.pinswg_speacialistcaseprocess ||
|
.pinswg_speacialistcaseprocess ||
|
||||||
searchDetailsObj?.[0]?.value?.[0]
|
searchDetailsObj[0].value[0].pinswg_specialistcaseprocess
|
||||||
.pinswg_specialistcaseprocess
|
|
||||||
: ""
|
: ""
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -304,46 +254,15 @@ export const loadNewRepresentation = async ({ store, ctx, bootstrap }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const loadRepresentationPage = async ({ store, ctx }) => {
|
export const loadRepresentationPage = async ({ store, ctx }) => {
|
||||||
const { query } = ctx;
|
|
||||||
|
|
||||||
if (!query?.case) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "RepresentationLoaderMissingCaseQuery",
|
|
||||||
message:
|
|
||||||
"loadRepresentationPage missing case query; redirecting to myportal"
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
Object.prototype.hasOwnProperty.call(query, "state") &&
|
|
||||||
!query?.created
|
|
||||||
) {
|
|
||||||
consoleLogger({
|
|
||||||
name: "RepresentationLoaderMissingCreatedQuery",
|
|
||||||
message:
|
|
||||||
"loadRepresentationPage missing created query for state flow; redirecting to myportal"
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
redirect: {
|
|
||||||
destination: "/myportal",
|
|
||||||
permanent: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const bootstrap = await loadRepresentationBootstrap({ ctx });
|
const bootstrap = await loadRepresentationBootstrap({ ctx });
|
||||||
|
|
||||||
if (bootstrap?.redirect) {
|
if (bootstrap?.redirect) {
|
||||||
return bootstrap;
|
return bootstrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(query, "state")) {
|
const { query } = ctx;
|
||||||
|
|
||||||
|
if (query.hasOwnProperty("state")) {
|
||||||
return loadExistingRepresentation({ store, ctx, bootstrap });
|
return loadExistingRepresentation({ store, ctx, bootstrap });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"register-new-account-email-address-label": "Cyfeiriad e-bost",
|
"register-new-account-email-address-label": "Cyfeiriad e-bost",
|
||||||
"register-new-account-email-address-label-errormsg": "Rhowch gyfeiriad e-bost dilys",
|
"register-new-account-email-address-label-errormsg": "Rhowch gyfeiriad e-bost dilys",
|
||||||
"register-new-account-phone-label": "Rhif ffôn",
|
"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": "Cyfrinair",
|
||||||
"register-new-account-password-label-errormsg": "Cyfrinair",
|
"register-new-account-password-label-errormsg": "Cyfrinair",
|
||||||
"register-new-account-confirm-password-label": "Cadarnhau cyfrinair",
|
"register-new-account-confirm-password-label": "Cadarnhau cyfrinair",
|
||||||
|
|||||||
@@ -1,111 +0,0 @@
|
|||||||
{
|
|
||||||
"pre-application": "Cyn-ymgeisio",
|
|
||||||
"pre-application-desc": "Mae'r prosiect hwn yn y cyfnod cyn-ymgeisio ac nid yw wedi'i gyflwyno i PEDW i'w ystyried. Nid yw PEDW yn derbyn sylwadau ar hyn o bryd. Dylid cyfeirio unrhyw ymholiadau at yr ymgeisydd.",
|
|
||||||
"environmental-impact-assessment-scoping": "Cwmpasu Asesiad Effaith Amgylcheddol",
|
|
||||||
"environmental-impact-assessment-scoping-desc": "Penderfynu cwmpas y Datganiad Amgylcheddol yn y dyfodol. Dim ond cyflwyniadau am gwmpas arfaethedig y Datganiad Amgylcheddol y bydd PEDW yn eu hystyried ar hyn o bryd.",
|
|
||||||
"notification": "Hysbysiad",
|
|
||||||
"notification-desc": "Mae PEDW wedi cael gwybod gan yr ymgeisydd am eu bwriad i gyflwyno cais. Nid yw PEDW yn derbyn sylwadau ar hyn o bryd.",
|
|
||||||
"acceptance-checking": "Gwirio Derbyniad",
|
|
||||||
"acceptance-checking-desc": "Mae'r cais wedi'i gyflwyno i PEDW ac mae'n cael ei ddilysu ar hyn o bryd.",
|
|
||||||
"invalid-submission": "Cyflwyniad Annilys",
|
|
||||||
"invalid-submission-desc": "Mae'r cais a gyflwynwyd i PEDW wedi'i ganfod yn annilys ac mae angen rhagor o wybodaeth.",
|
|
||||||
"consultation": "Ymgynghori",
|
|
||||||
"consultation-desc": "Mae ymgynghoriad ar agor ar y cais hwn. Gellir cyflwyno sylwadau i PEDW yn ystod y cyfnod hwn.",
|
|
||||||
"re-consultation": "Ail-Ymgynghori",
|
|
||||||
"re-consultation-desc": "Mae PEDW yn ail-ymgynghori ar y cais hwn - derbynnir sylwadau ar faterion cyfyngedig yn ystod y cyfnod ymgynghori. Gweler yr hysbysiad archwilio ar ein porth am fanylion.",
|
|
||||||
"reporting": "Adrodd",
|
|
||||||
"reporting-desc": "Mae'r Arolygydd(ion) yn ystyried y dystiolaeth a gyflwynwyd ar gyfer y cais hwn. Nid yw PEDW yn derbyn sylwadau ar hyn o bryd. ",
|
|
||||||
"inspectors-decision": "Penderfyniad yr Arolygydd(ion)",
|
|
||||||
"inspectors-decision-desc": "Mae'r Arolygydd wedi cyhoeddi ei benderfyniad ar y cais hwn.",
|
|
||||||
"report-to-ministers": "Adrodd i Weinidogion",
|
|
||||||
"report-to-ministers-desc-cpo": "Mae'r Arolygydd wedi cyflwyno ei adroddiad i Weinidogion Cymru.",
|
|
||||||
"report-to-ministers-desc": "Mae Gweinidogion Cymru wedi derbyn adroddiad yr Arolygydd(ion) a byddant yn cyhoeddi eu penderfyniad.",
|
|
||||||
"minister-s-decision": "Penderfyniad y Gweinidog",
|
|
||||||
"minister-s-decision-desc": "Mae Gweinidogion Cymru wedi cyhoeddi eu penderfyniad ar y cais hwn.",
|
|
||||||
"minister-s-decision-desc-callin": "Bydd Gweinidogion Cymru yn cyhoeddi eu penderfyniad.",
|
|
||||||
"case-closed": "Achos wedi'i Gau",
|
|
||||||
"case-closed-nonval": "Achos Ar Gau - Penderfyniad Wedi'i Gyhoeddi",
|
|
||||||
"case-closed-desc": "Mae PEDW wedi penderfynu ar yr apêl ac mae'r achos bellach wedi'i gau.",
|
|
||||||
"case-closed-desc-order": "Mae PEDW wedi penderfynu ar y gorchymyn ac mae'r achos bellach wedi'i gau.",
|
|
||||||
"case-closed-desc-application": "Mae PEDW wedi penderfynu ar y cais ac mae'r achos bellach wedi'i gau.",
|
|
||||||
"case-closed-desc-callin": "Mae PEDW wedi penderfynu ar y cais a alwyd i mewn ac mae'r achos bellach wedi'i gau.",
|
|
||||||
"appeal-submitted": "Apêl wedi'i Chyflwyno",
|
|
||||||
"appeal-submitted-desc": "Mae PEDW wedi derbyn yr apêl.",
|
|
||||||
"appeal-registered": "Apêl wedi'i Chofrestru",
|
|
||||||
"appeal-registered-desc": "Mae PEDW wedi cofrestru'r apêl.",
|
|
||||||
"appeal-validated": "Apêl wedi'i Dilysu",
|
|
||||||
"appeal-validated-desc": "Mae PEDW wedi canfod bod yr apêl yn ddilys.",
|
|
||||||
"case-in-progress": "Achos ar y Gweill",
|
|
||||||
"case-in-progress-desc": "Mae'r apêl wedi cychwyn.",
|
|
||||||
"case-in-progress-desc-callin": "Mae'r rhaglen a alwyd i mewn wedi'i chychwyn.",
|
|
||||||
"questionnaire-lpa-to-notify": "Holiadur / ACLl i'w Hysbysu",
|
|
||||||
"questionnaire-lpa-to-notify-desc": "Rhaid i'r Awdurdod Cynllunio Lleol gyflwyno eu Holiadur i PEDW a hysbysu partïon â diddordeb o ddechrau'r apêl, a'u cyfle i gyflwyno sylwadau.",
|
|
||||||
"representations-period": "Cyfnod cynrychioliadau",
|
|
||||||
"representations-period-desc": "Gellir cyflwyno cynrychiolaethau ar gyfer yr apel yn awr.",
|
|
||||||
"representations-period-desc-callin": "Gellir cyflwyno sylwadau nawr ar gyfer y cais a alwyd i mewn.",
|
|
||||||
"final-comments": "Sylwadau Terfynol",
|
|
||||||
"final-comments-desc": "Gellir cyflwyno sylwadau terfynol nawr ar gyfer y gorchymyn.",
|
|
||||||
"final-comments-desc-callin": "Gellir cyflwyno sylwadau terfynol nawr ar gyfer y cais a alwyd i mewn.",
|
|
||||||
"final-comments-desc-cpo": "Gellir cyflwyno sylwadau terfynol ar gyfer y gorchymyn nawr.",
|
|
||||||
"event": "Digwyddiad",
|
|
||||||
"event-desc": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer yr apêl hon.",
|
|
||||||
"event-desc-order": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer y gorchymyn hwn.",
|
|
||||||
"event-desc-callin": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer y cais apêl-i-mewn hwn.",
|
|
||||||
"site-visit": "Ymweliad â Safle",
|
|
||||||
"site-visit-desc": "Mae'r Arolygydd yn cynnal ei ymweliad â'r safle.",
|
|
||||||
"decision-issued": "Penderfyniad Wedi'i Gyhoeddi",
|
|
||||||
"decision-issued-desc": "Mae'r Arolygydd wedi cyflwyno ei benderfyniad i'w gyhoeddi.",
|
|
||||||
"application-called-in": "Cais Wedi'i Alw I Mewn",
|
|
||||||
"application-called-in-desc": "Mae'r cais wedi'i alw i mewn gan Weinidogion Cymru.",
|
|
||||||
"application-registered": "Cais Wedi'i Gofrestru",
|
|
||||||
"application-registered-desc": "Mae'r cais wedi'i gofrestru gan PEDW.",
|
|
||||||
"application-validated": "Cais Wedi'i Ddilysu",
|
|
||||||
"application-validated-desc": "Mae PEDW wedi canfod bod y cais yn ddilys.",
|
|
||||||
"application-validated-desc-callin": "Mae PEDW wedi canfod bod y cais a alwyd i mewn yn ddilys.",
|
|
||||||
"lpa-to-notify": "ACLl i Hysbysu",
|
|
||||||
"lpa-to-notify-desc": "Mae'r Awdurdod Cynllunio Lleol yn hysbysu Partïon â Diddordeb o ddechrau'r cais a Alwyd i Mewn, a'u cyfle i gyflwyno sylwadau.",
|
|
||||||
"report-issued-to-welsh-ministers": "Adroddiad Wedi'i Gyhoeddi i Weinidogion Cymru",
|
|
||||||
"report-issued-to-welsh-ministers-desc": "Mae'r Arolygydd wedi cyflwyno ei adroddiad argymhelliad i Weinidogion Cymru.",
|
|
||||||
"fee-due": "Ffi Ddyledus",
|
|
||||||
"fee-due-desc": "Os oes angen, mae'r ffi bellach yn ddyledus.",
|
|
||||||
"validated": "Wedi'i ddilysu",
|
|
||||||
"appeal-start-case-in-progress": "Cais Wedi'i Ddechrau/Achos Ar Y Gweill",
|
|
||||||
"statements-representations-period": "Datganiadau/Cyfnod Sylwadau",
|
|
||||||
"statements-representations-period-desc": "Gellir cyflwyno datganiadau a sylwadau ar gyfer yr apêl nawr.",
|
|
||||||
"order-submitted": "Gorchymyn Wedi'i Gyflwyno",
|
|
||||||
"order-submitted-desc": "Mae PEDW wedi derbyn y gorchymyn.",
|
|
||||||
"order-submission-registered": "Cyflwyniad Gorchymyn Wedi'i Gofrestru",
|
|
||||||
"order-submission-registered-desc": "Mae PEDW wedi cofrestru'r gorchymyn.",
|
|
||||||
"order-submission-validated": "Cyflwyniad Gorchymyn Wedi'i Ddilysu",
|
|
||||||
"order-submission-validated-desc": "Mae PEDW wedi canfod bod y gorchymyn yn ddilys.",
|
|
||||||
"case-started-case-in-progress": "Achos Wedi'i gychwyn/Achos ar y Gweill",
|
|
||||||
"case-started-case-in-progress-desc": "Mae'r gorchymyn wedi'i gychwyn.",
|
|
||||||
"statements": "Datganiadau",
|
|
||||||
"statements-desc": "Gellir cyflwyno datganiadau ar gyfer yr apêl nawr.",
|
|
||||||
"statements-desc-application": "Gellir cyflwyno datganiadau ar gyfer y cais nawr.",
|
|
||||||
"statements-desc-order": "Gellir cyflwyno datganiadau ar gyfer y gorchymyn nawr.",
|
|
||||||
"event-site-visit": "Digwyddiad/Ymweliad Safle",
|
|
||||||
"event-site-visit-desc": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer y cais hwn, neu mae'r Arolygydd yn cynnal ei ymweliad â'r safle.",
|
|
||||||
"event-site-visit-desc-order": "Mae PEDW yn trefnu'r digwyddiad Gwrandawiad / Ymchwiliad ar gyfer y gorchymyn hwn, neu mae'r Arolygydd yn cynnal ei ymweliad â'r safle.",
|
|
||||||
"application-submitted": "Cais Wedi'i Gyflwyno",
|
|
||||||
"application-submitted-desc": "Mae PEDW wedi derbyn y cais.",
|
|
||||||
"application-start-case-in-progress": "Cais Wedi'i Ddechrau/Achos Ar Y Gweill",
|
|
||||||
"application-start-case-in-progress-desc": "Mae'r cais wedi'i gychwyn.",
|
|
||||||
"applicant-statement-on-representations": "Datganiad yr Ymgeisydd ar Gynrychioliadau",
|
|
||||||
"applicant-statement-on-representations-desc": "Gall yr ymgeisydd nawr gyflwyno ei ddatganiad ar gyfer y cais.",
|
|
||||||
"representatives-comment": "Sylwadau'r Cynrychiolwyr",
|
|
||||||
"representatives-comment-desc": "Gall cynrychiolwyr nawr gyflwyno eu sylwadau ar ddatganiad yr ymgeisydd.",
|
|
||||||
"applicants-final-comment": "Sylwadau Terfynol yr Ymgeisydd",
|
|
||||||
"applicants-final-comment-desc": "Gall yr ymgeisydd nawr gyflwyno sylwadau terfynol ar gyfer y cais.",
|
|
||||||
"order-registered": "Gorchymyn Wedi'i Gofrestru",
|
|
||||||
"order-validated": "Gorchymyn Wedi'i Ddilysu",
|
|
||||||
"report-to-desnz": "Adrodd i DESNZ",
|
|
||||||
"report-to-desnz-desc": "Mae'r Arolygydd wedi cyflwyno ei adroddiad i DESNZ.",
|
|
||||||
"case-in-progress-assessment": "Achos ar y Gweill / Asesiad",
|
|
||||||
"decision-outcome": "Penderfyniad / Canlyniad",
|
|
||||||
"decision-outcome-desc": "Mae PEDW wedi gwneud ei benderfyniad ar ddilysrwydd y cais.",
|
|
||||||
"status-complete": "Wedi cwblhau",
|
|
||||||
"status-in-progress": "Ar y gweill",
|
|
||||||
"status-not-started": "Heb ddechrau",
|
|
||||||
"status-blocked": "Wedi'i rwystro"
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"summary-tab-map-label": " Map",
|
"summary-tab-map-label": " Map",
|
||||||
"summary-tab-events-label": " Digwyddiadau",
|
"summary-tab-events-label": " Digwyddiadau",
|
||||||
"summary-tab-documents-label": "Dogfennau",
|
"summary-tab-documents-label": "Dogfennau",
|
||||||
"summary-tab-media-label": "Recordiadau",
|
"summary-tab-media-label": "Cyfryngau",
|
||||||
"summary-reference-label": "Cyfeirnod",
|
"summary-reference-label": "Cyfeirnod",
|
||||||
"summary-applicant-label": "Apelydd",
|
"summary-applicant-label": "Apelydd",
|
||||||
"summary-applicantonly-label": "Ymgeisydd",
|
"summary-applicantonly-label": "Ymgeisydd",
|
||||||
@@ -144,12 +144,6 @@
|
|||||||
"summary-report-issued-to-welsh-ministers": "Adroddiad a Gyhoeddwyd i Weinidogion Cymru",
|
"summary-report-issued-to-welsh-ministers": "Adroddiad a Gyhoeddwyd i Weinidogion Cymru",
|
||||||
"summary-decision-issued-to-applicant": "Penderfyniad a Gyhoeddwyd i'r Ymgeisydd",
|
"summary-decision-issued-to-applicant": "Penderfyniad a Gyhoeddwyd i'r Ymgeisydd",
|
||||||
"summary-decision-outcome": "Canlyniad y Penderfyniad",
|
"summary-decision-outcome": "Canlyniad y Penderfyniad",
|
||||||
"media-title": "Recordiadau digwyddiadau",
|
"media-title": "Cyfryngau",
|
||||||
"video-heading": "Fideos",
|
"video-heading": "Fideos"
|
||||||
"live-event-subheading": "Digwyddiad byw",
|
|
||||||
"live-event-copy": "Mae digwyddiad sy'n cael ei ffrydio'n fyw yn digwydd nawr.",
|
|
||||||
"live-event-link": "Gwylio'r ffrydio byw",
|
|
||||||
"status-title": "Statws",
|
|
||||||
"status-show-all-label": "Dangoswch bob cam",
|
|
||||||
"status-hide-all-label": "Cuddio pob cam"
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
"page-title": "Prosiectau Isadeiledd",
|
"page-title": "Prosiectau Isadeiledd",
|
||||||
"page-intro-paragraph-1": "Mae dau fath gwahanol o gais ar gyfer prosiectau seilwaith mawr a bennir gan Weinidogion Cymru: Datblygiadau o Arwyddocâd Cenedlaethol a Phrosiectau Seilwaith Sylweddol.",
|
"page-intro-paragraph-1": "Mae dau fath gwahanol o gais ar gyfer prosiectau seilwaith, sef Datblygiadau o Arwyddocâd Cenedlaethol a Phrosiectau Seilwaith Arwyddocaol.",
|
||||||
"page-intro-list-item-1": " Datblygiadau o Arwyddocâd Cenedlaethol yw datblygiadau a diffinio yn ",
|
"page-intro-list-item-1": " Datblygiadau o Arwyddocâd Cenedlaethol yw datblygiadau a ddiffinnir yn ",
|
||||||
"page-intro-list-item-1-link": "https://www.llyw.cymru/datblygiadau-o-arwyddocad-cenedlaethol-dns-ceisiadau",
|
"page-intro-list-item-1-link": "https://www.llyw.cymru/datblygiadau-o-arwyddocad-cenedlaethol-dns-ceisiadau",
|
||||||
"page-intro-list-item-2": "Mae Prosiectau Seilwaith Arwyddocaol yn ddatblygiadau sydd wedi'u diffinio yn ",
|
"page-intro-list-item-2": "Mae Prosiectau Seilwaith Arwyddocaol yn ddatblygiadau sydd wedi'u diffinio (YMA)",
|
||||||
"page-intro-list-item-2-link": "https://www.llyw.cymru/datblygiadau-o-arwyddocad-cenedlaethol-dns-ceisiadau",
|
"page-intro-list-item-2-link": "https://www.llyw.cymru/datblygiadau-o-arwyddocad-cenedlaethol-dns-ceisiadau",
|
||||||
|
"page-intro-list-item-3": "Lle penderfynwyd ar gynnig.",
|
||||||
"page-intro-paragraph-2": "Defnyddiwch y tabl isod i ddod o hyd i geisiadau fesul cam neu fath. Fel arall, defnyddiwch y map trwy glicio ar y marcwyr i fynd i’r dudalen geisiadau. Mae rhestr o ddigwyddiadau a therfynau amser allweddol ar gyfer pob cais ar gael ar ein ",
|
"page-intro-paragraph-2": "Defnyddiwch y tabl isod i ddod o hyd i geisiadau fesul cam neu fath. Fel arall, defnyddiwch y map trwy glicio ar y marcwyr i fynd i’r dudalen geisiadau. Mae rhestr o ddigwyddiadau a therfynau amser allweddol ar gyfer pob cais ar gael ar ein ",
|
||||||
"page-intro-paragraph-2-link": "tudalen galendr",
|
"page-intro-paragraph-2-link": "tudalen galendr",
|
||||||
"page-intro-list-item-3": "Yn ogystal, mae rhai prosiectau seilwaith yng Nghymru ar raddfa nad ydynt wedi'u datganoli i Gymru ac yn hytrach yn cael eu penderfynu gan Lywodraeth y DU, er enghraifft, prosiectau cynhyrchu ynni dros 350MW. Gelwir y rhain yn Brosiectau Seilwaith Cenedlaethol eu Harwyddocâd (NSIPs) ac mae rhagor o wybodaeth ar gael yma: ",
|
|
||||||
"page-intro-list-item-3-link": "https://national-infrastructure-consenting.planninginspectorate.gov.uk/?lang=cy",
|
|
||||||
"result-list-heading-label-reference": "Cyfeirnod",
|
"result-list-heading-label-reference": "Cyfeirnod",
|
||||||
"result-list-heading-label-application": "Cais",
|
"result-list-heading-label-application": "Cais",
|
||||||
"result-list-heading-label-developer": "Datblygwr",
|
"result-list-heading-label-developer": "Datblygwr",
|
||||||
|
|||||||
@@ -53,9 +53,5 @@
|
|||||||
"casescomment-card-paragraph-three": "Gallwch wneud sylwadau ar apeliadau a cheisiadau yn ystod y cyfnod cynrychioli neu gyflwyno datganiadau achos neu'r Holiadur LPA.",
|
"casescomment-card-paragraph-three": "Gallwch wneud sylwadau ar apeliadau a cheisiadau yn ystod y cyfnod cynrychioli neu gyflwyno datganiadau achos neu'r Holiadur LPA.",
|
||||||
"casescomment-card-paragraph-four": "Cyfeiriwch at y dyddiadau cau ar gyfer cynrychioli achosion unigol ar gyfer datganiadau a sylwadau.",
|
"casescomment-card-paragraph-four": "Cyfeiriwch at y dyddiadau cau ar gyfer cynrychioli achosion unigol ar gyfer datganiadau a sylwadau.",
|
||||||
"signin-benefits-title": "Mewngofnodwch i'ch porth",
|
"signin-benefits-title": "Mewngofnodwch i'ch porth",
|
||||||
"signin-benefits-paragraph": "Drwy fewngofnodi gyda'r botwm Mewngofnodi, byddwch yn gallu:",
|
"signin-benefits-paragraph": "Drwy fewngofnodi gyda'r botwm Mewngofnodi, byddwch yn gallu:"
|
||||||
"ai-policy-notice-title": "Pwysig: canllawiau ar ddefnyddio cynnwys a gynhyrchir gan AI",
|
|
||||||
"ai-policy-notice-paragraph-one": "Deellir y gall partïon ddewis defnyddio Deallusrwydd Artiffisial Cynhyrchiol (AI) wrth gyflwyno apeliadau neu gynrychioliadau i PEDW. Er bod gan y rhai sy'n ymgysylltu â PEDW hawl i ddefnyddio AI i gynorthwyo eu cyflwyniadau, dylid nodi y gall cynnwys a gynhyrchir gan AI gynnwys honiadau ffug neu ddi-sail.",
|
|
||||||
"ai-policy-notice-paragraph-two": "Gan y bydd cyflwyniadau ysgrifenedig yn destun craffu yn y broses apelio, o bosibl o dan groesholiad mewn gwrandawiadau ac ymholiadau, ni ddylech wneud cyflwyniadau ysgrifenedig nad ydych yn eu deall neu'n gwybod eu bod yn gywir. Gall cyflwyno tystiolaeth anghywir arwain at gost ddiangen wrth wirio neu wrthbrofi tystiolaeth o'r fath a gallai arwain at ddyfarnu costau yn eich erbyn. Gweler ein Canllawiau ar gyfer defnyddio AI Cynhyrchiol am ragor o wybodaeth.",
|
|
||||||
"ai-policy-notice-dismiss-button": "Rwy'n deall"
|
|
||||||
}
|
}
|
||||||
@@ -21,11 +21,6 @@
|
|||||||
"consultation-from-an-interested-person-heading": "Ymateb i'r ymgynghoriad gan Barti/Person â Diddordeb",
|
"consultation-from-an-interested-person-heading": "Ymateb i'r ymgynghoriad gan Barti/Person â Diddordeb",
|
||||||
"kind-of-rep-label": "Pa fath o sylw ydych chi'n ei wneud?",
|
"kind-of-rep-label": "Pa fath o sylw ydych chi'n ei wneud?",
|
||||||
"kind-of-consultation-label": "Pa fath o ymateb i'r ymgynghoriad ydych chi'n ei wneud?",
|
"kind-of-consultation-label": "Pa fath o ymateb i'r ymgynghoriad ydych chi'n ei wneud?",
|
||||||
"rep-type-statement-hint": "Gall Partïon â Diddordeb gyflwyno eu sylwadau ar yr apêl / cais erbyn y dyddiad cau o 4 wythnos. Dyma'ch cyfle i wneud sylwadau ar yr apêl / cais a'r dogfennau a gyflwynwyd gan yr apelydd / ymgeisydd.",
|
|
||||||
"rep-type-final-comments-hint": "Gall pob parti gyflwyno Sylwadau Terfynol ar yr apêl / cais erbyn y dyddiad cau o 6 wythnos. Rhaid i'ch Sylwadau Terfynol ymateb i'r Datganiad a'r Sylwadau a gyflwynwyd gan yr Awdurdod Cynllunio Lleol a Phartïon â Diddordeb ar gyfer y dyddiad cau o 4 wythnos yn unig. Ni all eich Sylwadau Terfynol gyflwyno deunydd newydd na chyflwyno dadleuon y dylid bod wedi'u cynnwys yn eich Datganiad cynharach. Os gwnewch hynny, ni fydd eich sylwadau'n cael eu derbyn a byddant yn cael eu hanwybyddu.",
|
|
||||||
"rep-type-questionnaire-hint": "Mae holiadur ar gyfer Awdurdodau Cynllunio Lleol i ddarparu'r wybodaeth achos ofynnol.",
|
|
||||||
"rep-type-consultation-hint": "Gall Partïon â Diddordeb gyflwyno eu sylwadau ar y cais erbyn y dyddiad cau o 5 wythnos. Dyma'ch cyfle i wneud sylwadau ar y cais a'r dogfennau a gyflwynwyd gan yr ymgeisydd.",
|
|
||||||
"rep-type-lir-hint": "Dylai'r LIR nodi asesiad yr ACLl o effeithiau tebygol y datblygiad arfaethedig ar yr ardal leol. NI ddylai'r LIR gynnwys tystiolaeth newydd oni bai ei fod yn cael ei nodi'n glir felly ac ni ddylai ailadrodd sylwadau a ddarparwyd eisoes oni bai bod angen hynny er mwyn eglurder. Rhaid cyflwyno'r LIR o fewn yr amserlen statudol.",
|
|
||||||
"enter-comment-label": "Gallwch roi eich cynrychioliad yn y gofod a ddarparwyd neu atodi dogfen ar wahân.",
|
"enter-comment-label": "Gallwch roi eich cynrychioliad yn y gofod a ddarparwyd neu atodi dogfen ar wahân.",
|
||||||
"consultation-comment-label": "Gallwch atodi'ch dogfennau sy'n gysylltiedig â'ch ymateb i'r ymgynghoriad.",
|
"consultation-comment-label": "Gallwch atodi'ch dogfennau sy'n gysylltiedig â'ch ymateb i'r ymgynghoriad.",
|
||||||
"comments-set-out-label": "Mae fy sylwadau wedi'u nodi yn",
|
"comments-set-out-label": "Mae fy sylwadau wedi'u nodi yn",
|
||||||
@@ -261,8 +256,6 @@
|
|||||||
"rep-period-notice-label": "Aeth y dyddiad dyledus ar gyfer y sylw hwn heibio. Ni allwch gyflwyno'r wybodaeth a ddarparwyd gennych mwyach.",
|
"rep-period-notice-label": "Aeth y dyddiad dyledus ar gyfer y sylw hwn heibio. Ni allwch gyflwyno'r wybodaeth a ddarparwyd gennych mwyach.",
|
||||||
"representation-onbehalfof-hint": " e.e. \"Perchnogion Rhifau 1-5 Stryd Fawr\", neu \"Mr a Mrs Smith\" neu \"ysgutorion ystâd Mr Evans\"",
|
"representation-onbehalfof-hint": " e.e. \"Perchnogion Rhifau 1-5 Stryd Fawr\", neu \"Mr a Mrs Smith\" neu \"ysgutorion ystâd Mr Evans\"",
|
||||||
"representation-onbehalfof-label": "Rhowch enw'r cwmni/grŵp/sefydliad",
|
"representation-onbehalfof-label": "Rhowch enw'r cwmni/grŵp/sefydliad",
|
||||||
"representation-type-unavailable-label": "Nid oes unrhyw fathau o sylwadau ar gael ar gyfer yr achos hwn ar hyn o bryd.",
|
|
||||||
"return-home-link-label": "Dychwelyd i'r hafan",
|
|
||||||
"docsoffline-reps-label": "Oherwydd gwaith cynnal a chadw system, ni allwn dderbyn sylwadau ar hyn o bryd. Rhowch gynnig arall arni yn nes ymlaen.",
|
"docsoffline-reps-label": "Oherwydd gwaith cynnal a chadw system, ni allwn dderbyn sylwadau ar hyn o bryd. Rhowch gynnig arall arni yn nes ymlaen.",
|
||||||
"return-to-myportal-link": "Dychwelyd i Fy Mhorth"
|
"return-to-myportal-link": "Dychwelyd i Fy Mhorth"
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,6 @@
|
|||||||
"register-new-account-email-address-label": "Email address",
|
"register-new-account-email-address-label": "Email address",
|
||||||
"register-new-account-email-address-label-errormsg": "Enter a valid email address",
|
"register-new-account-email-address-label-errormsg": "Enter a valid email address",
|
||||||
"register-new-account-phone-label": "Telephone",
|
"register-new-account-phone-label": "Telephone",
|
||||||
"register-new-account-company-label": "Company/Group",
|
|
||||||
"register-new-account-password-label": "Password",
|
"register-new-account-password-label": "Password",
|
||||||
"register-new-account-password-label-errormsg": "Password",
|
"register-new-account-password-label-errormsg": "Password",
|
||||||
"register-new-account-confirm-password-label": "Confirm password",
|
"register-new-account-confirm-password-label": "Confirm password",
|
||||||
|
|||||||
@@ -1,111 +0,0 @@
|
|||||||
{
|
|
||||||
"pre-application": "Pre-Application",
|
|
||||||
"pre-application-desc": "This project is at pre-application stage and it has not been submitted to PEDW for consideration. PEDW is not accepting representations at this stage. Any queries should be directed to the applicant.",
|
|
||||||
"environmental-impact-assessment-scoping": "Environmental Impact Assessment Scoping",
|
|
||||||
"environmental-impact-assessment-scoping-desc": "Determination of the scope of the future Environmental Statement. PEDW will only consider submissions about the proposed scope of the Environmental Statement at this time.",
|
|
||||||
"notification": "Notification",
|
|
||||||
"notification-desc": "PEDW has been notified by the applicant of their intention to submit an application. PEDW is not accepting representations at this stage.",
|
|
||||||
"acceptance-checking": "Acceptance Checking",
|
|
||||||
"acceptance-checking-desc": "The application has been submitted to PEDW and is currently being validated.",
|
|
||||||
"invalid-submission": "Invalid Submission",
|
|
||||||
"invalid-submission-desc": "The application submitted to PEDW has been found invalid and further information is required.",
|
|
||||||
"consultation": "Consultation",
|
|
||||||
"consultation-desc": "Consultation is open on this application. Representations may be submitted to PEDW during this period.",
|
|
||||||
"re-consultation": "Re-Consultation",
|
|
||||||
"re-consultation-desc": "PEDW is re-consulting on this application - representations on limited matters will be accepted during the consultation period. Please see the examination notice on our portal for details.",
|
|
||||||
"reporting": "Reporting",
|
|
||||||
"reporting-desc": "The Inspector(s) is considering the evidence submitted for this application. PEDW is not accepting representations at this stage. ",
|
|
||||||
"inspectors-decision": "Inspector(s) Decision",
|
|
||||||
"inspectors-decision-desc": "The Inspector has issued their decision on this application.",
|
|
||||||
"report-to-ministers": "Report to Ministers",
|
|
||||||
"report-to-ministers-desc-cpo": "The Inspector has submitted their report to the Welsh Ministers.",
|
|
||||||
"report-to-ministers-desc": "The Welsh Ministers have received the Inspector(s)'s report and will issue their decision.",
|
|
||||||
"minister-s-decision": "Minister's Decision",
|
|
||||||
"minister-s-decision-desc": "The Welsh Ministers have issued their decision on this application.",
|
|
||||||
"minister-s-decision-desc-callin": "The Welsh Ministers will issue their decision.",
|
|
||||||
"case-closed": "Case Closed",
|
|
||||||
"case-closed-nonval": "Case Closed - Decision Issued",
|
|
||||||
"case-closed-desc": "PEDW has determined the appeal and the case has now been closed.",
|
|
||||||
"case-closed-desc-order": "PEDW has determined the order and the case has now been closed.",
|
|
||||||
"case-closed-desc-application": "PEDW has determined the application and the case has now been closed.",
|
|
||||||
"case-closed-desc-callin": "PEDW has determined the called-in application and the case has now been closed.",
|
|
||||||
"appeal-submitted": "Appeal Submitted",
|
|
||||||
"appeal-submitted-desc": "Appeal has been received by PEDW.",
|
|
||||||
"appeal-registered": "Appeal Registered",
|
|
||||||
"appeal-registered-desc": "Appeal has been registered by PEDW.",
|
|
||||||
"appeal-validated": "Appeal Validated",
|
|
||||||
"appeal-validated-desc": "PEDW has found the appeal valid.",
|
|
||||||
"case-in-progress": "Case in Progress",
|
|
||||||
"case-in-progress-desc": "The appeal has been started.",
|
|
||||||
"case-in-progress-desc-callin": "The called-in application has been started.",
|
|
||||||
"questionnaire-lpa-to-notify": "Questionnaire / LPA to Notify",
|
|
||||||
"questionnaire-lpa-to-notify-desc": "The Local Planning Authority must submit their Questionnaire to PEDW and notify interested parties of the start of the appeal, and their opportunity to submit comments.",
|
|
||||||
"representations-period": "Representations Period",
|
|
||||||
"representations-period-desc": "Representations may now be submitted for the appeal.",
|
|
||||||
"representations-period-desc-callin": "Representations may now be submitted for the called-in application.",
|
|
||||||
"final-comments": "Final Comments",
|
|
||||||
"final-comments-desc": "Final comments may now be submitted for the appeal.",
|
|
||||||
"final-comments-desc-callin": "Final comments may now be submitted for the called-in application.",
|
|
||||||
"final-comments-desc-cpo": "Final comments may now be submitted for the order.",
|
|
||||||
"event": "Event",
|
|
||||||
"event-desc": "PEDW is arranging the Hearing / Inquiry event for this appeal.",
|
|
||||||
"event-desc-order": "PEDW is arranging the Hearing / Inquiry event for this order.",
|
|
||||||
"event-desc-callin": "PEDW is arranging the Hearing / Inquiry event for this appeal-in application.",
|
|
||||||
"site-visit": "Site Visit",
|
|
||||||
"site-visit-desc": "The Inspector is conducting their visit to the site.",
|
|
||||||
"decision-issued": "Decision Issued",
|
|
||||||
"decision-issued-desc": "The Inspector has submitted their decision for issuing.",
|
|
||||||
"application-called-in": "Application Called-In",
|
|
||||||
"application-called-in-desc": "Application has been called-in by the Welsh Ministers.",
|
|
||||||
"application-registered": "Application Registered",
|
|
||||||
"application-registered-desc": "Application has been registered by PEDW.",
|
|
||||||
"application-validated": "Application Validated",
|
|
||||||
"application-validated-desc": "PEDW has found the application valid.",
|
|
||||||
"application-validated-desc-callin": "PEDW has found the called-in application valid.",
|
|
||||||
"lpa-to-notify": "LPA to Notify",
|
|
||||||
"lpa-to-notify-desc": "The Local Planning Authority is notifying Interested Parties of the start of the Called-In application, and their opportunity to submit comments.",
|
|
||||||
"report-issued-to-welsh-ministers": "Report Issued to Welsh Ministers",
|
|
||||||
"report-issued-to-welsh-ministers-desc": "The Inspector has submitted their recommendation report to the Welsh Ministers.",
|
|
||||||
"fee-due": "Fee Due",
|
|
||||||
"fee-due-desc": "If required, the payment of the fee is now due.",
|
|
||||||
"validated": "Validated",
|
|
||||||
"appeal-start-case-in-progress": "Appeal Start / Case in Progress",
|
|
||||||
"statements-representations-period": "Statements/Representations Period",
|
|
||||||
"statements-representations-period-desc": "Statements and representations may now be submitted for the appeal.",
|
|
||||||
"order-submitted": "Order Submitted",
|
|
||||||
"order-submitted-desc": "Order has been received by PEDW.",
|
|
||||||
"order-submission-registered": "Order Submission Registered",
|
|
||||||
"order-submission-registered-desc": "Order has been registered by PEDW.",
|
|
||||||
"order-submission-validated": "Order Submission Validated",
|
|
||||||
"order-submission-validated-desc": "PEDW has found the order valid.",
|
|
||||||
"case-started-case-in-progress": "Case started/Case in Progress",
|
|
||||||
"case-started-case-in-progress-desc": "The order has been started.",
|
|
||||||
"statements": "Statements",
|
|
||||||
"statements-desc": "Statements may now be submitted for the appeal.",
|
|
||||||
"statements-desc-application": "Statements may now be submitted for the application.",
|
|
||||||
"statements-desc-order": "Statements may now be submitted for the order.",
|
|
||||||
"event-site-visit": "Event/Site Visit",
|
|
||||||
"event-site-visit-desc": "PEDW is arranging the Hearing / Inquiry event for this application, or the Inspector is conducting their visit to the site.",
|
|
||||||
"event-site-visit-desc-order": "PEDW is arranging the Hearing / Inquiry event for this order, or the Inspector is conducting their visit to the site.",
|
|
||||||
"application-submitted": "Application Submitted",
|
|
||||||
"application-submitted-desc": "Application has been received by PEDW.",
|
|
||||||
"application-start-case-in-progress": "Application Start/Case In Progress",
|
|
||||||
"application-start-case-in-progress-desc": "The application has been started.",
|
|
||||||
"applicant-statement-on-representations": "Applicant Statement on Representations",
|
|
||||||
"applicant-statement-on-representations-desc": "The applicant may now submit their statement for the application.",
|
|
||||||
"representatives-comment": "Representatives Comment",
|
|
||||||
"representatives-comment-desc": "Representatives may now submit their comments on the applicant's statement.",
|
|
||||||
"applicants-final-comment": "Applicants Final Comment",
|
|
||||||
"applicants-final-comment-desc": "The applicant may now submit final comments for the application.",
|
|
||||||
"order-registered": "Order Registered",
|
|
||||||
"order-validated": "Order Validated",
|
|
||||||
"report-to-desnz": "Report to DESNZ",
|
|
||||||
"report-to-desnz-desc": "The Inspector has submitted their report to DESNZ.",
|
|
||||||
"case-in-progress-assessment": "Case in Progress / Assessment",
|
|
||||||
"decision-outcome": "Decision / Outcome",
|
|
||||||
"decision-outcome-desc": "PEDW has made their decision on the validity of the application.",
|
|
||||||
"status-complete": "Complete",
|
|
||||||
"status-in-progress": "In progress",
|
|
||||||
"status-not-started": "Not started",
|
|
||||||
"status-blocked": "Blocked"
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"summary-tab-map-label": "Map",
|
"summary-tab-map-label": "Map",
|
||||||
"summary-tab-events-label": "Events",
|
"summary-tab-events-label": "Events",
|
||||||
"summary-tab-documents-label": "Documents",
|
"summary-tab-documents-label": "Documents",
|
||||||
"summary-tab-media-label": "Event recordings",
|
"summary-tab-media-label": "Media",
|
||||||
"summary-reference-label": "Reference",
|
"summary-reference-label": "Reference",
|
||||||
"summary-applicant-label": "Appellant",
|
"summary-applicant-label": "Appellant",
|
||||||
"summary-applicantonly-label": "Applicant",
|
"summary-applicantonly-label": "Applicant",
|
||||||
@@ -145,12 +145,6 @@
|
|||||||
"summary-report-issued-to-welsh-ministers": "Report Issued to Welsh Ministers",
|
"summary-report-issued-to-welsh-ministers": "Report Issued to Welsh Ministers",
|
||||||
"summary-decision-issued-to-applicant": "Decision Issued to Applicant",
|
"summary-decision-issued-to-applicant": "Decision Issued to Applicant",
|
||||||
"summary-decision-outcome": "Decision Outcome",
|
"summary-decision-outcome": "Decision Outcome",
|
||||||
"media-title": "Event recordings",
|
"media-title": "Media",
|
||||||
"video-heading": "Videos",
|
"video-heading": "Fideos"
|
||||||
"live-event-subheading": "Live event",
|
|
||||||
"live-event-copy": "A live streamed event is happening now.",
|
|
||||||
"live-event-link": "Watch live stream",
|
|
||||||
"status-title": "Status",
|
|
||||||
"status-show-all-label": "Show all stages",
|
|
||||||
"status-hide-all-label": "Hide all stages"
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
"page-title": "Infrastructure Projects",
|
"page-title": "Infrastructure Projects",
|
||||||
"page-intro-paragraph-1": "There are two different types of application for major infrastructure projects that are determined by the Welsh Ministers: Developments of National Significance and Significant Infrastructure Projects.",
|
"page-intro-paragraph-1": "There are two different types of application for infrastructure projects, Developments of National Significance and Significant Infrastructure Projects.",
|
||||||
"page-intro-list-item-1": "Developments of National Significance are developments that are defined at ",
|
"page-intro-list-item-1": "Developments of National Significance are developments that are defined at",
|
||||||
"page-intro-list-item-1-link": "https://www.gov.wales/developments-national-significance-dns-applications",
|
"page-intro-list-item-1-link": "https://www.gov.wales/developments-national-significance-dns-applications",
|
||||||
"page-intro-list-item-2": "Significant Infrastructure Projects are developments that are defined at ",
|
"page-intro-list-item-2": "Significant Infrastructure Projects are developments that are defined at ",
|
||||||
"page-intro-list-item-2-link": "https://www.gov.wales/significant-infrastructure-projects-applications",
|
"page-intro-list-item-2-link": "https://www.gov.wales/significant-infrastructure-projects-applications",
|
||||||
|
"page-intro-list-item-3": "Where a proposal has been decided.",
|
||||||
"page-intro-paragraph-2": "Use the table below to find applications by stage or type. Alternatively, use the map by clicking on the markers to go to the applications page. A list of key events and deadlines for all applications is available on our ",
|
"page-intro-paragraph-2": "Use the table below to find applications by stage or type. Alternatively, use the map by clicking on the markers to go to the applications page. A list of key events and deadlines for all applications is available on our ",
|
||||||
"page-intro-paragraph-2-link": "calendar page",
|
"page-intro-paragraph-2-link": "calendar page",
|
||||||
"page-intro-list-item-3": "In addition, some infrastructure projects in Wales are of a scale that have not been devolved to Wales and are instead decided by UK Government, for example, energy generation projects over 350MW. These are known as Nationally Significant Infrastructure Projects (NSIPs) and more information is available here: ",
|
|
||||||
"page-intro-list-item-3-link": "https://national-infrastructure-consenting.planninginspectorate.gov.uk/",
|
|
||||||
"result-list-heading-label-reference": "Reference",
|
"result-list-heading-label-reference": "Reference",
|
||||||
"result-list-heading-label-application": "Application",
|
"result-list-heading-label-application": "Application",
|
||||||
"result-list-heading-label-developer": "Developer",
|
"result-list-heading-label-developer": "Developer",
|
||||||
|
|||||||
@@ -53,9 +53,5 @@
|
|||||||
"casescomment-card-paragraph-three": "You can make comments on appeals and applications during the representation period or submit statements of case or the LPA Questionnaire.",
|
"casescomment-card-paragraph-three": "You can make comments on appeals and applications during the representation period or submit statements of case or the LPA Questionnaire.",
|
||||||
"casescomment-card-paragraph-four": "Please refer to the individual case representation deadlines for statements and comments.",
|
"casescomment-card-paragraph-four": "Please refer to the individual case representation deadlines for statements and comments.",
|
||||||
"signin-benefits-title": "Sign in to your portal",
|
"signin-benefits-title": "Sign in to your portal",
|
||||||
"signin-benefits-paragraph": "By signing in with the Sign in button, you will be able to:",
|
"signin-benefits-paragraph": "By signing in with the Sign in button, you will be able to:"
|
||||||
"ai-policy-notice-title": "Important: guidance on use of AI-generated content",
|
|
||||||
"ai-policy-notice-paragraph-one": "It is understood that parties may choose to make use of Generative Artificial Intelligence (AI) when submitting appeals or representations to PEDW. While those engaging with PEDW are entitled to use AI to aid their submissions, it should be noted that content generated by an AI may include false or unsubstantiated claims.",
|
|
||||||
"ai-policy-notice-paragraph-two": "As written submissions will be subject to scrutiny in the appeals process, potentially under cross-examination at hearings and inquiries, you should not make written submissions that you do not understand or know to be accurate. The submission of inaccurate evidence may incur unnecessary expense verifying or rebutting such evidence and could lead to an award of costs against you. Please see our Guidance for the use of Generative AI for further information.",
|
|
||||||
"ai-policy-notice-dismiss-button": "I understand"
|
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user