@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,43 +24,30 @@ const Pinswg_advertsid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={"Specialist Case Process"}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
label={t(
|
||||
"case:summary-specialist-case-process-label"
|
||||
)}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_speacialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
@@ -80,79 +67,51 @@ const Pinswg_advertsid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
@@ -160,23 +119,16 @@ const Pinswg_advertsid = (props) => {
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
@@ -193,7 +145,9 @@ const Pinswg_advertsid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -257,7 +211,10 @@ const Pinswg_advertsid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_callinss77id = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_callinss77id = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_callinss77id = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -234,7 +188,10 @@ const Pinswg_callinss77id = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -247,31 +204,6 @@ const Pinswg_callinss77id = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-date-exported-to-iss-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_dateexportedtoiss"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateexportedtoiss
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateexportedtoiss
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-statement-due-date-label")}
|
||||
@@ -328,7 +260,10 @@ const Pinswg_callinss77id = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -341,31 +276,7 @@ const Pinswg_callinss77id = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_commonlandid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_commonlandid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_commonlandid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -203,26 +157,14 @@ const Pinswg_commonlandid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-relevant-authoritylabel"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}) ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_relevantauthorityname"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
</dl>
|
||||
</SummaryCard>
|
||||
@@ -260,7 +202,10 @@ const Pinswg_commonlandid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -331,7 +276,10 @@ const Pinswg_commonlandid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -344,31 +292,7 @@ const Pinswg_commonlandid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -269,7 +223,10 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
@@ -23,131 +22,81 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -190,26 +139,12 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-relevant-authoritylabel"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}) ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_relevantauthorityname,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
</dl>
|
||||
</SummaryCard>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -96,25 +97,16 @@ const Pinswg_dnsid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-type-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
{detailsObj.pinswg_webaddress != null && (
|
||||
@@ -175,23 +167,16 @@ const Pinswg_dnsid = (props) => {
|
||||
label={t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t(
|
||||
@@ -200,77 +185,34 @@ const Pinswg_dnsid = (props) => {
|
||||
value={
|
||||
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[
|
||||
? resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({path:
|
||||
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',transLookup
|
||||
)
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-case-officer-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""
|
||||
}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t(
|
||||
"case:summary-type-of-event-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t(
|
||||
@@ -324,31 +266,21 @@ const Pinswg_dnsid = (props) => {
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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[
|
||||
? resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
<SummaryRow
|
||||
@@ -416,22 +348,6 @@ const Pinswg_dnsid = (props) => {
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-case-recommendation-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj.pinswg_recommendation +
|
||||
'")].value_cy',
|
||||
transLookup,
|
||||
|
||||
)
|
||||
: detailsObj.pinswg_recommendation
|
||||
}
|
||||
/> */}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -443,29 +359,6 @@ const Pinswg_dnsid = (props) => {
|
||||
{t("case:summary-dates-label")}
|
||||
</h3>
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||
)}
|
||||
value={
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
<SummaryRow
|
||||
label={t(
|
||||
"case:summary-written-acceptance-of-notice"
|
||||
@@ -767,27 +660,7 @@ const Pinswg_dnsid = (props) => {
|
||||
)
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t("case:summary-suspension-dates")}
|
||||
value={
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_suspensiondates"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_suspensiondates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensiondates
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t(
|
||||
"case:summary-inspector-report-submission-to-welsh-government"
|
||||
|
||||
@@ -3,6 +3,7 @@ import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -67,25 +68,16 @@ const Pinswg_electricityactid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-type-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -106,23 +98,16 @@ const Pinswg_electricityactid = (props) => {
|
||||
label={t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
@@ -131,9 +116,6 @@ const Pinswg_electricityactid = (props) => {
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{hasOwn(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -145,96 +127,56 @@ const Pinswg_electricityactid = (props) => {
|
||||
label={t(
|
||||
"case:summary-procedure-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t(
|
||||
"case:summary-type-of-event-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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-date-entered-label"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -283,21 +225,16 @@ const Pinswg_electricityactid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-recommendation-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj.pinswg_recommendation +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj.pinswg_recommendation ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_recommendation"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
{detailsObj.pinswg_webaddress != null && (
|
||||
<SummaryRow
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -235,7 +189,10 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -306,7 +263,10 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -319,31 +279,7 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -235,7 +189,10 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -306,7 +263,10 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -319,27 +279,7 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_environmentalpermittingid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_environmentalpermittingid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_environmentalpermittingid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -203,26 +157,12 @@ const Pinswg_environmentalpermittingid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-relevant-authoritylabel"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}) ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_relevantauthorityname,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
</dl>
|
||||
</SummaryCard>
|
||||
@@ -260,7 +200,10 @@ const Pinswg_environmentalpermittingid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -331,7 +274,10 @@ const Pinswg_environmentalpermittingid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
|
||||
@@ -7,6 +7,7 @@ import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
import { hasOwn } from "../../utils";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const Pinswg_harbourrevisionorderid = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -67,25 +68,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-type-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -106,23 +98,16 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
||||
label={t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
@@ -131,9 +116,6 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{hasOwn(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -145,75 +127,43 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
||||
label={t(
|
||||
"case:summary-procedure-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -262,21 +212,14 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-recommendation-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj.pinswg_recommendation +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj.pinswg_recommendation ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_recommendation,
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
{detailsObj.pinswg_webaddress != null && (
|
||||
<SummaryRow
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,43 +24,30 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={"Specialist Case Process"}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
label={t(
|
||||
"case:summary-specialist-case-process-label"
|
||||
)}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
@@ -80,110 +67,69 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -192,7 +138,9 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -224,26 +172,12 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-relevant-authoritylabel"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}) ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_relevantauthorityname,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
</dl>
|
||||
</SummaryCard>
|
||||
@@ -281,7 +215,10 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -352,7 +289,10 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -365,27 +305,7 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_householderappealhasid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,91 +52,58 @@ const Pinswg_householderappealhasid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -152,7 +112,9 @@ const Pinswg_householderappealhasid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -216,7 +178,10 @@ const Pinswg_householderappealhasid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,67 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +121,9 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -235,7 +187,10 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -306,7 +261,10 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -319,27 +277,7 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_ldpid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -60,92 +53,56 @@ const Pinswg_ldpid = (props) => {
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -154,7 +111,9 @@ const Pinswg_ldpid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -218,7 +177,10 @@ const Pinswg_ldpid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -289,7 +251,10 @@ const Pinswg_ldpid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -302,27 +267,7 @@ const Pinswg_ldpid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -235,7 +189,10 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -306,7 +263,10 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -319,27 +279,7 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -235,7 +189,10 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -306,7 +263,10 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -203,26 +157,12 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-relevant-authoritylabel"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}) ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_relevantauthorityname,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
</dl>
|
||||
</SummaryCard>
|
||||
@@ -260,7 +200,10 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -331,7 +274,10 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_nonvalidationid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -60,54 +53,34 @@ const Pinswg_nonvalidationid = (props) => {
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decisionissued@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import pickListLookup from "../../../data/picklistLookups.json";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import {
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
getCaseLpaDisplayLines
|
||||
} from "../../utils/getCaseLpaDisplayValue";
|
||||
import { hasOwn } from "../../utils";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const Pinswg_planningappeals78id = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -27,23 +28,16 @@ const Pinswg_planningappeals78id = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -60,115 +54,73 @@ const Pinswg_planningappeals78id = (props) => {
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: pickListLookup
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_dicision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
</dd>
|
||||
</div>
|
||||
<SummaryRow
|
||||
@@ -295,43 +247,6 @@ const Pinswg_planningappeals78id = (props) => {
|
||||
}
|
||||
/>
|
||||
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-interested-party-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_otherpartiesstatement"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_otherpartiesstatement
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_otherpartiesstatement
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_otherpartiesstatements"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_otherpartiesstatements
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_otherpartiesstatements
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-final-comments-date-label")}
|
||||
value={
|
||||
@@ -351,50 +266,6 @@ const Pinswg_planningappeals78id = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
{/* <SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_dateeventrequested"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -235,7 +189,10 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -306,7 +263,10 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -319,29 +279,7 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -235,7 +189,10 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -306,7 +263,10 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
@@ -7,6 +6,7 @@ import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
import { hasOwn } from "../../utils";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const Pinswg_rowid = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -24,43 +24,30 @@ const Pinswg_rowid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={"Specialist Case Process"}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
label={t(
|
||||
"case:summary-specialist-case-process-label"
|
||||
)}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
@@ -80,110 +67,67 @@ const Pinswg_rowid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
t("case:summary-no-date-entered-label")
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -192,7 +136,9 @@ const Pinswg_rowid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -224,26 +170,12 @@ const Pinswg_rowid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-relevant-authoritylabel"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}) ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_relevantauthorityname,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
</dl>
|
||||
</SummaryCard>
|
||||
@@ -281,7 +213,10 @@ const Pinswg_rowid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -352,7 +287,10 @@ const Pinswg_rowid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -365,27 +303,7 @@ const Pinswg_rowid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
@@ -3,6 +3,7 @@ import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -69,22 +70,6 @@ const Pinswg_sipscase = (props) => {
|
||||
)[0]
|
||||
: ""}
|
||||
</p>
|
||||
|
||||
{/* <p className="govuk-body">
|
||||
{detailsObj.pinswg_projectlocation != null
|
||||
? detailsObj.pinswg_projectlocation.indexOf(
|
||||
";"
|
||||
) < 0
|
||||
? detailsObj.pinswg_projectlocation
|
||||
: router.locale == "cy"
|
||||
? detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[1]
|
||||
: detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[0]
|
||||
: ""}
|
||||
</p> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,23 +91,16 @@ const Pinswg_sipscase = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-type-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
{projectTypes.length > 0 && (
|
||||
@@ -200,12 +178,7 @@ const Pinswg_sipscase = (props) => {
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
Project Type
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value"></dd>
|
||||
</div> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
value={
|
||||
@@ -228,18 +201,16 @@ const Pinswg_sipscase = (props) => {
|
||||
value={
|
||||
detailsObj.pinswg_choiceofprocedure !==
|
||||
null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
? resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
@@ -250,18 +221,16 @@ const Pinswg_sipscase = (props) => {
|
||||
value={
|
||||
detailsObj.pinswg_essubmitted !==
|
||||
null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_essubmitted@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
? resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_essubmitted@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
@@ -274,157 +243,41 @@ const Pinswg_sipscase = (props) => {
|
||||
value={
|
||||
detailsObj.pinswg_deemedmarinelicenseappliedfor !==
|
||||
null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
? resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_deemedmarinelicenseappliedfor@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
|
||||
'$..[?(@.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',transLookup
|
||||
)
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
/> */}
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-case-officer-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""
|
||||
}
|
||||
/> */}
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-type-of-event-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
/>
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-start-event-date-label"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_startdateofevent"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_startdateofevent
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_startdateofevent
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
<SummaryRow
|
||||
|
||||
label={t("case:summary-event-date-label")}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_dateeventrequested"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
)
|
||||
: t(
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
|
||||
}
|
||||
/>
|
||||
|
||||
/> */}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{detailsObj.pinswg_decision !== null
|
||||
? router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
? resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
<SummaryRow
|
||||
@@ -492,22 +345,6 @@ const Pinswg_sipscase = (props) => {
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-case-recommendation-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj.pinswg_recommendation +
|
||||
'")].value_cy',
|
||||
transLookup,
|
||||
|
||||
)
|
||||
: detailsObj.pinswg_recommendation
|
||||
}
|
||||
/> */}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -925,671 +762,6 @@ const Pinswg_sipscase = (props) => {
|
||||
</dl>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* <div>
|
||||
<h4 className="govuk-heading-s ">
|
||||
EIA Screening
|
||||
</h4>
|
||||
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
|
||||
label={"Screening start date"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_screeningstartdate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_screeningstartdate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_screeningstartdate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
<SummaryRow
|
||||
|
||||
label={"EIA target date"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_eiatargetdate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_eiatargetdate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_eiatargetdate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
|
||||
{hasValidKey(
|
||||
detailsObj,
|
||||
"pinswg_targetextended"
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={"Target Extended"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_targetextended"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_targetextended
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_targetextended
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
<SummaryRow
|
||||
|
||||
label={"Direction Issued Date"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_directionissueddate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_directionissueddate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_directionissueddate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
|
||||
{hasValidKey(
|
||||
detailsObj,
|
||||
"pinswg_eiarequired"
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_eiarequired"
|
||||
)
|
||||
? detailsObj.pinswg_eiarequired
|
||||
? router.locale ==
|
||||
"cy"
|
||||
? "Ie"
|
||||
: "Yes"
|
||||
: router.locale ==
|
||||
"cy"
|
||||
? "Na"
|
||||
: "No"
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
</dl>
|
||||
</div> */}
|
||||
{/* <div>
|
||||
<h4 className="govuk-heading-s ">
|
||||
EIA Scoping
|
||||
</h4>
|
||||
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
|
||||
label={"Scoping Start Date"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_scopingstartdate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_scopingstartdate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_scopingstartdate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
<SummaryRow
|
||||
|
||||
label={"Scoping Target Date"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_scopingtargetdate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_scopingtargetdate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_scopingtargetdate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
{hasValidKey(
|
||||
detailsObj,
|
||||
"pinswg_scopingtargetextended"
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={"Scoping Target Extended"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_scopingtargetextended"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_scopingtargetextended
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_scopingtargetextended
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
<SummaryRow
|
||||
|
||||
label={"Scoping Outcome Issued Date"}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_scopingoutcomeissueddate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_scopingoutcomeissueddate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_scopingoutcomeissueddate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
</dl>
|
||||
</div> */}
|
||||
{/* <dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-date-of-submission-of-application"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_dateofsubmissionofapplication"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateofsubmissionofapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateofsubmissionofapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_applicationacceptedasvalid"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-application-accepted-as-valid"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_applicationacceptedasvalid
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_applicationacceptedasvalid
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_applicationrejectedasinvalid"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-application-rejected-as-invalid"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-end-of-representation-period"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_endofrepresentationperiod"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_dateofrequesttovarytheapplication"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-date-of-request-to-vary"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_confirmrequesttovaryapplication"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
) &&
|
||||
(hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_rejectrequesttovaryapplication"
|
||||
) &&
|
||||
_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
) ? (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-confirm-request-to-vary-application"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
) : (
|
||||
""
|
||||
))}
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_rejectrequesttovaryapplication"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
) &&
|
||||
(hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_confirmrequesttovaryapplication"
|
||||
) &&
|
||||
_.isEmpty(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
) ? (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-reject-request-to-vary-application"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
) : (
|
||||
""
|
||||
))}
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_suspensionstartdates"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-suspension-start-dates"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
|
||||
<SummaryRow
|
||||
|
||||
|
||||
label={t(
|
||||
"case:summary-suspension-end-dates"
|
||||
)}
|
||||
|
||||
|
||||
value={
|
||||
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_suspensionenddates"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/>
|
||||
<SummaryRow
|
||||
|
||||
label={t("case:summary-report-due-by")}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_reportdueby"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_reportdueby
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_reportdueby
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
<SummaryRow
|
||||
|
||||
label={t("case:summary-suspension-dates")}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_suspensiondates"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_suspensiondates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensiondates
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-inspector-report-submission-to-welsh-government"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_withdrawndate"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_withdrawndate
|
||||
) && (
|
||||
<SummaryRow
|
||||
|
||||
label={t(
|
||||
"case:summary-withdrawn-date"
|
||||
)}
|
||||
|
||||
value={
|
||||
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_withdrawndate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_withdrawndate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
/>
|
||||
)}
|
||||
</dl> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -66,68 +66,43 @@ const Pinswg_transportandworkactid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-type-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
|
||||
<SummaryRow
|
||||
label={t(
|
||||
"case:summary-case-recommendation-label"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj.pinswg_recommendation +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj.pinswg_recommendation ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_recommendation,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
{detailsObj.pinswg_webaddress != null && (
|
||||
<SummaryRow
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import SummaryCard from "../summary/components/SummaryCard";
|
||||
import SummaryRow from "../summary/components/SummaryRow";
|
||||
import { getCaseLpaDisplayLines } from "../../utils/getCaseLpaDisplayValue";
|
||||
@@ -24,23 +24,16 @@ const Pinswg_wayleaveid = (props) => {
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<SummaryRow
|
||||
label={t("case:summary-case-type-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-lpa-label")}
|
||||
@@ -59,110 +52,69 @@ const Pinswg_wayleaveid = (props) => {
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-eia-required-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-to-be-confirmed-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-procedure-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_procedure@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-type-of-event-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
<SummaryRow
|
||||
label={t("case:summary-status-label")}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: casesObj[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
})}
|
||||
/>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-decision-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{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"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
})}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
@@ -171,7 +123,9 @@ const Pinswg_wayleaveid = (props) => {
|
||||
{t("case:summary-case-link-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{hasOwn(casesObj, ["numberofchildincidents"])
|
||||
{hasOwn(casesObj, [
|
||||
"numberofchildincidents"
|
||||
])
|
||||
? casesObj.numberofchildincidents > 0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
@@ -203,26 +157,12 @@ const Pinswg_wayleaveid = (props) => {
|
||||
label={t(
|
||||
"case:summary-case-relevant-authoritylabel"
|
||||
)}
|
||||
value={
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.pinswg_lpa=="' +
|
||||
detailsObj.pinswg_relevantauthorityname +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}) ||
|
||||
t("case:summary-no-date-entered-label")
|
||||
}
|
||||
value={resolveCrmDisplayValue({
|
||||
value: detailsObj.pinswg_relevantauthorityname,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: ""
|
||||
})}
|
||||
/>
|
||||
</dl>
|
||||
</SummaryCard>
|
||||
@@ -260,7 +200,10 @@ const Pinswg_wayleaveid = (props) => {
|
||||
"case:summary-questionnaire-due-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_questionnaireduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_questionnaireduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_questionnaireduedate
|
||||
)
|
||||
@@ -331,7 +274,10 @@ const Pinswg_wayleaveid = (props) => {
|
||||
"case:summary-applicant-final-comments-date-label"
|
||||
)}
|
||||
value={
|
||||
hasOwn(detailsObj, "pinswg_finalcommentsduedate")
|
||||
hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_finalcommentsduedate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_finalcommentsduedate
|
||||
)
|
||||
@@ -344,27 +290,7 @@ const Pinswg_wayleaveid = (props) => {
|
||||
: t("case:summary-no-date-entered-label")
|
||||
}
|
||||
/>
|
||||
{/* <SummaryRow
|
||||
label={t(
|
||||
"case:summary-inquiry-evidence-date-label"
|
||||
)}
|
||||
value={hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_proofsofevidencewrittenstatementsofeviden"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_proofsofevidencewrittenstatementsofeviden
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
/> */}
|
||||
|
||||
<SummaryRow
|
||||
label={t("case:summary-event-date-label")}
|
||||
value={
|
||||
|
||||
Reference in New Issue
Block a user