diff --git a/actions/index.js b/actions/index.js
index 5dcf1bcc..93944b2c 100644
--- a/actions/index.js
+++ b/actions/index.js
@@ -2,7 +2,6 @@ import axios from "axios";
import https from "https";
import CryptoJS from "crypto-js";
import HmacSHA256 from "crypto-js/hmac-sha256";
-import { has, indexOf } from "lodash";
let BASE_URL;
const port = parseInt(process.env.PORT, 10) || 3000;
diff --git a/components/case/summary.js b/components/case/summary.js
index bca53295..6a597d12 100644
--- a/components/case/summary.js
+++ b/components/case/summary.js
@@ -121,23 +121,28 @@ const CaseSummary = (props) => {
] || "not entered"}
- {_.has(detailsObj, "pinswg_agentcontactname") ? (
-
-
- {t("case:summary-agent-label")}
-
-
- {_.has(
- detailsObj,
- "pinswg_agentcontactname"
- )
- ? detailsObj.pinswg_agentcontactname
- : ""}
-
-
- ) : (
- ""
- )}
+
+ {detailsObj.pinswg_agentcontactname != null &&
+ (_.has(
+ detailsObj,
+ "pinswg_agentcontactname"
+ ) ? (
+
+
+ {t("case:summary-agent-label")}
+
+
+ {_.has(
+ detailsObj,
+ "pinswg_agentcontactname"
+ )
+ ? detailsObj.pinswg_agentcontactname
+ : ""}
+
+
+ ) : (
+ ""
+ ))}
{t("case:summary-site-address-label")}
@@ -235,7 +240,7 @@ const CaseSummary = (props) => {
-
Not details currently held
+ {t("case:summary-no-details-label")}
diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js
index 81ff0802..b27dc1be 100644
--- a/components/case/summaryTypes/pinswg_dnsid.js
+++ b/components/case/summaryTypes/pinswg_dnsid.js
@@ -248,43 +248,46 @@ const Pinswg_dnsid = (props) => {
: detailsObj.pinswg_recommendation}
-
-
- {t(
- "case:summary-case-website-label"
- )}
-
-
- {router.locale == "cy"
- ? jsonpath.query(
- transLookup,
- '$..[?(@.value=="' +
- detailsObj.pinswg_webaddress +
- '")].value_cy'
- )
- : (
-
- {
- detailsObj.pinswg_webaddress
- }
-
- ) ||
- t(
- "case:summary-no-date-entered-label"
- )}
-
-
+
+ {detailsObj.pinswg_webaddress != null && (
+
+
+ {t(
+ "case:summary-case-website-label"
+ )}
+
+
+ {router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ detailsObj.pinswg_webaddress +
+ '")].value_cy'
+ )
+ : (
+
+ {
+ detailsObj.pinswg_webaddress
+ }
+
+ ) ||
+ t(
+ "case:summary-no-date-entered-label"
+ )}
+
+
+ )}
diff --git a/components/case/summaryTypes/pinswg_electricityactid.js b/components/case/summaryTypes/pinswg_electricityactid.js
index f2446653..8ae9f2a7 100644
--- a/components/case/summaryTypes/pinswg_electricityactid.js
+++ b/components/case/summaryTypes/pinswg_electricityactid.js
@@ -250,26 +250,28 @@ const Pinswg_electricityactid = (props) => {
)}
-
-
- {t(
- "case:summary-case-website-label"
- )}
-
-
- {router.locale == "cy"
- ? jsonpath.query(
- transLookup,
- '$..[?(@.value=="' +
- detailsObj.pinswg_webaddress +
- '")].value_cy'
- )
- : detailsObj.pinswg_webaddress ||
- t(
- "case:summary-no-date-entered-label"
- )}
-
-
+ {detailsObj.pinswg_webaddress != null && (
+
+
+ {t(
+ "case:summary-case-website-label"
+ )}
+
+
+ {router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ detailsObj.pinswg_webaddress +
+ '")].value_cy'
+ )
+ : detailsObj.pinswg_webaddress ||
+ t(
+ "case:summary-no-date-entered-label"
+ )}
+
+
+ )}
diff --git a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js
index e36f366f..3e963283 100644
--- a/components/case/summaryTypes/pinswg_harbourrevisionorderid.js
+++ b/components/case/summaryTypes/pinswg_harbourrevisionorderid.js
@@ -250,26 +250,28 @@ const Pinswg_harbourrevisionorderid = (props) => {
)}
-
-
- {t(
- "case:summary-case-website-label"
- )}
-
-
- {router.locale == "cy"
- ? jsonpath.query(
- transLookup,
- '$..[?(@.value=="' +
- detailsObj.pinswg_webaddress +
- '")].value_cy'
- )
- : detailsObj.pinswg_webaddress ||
- t(
- "case:summary-no-date-entered-label"
- )}
-
-
+ {detailsObj.pinswg_webaddress != null && (
+
+
+ {t(
+ "case:summary-case-website-label"
+ )}
+
+
+ {router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ detailsObj.pinswg_webaddress +
+ '")].value_cy'
+ )
+ : detailsObj.pinswg_webaddress ||
+ t(
+ "case:summary-no-date-entered-label"
+ )}
+
+
+ )}
diff --git a/components/case/summaryTypes/pinswg_transportandworkactid.js b/components/case/summaryTypes/pinswg_transportandworkactid.js
index 346b38a4..0f38e6e1 100644
--- a/components/case/summaryTypes/pinswg_transportandworkactid.js
+++ b/components/case/summaryTypes/pinswg_transportandworkactid.js
@@ -102,26 +102,28 @@ const Pinswg_transportandworkactid = (props) => {
)}
-
-
- {t(
- "case:summary-case-website-label"
- )}
-
-
- {router.locale == "cy"
- ? jsonpath.query(
- transLookup,
- '$..[?(@.value=="' +
- detailsObj.pinswg_webaddress +
- '")].value_cy'
- )
- : detailsObj.pinswg_webaddress ||
- t(
- "case:summary-no-date-entered-label"
- )}
-
-
+ {detailsObj.pinswg_webaddress != null && (
+
+
+ {t(
+ "case:summary-case-website-label"
+ )}
+
+
+ {router.locale == "cy"
+ ? jsonpath.query(
+ transLookup,
+ '$..[?(@.value=="' +
+ detailsObj.pinswg_webaddress +
+ '")].value_cy'
+ )
+ : detailsObj.pinswg_webaddress ||
+ t(
+ "case:summary-no-date-entered-label"
+ )}
+
+
+ )}
diff --git a/locales/cy/case.json b/locales/cy/case.json
index 857780ba..0c27af6d 100644
--- a/locales/cy/case.json
+++ b/locales/cy/case.json
@@ -63,5 +63,7 @@
"summary-withdrawn-date": "Dyddiad tynnu'n ôl",
"summary-written-acceptance-of-notice": "Derbyniad ysgrifenedig o rybudd",
"summary-case-website-label": "Gwefan",
- "summary-case-recommendation-label": "Argymhelliad"
+ "summary-case-recommendation-label": "Argymhelliad",
+ "summary-no-details-label": "Nid oes unrhyw fanylion ar gael ar hyn o bryd",
+ "summary-case-relevant-authoritylabel": "Awdurdod perthnasol"
}
\ No newline at end of file
diff --git a/locales/en/case.json b/locales/en/case.json
index bf936078..10bb81b8 100644
--- a/locales/en/case.json
+++ b/locales/en/case.json
@@ -63,5 +63,7 @@
"summary-withdrawn-date": "Withdrawn Date",
"summary-written-acceptance-of-notice": "Written Acceptance of Notice",
"summary-case-website-label": "Website",
- "summary-case-recommendation-label": "Recommendation"
+ "summary-case-recommendation-label": "Recommendation",
+ "summary-no-details-label": "No details currently held",
+ "summary-case-relevant-authoritylabel": "Relevant authority"
}
\ No newline at end of file