+17
-17
@@ -4,7 +4,7 @@ ACCESS_TOKEN_ENDPOINT = https://login.microsoftonline.com/
|
||||
//ESNR Tenant
|
||||
TENANT = a8d860de-d5e1-45af-8376-d93f02e6b502
|
||||
//WGO Tenant
|
||||
//TENANT = 9ac1a5ab-cd58-409e-a1b6-6b10422a68f5
|
||||
TENANT = 9ac1a5ab-cd58-409e-a1b6-6b10422a68f5
|
||||
GRANT_TYPE = "client_credentials"
|
||||
|
||||
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||
@@ -12,27 +12,27 @@ NEXT_PUBLIC_HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459
|
||||
|
||||
|
||||
//Dev oauth ESNR
|
||||
CLIENT_ID = e082def0-3453-461f-9a5e-f4ab127dc015
|
||||
CLIENT_SECRET = qW.7Q~TSr3sZmLEnJQJPXEdOckb_yo2t1yJmY
|
||||
RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||
RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||
RELAYPATH = "dev-pedw-hc"
|
||||
//CLIENT_ID = e082def0-3453-461f-9a5e-f4ab127dc015
|
||||
//CLIENT_SECRET = qW.7Q~TSr3sZmLEnJQJPXEdOckb_yo2t1yJmY
|
||||
//RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||
//RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||
//RELAYPATH = "dev-pedw-hc"
|
||||
|
||||
|
||||
//Test Oauth ESNR
|
||||
//CLIENT_ID = 6619ad85-c908-490d-811b-de8c93c0f2aa
|
||||
//CLIENT_SECRET = qKo7Q~5QvLEplbwnBbint_I5lXqx_-kDm8Vj-
|
||||
//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
||||
//RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
||||
//RELAYPATH = "test-pedw-hc"
|
||||
CLIENT_ID = 6619ad85-c908-490d-811b-de8c93c0f2aa
|
||||
CLIENT_SECRET = qKo7Q~5QvLEplbwnBbint_I5lXqx_-kDm8Vj-
|
||||
RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
||||
RELAYURI = "test-pedw-ns.servicebus.windows.net"
|
||||
RELAYPATH = "test-pedw-hc"
|
||||
|
||||
|
||||
//Preprod Oauth WGO
|
||||
//CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||
//CLIENT_SECRET = Ioo7Q~RJfhWsE45wPsuHm1CzRk1SppnNN3lZF
|
||||
//RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
|
||||
//RELAYURI = "pp-pedw-ns.servicebus.windows.net"
|
||||
//RELAYPATH = "pp-pedw-hc"
|
||||
CLIENT_ID = ab6c4678-b31a-4eb3-b429-e039120e488a
|
||||
CLIENT_SECRET = Ioo7Q~RJfhWsE45wPsuHm1CzRk1SppnNN3lZF
|
||||
RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
|
||||
RELAYURI = "pp-pedw-ns.servicebus.windows.net"
|
||||
RELAYPATH = "pp-pedw-hc"
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||
SHOWLOGIN = "true"
|
||||
SHOWREPRESENTATIONS = false
|
||||
SHOWFILEUPLOAD = "false"
|
||||
SHOWMAPS = "true"
|
||||
SHOWMAPS = "false"
|
||||
//BASIC_AUTH_CREDENTIALS = pinswg:password|pinswg2:password2
|
||||
|
||||
|
||||
|
||||
@@ -904,3 +904,36 @@ export const createAccount = (formValues) => {
|
||||
console.log("this serror", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const uploadFiles = (formValues) => {
|
||||
var data = formValues;
|
||||
var queryUrl = "/api/uploads";
|
||||
var config = {
|
||||
method: "post",
|
||||
url: queryUrl,
|
||||
data: data,
|
||||
};
|
||||
|
||||
// const config = {
|
||||
// method: "post",
|
||||
// url: queryUrl,
|
||||
// data: data,
|
||||
// headers: { "content-type": "multipart/form-data" },
|
||||
// onUploadProgress: (event) => {
|
||||
// console.log(
|
||||
// `Current progress:`,
|
||||
// Math.round((event.loaded * 100) / event.total)
|
||||
// );
|
||||
// },
|
||||
// };
|
||||
|
||||
console.log(config);
|
||||
return axios(config)
|
||||
.then((res) => {
|
||||
// console.log("posted ", res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("this serror", error);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ export const getSelectQuery = (appealTypeName) => {
|
||||
case "pinswg_compulsorypurchaseorderses":
|
||||
return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode";
|
||||
case "pinswg_dnses":
|
||||
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";
|
||||
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";
|
||||
case "pinswg_electricityacts":
|
||||
return "&$select=_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode";
|
||||
case "pinswg_householderappealhases":
|
||||
|
||||
@@ -35,6 +35,7 @@ const Case = (props) => {
|
||||
searchDetailsObj={props.searchDetailsObj}
|
||||
searchString={props.searchString}
|
||||
incidentid={props.incidentid}
|
||||
showMap={props.showMap}
|
||||
/>
|
||||
<Documents
|
||||
incidentid={props.incidentid}
|
||||
|
||||
@@ -61,6 +61,7 @@ const CaseSummary = (props) => {
|
||||
setCurrentLinkedCases,
|
||||
linkedCasesReference,
|
||||
setCurrentReference,
|
||||
showMap,
|
||||
} = props;
|
||||
|
||||
const noRepresentationLink = [
|
||||
@@ -414,6 +415,7 @@ const CaseSummary = (props) => {
|
||||
formatDates={formatDates}
|
||||
linkedCasesList={linkedCasesList}
|
||||
currentView={props.currentView}
|
||||
showMap={showMap}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -13,7 +13,8 @@ import OSPoint from "ospoint";
|
||||
|
||||
const Pinswg_dnsid = (props) => {
|
||||
let { t } = useTranslation();
|
||||
const { casesObj, detailsObj, formatDates, linkedCasesList } = props;
|
||||
const { casesObj, detailsObj, formatDates, linkedCasesList, showMap } =
|
||||
props;
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
@@ -44,7 +45,13 @@ const Pinswg_dnsid = (props) => {
|
||||
{detailsObj.pinswg_projectdescription != null ? (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="flex-container grid-row govuk-body case">
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
className={
|
||||
showMap == "true"
|
||||
? "govuk-grid-column-one-half"
|
||||
: "govuk-grid-column-two-thirds"
|
||||
}
|
||||
>
|
||||
<h2 className="govuk-heading-m govuk-!-margin-bottom-7">
|
||||
{t("case:summary-project-details-label")}
|
||||
</h2>
|
||||
@@ -80,22 +87,22 @@ const Pinswg_dnsid = (props) => {
|
||||
: ""}
|
||||
</p> */}
|
||||
</div>
|
||||
{/* {process.env.SHOWMAPS == "true" && ( */}
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
style={{
|
||||
height: "40vh",
|
||||
width: "100%",
|
||||
}}
|
||||
>
|
||||
<GoogleMapComponent
|
||||
center={center}
|
||||
zoom={zoom}
|
||||
/>
|
||||
{/* <OSMapComponent center={center} zoom={zoom} /> */}
|
||||
{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>
|
||||
) : (
|
||||
@@ -153,23 +160,6 @@ const Pinswg_dnsid = (props) => {
|
||||
] || ""}
|
||||
</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">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.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-procedure-label")}
|
||||
@@ -186,7 +176,10 @@ const Pinswg_dnsid = (props) => {
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_choiceofprocedure@OData.Community.Display.V1.FormattedValue"
|
||||
] || ""}
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
@@ -207,7 +200,47 @@ const Pinswg_dnsid = (props) => {
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"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">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.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-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>
|
||||
@@ -229,7 +262,7 @@ const Pinswg_dnsid = (props) => {
|
||||
"pinswg_decision@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-no-information-to-date-label"
|
||||
)}
|
||||
|
||||
<br />
|
||||
@@ -241,6 +274,31 @@ const Pinswg_dnsid = (props) => {
|
||||
</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_casedecisiondate"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_casedecisiondate
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_casedecisiondate
|
||||
)
|
||||
: 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">
|
||||
@@ -283,7 +341,7 @@ const Pinswg_dnsid = (props) => {
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
<div className="govuk-summary-list__row">
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-case-recommendation-label"
|
||||
@@ -299,7 +357,7 @@ const Pinswg_dnsid = (props) => {
|
||||
)
|
||||
: detailsObj.pinswg_recommendation}
|
||||
</dd>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
{detailsObj.pinswg_webaddress != null && (
|
||||
<div className="govuk-summary-list__row">
|
||||
@@ -353,53 +411,104 @@ const Pinswg_dnsid = (props) => {
|
||||
<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-event-date-label")}
|
||||
</dt>
|
||||
{t(
|
||||
"case:summary-valid-notice-of-intention-to-submit-an-application"
|
||||
)}
|
||||
</dt>{" "}
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_dateeventrequested"
|
||||
"pinswg_validnoticeofintentiontosubmitanapplicati"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateeventrequested
|
||||
detailsObj.pinswg_validnoticeofintentiontosubmitanapplicati
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-decision-date-label"
|
||||
"case:summary-written-acceptance-of-notice"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_casedecisiondate"
|
||||
"pinswg_writtenacceptanceofnotification"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_casedecisiondate
|
||||
detailsObj.pinswg_writtenacceptanceofnotification
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_casedecisiondate
|
||||
detailsObj.pinswg_writtenacceptanceofnotification
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"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>
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
@@ -418,10 +527,10 @@ const Pinswg_dnsid = (props) => {
|
||||
detailsObj.pinswg_applicationacceptedasvalid
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -443,10 +552,60 @@ const Pinswg_dnsid = (props) => {
|
||||
detailsObj.pinswg_applicationrejectedasinvalid
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"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>
|
||||
<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">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_dateofrequesttovarytheapplication"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -468,14 +627,64 @@ const Pinswg_dnsid = (props) => {
|
||||
detailsObj.pinswg_confirmrequesttovaryapplication
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<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">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_rejectrequesttovaryapplication"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
)
|
||||
: 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-start-dates"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_suspensionstartdates"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
: 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-decisions"
|
||||
@@ -499,58 +708,9 @@ const Pinswg_dnsid = (props) => {
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<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">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_dateofrequesttovarytheapplication"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_dateofrequesttovarytheapplication
|
||||
)
|
||||
: 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-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-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
</div> */}
|
||||
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-date-project-published-to-website"
|
||||
@@ -574,83 +734,8 @@ const Pinswg_dnsid = (props) => {
|
||||
"case:summary-no-date-entered-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-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-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-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-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
</div> */}
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-procedure-confirmed"
|
||||
@@ -674,29 +759,30 @@ const Pinswg_dnsid = (props) => {
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-reject-request-to-vary-application"
|
||||
"case:summary-suspension-end-dates"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_rejectrequesttovaryapplication"
|
||||
"pinswg_suspensionenddates"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_rejectrequesttovaryapplication
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -716,14 +802,14 @@ const Pinswg_dnsid = (props) => {
|
||||
detailsObj.pinswg_reportdueby
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-suspension-dates")}
|
||||
</dt>
|
||||
@@ -745,79 +831,29 @@ const Pinswg_dnsid = (props) => {
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-suspension-end-dates"
|
||||
"case:summary-inspector-report-submission-to-welsh-government"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_suspensionenddates"
|
||||
"pinswg_inspectorreportsubmittedtowelshgovernment"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensionenddates
|
||||
detailsObj.pinswg_inspectorreportsubmittedtowelshgovernment
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-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-suspension-start-dates"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_suspensionstartdates"
|
||||
)
|
||||
? !_.isEmpty(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_suspensionstartdates
|
||||
)
|
||||
: 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-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-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
@@ -837,35 +873,10 @@ const Pinswg_dnsid = (props) => {
|
||||
detailsObj.pinswg_withdrawndate
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-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-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-no-date-entered-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-no-date-entered-label"
|
||||
"case:summary-awaiting-information-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,8 @@ import DNSSearchResults from "./search/dnssearchresults";
|
||||
import CRMError from "./crmError";
|
||||
|
||||
export default function Search(props) {
|
||||
const { searchString, searchResultsObj, myportal, watchedCases } = props;
|
||||
const { searchString, searchResultsObj, myportal, watchedCases, showMap } =
|
||||
props;
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -42,6 +43,7 @@ export default function Search(props) {
|
||||
dnsCoords={searchResultsObj.dnsCoordsObj.value}
|
||||
myportal={myportal}
|
||||
watchedCases={watchedCases}
|
||||
showMap={showMap}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,7 @@ const ViewAllResults = (props) => {
|
||||
resultsArr.map((item, key) => {
|
||||
let detailsObj = jsonpath.query(
|
||||
searchDetailsObj,
|
||||
"$..value[?(@.pinswg_name=='" + item.pinswg_title + "')]"
|
||||
'$..value[?(@.pinswg_name=="' + item.pinswg_title + '")]'
|
||||
);
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ const DNSSearchResults = (props) => {
|
||||
watchedCases,
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
showMap,
|
||||
} = props;
|
||||
let { t } = useTranslation();
|
||||
|
||||
@@ -302,9 +303,9 @@ const DNSSearchResults = (props) => {
|
||||
resultsArr.map((item, key) => {
|
||||
let detailsObj = jsonpath.query(
|
||||
searchDetailsObj,
|
||||
"$..value[?(@.pinswg_name=='" +
|
||||
'$..value[?(@.pinswg_name=="' +
|
||||
item.title +
|
||||
"')]"
|
||||
'")]'
|
||||
);
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
@@ -339,6 +340,7 @@ const DNSSearchResults = (props) => {
|
||||
item.incidentid,
|
||||
"appealType":
|
||||
item.pinswg_appealcasetype,
|
||||
"showMap": showMap,
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -619,7 +621,13 @@ const DNSSearchResults = (props) => {
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="flex-container grid-row govuk-body case">
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
className={
|
||||
showMap == "true"
|
||||
? "govuk-grid-column-one-half"
|
||||
: "govuk-grid-column-two-thirds"
|
||||
}
|
||||
>
|
||||
<h1 className="govuk-heading-l">
|
||||
{t("dnsApplications:page-title")}
|
||||
</h1>
|
||||
@@ -644,37 +652,37 @@ const DNSSearchResults = (props) => {
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* {process.env.SHOWMAPS == "true" && ( */}
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
style={{
|
||||
height: "45vh",
|
||||
width: "100%",
|
||||
}}
|
||||
>
|
||||
<GoogleMapReact
|
||||
options={function (maps) {
|
||||
return {
|
||||
overviewMapControl: true,
|
||||
mapTypeControl: true,
|
||||
};
|
||||
{showMap == "true" && (
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
style={{
|
||||
height: "45vh",
|
||||
width: "100%",
|
||||
}}
|
||||
bootstrapURLKeys={{
|
||||
key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||
}}
|
||||
defaultCenter={{
|
||||
id: "",
|
||||
lat: 52.412272,
|
||||
lng: -3.437989,
|
||||
}}
|
||||
defaultZoom={7}
|
||||
onGoogleApiLoaded={({ map, maps }) =>
|
||||
ModelsMap(map, maps)
|
||||
}
|
||||
/>
|
||||
>
|
||||
<GoogleMapReact
|
||||
options={function (maps) {
|
||||
return {
|
||||
overviewMapControl: true,
|
||||
mapTypeControl: true,
|
||||
};
|
||||
}}
|
||||
bootstrapURLKeys={{
|
||||
key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||
}}
|
||||
defaultCenter={{
|
||||
id: "",
|
||||
lat: 52.412272,
|
||||
lng: -3.437989,
|
||||
}}
|
||||
defaultZoom={7}
|
||||
onGoogleApiLoaded={({ map, maps }) =>
|
||||
ModelsMap(map, maps)
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* )} */}
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{searchResultsObj["@odata.count"] > 5 && (
|
||||
|
||||
@@ -247,9 +247,9 @@ const SearchResults = (props) => {
|
||||
resultsArr.map((item, key) => {
|
||||
let detailsObj = jsonpath.query(
|
||||
searchDetailsObj,
|
||||
"$..value[?(@.pinswg_name=='" +
|
||||
'$..value[?(@.pinswg_name=="' +
|
||||
item.title +
|
||||
"')]"
|
||||
'")]'
|
||||
);
|
||||
detailsObj = detailsObj[0];
|
||||
return (
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
"summary-linked-cases-label": "Achosion cysylltiedig",
|
||||
"summary-dates-label": "Dyddiadau",
|
||||
"summary-no-date-entered-label": "dim dyddiad wedi'i nodi",
|
||||
"summary-no-information-to-date-label": "Dim gwybodaeth hyd yma",
|
||||
"summary-awaiting-information-label": "Aros am wybodaeth",
|
||||
"summary-to-be-confirmed-label": "I gael ei gadarnhau",
|
||||
"summary-start-date-label": "Dyddiad Dechrau",
|
||||
"summary-questionnaire-due-date-label": "Holiadur i ddod",
|
||||
"summary-statement-due-date-label": "Datganiad(au) i ddod",
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
"summary-linked-cases-label": "Linked Cases",
|
||||
"summary-dates-label": "Dates",
|
||||
"summary-no-date-entered-label": "no date entered",
|
||||
"summary-no-information-to-date-label": "No information to date",
|
||||
"summary-awaiting-information-label": "Awaiting information",
|
||||
"summary-to-be-confirmed-label": "To be confirmed",
|
||||
"summary-start-date-label": "Start Date",
|
||||
"summary-questionnaire-due-date-label": "Questionnaire due",
|
||||
"summary-statement-due-date-label": "Statement(s) due",
|
||||
|
||||
@@ -34,7 +34,8 @@ export default async function ApiProxy(req, res) {
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Developments of National Significance' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
|
||||
"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
|
||||
//"stringmaps?$filter=objecttypecode eq 'incident' and attributename eq 'pinswg_appealcasetype' and value ne 'Developments of National Significance' and value ne 'LDP' and value ne 'Misc Casework'&$count=true&$select=value,stringmapid,organizationid,attributevalue&$orderby=value asc";
|
||||
|
||||
console.log(queryUrl);
|
||||
return axios
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import nextConnect from "next-connect";
|
||||
import multer from "multer";
|
||||
|
||||
const upload = multer({
|
||||
storage: multer.diskStorage({
|
||||
destination: "./public/uploads",
|
||||
filename: (req, file, cb) => cb(null, file.originalname),
|
||||
}),
|
||||
});
|
||||
|
||||
const apiRoute = nextConnect({
|
||||
onError(error, req, res) {
|
||||
console.log("booo", req.data);
|
||||
|
||||
res.status(501).json({
|
||||
error: `Sorry something Happened! ${error.message}`,
|
||||
});
|
||||
},
|
||||
onNoMatch(req, res) {
|
||||
res.status(405).json({ error: `Method '${req.method}' Not Allowed` });
|
||||
},
|
||||
});
|
||||
|
||||
apiRoute.use(upload.array("fileList"));
|
||||
|
||||
apiRoute.post((req, res) => {
|
||||
res.status(200).json({ data: "success" });
|
||||
});
|
||||
|
||||
export default apiRoute;
|
||||
|
||||
export const config = {
|
||||
api: {
|
||||
bodyParser: false, // Disallow body parsing, consume as stream
|
||||
},
|
||||
};
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
import { wrapper } from "../store/store";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages } = props;
|
||||
const { footerLinks, pages, showMap } = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -99,6 +99,7 @@ const Home = (props) => {
|
||||
<div className="govuk-width-container">
|
||||
<Breadcrumbs slug={appealtypes} />
|
||||
<DNSSearchResults
|
||||
showMap={showMap}
|
||||
searchString="DNS"
|
||||
searchResultsObj={props.searchResultsObj}
|
||||
/>
|
||||
@@ -129,12 +130,17 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
}
|
||||
: searchResultsObj;
|
||||
|
||||
const showMapCheck = process.env.SHOWMAPS || false;
|
||||
|
||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||
const dnsCoords = await getDNSCoords();
|
||||
store.dispatch(setSearchResults(searchResultsObj));
|
||||
store.dispatch(setSearchDetails(searchDetailsObj));
|
||||
store.dispatch(setSearch("DNS"));
|
||||
store.dispatch(setDNSCoords(dnsCoords));
|
||||
return {
|
||||
props: { showMap: showMapCheck },
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
+2
-1
@@ -9,7 +9,7 @@ import Footer from "../components/footer";
|
||||
import Header from "../components/header";
|
||||
|
||||
const Home = (props) => {
|
||||
const { footerLinks, pages } = props;
|
||||
const { footerLinks, pages, showMap } = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -63,6 +63,7 @@ const Home = (props) => {
|
||||
appealTypeID={
|
||||
props.currentView.caseReference.appealType
|
||||
}
|
||||
showMap={props.currentView.caseReference.showMap}
|
||||
/>
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
|
||||
@@ -25,6 +25,7 @@ const Home = (props) => {
|
||||
footerLinks,
|
||||
pages,
|
||||
showLogin,
|
||||
showMap,
|
||||
loggedInUserId,
|
||||
hasGGCode,
|
||||
loginEmailStr,
|
||||
@@ -140,6 +141,7 @@ const Home = (props) => {
|
||||
ggLocale={ggLocale}
|
||||
pages={pages}
|
||||
showLogin={showLogin}
|
||||
showMap={showMap}
|
||||
loggedInUserId={loggedInUserId}
|
||||
GG_REDIRECT_URI={props.GG_REDIRECT_URI}
|
||||
GG_CLIENT_ID={props.GG_CLIENT_ID}
|
||||
@@ -164,6 +166,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
console.log("gg local", query.ui_locales);
|
||||
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
const showMapCheck = process.env.SHOWMAPS || false;
|
||||
|
||||
const hasLoginCode = typeof query.code != "undefined";
|
||||
let providerConfig = await getProviderConfig();
|
||||
@@ -224,6 +227,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
props: {
|
||||
ggLocale: ggLocale,
|
||||
showLogin: showLoginCheck,
|
||||
showMap: showMapCheck,
|
||||
hasGGCode: hasLoginCode,
|
||||
loggedInUserId: portalUserObj,
|
||||
loggedInUserEmail: loginEmailStr,
|
||||
|
||||
Reference in New Issue
Block a user