diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js index a316d657..1797d294 100644 --- a/components/case/summaryTypes/pinswg_dnsid.js +++ b/components/case/summaryTypes/pinswg_dnsid.js @@ -197,21 +197,23 @@ const Pinswg_dnsid = (props) => { "case:summary-procedure-label" )} value={ - router.locale == "cy" - ? jsonpath({ - path: - '$..[?(@ && @.value=="' + - detailsObj[ - "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" - ] + - '")].value_cy', - json: transLookup, - eval: true - }) - : detailsObj[ - "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" - ] || - t( + detailsObj.pinswg_choiceofprocedure !== + null + ? router.locale == "cy" + ? jsonpath({ + path: + '$..[?(@ && @.value=="' + + detailsObj[ + "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + json: transLookup, + eval: true + }) + : detailsObj[ + "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" + ] + : t( "case:summary-to-be-confirmed-label" ) } @@ -320,21 +322,22 @@ const Pinswg_dnsid = (props) => { {t("case:summary-decision-label")}
- {router.locale == "cy" - ? jsonpath({ - path: - '$..[?(@ && @.value=="' + - detailsObj[ - "pinswg_decision@OData.Community.Display.V1.FormattedValue" - ] + - '")].value_cy', - json: transLookup, - eval: true - }) - : detailsObj[ - "pinswg_decision@OData.Community.Display.V1.FormattedValue" - ] || - t( + {detailsObj.pinswg_decision !== null + ? router.locale == "cy" + ? jsonpath({ + path: + '$..[?(@ && @.value=="' + + detailsObj[ + "pinswg_decision@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + json: transLookup, + eval: true + }) + : detailsObj[ + "pinswg_decision@OData.Community.Display.V1.FormattedValue" + ] + : t( "case:summary-no-information-to-date-label" )} diff --git a/components/case/summaryTypes/pinswg_sipscase.js b/components/case/summaryTypes/pinswg_sipscase.js index de7df669..a78e379a 100644 --- a/components/case/summaryTypes/pinswg_sipscase.js +++ b/components/case/summaryTypes/pinswg_sipscase.js @@ -126,7 +126,7 @@ const Pinswg_sipscase = (props) => { {projectTypes.length > 0 && ( {projectTypes.map( @@ -225,19 +225,21 @@ const Pinswg_sipscase = (props) => { "case:summary-procedure-label" )} value={ - router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + - detailsObj[ - "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" - ] + - '")].value_cy', - transLookup - ) - : detailsObj[ - "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" - ] || - t( + detailsObj.pinswg_choiceofprocedure !== + null + ? router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj[ + "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : detailsObj[ + "pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue" + ] + : t( "case:summary-to-be-confirmed-label" ) } @@ -245,19 +247,21 @@ const Pinswg_sipscase = (props) => { { "Deemed Marine License Applied for" } value={ - router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + - detailsObj[ - "pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue" - ] + - '")].value_cy', - transLookup - ) - : detailsObj[ - "pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue" - ] || - t( + detailsObj.pinswg_deemedmarinelicenseappliedfor !== + null + ? router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj[ + "pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : detailsObj[ + "pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue" + ] + : t( "case:summary-to-be-confirmed-label" ) } @@ -394,19 +400,20 @@ const Pinswg_sipscase = (props) => { {t("case:summary-decision-label")}
- {router.locale == "cy" - ? jsonpath( - '$..[?(@.value=="' + - detailsObj[ - "pinswg_decision@OData.Community.Display.V1.FormattedValue" - ] + - '")].value_cy', - transLookup - ) - : detailsObj[ - "pinswg_decision@OData.Community.Display.V1.FormattedValue" - ] || - t( + {detailsObj.pinswg_decision !== null + ? router.locale == "cy" + ? jsonpath( + '$..[?(@.value=="' + + detailsObj[ + "pinswg_decision@OData.Community.Display.V1.FormattedValue" + ] + + '")].value_cy', + transLookup + ) + : detailsObj[ + "pinswg_decision@OData.Community.Display.V1.FormattedValue" + ] + : t( "case:summary-no-information-to-date-label" )} diff --git a/data/lookuptranslations.json b/data/lookuptranslations.json index 2a832b5f..5a1e01cb 100644 --- a/data/lookuptranslations.json +++ b/data/lookuptranslations.json @@ -919,5 +919,141 @@ "value": "Refused planning permission for the development", "value_cy": "Wedi gwrthod caniatâd cynllunio ar gyfer y datblygiad" } + ], + "common": [ + { + "value": "Yes", + "value_cy": "Ie" + }, + { + "value": "No", + "value_cy": "Na" + } + ], + "projecTypes": [ + { + "value": "Airport", + "value_cy": "Maes Awyr" + }, + { + "value": "Dams and Reservoirs", + "value_cy": "Argaeau a Chronfeydd Dŵr" + }, + { + "value": "Electricity infrastructure – installation of an electric line above ground associated with a generating station", + "value_cy": "Seilwaith trydan – gosod llinell drydan uwchben y ddaear sy'n gysylltiedig â gorsaf gynhyrchu" + }, + { + "value": "Electricity infrastructure - Installation of an electric line, other than above ground associated with a generating station", + "value_cy": "Seilwaith trydan – gosod llinell drydan, heblaw un uwchben y ddaear sy'n gysylltiedig â gorsaf gynhyrchu" + }, + { + "value": "Electricity infrastructure – marine other", + "value_cy": "Seilwaith trydan – morol arall" + }, + { + "value": "Electricity infrastructure – marine solar", + "value_cy": "Seilwaith trydan – ynni solar morol" + }, + { + "value": "Electricity infrastructure – marine tidal", + "value_cy": "Seilwaith trydan – ynni llanw morol" + }, + { + "value": "Electricity infrastructure – marine wind", + "value_cy": "Seilwaith trydan – ynni gwynt morol" + }, + { + "value": "Electricity infrastructure – onshore energy from waste", + "value_cy": "Seilwaith trydan – ynni o wastraff ar y tir" + }, + { + "value": "Electricity infrastructure – onshore other", + "value_cy": "Seilwaith trydan – ar y tir arall" + }, + { + "value": "Electricity infrastructure – onshore solar", + "value_cy": "Seilwaith trydan – ynni solar ar y tir" + }, + { + "value": "Electricity infrastructure – onshore wind", + "value_cy": "Seilwaith trydan – ynni gwynt ar y tir" + }, + { + "value": "Energy Storage", + "value_cy": "Storio Ynni" + }, + { + "value": "Gas Reception Facilities", + "value_cy": "Cyfleusterau Derbyn Nwy" + }, + { + "value": "Harbour facilities", + "value_cy": "Cyfleusterau Harbwr" + }, + { + "value": "Hazardous Waste Facilities", + "value_cy": "Cyfleusterau Gwastraff Peryglus" + }, + { + "value": "Highway", + "value_cy": "Priffordd" + }, + { + "value": "Hydraulic Fracturing for Oil and Gas and Coal Gasification", + "value_cy": "Hollti Hydrolig ar gyfer Olew a Nwy a Nwyeiddio Glo" + }, + { + "value": "Hydraulic fracturing for oil and gas and coal gasification", + "value_cy": "Hollti hydrolig ar gyfer olew a nwy a nwyeiddio glo" + }, + { + "value": "Hydrogen production", + "value_cy": "Cynhyrchu Hydrogen" + }, + { + "value": "Liquefied Natural Gas Facilities", + "value_cy": "Cyfleusterau Nwy Naturiol Hylifedig" + }, + { + "value": "Non gas transport pipeline", + "value_cy": "Piblinell gludo nad yw ar gyfer nwy" + }, + { + "value": "Open Cast Coal Mining", + "value_cy": "Cloddio Glo Brig" + }, + { + "value": "Open cast coal mining", + "value_cy": "Cloddio glo brig" + }, + { + "value": "Pipeline by Gas transporters", + "value_cy": "Piblinell gan gludwyr nwy" + }, + { + "value": "Radioactive Waste Geological Disposal Facilities", + "value_cy": "Cyfleusterau Gwaredu Daearegol Gwastraff Ymbelydrol" + }, + { + "value": "Rail Freight Interchange", + "value_cy": "Cyfnewidfa Cludo Nwyddau Rheilffordd" + }, + { + "value": "Railway", + "value_cy": "Rheilffordd" + }, + { + "value": "The construction of flood defence works", + "value_cy": "Adeiladu gwaith amddiffyn rhag llifogydd" + }, + { + "value": "Transfer of Water Resources", + "value_cy": "Trosglwyddo Adnoddau Dŵr" + }, + { + "value": "Waste Water Treatment Plants", + "value_cy": "Gweithfeydd Trin Dŵr Gwastraff" + } ] } \ No newline at end of file diff --git a/locales/cy/case.json b/locales/cy/case.json index a3620bb5..eeeb3695 100644 --- a/locales/cy/case.json +++ b/locales/cy/case.json @@ -151,5 +151,6 @@ "live-event-link": "Gwylio'r ffrydio byw", "status-title": "Statws", "status-show-all-label": "Dangoswch bob cam", - "status-hide-all-label": "Cuddio pob cam" + "status-hide-all-label": "Cuddio pob cam", + "project-type-label": "Math o brosiect" } \ No newline at end of file diff --git a/locales/en/case.json b/locales/en/case.json index 37b43776..e44fb460 100644 --- a/locales/en/case.json +++ b/locales/en/case.json @@ -152,5 +152,6 @@ "live-event-link": "Watch live stream", "status-title": "Status", "status-show-all-label": "Show all stages", - "status-hide-all-label": "Hide all stages" + "status-hide-all-label": "Hide all stages", + "project-type-label": "Project type" } \ No newline at end of file diff --git a/pages/case/[ticketnumber].js b/pages/case/[ticketnumber].js index c1b3bdcb..ddd998d7 100644 --- a/pages/case/[ticketnumber].js +++ b/pages/case/[ticketnumber].js @@ -38,7 +38,8 @@ const CaseHome = (props) => { pages, setSearchResults, setSearchDetails, - searchResultsObj + searchResultsObj, + mapTarget } = props; let { t, lang } = useTranslation(); @@ -113,6 +114,7 @@ const CaseHome = (props) => { showMaps={props.showMaps} eventsObj={props.searchResultsObj.eventsObj} mediaObj={props.searchResultsObj.mediaObj} + mapTarget={props.mapTarget} />