@@ -6,6 +6,7 @@ import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import PaginationControl from "../../../components/search/pagination";
|
||||
import { connect } from "react-redux";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
|
||||
import {
|
||||
setSearchResults,
|
||||
@@ -15,6 +16,7 @@ import {
|
||||
import { getDetailsProxy, getSearchDetailsPaged, hasOwn } from "../../utils";
|
||||
import { getAdvancedSearchPaged } from "../../../actions/services/searchService";
|
||||
import { getNewAppealsPage } from "../../../actions/services/adminService";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import {
|
||||
setCurrentPage,
|
||||
setCurrentReference
|
||||
@@ -416,20 +418,14 @@ function AppealsTab(props) {
|
||||
{hasOwn(item, [
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
? resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: ""}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
@@ -439,20 +435,14 @@ function AppealsTab(props) {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
@@ -462,20 +452,14 @@ function AppealsTab(props) {
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
{item[
|
||||
|
||||
@@ -21,6 +21,8 @@ import { getNewDocumentsPaged } from "../../../actions/services/adminService";
|
||||
import { setCurrentPage } from "../../../store/currentView/action";
|
||||
|
||||
import { setDocumentDetails } from "../../../store/searchOutput/action";
|
||||
import resolveCrmDisplayValue from "../../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const getDocumentTypes = [
|
||||
{
|
||||
"Value": 846040009,
|
||||
@@ -397,19 +399,11 @@ const DocumentsTab = (props) => {
|
||||
className="govuk-label-s govuk-checkboxes__label"
|
||||
htmlFor={item.Value}
|
||||
>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item.Label +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item.Label ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}{" "}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item.Label,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
@@ -470,19 +464,11 @@ const DocumentsTab = (props) => {
|
||||
className="govuk-label-s govuk-checkboxes__label"
|
||||
htmlFor={"origin_" + item.Value}
|
||||
>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item.Label +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item.Label ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}{" "}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item.Label,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
@@ -822,23 +808,16 @@ const DocumentsTab = (props) => {
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue(
|
||||
{
|
||||
value: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations:
|
||||
transLookup
|
||||
}
|
||||
)}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14">
|
||||
<span className="results-visually-hidden">
|
||||
|
||||
@@ -37,7 +37,7 @@ export async function fetchAdminStorageData() {
|
||||
const limit = pLimit(5);
|
||||
let data = await Promise.all(
|
||||
users.map(async (user) => {
|
||||
limit(async () => {
|
||||
return limit(async () => {
|
||||
const containers = await listContainersForUser(
|
||||
blobServiceClient,
|
||||
`${user.id}`,
|
||||
|
||||
@@ -46,14 +46,6 @@ const Case = (props) => {
|
||||
mediaObj={props.mediaObj}
|
||||
mapTarget={props.mapTarget}
|
||||
/>
|
||||
{showRepresentations == true && (
|
||||
<RepresentationList
|
||||
incidentid={props.incidentid}
|
||||
caseReference={props.caseReference}
|
||||
representationsObj={props.representationsObj}
|
||||
documentDetailsObj={props.documentDetailsObj}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
+14
-380
@@ -19,6 +19,7 @@ import { setCurrentPage } from "../../store/currentView/action";
|
||||
import { setDocumentDetails } from "../../store/searchOutput/action";
|
||||
import DocumentLink from "../utils/downloads";
|
||||
import { useDownloadQueue } from "../utils/downloadmanager";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const DocumentDetails = (props) => {
|
||||
let { t, lang } = useTranslation();
|
||||
@@ -92,352 +93,6 @@ const DocumentDetails = (props) => {
|
||||
};
|
||||
let ShowDocLinks = getDocLink(docsOffline);
|
||||
|
||||
const DocumentView = (documentDetailsArr) => {
|
||||
documentDetailsArr = documentDetailsArr.value;
|
||||
|
||||
return (
|
||||
<>
|
||||
<p>
|
||||
{documentDetailsObj["@odata.count"] > 1
|
||||
? t("case:documents-count-label-1")
|
||||
: t("case:documents-count-label-1a")}{" "}
|
||||
{documentDetailsObj["@odata.count"]}{" "}
|
||||
{documentDetailsObj["@odata.count"] > 1
|
||||
? t("case:documents-count-label-2")
|
||||
: t("case:documents-count-label-2a")}
|
||||
</p>
|
||||
<div className="documentFilters govuk-!-margin-top-5">
|
||||
<div
|
||||
id="recordDocumentTypeSelect"
|
||||
className="govuk-grid-row govuk-!-margin-left-0"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label-s "
|
||||
htmlFor="showDocumentType"
|
||||
>
|
||||
{t("case:documents-show-label")}
|
||||
<select
|
||||
onChange={(e) => {
|
||||
setSelectedDocumentType(e.target.value);
|
||||
setCurrentPage(1);
|
||||
}}
|
||||
value={selectedDocumentType}
|
||||
className="govuk-select"
|
||||
id="showDocumentType"
|
||||
name="showDocumentType"
|
||||
>
|
||||
<option value="all" key="00">
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path: '$..[?(@ && @.value=="All")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: "All"}
|
||||
</option>
|
||||
{documentTypes.map((item, key) => {
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={
|
||||
item.pinswg_isharedocumentlocations
|
||||
}
|
||||
>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item.pinswg_isharedocumentlocationsLabel +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item.pinswg_isharedocumentlocationsLabel ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
{t("case:documents-count-label-2")}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{documentDetailsObj["@odata.count"] > 5 && (
|
||||
<div
|
||||
id="recordCountSelect"
|
||||
className="govuk-grid-row govuk-!-margin-left-0"
|
||||
>
|
||||
<div className="govuk-form-group">
|
||||
<label
|
||||
className="govuk-label-s "
|
||||
htmlFor="showNumberOfRecords"
|
||||
>
|
||||
{t(
|
||||
"search:searchresults-show-records-label-a"
|
||||
)}
|
||||
<select
|
||||
onChange={(e) => {
|
||||
setSelectedOption(e.target.value);
|
||||
setCurrentPage(1);
|
||||
}}
|
||||
value={selectedOption}
|
||||
className="govuk-select"
|
||||
id="showNumberOfRecords"
|
||||
name="showNumberOfRecords"
|
||||
>
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="20">20</option>
|
||||
<option value="30">30</option>
|
||||
<option value="50">50</option>
|
||||
</select>{" "}
|
||||
{t(
|
||||
"search:searchresults-show-records-label-b"
|
||||
)}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{ShowDocLinks && (
|
||||
<div className="govuk-warning-text ">
|
||||
<span
|
||||
className="govuk-warning-text__icon"
|
||||
aria-hidden="true"
|
||||
>
|
||||
!
|
||||
</span>
|
||||
<strong className="govuk-warning-text__text govuk-!-margin-top-2">
|
||||
<span className="govuk-visually-hidden">
|
||||
Notice
|
||||
</span>
|
||||
|
||||
{t("case:documents-not-available-label")}
|
||||
</strong>
|
||||
</div>
|
||||
)}
|
||||
<dl className="documentList govuk-summary-list govuk-!-margin-bottom-9 results">
|
||||
<div className="govuk-summary-list__row results-headings">
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16 ">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => sortDataBy("pinswg_name")}
|
||||
className={
|
||||
orderByState == "pinswg_name"
|
||||
? fieldSortState == "asc"
|
||||
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16`
|
||||
}
|
||||
>
|
||||
{t("case:documents-name-label")}
|
||||
</button>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
{/* {t("case:documents-doc-type-label")} */}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() =>
|
||||
sortDataBy("pinswg_isharedocumentlocations")
|
||||
}
|
||||
className={
|
||||
orderByState ==
|
||||
"pinswg_isharedocumentlocations"
|
||||
? fieldSortState == "asc"
|
||||
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16`
|
||||
}
|
||||
>
|
||||
{t("case:documents-doc-type-label")}
|
||||
</button>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
{/* {t("case:documents-date-published-label")} */}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => sortDataBy("createdon")}
|
||||
className={
|
||||
orderByState == "createdon"
|
||||
? fieldSortState == "asc"
|
||||
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16`
|
||||
}
|
||||
>
|
||||
{t("case:documents-date-published-label")}
|
||||
</button>
|
||||
</dd>
|
||||
{/* <dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
{t("case:documents-size-label")}
|
||||
</dd> */}
|
||||
</div>
|
||||
{showSpinnerState == true ? (
|
||||
<div className="govuk-summary-list__row">
|
||||
<div className="govuk-!-margin-top-4 govuk-!-margin-bottom-4 govuk-!-font-weight-bold govuk-!-font-size-20 ">
|
||||
{t("common:spinner-fetching-data")}
|
||||
<img
|
||||
className="data-loading-icon"
|
||||
src="/assets/images/loading.gif"
|
||||
alt={
|
||||
router.locale == "cy"
|
||||
? "Nôl data"
|
||||
: "Fetching data"
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
documentDetailsArr.map((item, key) => {
|
||||
let detailsObj = jsonpath({
|
||||
path:
|
||||
"$..[?(@ && @._pinswg_documentids_value=='" +
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
sanbox: {}
|
||||
});
|
||||
detailsObj = item;
|
||||
return (
|
||||
<div
|
||||
className="govuk-summary-list__row"
|
||||
key={key}
|
||||
>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
||||
{showDownloadingState === key && (
|
||||
<div className="coverLoadingLink downloading">
|
||||
{/* <img
|
||||
className="data-loading-icon"
|
||||
src="/assets/images/loading.gif"
|
||||
alt={
|
||||
router.locale ==
|
||||
"cy"
|
||||
? "Nôl data"
|
||||
: "Fetching data"
|
||||
}
|
||||
/> */}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!ShowDocLinks ? (
|
||||
<Link
|
||||
scroll={false}
|
||||
href={
|
||||
detailsObj.pinswg_hashlink
|
||||
}
|
||||
key={key}
|
||||
onClick={() => {
|
||||
(toggleDownLoadLink(key),
|
||||
sendGAEvent(
|
||||
"event",
|
||||
"DownloadedFile",
|
||||
{
|
||||
caseReference:
|
||||
props.caseReference,
|
||||
filename:
|
||||
detailsObj.pinswg_name
|
||||
}
|
||||
));
|
||||
}}
|
||||
>
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"case:documents-name-label"
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_name"
|
||||
)
|
||||
? detailsObj.pinswg_name
|
||||
: ""}
|
||||
</Link>
|
||||
) : (
|
||||
<>
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"case:documents-name-label"
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_name"
|
||||
)
|
||||
? detailsObj.pinswg_name
|
||||
: ""}
|
||||
</>
|
||||
)}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{t("case:documents-doc-type-label")}
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"case:documents-date-published-label"
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
|
||||
{hasOwn(
|
||||
detailsObj,
|
||||
"pinswg_latestpublisheddate"
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_latestpublisheddate
|
||||
)
|
||||
: ""}
|
||||
</dd>
|
||||
{/* <dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{t("case:documents-size-label")}:
|
||||
</span>
|
||||
92
|
||||
</dd> */}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
)}
|
||||
</dl>
|
||||
<PaginationControl
|
||||
showNoOfRecords={selectedOption}
|
||||
currentPage={currentPage}
|
||||
searchResultsObj={documentDetailsObj}
|
||||
spinnerState={spinnerState}
|
||||
orderBy={orderByState}
|
||||
fieldSort={fieldSortState}
|
||||
getDocumentResults={getDocumentResults}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const FilteredDocumentView = (documentDetailsArr) => {
|
||||
documentDetailsArr = documentDetailsArr.value;
|
||||
|
||||
@@ -547,19 +202,11 @@ const DocumentDetails = (props) => {
|
||||
item.pinswg_isharedocumentlocations
|
||||
}
|
||||
>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item.pinswg_isharedocumentlocationsLabel +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item.pinswg_isharedocumentlocationsLabel ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}{" "}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item.pinswg_isharedocumentlocationsLabel,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}{" "}
|
||||
- ({item.count})
|
||||
</label>
|
||||
</div>
|
||||
@@ -817,24 +464,13 @@ const DocumentDetails = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
@@ -1047,10 +683,8 @@ const DocumentDetails = (props) => {
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
) : showFilteredDocs == "true" ? (
|
||||
FilteredDocumentView(documentDetailsArr)
|
||||
) : (
|
||||
DocumentView(documentDetailsArr)
|
||||
FilteredDocumentView(documentDetailsArr)
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,23 +88,13 @@ const RepresentationList = (props) => {
|
||||
{t("case:documents-doc-type-label")}:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
sanbox: {}
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
|
||||
@@ -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={
|
||||
|
||||
+10
-79
@@ -13,9 +13,10 @@ import SearchCases from "./myportal/searchcases";
|
||||
import WatchedCases from "./myportal/watchedcases";
|
||||
import MySubmittedReps from "./myportal/mysubmittedrepresentations";
|
||||
import ServiceBanner from "./myportal/servicebanner";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import transLookup from "../data/lookuptranslations.json";
|
||||
import { performPortalSignOut } from "../lib/auth/sessionClient";
|
||||
import resolveCrmDisplayValue from "../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import _ from "lodash";
|
||||
|
||||
const MyPortal = (props) => {
|
||||
const { showFileUpload, showLoginCheck, docsOffline } = props;
|
||||
@@ -38,78 +39,17 @@ const MyPortal = (props) => {
|
||||
return (
|
||||
<>
|
||||
<main className="" id="main-content" role="main">
|
||||
{/* <div className="servicebanner myportal govuk-!-margin-bottom-4">
|
||||
<h1>
|
||||
<img
|
||||
src={
|
||||
router.locale == "cy"
|
||||
? "/assets/images/planning-casework-cy.svg"
|
||||
: "/assets/images/planning-casework-en.svg"
|
||||
}
|
||||
alt={
|
||||
router.locale == "cy"
|
||||
? "Fy mhorth"
|
||||
: "My Portal"
|
||||
}
|
||||
/>
|
||||
</h1>
|
||||
|
||||
<div className="serviceBanner_userDetails">
|
||||
<img
|
||||
className="user_logo"
|
||||
src="/assets/images/user.svg"
|
||||
alt={router.locale == "cy" ? "Defnyddiwr" : "User"}
|
||||
/>{" "}
|
||||
<div className="serviceBanner_userDetails_name">
|
||||
<Link
|
||||
href="/account/personaldetails"
|
||||
className="govuk-button-secondary"
|
||||
>
|
||||
{props.accountDetails.accountDetails.firstname}{" "}
|
||||
{props.accountDetails.accountDetails.lastname}
|
||||
{" - "}
|
||||
{
|
||||
props.accountDetails.accountDetails[
|
||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
</Link>
|
||||
</div>
|
||||
<div>
|
||||
<Link
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? "/allgofnodi"
|
||||
: "/logout"
|
||||
}
|
||||
onClick={() => {
|
||||
handleLogout();
|
||||
}}
|
||||
className="govuk-header__link "
|
||||
>
|
||||
{t("common:signout-label")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
<ServiceBanner props={props} />
|
||||
{isLPA && (
|
||||
<div>
|
||||
<h2 className="heading-small card-heading">
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
props.accountDetails.accountDetails[
|
||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: props.accountDetails.accountDetails[
|
||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||
]}{" "}
|
||||
{resolveCrmDisplayValue({
|
||||
value: props.accountDetails.accountDetails[
|
||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}{" "}
|
||||
{t("myportal:lpa-portal-heading")}
|
||||
</h2>
|
||||
</div>
|
||||
@@ -121,18 +61,9 @@ const MyPortal = (props) => {
|
||||
{!isLPA && (
|
||||
<MakeNewAppeal docsOffline={docsOffline} />
|
||||
)}
|
||||
{/* {props.awaitingSubmission.awaitingSubmission[
|
||||
"@odata.count"
|
||||
] > 0 && (
|
||||
<AwaitingSubmission
|
||||
awaitingSubmission={
|
||||
props.awaitingSubmission
|
||||
}
|
||||
/>
|
||||
)} */}
|
||||
|
||||
{!isLPA &&
|
||||
hasOwnhas(props.awaitingSubmission, [
|
||||
_.has(props.awaitingSubmission, [
|
||||
"awaitingSubmissionFromBlob",
|
||||
"@odata.count"
|
||||
]) &&
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const required = (errorMsg) => (value) =>
|
||||
value || typeof value === "number" ? undefined : errorMsg;
|
||||
@@ -133,22 +133,11 @@ let AdvancedSearch = (props) => {
|
||||
key={key}
|
||||
value={optionsObj[key].accountid}
|
||||
>
|
||||
{/* {optionsObj[key].name} */}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key]
|
||||
.name +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].name ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: optionsObj[key].name,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -234,31 +223,11 @@ let AdvancedSearch = (props) => {
|
||||
.toLowerCase()
|
||||
}
|
||||
>
|
||||
{_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.value
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[
|
||||
key
|
||||
].value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key]
|
||||
.value ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: optionsObj[key].value,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
@@ -18,6 +17,7 @@ import {
|
||||
setCurrentReference,
|
||||
setCurrentView
|
||||
} from "../../store/currentView/action";
|
||||
import { resolveCrmDisplayValue } from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const AwaitingSubmissionFromBlob = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -201,22 +201,14 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
getFormCollectionByID(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
).value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: getFormCollectionByID(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
).value || ""}
|
||||
{resolveCrmDisplayValue({
|
||||
value: getFormCollectionByID(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
).value,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:case-address")}:</b>{" "}
|
||||
@@ -302,20 +294,14 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
{router.locale == "cy" ? "ACLl" : "LPA"}
|
||||
:
|
||||
</b>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"pinswg_lpaname"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"pinswg_lpaname"
|
||||
] || ""}
|
||||
|
||||
{resolveCrmDisplayValue({
|
||||
value: showTopThreeArr[key][
|
||||
"pinswg_lpaname"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:date-raised")}:</b>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import Link from "next/link";
|
||||
@@ -33,6 +32,7 @@ import { planningappeals78_pdf } from "../../components/pdftemplates/planningapp
|
||||
import { other_pdf } from "../../components/pdftemplates/other_pdf";
|
||||
|
||||
import { PDFDownloadLink, pdf } from "@react-pdf/renderer";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const TopThree = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -406,20 +406,13 @@ const TopThree = (props) => {
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:appeal-type-label")}:</b>{" "}
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
{resolveCrmDisplayValue({
|
||||
value: showTopThreeArr[key][
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</div>
|
||||
{/* )} */}
|
||||
{/* {topThreeType != "awaitingSubmission" ? ( */}
|
||||
@@ -484,20 +477,13 @@ const TopThree = (props) => {
|
||||
)}
|
||||
<div className="cardModuleReference">
|
||||
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
{resolveCrmDisplayValue({
|
||||
value: showTopThreeArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</div>
|
||||
{topThreeType == "awaitingSubmission" ? (
|
||||
<div className="carModuleAddress">
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
@@ -34,6 +33,7 @@ import {
|
||||
setWatchedCasesDetails
|
||||
} from "../../store/watchedCases/action";
|
||||
import { getFormCollectionByID, getDetailsProxy } from "../utils";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const TopThree = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -196,19 +196,6 @@ const TopThree = (props) => {
|
||||
<b>{showTopThreeArr[key].pinswg_name}</b>
|
||||
) : (
|
||||
<span
|
||||
// href="#"
|
||||
// href={{
|
||||
// pathname:
|
||||
// router.locale == "cy"
|
||||
// ? "/fymhorth/representation"
|
||||
// : "/myportal/representation",
|
||||
// query: {
|
||||
// case: showTopThreeArr[key].ticketnumber,
|
||||
// state: "edit",
|
||||
// created:
|
||||
// showTopThreeArr[key].repfile_name,
|
||||
// },
|
||||
// }}
|
||||
className="govuk-link--no-underline"
|
||||
style={{
|
||||
color: "#0360a6",
|
||||
@@ -292,54 +279,19 @@ const TopThree = (props) => {
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:representation-type")}:</b>
|
||||
{" "}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
showTopThreeArr[key].representationType +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key].representationType || ""}
|
||||
{resolveCrmDisplayValue({
|
||||
value: showTopThreeArr[key].representationType,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:capacity")}:</b>
|
||||
{" "}
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'" ||@.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'" )].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}).length > 0
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key].representationCapacity}
|
||||
{resolveCrmDisplayValue({
|
||||
value: showTopThreeArr[key].representationCapacity,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:date-raised")}:</b>
|
||||
@@ -348,22 +300,13 @@ const TopThree = (props) => {
|
||||
</div>{" "}
|
||||
<div className="cardModuleReference">
|
||||
<b>{router.locale == "cy" ? "ACLl" : "LPA"}:</b>
|
||||
{" "}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
showTopThreeArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
{resolveCrmDisplayValue({
|
||||
value: showTopThreeArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</div>
|
||||
{showTopThreeArr[key].hasOwnProperty("repComplete") && (
|
||||
<div className="cardModuleReference">
|
||||
|
||||
+80
-140
@@ -46,6 +46,7 @@ import {
|
||||
setMyRepresentations,
|
||||
setMyRepresentationsDetails
|
||||
} from "../../store/myRepresentations/action";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const ViewAllResults = (props) => {
|
||||
const {
|
||||
@@ -493,86 +494,66 @@ const ViewAllResults = (props) => {
|
||||
</span>
|
||||
{isAwaitingSubmissionDetails &&
|
||||
hasOwn(resultItem, "pinswg_lpaname")
|
||||
? router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
resultItem.pinswg_lpaname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: resultItem.pinswg_lpaname || "N/A"
|
||||
? resolveCrmDisplayValue({
|
||||
value: resultItem.pinswg_lpaname,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: ""}
|
||||
{hasOwn(resultItem, [
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
resultItem[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: resultItem[
|
||||
? resolveCrmDisplayValue({
|
||||
value: resultItem[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: ""}
|
||||
{hasOwn(searchDetailsObj[key], [
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
(searchDetailsObj[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
searchDetailsObj[key]?.value[0][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
]) +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: isMyRepresentations
|
||||
? searchDetailsObj[key].value
|
||||
: searchDetailsObj[key].value[0][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
? resolveCrmDisplayValue({
|
||||
value:
|
||||
searchDetailsObj[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
searchDetailsObj[key]?.value[0][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: isMyRepresentations
|
||||
? searchDetailsObj[key].value
|
||||
: searchDetailsObj[key].value[0][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
})
|
||||
: ""}
|
||||
{hasOwn(resultItem, [
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
resultItem[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: resultItem[
|
||||
? resolveCrmDisplayValue({
|
||||
value: resultItem[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || (isMyRepresentations ? "" : "N/A")
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: isMyRepresentations
|
||||
? ""
|
||||
: "N/A"
|
||||
})
|
||||
: isMyRepresentations &&
|
||||
router.locale === "cy" &&
|
||||
jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
searchDetailsObj[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
resolveCrmDisplayValue({
|
||||
value: searchDetailsObj[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
@@ -581,50 +562,36 @@ const ViewAllResults = (props) => {
|
||||
</span>
|
||||
|
||||
{isAwaitingSubmissionDetails
|
||||
? router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
getFormCollectionByID(
|
||||
item.pinswg_appealcasetype
|
||||
).value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: getFormCollectionByID(
|
||||
? resolveCrmDisplayValue({
|
||||
value: getFormCollectionByID(
|
||||
item.pinswg_appealcasetype
|
||||
).value || "N/A"
|
||||
: router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || (isMyRepresentations ? "" : "N/A")}
|
||||
).value,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: isMyRepresentations
|
||||
? ""
|
||||
: "N/A"
|
||||
})}
|
||||
|
||||
{isMyRepresentations &&
|
||||
(router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
getFormCollectionByID(
|
||||
searchDetailsObj[key].appealType
|
||||
).value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})[0]
|
||||
: getFormCollectionByID(
|
||||
searchDetailsObj[key].appealType
|
||||
).value)}
|
||||
resolveCrmDisplayValue({
|
||||
value: getFormCollectionByID(
|
||||
searchDetailsObj[key].appealType
|
||||
).value,
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: getFormCollectionByID(
|
||||
searchDetailsObj[key].appealType
|
||||
).value
|
||||
})}
|
||||
{hasOwn(
|
||||
searchDetailsObj[key],
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -658,41 +625,14 @@ const ViewAllResults = (props) => {
|
||||
}) || "N/A"
|
||||
: isMyRepresentations
|
||||
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
||||
: // ? jsonpath({path:
|
||||
//
|
||||
// '$..[?(@ && @.value=="' +
|
||||
// searchDetailsObj[key].value[0][
|
||||
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
// ] +
|
||||
// '")].value_cy',transLookup,
|
||||
// )
|
||||
// : searchDetailsObj[key].value[0][
|
||||
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
// ] || "N/A"
|
||||
// : router.locale == "cy"
|
||||
// ? jsonpath({path:
|
||||
//
|
||||
// '$..[?(@ && @.value=="' +
|
||||
// item[
|
||||
// "statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
// ] +
|
||||
// '")].value_cy',transLookup,
|
||||
// )
|
||||
|
||||
router.locale === "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
: resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</dd>
|
||||
{isAwaitingSubmissionDetails && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 ">
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
selectRowFieldType,
|
||||
selectRowLabelDescriptions
|
||||
} from "../../lib/newappeal/formDerivation";
|
||||
import { resolveCrmDisplayValue } from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
let BuildCheckRow = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -74,14 +75,12 @@ let BuildCheckRow = (props) => {
|
||||
eval: true
|
||||
});
|
||||
|
||||
let labelTrans =
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
|
||||
json: formObj,
|
||||
eval: true
|
||||
})
|
||||
: label;
|
||||
let labelTrans = resolveCrmDisplayValue({
|
||||
value: label,
|
||||
locale,
|
||||
translations: formObj
|
||||
});
|
||||
|
||||
return labelTrans;
|
||||
};
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import DocsOfflineNotice from "./buildCheckSection/DocsOfflineNotice";
|
||||
import FinalisingStatePanel from "./buildCheckSection/FinalisingStatePanel";
|
||||
import SectionReviewList from "./buildCheckSection/SectionReviewList";
|
||||
import SubmitActionsPanel from "./buildCheckSection/SubmitActionsPanel";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
let BuildCheckSection = (props) => {
|
||||
useEffect(() => {
|
||||
@@ -144,14 +145,11 @@ let BuildCheckSection = (props) => {
|
||||
eval: true
|
||||
});
|
||||
|
||||
let labelTrans =
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
|
||||
json: formObj,
|
||||
eval: true
|
||||
})
|
||||
: label;
|
||||
let labelTrans = resolveCrmDisplayValue({
|
||||
value: label,
|
||||
locale,
|
||||
translations: formObj
|
||||
});
|
||||
return labelTrans;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { useState } from "react";
|
||||
@@ -15,6 +14,7 @@ import {
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID, hasOwn } from "../utils";
|
||||
import Aboutyou from "./aboutyou";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const RenderLPAList = ({
|
||||
name,
|
||||
@@ -52,32 +52,29 @@ const RenderLPAList = ({
|
||||
className="govuk-select govuk-input--error"
|
||||
id="lpatypes"
|
||||
name="lpatypes"
|
||||
//onChange={(e) => props.onChangeSelectLPA(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
: Object.keys(optionsObj).map((key, index) => {
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={optionsObj[key].accountid}
|
||||
>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key].name +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].name}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
|
||||
{Object.keys(optionsObj || {}).map((key) => {
|
||||
const option = optionsObj[key];
|
||||
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={option?.accountid || ""}
|
||||
>
|
||||
{option?.name
|
||||
? resolveCrmDisplayValue({
|
||||
value: option.name,
|
||||
locale: router.locale,
|
||||
translations: transLookup
|
||||
})
|
||||
: ""}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -119,53 +116,33 @@ const RenderAppealTypeList = ({
|
||||
className="govuk-select"
|
||||
id="appealTypes"
|
||||
name={name}
|
||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
: Object.keys(optionsObj).map((key, index) => {
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={
|
||||
_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.value
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key]
|
||||
.attributevalue
|
||||
}
|
||||
>
|
||||
{_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key].value
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key]
|
||||
.value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].value}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
|
||||
{Object.keys(optionsObj || {}).map((key) => {
|
||||
const option = optionsObj[key];
|
||||
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={
|
||||
option?.value
|
||||
? option.attributevalue
|
||||
: ""
|
||||
}
|
||||
>
|
||||
{option?.value
|
||||
? resolveCrmDisplayValue({
|
||||
value: option.value,
|
||||
locale: router.locale,
|
||||
translations: transLookup
|
||||
})
|
||||
: ""}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -305,25 +282,11 @@ function Radiofield(props) {
|
||||
.slice(1, props.options.length - 1)
|
||||
.split(",");
|
||||
|
||||
//parentFieldShowOnValue
|
||||
var showIfHasParentShowValue = parentField != false;
|
||||
//debugger;
|
||||
// parentField != false &&
|
||||
// !_.isEmpty(formProps[form]) &&
|
||||
// hasOwn(formProps[form].values, parentField) &&
|
||||
// parentFieldShowOnValue.indexOf(
|
||||
// formProps[form].values[parentField].toString()
|
||||
// ) > -1;
|
||||
|
||||
(showIfHasParentShowValue == parentField) != false &&
|
||||
showIfHasParentShowValue;
|
||||
|
||||
//console.log(
|
||||
// datafieldname,
|
||||
// showIfHasParentShowValue,
|
||||
// formProps[form].values[parentField]
|
||||
// );
|
||||
|
||||
return (
|
||||
<>
|
||||
{parentField != false ? (
|
||||
@@ -466,20 +429,6 @@ let CreateCase = (props) => {
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
});
|
||||
|
||||
// router.replace(
|
||||
// "/newappeal" +
|
||||
// "/" +
|
||||
// appTypeCollection.UrlName +
|
||||
// "?lpa=" +
|
||||
// values.lpaTypes +
|
||||
// "&apt=" +
|
||||
// values.appealTypes.split(",")[0],
|
||||
// null,
|
||||
// {
|
||||
// shallow: true,
|
||||
// }
|
||||
// );
|
||||
};
|
||||
const yesNo = isWelsh ? ["Ydw", "Na"] : ["Yes", "No"];
|
||||
|
||||
@@ -488,13 +437,13 @@ let CreateCase = (props) => {
|
||||
form = "caseForm",
|
||||
parentFieldShowOnValue = "846040004";
|
||||
|
||||
var showIfHasParentShowValue =
|
||||
parentField != false &&
|
||||
!_.isEmpty(formProps[form]) &&
|
||||
hasOwn(formProps[form].values, parentField) &&
|
||||
parentFieldShowOnValue.indexOf(
|
||||
formProps[form].values[parentField].toString()
|
||||
) > -1;
|
||||
const values = formProps[form]?.values;
|
||||
|
||||
const showIfHasParentShowValue =
|
||||
parentField !== false &&
|
||||
values &&
|
||||
hasOwn(values, parentField) &&
|
||||
parentFieldShowOnValue.includes(values[parentField].toString());
|
||||
|
||||
(showIfHasParentShowValue == parentField) != false &&
|
||||
showIfHasParentShowValue;
|
||||
|
||||
@@ -14,6 +14,7 @@ import Html from "react-pdf-html";
|
||||
|
||||
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
export const AppealRow_pdf = (props) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -435,32 +436,18 @@ export const AppealRow_pdf = (props) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
getPickListLabel(
|
||||
props.pickListData,
|
||||
datafieldname[0]
|
||||
.value,
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
]
|
||||
) +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: getPickListLabel(
|
||||
props.pickListData,
|
||||
datafieldname[0]
|
||||
.value,
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
]
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: getPickListLabel(
|
||||
props.pickListData,
|
||||
datafieldname[0].value,
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
]
|
||||
),
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -22,6 +22,7 @@ import transLookupEN from "../../locales/en/newappeal.json";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const getTrans = (locale, key) => {
|
||||
let jsonQuery = `$.${key}`;
|
||||
@@ -666,22 +667,12 @@ export const planningappeals78_pdf = ({ docProps, pickListData }) => {
|
||||
)}
|
||||
</Text>
|
||||
<Text style={styles.questionAnswer}>
|
||||
{/* {values.caseObj.pinswg_lpaname ||
|
||||
values.caseObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
]} */}
|
||||
|
||||
{locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
values.caseObj
|
||||
.pinswg_lpaname +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: values.caseObj.pinswg_lpaname}
|
||||
{resolveCrmDisplayValue({
|
||||
value: values.caseObj
|
||||
.pinswg_lpaname,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</Text>
|
||||
</View>
|
||||
{/* <View
|
||||
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
deleteWatchedCases,
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import RepsOnResults from "./repsonresults";
|
||||
import LiveLink from "./liveLink";
|
||||
|
||||
@@ -598,39 +599,27 @@ const SearchResults = (props) => {
|
||||
item,
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
)
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
? resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: ""}
|
||||
{hasOwn(
|
||||
item,
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
)
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
? resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: ""}
|
||||
{item?.pinswg_lpareference && (
|
||||
<>
|
||||
@@ -653,19 +642,12 @@ const SearchResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"pinswg_appealType"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item["pinswg_appealType"] ||
|
||||
"N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item["pinswg_appealType"],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
@@ -675,20 +657,14 @@ const SearchResults = (props) => {
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</dd>
|
||||
{myportal == true && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
@@ -7,6 +6,7 @@ import { useEffect, useState } from "react";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
|
||||
import { getCaseStatus } from "../../actions/services/caseDirectService";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const required = (errorMsg) => (value) =>
|
||||
value || typeof value === "number" ? undefined : errorMsg;
|
||||
@@ -282,22 +282,11 @@ let AdvancedSearch = (props) => {
|
||||
key={key}
|
||||
value={optionsObj[key].accountid}
|
||||
>
|
||||
{/* {optionsObj[key].name} */}
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key]
|
||||
.name +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].name ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: optionsObj[key].name,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -383,31 +372,11 @@ let AdvancedSearch = (props) => {
|
||||
.toLowerCase()
|
||||
}
|
||||
>
|
||||
{_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.value
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[
|
||||
key
|
||||
].value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key]
|
||||
.value ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
{resolveCrmDisplayValue({
|
||||
value: optionsObj[key].value,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -456,69 +425,47 @@ let AdvancedSearch = (props) => {
|
||||
className="govuk-select"
|
||||
id={id}
|
||||
name={name}
|
||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
: Object.keys(optionsObj).map((key, index) => {
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={
|
||||
_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
)
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.pinswg_sipsprojecttypeid
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key]
|
||||
.pinswg_sipsprojecttypeid +
|
||||
"," +
|
||||
optionsObj[
|
||||
key
|
||||
].pinswg_name
|
||||
.replace(
|
||||
/(\band|[\s\-\+\(\)\,\&])/g,
|
||||
""
|
||||
)
|
||||
.toLowerCase()
|
||||
}
|
||||
>
|
||||
{_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.pinswg_name
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[
|
||||
key
|
||||
]
|
||||
.pinswg_name +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: optionsObj[key]
|
||||
.pinswg_name ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
|
||||
{Object.keys(optionsObj || {}).map((key) => {
|
||||
const option = optionsObj[key];
|
||||
const projectTypeId =
|
||||
option?.pinswg_sipsprojecttypeid;
|
||||
const projectName = option?.pinswg_name;
|
||||
|
||||
const cleanProjectName = projectName
|
||||
? projectName
|
||||
.replace(
|
||||
/(\band|[\s\-\+\(\),&])/g,
|
||||
""
|
||||
)
|
||||
.toLowerCase()
|
||||
: "";
|
||||
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={
|
||||
projectTypeId && projectName
|
||||
? `${projectTypeId},${cleanProjectName}`
|
||||
: ""
|
||||
}
|
||||
>
|
||||
{projectName
|
||||
? resolveCrmDisplayValue({
|
||||
value: projectName,
|
||||
locale,
|
||||
translations: transLookup
|
||||
})
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -595,7 +542,6 @@ let AdvancedSearch = (props) => {
|
||||
{t("search:search-title-label")}
|
||||
</h1>
|
||||
</legend>
|
||||
|
||||
<Field
|
||||
validate={[
|
||||
minLength(
|
||||
@@ -620,7 +566,6 @@ let AdvancedSearch = (props) => {
|
||||
"myportal:searchcases-card-search-example-label-2"
|
||||
)}
|
||||
/>
|
||||
|
||||
<Field
|
||||
validate={[
|
||||
minLength(
|
||||
@@ -645,7 +590,6 @@ let AdvancedSearch = (props) => {
|
||||
"myportal:searchcases-card-search-example-label-2"
|
||||
)}
|
||||
/>
|
||||
|
||||
<Field
|
||||
name="appealTypes"
|
||||
id="appealTypes"
|
||||
@@ -655,7 +599,6 @@ let AdvancedSearch = (props) => {
|
||||
label={t("search:appealtype-label")}
|
||||
errormsg="Appeal type is required"
|
||||
/>
|
||||
|
||||
{props.appealTypesValue?.split(
|
||||
","
|
||||
)[0] === "846040002" && (
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
deleteWatchedCases,
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
import {
|
||||
setCurrentPage,
|
||||
setCurrentReference
|
||||
@@ -394,21 +395,14 @@ const DNSSearchResults = (props) => {
|
||||
});
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
var appType =
|
||||
router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@.value=="' +
|
||||
item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A";
|
||||
var appType = resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
});
|
||||
|
||||
appType =
|
||||
appType ==
|
||||
@@ -609,20 +603,14 @@ const DNSSearchResults = (props) => {
|
||||
detailsObj,
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
)
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
? resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: ""}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
@@ -632,20 +620,14 @@ const DNSSearchResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
|
||||
@@ -35,6 +35,7 @@ import {
|
||||
deleteWatchedCases,
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
import { sendGAEvent } from "@next/third-parties/google";
|
||||
import RepsOnResults from "./repsonresults";
|
||||
@@ -613,20 +614,14 @@ const SearchResults = (props) => {
|
||||
item,
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
)
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
? resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})
|
||||
: ""}
|
||||
{item?.pinswg_lpareference && (
|
||||
<>
|
||||
@@ -649,39 +644,28 @@ const SearchResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
|
||||
{detailsObj?.pinswg_specialistcaseprocess && (
|
||||
<>
|
||||
<br /> <br />
|
||||
<span>
|
||||
{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"
|
||||
] || "N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: detailsObj[
|
||||
"pinswg_specialistcaseprocess@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
locale: router.locale,
|
||||
translations:
|
||||
transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
@@ -694,20 +678,14 @@ const SearchResults = (props) => {
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
].trim() +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
{resolveCrmDisplayValue({
|
||||
value: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
]?.trim(),
|
||||
locale: router.locale,
|
||||
translations: transLookup,
|
||||
fallbackValue: "N/A"
|
||||
})}
|
||||
</dd>
|
||||
{myportal == true && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import resolveCrmDisplayValue from "../../lib/i18n/crmDisplay/resolveCrmDisplayValue";
|
||||
|
||||
const translateLpaName = ({ name, locale, transLookup }) => {
|
||||
if (!name) return "";
|
||||
|
||||
if (locale !== "cy") return name;
|
||||
|
||||
return (
|
||||
jsonpath({
|
||||
path: '$..[?(@ && @.value=="' + name + '")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})?.[0] || name
|
||||
);
|
||||
return resolveCrmDisplayValue({
|
||||
value: name,
|
||||
locale,
|
||||
translations: transLookup
|
||||
});
|
||||
};
|
||||
|
||||
export const getCaseLpaNames = ({
|
||||
|
||||
Reference in New Issue
Block a user