From 2ac0b0ade4223e5881bb88f4e21aac7b2416a448 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Fri, 28 Jan 2022 10:50:44 +0000 Subject: [PATCH] added in case stage for dns records summary --- actions/selectQueryTypes.js | 2 +- components/case/summary.js | 24 +++++++++++++++++++++ data/lookuptranslations.json | 42 ++++++++++++++++++++++++++++++++++++ locales/cy/case.json | 1 + locales/en/case.json | 1 + 5 files changed, 69 insertions(+), 1 deletion(-) diff --git a/actions/selectQueryTypes.js b/actions/selectQueryTypes.js index e64a4086..539d702c 100644 --- a/actions/selectQueryTypes.js +++ b/actions/selectQueryTypes.js @@ -19,7 +19,7 @@ export const getSelectQuery = (appealTypeName) => { case "pinswg_compulsorypurchaseorderses": return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode"; case "pinswg_dnses": - return "&$select=_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_projectdescription,pinswg_projectlocation,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode"; + return "&$select=_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_projectdescription,pinswg_projectlocation,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"; case "pinswg_electricityacts": return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode"; case "pinswg_householderappealhases": diff --git a/components/case/summary.js b/components/case/summary.js index 2722ef2f..e49cd42c 100644 --- a/components/case/summary.js +++ b/components/case/summary.js @@ -227,6 +227,30 @@ const CaseSummary = (props) => { )} + {detailsObj.pinswg_casestage != null && ( +
+
+ {t("case:summary-case-stage-label")} +
+
+ {router.locale == "cy" + ? jsonpath.query( + transLookup, + '$..[?(@.value=="' + + detailsObj[ + "pinswg_casestage@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy' + ) + : detailsObj[ + "pinswg_casestage@OData.Community.Display.V1.FormattedValue" + ] || + t( + "case:summary-no-date-entered-label" + )} +
+
+ )} diff --git a/data/lookuptranslations.json b/data/lookuptranslations.json index c4882e34..bfc9d567 100644 --- a/data/lookuptranslations.json +++ b/data/lookuptranslations.json @@ -499,5 +499,47 @@ "value_cy": "Penderfyniad / Adroddiad Terfyno", "pinswg_isharedocumentlocations": 0 } + ], + "pinswg_casestage": [ + { + "value": "Pre-Application", + "value_cy": "Cyn Ymgeisio", + "pinswg_decision": 846040000 + }, + { + "value": "Acceptance", + "value_cy": "Derbyn", + "pinswg_decision": 846040001 + }, + { + "value": "Pre-Examiniation", + "value_cy": "Rhag-Arholiad", + "pinswg_decision": 846040001 + }, + { + "value": "Examination", + "value_cy": "Arholiad", + "pinswg_decision": 846040003 + }, + { + "value": "Recommendation", + "value_cy": "Argymhelliad", + "pinswg_decision": 846040004 + }, + { + "value": "Decision", + "value_cy": "Penderfyniad", + "pinswg_decision": 846040005 + }, + { + "value": "Post Decision", + "value_cy": "Wedi Penderfyniad", + "pinswg_decision": 846040006 + }, + { + "value": "Withdrawn", + "value_cy": "Tynnwyd yn ôl", + "pinswg_decision": 846040007 + } ] } \ No newline at end of file diff --git a/locales/cy/case.json b/locales/cy/case.json index 176e4a5b..47a1c822 100644 --- a/locales/cy/case.json +++ b/locales/cy/case.json @@ -6,6 +6,7 @@ "summary-agent-label": "Asiant", "summary-site-address-label": "Cyfeiriad y Safle", "summary-description-label": "Disgrifiad", + "summary-case-stage-label": "Cam achos", "summary-make-representation-label": "Cyflwyno cynrychiolaeth", "summary-back-button-label": "Ewch yn ôl", "summary-case-details-label": "Manylion yr Achos", diff --git a/locales/en/case.json b/locales/en/case.json index 8c6b5591..dd3ccdae 100644 --- a/locales/en/case.json +++ b/locales/en/case.json @@ -6,6 +6,7 @@ "summary-agent-label": "Agent", "summary-site-address-label": "Site Address", "summary-description-label": "Description", + "summary-case-stage-label": "Case stage", "summary-make-representation-label": "Make representation", "summary-back-button-label": "Go back", "summary-case-details-label": "Case Details",