Merged PR 1426: Sprint 1 tasks
Related work items: #13923, #13924, #13925, #13927, #13928, #13929, #13930, #13931, #13933
This commit is contained in:
@@ -73,6 +73,10 @@ export const getSelectQuery = (appealTypeName) => {
|
||||
case "pinswg_nonvalidations":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,statuscode";
|
||||
break;
|
||||
case "pinswg_sipses":
|
||||
// return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_webaddress,statuscode,pinswg_casestage,_pinswg_sipscase_value";
|
||||
break;
|
||||
default:
|
||||
return "";
|
||||
break;
|
||||
|
||||
@@ -37,6 +37,7 @@ import Pinswg_commonlandid from "./summaryTypes/pinswg_commonlandid";
|
||||
import Pinswg_communityinfrastructurelevyid from "./summaryTypes/pinswg_communityinfrastructurelevyid";
|
||||
import Pinswg_compulsorypurchaseordersid from "./summaryTypes/pinswg_compulsorypurchaseordersid";
|
||||
import Pinswg_dnsid from "./summaryTypes/pinswg_dnsid";
|
||||
import Pinswg_sipscase from "./summaryTypes/pinswg_sipscase";
|
||||
import Pinswg_electricityactid from "./summaryTypes/pinswg_electricityactid";
|
||||
import Pinswg_enforcementlistedbuildingconseid from "./summaryTypes/pinswg_enforcementlistedbuildingconseid";
|
||||
import Pinswg_enforcementnoticeappeals174id from "./summaryTypes/pinswg_enforcementnoticeappeals174id";
|
||||
@@ -316,51 +317,75 @@ const CaseSummary = (props) => {
|
||||
)
|
||||
? detailsObj.pinswg_siteaddressline1
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_addressline1")
|
||||
? detailsObj.pinswg_addressline1
|
||||
: ""}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddressline1"
|
||||
) &&
|
||||
detailsObj.pinswg_siteaddressline1 !=
|
||||
null && <br />}
|
||||
{_.has(detailsObj, "pinswg_addressline1") &&
|
||||
detailsObj.pinswg_addressline1 !=
|
||||
null && <br />}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddressline2"
|
||||
)
|
||||
? detailsObj.pinswg_siteaddressline2
|
||||
: ""}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddressline2"
|
||||
) &&
|
||||
detailsObj.pinswg_siteaddressline2 !=
|
||||
{_.has(detailsObj, "pinswg_addressline2")
|
||||
? detailsObj.pinswg_addressline2
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_addressline2") &&
|
||||
detailsObj.pinswg_addressline2 !=
|
||||
null && <br />}
|
||||
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||
? detailsObj.pinswg_siteaddresstown
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_addresstown")
|
||||
? detailsObj.pinswg_addresstown
|
||||
: ""}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddresstown"
|
||||
) &&
|
||||
detailsObj.pinswg_siteaddresstown !=
|
||||
null && <br />}
|
||||
{_.has(detailsObj, "pinswg_addresstown") &&
|
||||
detailsObj.pinswg_addresstown !=
|
||||
null && <br />}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddresscounty"
|
||||
)
|
||||
? detailsObj.pinswg_siteaddresscounty
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_addresscounty")
|
||||
? detailsObj.pinswg_addresscounty
|
||||
: ""}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddresscounty"
|
||||
) &&
|
||||
detailsObj.pinswg_siteaddresscounty !=
|
||||
null && <br />}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_addresscounty"
|
||||
) &&
|
||||
detailsObj.pinswg_addresscounty !=
|
||||
null && <br />}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddresspostcode"
|
||||
)
|
||||
? detailsObj.pinswg_siteaddresspostcode
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_postcode")
|
||||
? detailsObj.pinswg_postcode
|
||||
: ""}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.description != null && (
|
||||
@@ -877,6 +902,18 @@ const CaseSummary = (props) => {
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "pinswg_sipscase":
|
||||
return (
|
||||
<Pinswg_sipscase
|
||||
casesObj={casesObj}
|
||||
detailsObj={detailsObj}
|
||||
formatDates={formatDates}
|
||||
linkedCasesList={linkedCasesList}
|
||||
currentView={props.currentView}
|
||||
showMap={showMap}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "pinswg_electricityactid":
|
||||
return (
|
||||
<Pinswg_electricityactid
|
||||
|
||||
@@ -0,0 +1,888 @@
|
||||
import { useRouter } from "next/router";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import _ from "lodash";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
|
||||
import GoogleMapComponent from "../../mapping";
|
||||
|
||||
import OSPoint from "ospoint";
|
||||
|
||||
const Pinswg_sipscase = (props) => {
|
||||
let { t } = useTranslation();
|
||||
const { casesObj, detailsObj, formatDates, linkedCasesList, showMap } =
|
||||
props;
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
let point = {};
|
||||
let siteCoords = {};
|
||||
let center = {};
|
||||
|
||||
point = new OSPoint(
|
||||
detailsObj.pinswg_anticipatedgridreferencenorthingtext,
|
||||
detailsObj.pinswg_anticipatedgridreferenceeastingtext
|
||||
);
|
||||
siteCoords = point.toOSGB36();
|
||||
//console.log(siteCoords);
|
||||
center = {
|
||||
id: "",
|
||||
lat: isNaN(parseFloat(siteCoords.latitude))
|
||||
? 52.412272
|
||||
: parseFloat(siteCoords.latitude),
|
||||
lng: isNaN(parseFloat(siteCoords.longitude))
|
||||
? -3.437989
|
||||
: parseFloat(siteCoords.longitude),
|
||||
};
|
||||
|
||||
const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
|
||||
|
||||
return (
|
||||
<>
|
||||
{detailsObj.pinswg_projectdescription != null ? (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="flex-container grid-row govuk-body case">
|
||||
<div
|
||||
className={
|
||||
showMap == "true"
|
||||
? "govuk-grid-column-one-half"
|
||||
: "govuk-grid-column-full"
|
||||
}
|
||||
>
|
||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||
{t("case:summary-project-details-label")}
|
||||
</h2>
|
||||
<p className="govuk-body">
|
||||
{detailsObj.pinswg_projectdescription != null
|
||||
? detailsObj.pinswg_projectdescription.indexOf(
|
||||
";"
|
||||
) < 0
|
||||
? detailsObj.pinswg_projectdescription
|
||||
: router.locale == "cy"
|
||||
? detailsObj.pinswg_projectdescription.split(
|
||||
";"
|
||||
)[1]
|
||||
: detailsObj.pinswg_projectdescription.split(
|
||||
";"
|
||||
)[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>
|
||||
{showMap == "true" && (
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
style={{
|
||||
height: "40vh",
|
||||
width: "100%",
|
||||
}}
|
||||
>
|
||||
<GoogleMapComponent
|
||||
center={center}
|
||||
zoom={zoom}
|
||||
/>
|
||||
{/* <OSMapComponent center={center} zoom={zoom} /> */}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="flex-container grid-row govuk-body case">
|
||||
<div className="card" id="case-details-card">
|
||||
<div className="card-body">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||
{t("case:summary-case-details-label")}
|
||||
</h2>
|
||||
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-type-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__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"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{detailsObj.pinswg_webaddress != null && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-case-website-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj.pinswg_webaddress +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: (
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
href={
|
||||
detailsObj.pinswg_webaddress.indexOf(
|
||||
"https://"
|
||||
)
|
||||
? "https://" +
|
||||
detailsObj.pinswg_webaddress
|
||||
: detailsObj.pinswg_webaddress
|
||||
}
|
||||
>
|
||||
{
|
||||
detailsObj.pinswg_webaddress
|
||||
}
|
||||
</a>
|
||||
) ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-lpa-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
casesObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: casesObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-procedure-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-status-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__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"
|
||||
)}
|
||||
</dd>
|
||||
</div> */}
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-case-officer-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
</dd>
|
||||
</div> */}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-type-of-event-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__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"
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-start-event-date-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
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"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-event-date-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_dateeventrequested"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
)
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<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(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
|
||||
<br />
|
||||
{/* <Link href="/">
|
||||
<a>
|
||||
{casesObj.caseDetails
|
||||
.outcome_document || ""}
|
||||
</a>
|
||||
</Link> */}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-decision-date-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_dateofdecision"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateofdecision
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateofdecision
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
{casesObj.numberofchildincidents > 0 && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-case-link-status-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(casesObj, [
|
||||
"numberofchildincidents",
|
||||
])
|
||||
? casesObj.numberofchildincidents >
|
||||
0
|
||||
? t(
|
||||
"case:summary-case-link-status-linked"
|
||||
)
|
||||
: t(
|
||||
"case:summary-case-link-status-not-linked"
|
||||
)
|
||||
: t(
|
||||
"case:summary-case-link-status-not-linked"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
{casesObj.numberofchildincidents > 0 ? (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-linked-cases-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{linkedCasesList(
|
||||
props.currentView
|
||||
.linkedCaseReferences
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-case-recommendation-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj.pinswg_recommendation +
|
||||
'")].value_cy',
|
||||
transLookup,
|
||||
|
||||
)
|
||||
: detailsObj.pinswg_recommendation}
|
||||
</dd>
|
||||
</div> */}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="card" id="key-dates-card">
|
||||
<div className="card-body">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h3 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||
{t("case:summary-dates-label")}
|
||||
</h3>
|
||||
<dl className="govuk-summary-list govuk-!-font-size-16 govuk-!-margin-bottom-9">
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||
)}
|
||||
</dt>{" "}
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div> */}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-written-acceptance-of-notice"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_writtenacceptanceofnotification"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_writtenacceptanceofnotification
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_writtenacceptanceofnotification
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-deadline-for-submission-of-application"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_deadlineforsubmissionofapplication"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_deadlineforsubmissionofapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_deadlineforsubmissionofapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-date-of-submission-of-application"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_dateofsubmissionofapplication"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateofsubmissionofapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateofsubmissionofapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_applicationacceptedasvalid"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
) && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-application-accepted-as-valid"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{!_.isEmpty(
|
||||
detailsObj.pinswg_applicationacceptedasvalid
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_applicationacceptedasvalid
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_applicationrejectedasinvalid"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
) && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-application-rejected-as-invalid"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{!_.isEmpty(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-end-of-representation-period"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_endofrepresentationperiod"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_dateofrequesttovarytheapplication"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
) && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-date-of-request-to-vary"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{!_.isEmpty(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_confirmrequesttovaryapplication"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
) &&
|
||||
(_.has(
|
||||
detailsObj,
|
||||
"pinswg_rejectrequesttovaryapplication"
|
||||
) &&
|
||||
_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
) ? (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-confirm-request-to-vary-application"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{!_.isEmpty(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
))}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_rejectrequesttovaryapplication"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
) &&
|
||||
(_.has(
|
||||
detailsObj,
|
||||
"pinswg_confirmrequesttovaryapplication"
|
||||
) &&
|
||||
_.isEmpty(
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
) ? (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-reject-request-to-vary-application"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{!_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
))}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_suspensionstartdates"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
) && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-suspension-start-dates"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{!_.isEmpty(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-suspension-end-dates"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_suspensionenddates"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-report-due-by")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_reportdueby"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_reportdueby
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_reportdueby
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-suspension-dates")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
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"
|
||||
)}
|
||||
</dd>
|
||||
</div> */}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-inspector-report-submission-to-welsh-government"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_withdrawndate"
|
||||
) &&
|
||||
!_.isEmpty(
|
||||
detailsObj.pinswg_withdrawndate
|
||||
) && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-withdrawn-date"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{!_.isEmpty(
|
||||
detailsObj.pinswg_withdrawndate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_withdrawndate
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Pinswg_sipscase;
|
||||
@@ -273,7 +273,9 @@ const DNSSearchResults = (props) => {
|
||||
</button>
|
||||
</dd>
|
||||
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16 govuk-summary-list__action"></dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16 govuk-summary-list__action">
|
||||
Type
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{showSpinnerState == true ? (
|
||||
@@ -301,6 +303,28 @@ const DNSSearchResults = (props) => {
|
||||
);
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
var appType =
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A";
|
||||
|
||||
appType =
|
||||
appType ==
|
||||
"Datblygiadau o Arwyddocâd Cenedlaethol" ||
|
||||
appType ==
|
||||
"Developments of National Significance"
|
||||
? "DNS"
|
||||
: "SIPs";
|
||||
|
||||
return (
|
||||
<div
|
||||
className="govuk-summary-list__row"
|
||||
@@ -472,7 +496,6 @@ const DNSSearchResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
@@ -486,6 +509,15 @@ const DNSSearchResults = (props) => {
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"search:searchresults-status-label"
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{appType}
|
||||
</dd>
|
||||
{myportal == true && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||
{isWatchedCase(item.incidentid)
|
||||
|
||||
@@ -370,6 +370,16 @@
|
||||
"appealTypeID": "846040012",
|
||||
"NavigationProperty": "pinswg_ElectricityActIds",
|
||||
"value": "Electricity Act"
|
||||
},
|
||||
{
|
||||
"LogicalCollectionName": "pinswg_sipses",
|
||||
"LogicalName": "pinswg_sips",
|
||||
"PrimaryIdAttribute": "pinswg_sipscase",
|
||||
"UrlName": "sips",
|
||||
"MetadataId": "8d31911b-b8ea-ef11-ab08-00224800be9c",
|
||||
"appealTypeID": "846040002",
|
||||
"NavigationProperty": "pinswg_SIPSIds",
|
||||
"value": "SIPs"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -38,8 +38,8 @@
|
||||
"inspectorate-card-visit-label": "Ymweld â'r Arolygiaeth Gynllunio",
|
||||
"inspectorate-card-visit-link": "Hafan",
|
||||
"inspectorate-card-alt-text": "Yr Arolygiaeth Gynllunio",
|
||||
"dns-card-title": "Gweld yr holl Ddatblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"dns-card-paragraph": "Mae Datblygiad o Arwyddocâd Cenedlaethol yn fath o gais cynllunio ar gyfer prosiect seilwaith mawr sydd o bwysigrwydd cenedlaethol.",
|
||||
"dns-card-title": "Gweld yr holl Brosiectau Seilwaith",
|
||||
"dns-card-paragraph": "Gellir dosbarthu prosiectau o bwysigrwydd cenedlaethol fel Datblygiad o Arwyddocâd Cenedlaethol neu dan ddeddfwriaeth newydd, Prosiect Seilwaith Arwyddocaol.",
|
||||
"dns-card-button": "Gweld pob cais",
|
||||
"logging-in-heading": "Rydym yn dilysu eich cyfrif. Arhoswch a pheidiwch ag adnewyddu'r dudalen",
|
||||
"logging-in-paragraph": "Arhoswch os gwelwch yn dda...",
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
"inspectorate-card-visit-label": "Visit the Planning Inspectorate",
|
||||
"inspectorate-card-visit-link": "Home",
|
||||
"inspectorate-card-alt-text": "The Planning Inspectorate",
|
||||
"dns-card-title": "View all Developments of National Significance ",
|
||||
"dns-card-paragraph": "A Development of National Significance is a type of planning application for a large infrastructure project of national importance.",
|
||||
"dns-card-title": "View all Infrastructure Projects",
|
||||
"dns-card-paragraph": "Projects of national importance can be classed as a Development of National Significance or under new legislation, a Significant Infrastructure Project.",
|
||||
"dns-card-button": "View all applications",
|
||||
"logging-in-heading": "We are authenticating your account please wait and don't refresh",
|
||||
"logging-in-paragraph": "Please wait...",
|
||||
|
||||
@@ -43,7 +43,7 @@ export default async function ApiProxy(req, res) {
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002)and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
|
||||
//console.log(queryUrl);
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ export default async function ApiProxy(req, res) {
|
||||
var showNumberOfRecords = req.query.showNumberOfRecords;
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=" +
|
||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference&$expand=primarycontactid($select=fullname)&$filter=(pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002) and pinswg_publishtoweb eq true&$orderby=" +
|
||||
orderby +
|
||||
" " +
|
||||
fieldSort +
|
||||
|
||||
@@ -50,9 +50,9 @@ export default async function ApiProxy(req, res) {
|
||||
searchString +
|
||||
"') or contains(ticketnumber, '" +
|
||||
searchString +
|
||||
"')) and pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
"')) and (pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002 ) and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
|
||||
//console.log("basic search ", queryUrl);
|
||||
console.log("basic search ", queryUrl);
|
||||
|
||||
var apiResponse = _.isEmpty(req.query)
|
||||
? res.status(400).json()
|
||||
|
||||
@@ -298,6 +298,18 @@ export default async function ApiProxy(req, res) {
|
||||
"NavigationProperty": "pinswg_PlanningObligationAppealS106Ids",
|
||||
"value": "Planning Obligation Appeal - S106",
|
||||
},
|
||||
{
|
||||
"LogicalCollectionName": "pinswg_sipses",
|
||||
"LogicalName": "pinswg_sips",
|
||||
"PrimaryIdAttribute": "pinswg_sipscase",
|
||||
"UrlName": "sips",
|
||||
"MetadataId": "8d31911b-b8ea-ef11-ab08-00224800be9c",
|
||||
"appealTypeID": "846040002",
|
||||
"tmpNav": "pinswg_sipsid",
|
||||
"NavigationProperty": "pinswg_SIPSids",
|
||||
"value": "SIPs",
|
||||
},
|
||||
|
||||
{
|
||||
"LogicalCollectionName": "pinswg_rows",
|
||||
"LogicalName": "pinswg_row",
|
||||
@@ -345,7 +357,8 @@ export default async function ApiProxy(req, res) {
|
||||
item.LogicalCollectionName == "pinswg_electricityacts" ||
|
||||
item.LogicalCollectionName ==
|
||||
"pinswg_transportandworkacts" ||
|
||||
item.LogicalCollectionName == "pinswg_dnses"
|
||||
item.LogicalCollectionName == "pinswg_dnses" ||
|
||||
item.LogicalCollectionName == "pinswg_sipses"
|
||||
? "pinswg_addressline1"
|
||||
: "pinswg_siteaddressline1") +
|
||||
", '" +
|
||||
@@ -363,7 +376,8 @@ export default async function ApiProxy(req, res) {
|
||||
"pinswg_transportandworkacts" ||
|
||||
item.LogicalCollectionName ==
|
||||
"pinswg_electricityacts" ||
|
||||
item.LogicalCollectionName == "pinswg_dnses"
|
||||
item.LogicalCollectionName == "pinswg_dnses" ||
|
||||
item.LogicalCollectionName == "pinswg_sipses"
|
||||
? "pinswg_addresstown"
|
||||
: "pinswg_siteaddresstown") +
|
||||
", '" +
|
||||
@@ -383,7 +397,8 @@ export default async function ApiProxy(req, res) {
|
||||
"pinswg_transportandworkacts" ||
|
||||
item.LogicalCollectionName ==
|
||||
"pinswg_electricityacts" ||
|
||||
item.LogicalCollectionName == "pinswg_dnses"
|
||||
item.LogicalCollectionName == "pinswg_dnses" ||
|
||||
item.LogicalCollectionName == "pinswg_sipses"
|
||||
? "pinswg_addresscounty"
|
||||
: item.LogicalCollectionName == "pinswg_rows"
|
||||
? "pinswg_sitecounty"
|
||||
@@ -459,6 +474,7 @@ export default async function ApiProxy(req, res) {
|
||||
? "pinswg_addresstown,pinswg_addressline1,pinswg_addresscounty,pinswg_addressline2,pinswg_addresspostcode"
|
||||
: item.LogicalCollectionName == "pinswg_electricityacts" ||
|
||||
item.LogicalCollectionName == "pinswg_dnses" ||
|
||||
item.LogicalCollectionName == "pinswg_sipses" ||
|
||||
item.LogicalCollectionName ==
|
||||
"pinswg_transportandworkacts"
|
||||
? "pinswg_addresstown,pinswg_addressline1,pinswg_addresscounty,pinswg_addressline2,pinswg_postcode"
|
||||
@@ -468,13 +484,14 @@ export default async function ApiProxy(req, res) {
|
||||
"," +
|
||||
(item.LogicalCollectionName == "pinswg_dnses" ||
|
||||
item.LogicalCollectionName == "pinswg_transportandworkacts"
|
||||
? "pinswg_dateofdecision"
|
||||
? "pinswg_dateofdecision,"
|
||||
: item.LogicalCollectionName == "pinswg_nonvalidations"
|
||||
? "pinswg_decisionissueddate"
|
||||
? "pinswg_decisionissueddate,"
|
||||
: item.LogicalCollectionName == "pinswg_electricityacts"
|
||||
? "pinswg_datedecision"
|
||||
: "pinswg_casedecisiondate") +
|
||||
"," +
|
||||
? "pinswg_datedecision,"
|
||||
: item.LogicalCollectionName == "pinswg_sipses"
|
||||
? ""
|
||||
: "pinswg_casedecisiondate,") +
|
||||
(item.LogicalCollectionName == "pinswg_planningappeals78s"
|
||||
? "pinswg_dicision"
|
||||
: item.LogicalCollectionName ==
|
||||
@@ -484,12 +501,14 @@ export default async function ApiProxy(req, res) {
|
||||
? "pinswg_decisionissued"
|
||||
: "pinswg_decision") +
|
||||
"," +
|
||||
(item.LogicalCollectionName == "pinswg_nonvalidations"
|
||||
(item.LogicalCollectionName == "pinswg_nonvalidations" ||
|
||||
item.LogicalCollectionName == "pinswg_sipses"
|
||||
? ""
|
||||
: "pinswg_dateeventrequested,") +
|
||||
"statuscode,_" +
|
||||
item.NavigationProperty.toLowerCase() +
|
||||
"_value" +
|
||||
"statuscode" +
|
||||
(item.LogicalCollectionName == "pinswg_sipses"
|
||||
? ""
|
||||
: ",_" + item.NavigationProperty.toLowerCase() + "_value") +
|
||||
(item.LogicalCollectionName == "pinswg_planningappeals78s"
|
||||
? ",_pinswg_localplanningauthority_value"
|
||||
: "") +
|
||||
@@ -519,19 +538,23 @@ export default async function ApiProxy(req, res) {
|
||||
item.LogicalCollectionName == "pinswg_maintenanceoflands217s" ||
|
||||
item.LogicalCollectionName ==
|
||||
"pinswg_enforcementlistedbuildingconservationaps" ||
|
||||
item.LogicalCollectionName == "pinswg_dnses"
|
||||
item.LogicalCollectionName == "pinswg_dnses" ||
|
||||
item.LogicalCollectionName == "pinswg_sipses"
|
||||
? ",_pinswg_associatedlpa_value"
|
||||
: "");
|
||||
: "") +
|
||||
(item.LogicalCollectionName == "pinswg_sipses"
|
||||
? ",_pinswg_sipscase_value"
|
||||
: ",_" + item.PrimaryIdAttribute + "s_value");
|
||||
|
||||
console.log(
|
||||
"\n==========================================\n",
|
||||
"basic search: " + queryUrl,
|
||||
"\n\n",
|
||||
item.LogicalCollectionName,
|
||||
"\n\n",
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
"\n==========================================\n"
|
||||
);
|
||||
// console.log(
|
||||
// "\n==========================================\n",
|
||||
// "basic search: " + queryUrl,
|
||||
// "\n\n",
|
||||
// item.LogicalCollectionName,
|
||||
// "\n\n",
|
||||
// WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
// "\n==========================================\n"
|
||||
// );
|
||||
|
||||
const resultObj = axios
|
||||
.get(
|
||||
@@ -544,9 +567,11 @@ export default async function ApiProxy(req, res) {
|
||||
"pinswg_appealType": item.value,
|
||||
"incidentid":
|
||||
key[
|
||||
"_" +
|
||||
item.NavigationProperty.toLowerCase() +
|
||||
"_value"
|
||||
item.value == "SIPs"
|
||||
? "_pinswg_sipscase_value"
|
||||
: "_" +
|
||||
item.NavigationProperty.toLowerCase() +
|
||||
"_value"
|
||||
],
|
||||
});
|
||||
});
|
||||
@@ -567,6 +592,7 @@ export default async function ApiProxy(req, res) {
|
||||
|
||||
const getIncidentResultsObj = await Promise.all(
|
||||
searchResultsObj.map(async (key) => {
|
||||
console.log(key);
|
||||
var queryUrl =
|
||||
"incidents?$select=ticketnumber,pinswg_publishtoweb,modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantagent,pinswg_appellantfirstname,pinswg_appellantlastname&$expand=primarycontactid($select=fullname)&$filter=incidentid eq " +
|
||||
key.incidentid +
|
||||
@@ -582,6 +608,11 @@ export default async function ApiProxy(req, res) {
|
||||
.then(({ data }) => {
|
||||
return data.value[0];
|
||||
});
|
||||
|
||||
console.log(
|
||||
"pinswg_publishtoweb: " + incidentObj.pinswg_publishtoweb,
|
||||
"ticketnumber: " + incidentObj.ticketnumber
|
||||
);
|
||||
Object.assign(key, {
|
||||
"pinswg_publishtoweb": incidentObj.pinswg_publishtoweb,
|
||||
"ticketnumber": incidentObj.ticketnumber,
|
||||
|
||||
@@ -58,8 +58,10 @@ export default async function ApiProxy(req, res) {
|
||||
var queryUrl =
|
||||
appealTypeName +
|
||||
"?$filter=_" +
|
||||
primaryIdAttribute +
|
||||
"s_value eq " +
|
||||
(primaryIdAttribute == "pinswg_sipscase"
|
||||
? "pinswg_sipscase_value"
|
||||
: primaryIdAttribute + "s_value ") +
|
||||
" eq " +
|
||||
incidentID +
|
||||
"&$count=true";
|
||||
//" and statuscode eq 1&$count=true";
|
||||
@@ -68,17 +70,18 @@ export default async function ApiProxy(req, res) {
|
||||
queryUrl +
|
||||
getSelectQuery(appealTypeName) +
|
||||
",_" +
|
||||
primaryIdAttribute +
|
||||
"s_value";
|
||||
(primaryIdAttribute == "pinswg_sipscase"
|
||||
? "pinswg_sipscase_value"
|
||||
: primaryIdAttribute + "s_value");
|
||||
|
||||
console.log(
|
||||
"\n==========================================\n",
|
||||
"\nSearch Details query ",
|
||||
"\nAppealType: " + appealTypeName,
|
||||
"\nIncident ID: " + incidentID,
|
||||
"\n\nQuery url: " + queryUrl,
|
||||
"\n==========================================\n"
|
||||
);
|
||||
// console.log(
|
||||
// "\n==========================================\n",
|
||||
// "\nSearch Details query ",
|
||||
// "\nAppealType: " + appealTypeName,
|
||||
// "\nIncident ID: " + incidentID,
|
||||
// "\n\nQuery url: " + queryUrl,
|
||||
// "\n==========================================\n"
|
||||
// );
|
||||
|
||||
return axios
|
||||
.get(
|
||||
|
||||
@@ -62,13 +62,21 @@ export default async function ApiProxy(req, res) {
|
||||
var queryUrl =
|
||||
appealTypeName +
|
||||
"?$filter=_" +
|
||||
primaryIdAttribute +
|
||||
"s_value eq " +
|
||||
(primaryIdAttribute == "pinswg_sipscase"
|
||||
? "pinswg_sipscase_value"
|
||||
: primaryIdAttribute + "s_value ") +
|
||||
" eq " +
|
||||
incidentID +
|
||||
"&$count=true";
|
||||
//" and statuscode eq 1&$count=true";
|
||||
|
||||
queryUrl = queryUrl + getSelectQuery(appealTypeName);
|
||||
queryUrl =
|
||||
queryUrl +
|
||||
getSelectQuery(appealTypeName) +
|
||||
",_" +
|
||||
(primaryIdAttribute == "pinswg_sipscase"
|
||||
? "pinswg_sipscase_value"
|
||||
: primaryIdAttribute + "s_value");
|
||||
|
||||
//console.log("query: ", queryUrl, "<<<<end query");
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ export default async function ApiProxy(req, res) {
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=pinswg_appealcasetype,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,statuscode,ticketnumber,title &$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
"incidents?$select=pinswg_appealcasetype,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,statuscode,ticketnumber,title &$filter=(pinswg_appealcasetype eq 846040011 or pinswg_appealcasetype eq 846040002) and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true";
|
||||
|
||||
console.log(queryUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user