added in welsh translations for crm values
This commit is contained in:
+114
-48
@@ -3,6 +3,7 @@ import { useRouter } from "next/router";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import jsonpath from "jsonpath";
|
||||
import _ from "lodash";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
|
||||
const CaseSummary = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -72,16 +73,23 @@ const CaseSummary = (props) => {
|
||||
] || "not entered"}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-agent-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(detailsObj, "pinswg_agentcontactname")
|
||||
? detailsObj.pinswg_agentcontactname
|
||||
: ""}
|
||||
</dd>
|
||||
</div>
|
||||
{_.has(detailsObj, "pinswg_agentcontactname") ? (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-agent-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_agentcontactname"
|
||||
)
|
||||
? detailsObj.pinswg_agentcontactname
|
||||
: ""}
|
||||
</dd>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-site-address-label")}
|
||||
@@ -91,19 +99,19 @@ const CaseSummary = (props) => {
|
||||
? detailsObj.pinswg_siteaddressline1
|
||||
: ""}
|
||||
<br />
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
{_.has(detailsObj, "pinswg_siteaddressline2")
|
||||
? detailsObj.pinswg_siteaddressline2
|
||||
: ""}
|
||||
<br />
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||
? detailsObj.pinswg_siteaddresstown
|
||||
: ""}
|
||||
<br />
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||
? detailsObj.pinswg_siteaddresscounty
|
||||
: ""}
|
||||
<br />
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
{_.has(detailsObj, "pinswg_siteaddresspostcode")
|
||||
? detailsObj.pinswg_siteaddresspostcode
|
||||
: ""}
|
||||
</dd>
|
||||
@@ -151,9 +159,21 @@ const CaseSummary = (props) => {
|
||||
{t("case:summary-case-type-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy'
|
||||
)
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
@@ -161,16 +181,21 @@ const CaseSummary = (props) => {
|
||||
{t("case:summary-lpa-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(detailsObj, [
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? detailsObj[
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy'
|
||||
)
|
||||
: detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-case-summary-label"
|
||||
@@ -184,7 +209,7 @@ const CaseSummary = (props) => {
|
||||
? detailsObj.pinswg_casedescription
|
||||
: ""}
|
||||
</dd>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
@@ -208,13 +233,18 @@ const CaseSummary = (props) => {
|
||||
{t("case:summary-procedure-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(detailsObj, [
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? detailsObj[
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy'
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
@@ -222,9 +252,21 @@ const CaseSummary = (props) => {
|
||||
{t("case:summary-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy'
|
||||
)
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
@@ -232,13 +274,21 @@ const CaseSummary = (props) => {
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(detailsObj, [
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? detailsObj[
|
||||
{router.locale == "cy"
|
||||
? jsonpath.query(
|
||||
transLookup,
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy'
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
@@ -301,7 +351,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_startdate@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -319,7 +371,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_questionnaireduedate@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -337,7 +391,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_statementduedate@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -355,7 +411,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_otherpartiesstatement@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -373,7 +431,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_finalcommentsduedate@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -391,7 +451,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_finalcommentsduedate@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -407,7 +469,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_dateeventrequested@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -425,7 +489,9 @@ const CaseSummary = (props) => {
|
||||
? detailsObj[
|
||||
"pinswg_dateoflpadecision@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: "N/A"}
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
Reference in New Issue
Block a user