diff --git a/.env.local b/.env.local index 2ad60f9b..99d14d85 100644 --- a/.env.local +++ b/.env.local @@ -35,8 +35,6 @@ SHOWLOGIN = "false" SHOWREPRESENTATIONS = "false" BASIC_AUTH_CREDENTIALS,, = pinswg:password|pinswg2:password2 -NEXT_PUBLIC_ISHARESECRETPHRASE = "Secret phrase" - HASHKEY = "028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c" NEXT_PUBLIC_HASHKEY = "028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c" diff --git a/actions/index.js b/actions/index.js index 5f68aeb1..69b05a42 100644 --- a/actions/index.js +++ b/actions/index.js @@ -591,7 +591,7 @@ export const getAppealsTypes = (token) => { return axios .get( WEBAPI_URL + - "stringmaps?$filter=attributename eq 'pinswg_appealcasetype' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue", + "stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc", azureHeaders(token) ) .then((res) => res.data) @@ -612,7 +612,7 @@ export const getLPA = (token) => { return axios .get( WEBAPI_URL + - "accounts?$count=true&$filter=pinswg_isalocalplanningauthorityaccount eq 846040000&$select=name", + "accounts?$count=true&$filter=pinswg_isalocalplanningauthorityaccount eq 846040000&$select=name&$orderby=name asc", azureHeaders(token) ) .then((res) => { diff --git a/components/case/summaryTypes/pinswg_advertsid.js b/components/case/summaryTypes/pinswg_advertsid.js index 297abb25..ac8e96c1 100644 --- a/components/case/summaryTypes/pinswg_advertsid.js +++ b/components/case/summaryTypes/pinswg_advertsid.js @@ -148,29 +148,31 @@ const Pinswg_advertsid = (props) => { */} -
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_callinss77id.js b/components/case/summaryTypes/pinswg_callinss77id.js index d2d93ff9..8a42e738 100644 --- a/components/case/summaryTypes/pinswg_callinss77id.js +++ b/components/case/summaryTypes/pinswg_callinss77id.js @@ -148,29 +148,31 @@ const Pinswg_callinss77id = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_commonlandid.js b/components/case/summaryTypes/pinswg_commonlandid.js index 3e4cb3db..d62ff697 100644 --- a/components/case/summaryTypes/pinswg_commonlandid.js +++ b/components/case/summaryTypes/pinswg_commonlandid.js @@ -148,29 +148,31 @@ const Pinswg_commonlandid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js b/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js index 1a396aef..57abd0e2 100644 --- a/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js +++ b/components/case/summaryTypes/pinswg_communityinfrastructurelevyid.js @@ -148,29 +148,31 @@ const Pinswg_communityinfrastructurelevyid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js b/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js index 70e66694..352c8e82 100644 --- a/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js +++ b/components/case/summaryTypes/pinswg_compulsorypurchaseordersid.js @@ -130,29 +130,31 @@ const Pinswg_compulsorypurchaseordersid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js index c09dd4da..2602ff9b 100644 --- a/components/case/summaryTypes/pinswg_dnsid.js +++ b/components/case/summaryTypes/pinswg_dnsid.js @@ -189,29 +189,31 @@ const Pinswg_dnsid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_electricityactid.js b/components/case/summaryTypes/pinswg_electricityactid.js index 60c7230f..f2446653 100644 --- a/components/case/summaryTypes/pinswg_electricityactid.js +++ b/components/case/summaryTypes/pinswg_electricityactid.js @@ -188,29 +188,31 @@ const Pinswg_electricityactid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js index 36fac0cb..6ce199e0 100644 --- a/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js +++ b/components/case/summaryTypes/pinswg_enforcementlistedbuildingconseid.js @@ -148,29 +148,31 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js b/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js index 266f26e6..b9188127 100644 --- a/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js +++ b/components/case/summaryTypes/pinswg_enforcementnoticeappeals174id.js @@ -148,29 +148,31 @@ const Pinswg_enforcementnoticeappeals174id = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_environmentalpermittingid.js b/components/case/summaryTypes/pinswg_environmentalpermittingid.js index ba96cf3d..c700bcfc 100644 --- a/components/case/summaryTypes/pinswg_environmentalpermittingid.js +++ b/components/case/summaryTypes/pinswg_environmentalpermittingid.js @@ -148,29 +148,31 @@ const Pinswg_environmentalpermittingid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js index d645720b..e36f366f 100644 --- a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js +++ b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js @@ -188,29 +188,31 @@ const Pinswg_harbourrevisionorderid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js index 09c61e1a..7c96fa13 100644 --- a/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js +++ b/components/case/summaryTypes/pinswg_hedgeshedgerowstreepreservatioid.js @@ -148,29 +148,31 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_householderappealhasid.js b/components/case/summaryTypes/pinswg_householderappealhasid.js index 7d62464d..df418aa8 100644 --- a/components/case/summaryTypes/pinswg_householderappealhasid.js +++ b/components/case/summaryTypes/pinswg_householderappealhasid.js @@ -148,29 +148,31 @@ const Pinswg_householderappealhasid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js b/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js index 57b04ca5..99a61008 100644 --- a/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js +++ b/components/case/summaryTypes/pinswg_lawfuldevelopmentcertificatappid.js @@ -148,29 +148,31 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_ldpid.js b/components/case/summaryTypes/pinswg_ldpid.js index 1caf671e..87db0d60 100644 --- a/components/case/summaryTypes/pinswg_ldpid.js +++ b/components/case/summaryTypes/pinswg_ldpid.js @@ -148,29 +148,31 @@ const Pinswg_ldpid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js b/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js index 8444ee16..b17601e5 100644 --- a/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js +++ b/components/case/summaryTypes/pinswg_listedbuildingandconservationrid.js @@ -148,29 +148,31 @@ const Pinswg_listedbuildingandconservationrid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_maintenanceoflands217id.js b/components/case/summaryTypes/pinswg_maintenanceoflands217id.js index ae194803..baf67bda 100644 --- a/components/case/summaryTypes/pinswg_maintenanceoflands217id.js +++ b/components/case/summaryTypes/pinswg_maintenanceoflands217id.js @@ -148,29 +148,31 @@ const Pinswg_maintenanceoflands217id = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js b/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js index d28f633c..9664e6f4 100644 --- a/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js +++ b/components/case/summaryTypes/pinswg_miscellaneouscasewordid.js @@ -148,29 +148,31 @@ const Pinswg_miscellaneouscasewordid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_planningappeals78id.js b/components/case/summaryTypes/pinswg_planningappeals78id.js index 5b153066..26267f78 100644 --- a/components/case/summaryTypes/pinswg_planningappeals78id.js +++ b/components/case/summaryTypes/pinswg_planningappeals78id.js @@ -148,29 +148,31 @@ const Pinswg_planningappeals78id = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_planningconditionss73s79id.js b/components/case/summaryTypes/pinswg_planningconditionss73s79id.js index 5da3352d..f5566e9e 100644 --- a/components/case/summaryTypes/pinswg_planningconditionss73s79id.js +++ b/components/case/summaryTypes/pinswg_planningconditionss73s79id.js @@ -148,29 +148,31 @@ const Pinswg_planningconditionss73s79id = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_planningobligationappeals106id.js b/components/case/summaryTypes/pinswg_planningobligationappeals106id.js index 5473960d..ba01be70 100644 --- a/components/case/summaryTypes/pinswg_planningobligationappeals106id.js +++ b/components/case/summaryTypes/pinswg_planningobligationappeals106id.js @@ -148,29 +148,31 @@ const Pinswg_planningobligationappeals106id = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_rowid.js b/components/case/summaryTypes/pinswg_rowid.js index 95cb8417..d65d2f65 100644 --- a/components/case/summaryTypes/pinswg_rowid.js +++ b/components/case/summaryTypes/pinswg_rowid.js @@ -148,29 +148,31 @@ const Pinswg_rowid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/case/summaryTypes/pinswg_wayleaveid.js b/components/case/summaryTypes/pinswg_wayleaveid.js index 961ab7fa..7849befd 100644 --- a/components/case/summaryTypes/pinswg_wayleaveid.js +++ b/components/case/summaryTypes/pinswg_wayleaveid.js @@ -148,29 +148,31 @@ const Pinswg_wayleaveid = (props) => { */}
-
-
- {t( - "case:summary-case-link-status-label" - )} -
-
- {_.has(casesObj, [ - "numberofchildincidents", - ]) - ? casesObj.numberofchildincidents > - 0 - ? t( - "case:summary-case-link-status-linked" - ) + {casesObj.numberofchildincidents > 0 && ( +
+
+ {t( + "case:summary-case-link-status-label" + )} +
+
+ {_.has(casesObj, [ + "numberofchildincidents", + ]) + ? casesObj.numberofchildincidents > + 0 + ? t( + "case:summary-case-link-status-linked" + ) + : t( + "case:summary-case-link-status-not-linked" + ) : t( "case:summary-case-link-status-not-linked" - ) - : t( - "case:summary-case-link-status-not-linked" - )} -
-
+ )} + + + )} {casesObj.numberofchildincidents > 0 ? (
diff --git a/components/homepage/casesearch.js b/components/homepage/casesearch.js index aeb487cd..b8675b73 100644 --- a/components/homepage/casesearch.js +++ b/components/homepage/casesearch.js @@ -91,7 +91,7 @@ let CaseSearch = (props) => { router.locale == "cy" ? "/canlyniadauchwilio" : "/searchresults", - query: { q: values.basicSearch }, + query: { q: values.basicSearch.trim() }, shallow: true, }); }; diff --git a/components/search/advancedsearch.js b/components/search/advancedsearch.js index e9ff67df..94daa7bc 100644 --- a/components/search/advancedsearch.js +++ b/components/search/advancedsearch.js @@ -232,7 +232,8 @@ let AdvancedSearch = (props) => { var searchString = ""; - searchString += values.caseRef != null ? "?q=" + values.caseRef : ""; + searchString += + values.caseRef.trim() != null ? "?q=" + values.caseRef.trim() : ""; searchString += values.lpaTypes != null ? (typeof values.caseRef == "undefined" ? "?" : "&") + diff --git a/data/lookuptranslations.json b/data/lookuptranslations.json index c7b870a9..45d969b7 100644 --- a/data/lookuptranslations.json +++ b/data/lookuptranslations.json @@ -375,11 +375,6 @@ "value": "Snowdonia National Park Authority", "value_cy": "Parc Cenedlaethol Eryri", "pinswg_lpa": 0 - }, - { - "value": "Developments of National Significance", - "value_cy": "Datblygiad o Arwyddocâd Cenedlaethol", - "pinswg_lpa": 0 } ], "pinswg_procedure": [ diff --git a/next.config.js b/next.config.js index e3e0aaa9..169a2b4e 100644 --- a/next.config.js +++ b/next.config.js @@ -17,7 +17,36 @@ module.exports = withStyles({ }, }, }); + +const securityHeaders = [ + { + key: "X-DNS-Prefetch-Control", + value: "on", + }, + { + key: "X-Frame-Options", + value: "SAMEORIGIN", + }, + { + key: "Strict-Transport-Security", + value: "max-age=63072000; includeSubDomains; preload", + }, + { + key: "Content-Security-Policy", + value: "frame-src 'self'; child-src 'self'", + }, +]; + module.exports = { + async headers() { + return [ + { + // Apply these headers to all routes in your application. + source: "/(.*)", + headers: securityHeaders, + }, + ]; + }, generateBuildId: async () => { // You can, for example, get the latest git commit hash here return "pinswg-build-id"; diff --git a/styles/sass/welshgov/_application.scss b/styles/sass/welshgov/_application.scss index 1e593aa6..d6490458 100644 --- a/styles/sass/welshgov/_application.scss +++ b/styles/sass/welshgov/_application.scss @@ -232,7 +232,7 @@ a.longLinkBreak { textarea, .react-datepicker__input-container input { border: 1px solid $darkgrey; - padding: 10px 15px; + padding: 7px 15px; } .govuk-radios__label:before { @@ -315,7 +315,7 @@ textarea, background-repeat: no-repeat; background-position: 98% 15px; background-color: #fff; - padding: 10px 15px; + padding: 7px 15px; border: 1px solid #666666; &:focus {