Merge branch 'Development' into nextauth-and-magic-poc
This commit is contained in:
+102
-1
@@ -77,6 +77,19 @@ export const azureHeaders = (access_token) => {
|
||||
};
|
||||
};
|
||||
|
||||
export const azureHeadersNoOdata = (access_token) => {
|
||||
return {
|
||||
headers: {
|
||||
//"OData-MaxVersion": "4.0",
|
||||
//"OData-Version": "4.0",
|
||||
//"Accept": "application/json;odata.metadata=none",
|
||||
//"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer " + access_token,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export const azureHeadersPaged = (access_token) => {
|
||||
return {
|
||||
headers: {
|
||||
@@ -145,6 +158,22 @@ export const getBasicSearch = (searchString) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getPartSavedAppeal = (searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getpartsavedappeal_api?searchString=" +
|
||||
searchString
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
return error.response;
|
||||
});
|
||||
};
|
||||
|
||||
export const getBasicDNSURLSearch = (searchString) => {
|
||||
return axios
|
||||
.get(
|
||||
@@ -322,6 +351,38 @@ export const getBasicSearchDetails = (
|
||||
});
|
||||
};
|
||||
|
||||
export const getBasicPartSavedDetails = (
|
||||
appealTypeName,
|
||||
caseReference,
|
||||
primaryIdAttribute,
|
||||
incidentID
|
||||
) => {
|
||||
console.log(
|
||||
"///////api call: ",
|
||||
BASE_URL +
|
||||
"/api/endpoint/getbasicpartsaveddetails_api?appealTypeName=" +
|
||||
appealTypeName +
|
||||
"&primaryIdAttribute=" +
|
||||
primaryIdAttribute +
|
||||
"&incidentID=" +
|
||||
incidentID
|
||||
);
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getbasicpartsaveddetails_api?appealTypeName=" +
|
||||
appealTypeName +
|
||||
"&primaryIdAttribute=" +
|
||||
primaryIdAttribute +
|
||||
"&incidentID=" +
|
||||
incidentID
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
console.log("this error", error);
|
||||
});
|
||||
};
|
||||
|
||||
export const getBasicSearchDetailsPaged = (
|
||||
appealTypeName,
|
||||
caseReference,
|
||||
@@ -670,13 +731,20 @@ export const getAwaitingSubmission = (loggedInUserId) => {
|
||||
};
|
||||
|
||||
export const getPortalModuleDetails = (appealType, caseReference) => {
|
||||
console.log(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||
appealType +
|
||||
"&caseReference=" +
|
||||
encodeURI(caseReference)
|
||||
);
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getportalmoduledetails_api?appealType=" +
|
||||
appealType +
|
||||
"&caseReference=" +
|
||||
caseReference
|
||||
encodeURI(caseReference)
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
@@ -904,3 +972,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-full"
|
||||
}
|
||||
>
|
||||
<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>
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
subYears,
|
||||
subMonths,
|
||||
subDays,
|
||||
parseISO,
|
||||
} from "date-fns";
|
||||
|
||||
const RenderTextfield = ({
|
||||
@@ -344,20 +345,29 @@ const RenderDatePicker = ({
|
||||
{errorMsg}
|
||||
</span>
|
||||
)}
|
||||
|
||||
{/* {value}
|
||||
<br />
|
||||
{moment(value).format("DD/MM/YY")}
|
||||
<br /> */}
|
||||
|
||||
<DatePicker
|
||||
{...custom}
|
||||
locale={router.locale}
|
||||
autoOk={true}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
onChange={onChange}
|
||||
selected={value || null}
|
||||
selected={
|
||||
value
|
||||
? typeof value != "object"
|
||||
? parseISO(value)
|
||||
: value
|
||||
: null
|
||||
} //{parseISO(value) || null}
|
||||
className="govuk-input govuk-input--width-10"
|
||||
{...(custom.dateStart !== false && {
|
||||
minDate: minDate,
|
||||
})}
|
||||
{...(custom.dateEnd !== false && { maxDate: maxDate })}
|
||||
|
||||
// value={!value ? null : new Date(value)}
|
||||
minDate={minDate}
|
||||
maxDate={maxDate}
|
||||
//value={!value ? null : moment(value, "DD/MM/yyyy")}
|
||||
/>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -558,6 +568,7 @@ const RenderYesNo = ({
|
||||
type="radio"
|
||||
className="govuk-radios__input"
|
||||
value={options[key]}
|
||||
//checked={value == options[key]}
|
||||
onChange={(e) => {
|
||||
let docListObj = custom.documentList;
|
||||
if (
|
||||
@@ -694,6 +705,10 @@ const RenderRadio = ({
|
||||
type="radio"
|
||||
className="govuk-radios__input"
|
||||
value={options[key].split("|")[0]}
|
||||
// checked={
|
||||
// value ==
|
||||
// parseInt(options[key].split("|")[0])
|
||||
// }
|
||||
onChange={(e) => {
|
||||
let docListObj = custom.documentList;
|
||||
if (
|
||||
@@ -752,15 +767,23 @@ export function Radiofield(props) {
|
||||
.split(",");
|
||||
|
||||
//parentFieldShowOnValue
|
||||
var showIfHasParentShowValue =
|
||||
parentField != false &&
|
||||
!_.isEmpty(formProps[form]) &&
|
||||
_.has(formProps[form].values, parentField) &&
|
||||
parentFieldShowOnValue.indexOf(
|
||||
formProps[form].values[parentField].toString()
|
||||
) > -1;
|
||||
var showIfHasParentShowValue = parentField != false;
|
||||
//debugger;
|
||||
// parentField != false &&
|
||||
// !_.isEmpty(formProps[form]) &&
|
||||
// _.has(formProps[form].values, parentField) &&
|
||||
// parentFieldShowOnValue.indexOf(
|
||||
// formProps[form].values[parentField].toString()
|
||||
// ) > -1;
|
||||
|
||||
// console.log(showIfHasParentShowValue);
|
||||
(showIfHasParentShowValue == parentField) != false &&
|
||||
showIfHasParentShowValue;
|
||||
|
||||
console.log(
|
||||
datafieldname,
|
||||
showIfHasParentShowValue,
|
||||
formProps[form].values[parentField]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -175,6 +175,11 @@ const TopThree = (props) => {
|
||||
className="govuk-link--no-underline"
|
||||
data-id={index}
|
||||
onClick={() => {
|
||||
topThreeType == "awaitingSubmission" &&
|
||||
console.log(
|
||||
"appealDetails"
|
||||
// props.props.awaitingSubmission
|
||||
);
|
||||
setCurrentReference({
|
||||
"currentReference":
|
||||
topThreeType != "watchedCases"
|
||||
@@ -209,7 +214,7 @@ const TopThree = (props) => {
|
||||
]
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]}
|
||||
]}{" "}
|
||||
</a>
|
||||
</Link>
|
||||
</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];
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ import {
|
||||
setCurrentSection,
|
||||
setDocumentsList,
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID } from "../utils";
|
||||
import { updateCase, patchCase } from "../../actions";
|
||||
|
||||
import { FieldsTranslations } from "../elements";
|
||||
|
||||
@@ -32,6 +34,9 @@ let BuildSection = (props) => {
|
||||
sectionCount,
|
||||
onSubmit,
|
||||
handleSubmit,
|
||||
load,
|
||||
pristine,
|
||||
reset,
|
||||
formTitle,
|
||||
setCurrentSection,
|
||||
refno,
|
||||
@@ -62,7 +67,64 @@ let BuildSection = (props) => {
|
||||
|
||||
const handleParam = (setValue) => (e) => setValue(e.target.value);
|
||||
|
||||
const updateCaseProgress = (values) => {
|
||||
let incidentId = props.appealType.caseReference.incidentid;
|
||||
let updateBody = values || {};
|
||||
|
||||
let appTypeCollection = getFormCollectionByID(
|
||||
props.appealType.appealTypeID
|
||||
);
|
||||
let updateBindAppealTypeToIncident =
|
||||
appTypeCollection.NavigationProperty;
|
||||
|
||||
Object.assign(updateBody, {
|
||||
"pinswg_Appellant@odata.bind":
|
||||
"/contacts(" + props.props.accountDetails.loggedinUserId + ")",
|
||||
"pinswg_name": props.appealType.caseReference.ticketnumber,
|
||||
[updateBindAppealTypeToIncident + "@odata.bind"]:
|
||||
"/incidents(" + incidentId + ")",
|
||||
});
|
||||
|
||||
updateBody = JSON.stringify(updateBody);
|
||||
updateBody = updateBody.replace(/:"Yes"/gm, `:true`);
|
||||
updateBody = updateBody.replace(/:"No"/gm, `:false`);
|
||||
updateBody = JSON.parse(updateBody);
|
||||
|
||||
Object.keys(updateBody).forEach((key) => {
|
||||
if (updateBody[key] === null) {
|
||||
delete updateBody[key];
|
||||
}
|
||||
if (key.indexOf("_") == 0) {
|
||||
delete updateBody[key];
|
||||
}
|
||||
});
|
||||
|
||||
console.log(updateBody);
|
||||
|
||||
let updateFormCollection = appTypeCollection.LogicalCollectionName;
|
||||
let primaryAttribute = appTypeCollection.PrimaryIdAttribute;
|
||||
|
||||
console.log(
|
||||
incidentId,
|
||||
updateBody,
|
||||
updateFormCollection,
|
||||
primaryAttribute,
|
||||
props.appealType.caseReference.ticketnumber
|
||||
);
|
||||
updateCase(
|
||||
incidentId,
|
||||
updateBody,
|
||||
updateFormCollection,
|
||||
primaryAttribute,
|
||||
props.appealType.caseReference.ticketnumber
|
||||
);
|
||||
//console.log("patching////////");
|
||||
//patchCase(incidentId);
|
||||
};
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
//alert(1);
|
||||
//updateCaseProgress(values);
|
||||
setCurrentSection(currentSection + 1);
|
||||
};
|
||||
|
||||
@@ -198,86 +260,116 @@ let BuildSection = (props) => {
|
||||
</form>
|
||||
</div>
|
||||
<div className="govuk-grid-column-one-third">
|
||||
<nav
|
||||
role="navigation"
|
||||
aria-labelledby="progress-list"
|
||||
className="at-nav"
|
||||
>
|
||||
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
|
||||
{t("newappeal:new-appeal-progress-nav-label")}:
|
||||
</h3>
|
||||
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||
|
||||
<ol className="govuk-list">
|
||||
<ul className="govuk-list ">
|
||||
<li className="at-nav__page">
|
||||
<ol className="govuk-list">
|
||||
{Object.keys(titleList).map((key) =>
|
||||
parseInt(key) + 1 == currentSection ? (
|
||||
<li key={key}>
|
||||
<b>
|
||||
{FieldsTranslations(
|
||||
titleList[key].value
|
||||
)}{" "}
|
||||
</b>
|
||||
</li>
|
||||
) : (
|
||||
<li key={key}>
|
||||
{props.appealType
|
||||
.formComplete == "true" ||
|
||||
parseInt(key) + 1 <
|
||||
currentSection ? (
|
||||
<a
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
gotoSection(
|
||||
parseInt(key) +
|
||||
1
|
||||
);
|
||||
}}
|
||||
>
|
||||
{FieldsTranslations(
|
||||
titleList[key].value
|
||||
)}
|
||||
</a>
|
||||
) : (
|
||||
FieldsTranslations(
|
||||
titleList[key].value
|
||||
)
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
)}
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
{Object.keys(documentListObj).length > 0 && (
|
||||
<div>
|
||||
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
|
||||
{t("newappeal:new-appeal-documentlist-nav")}:
|
||||
<div className="at-nav-container">
|
||||
<nav
|
||||
role="navigation"
|
||||
aria-labelledby="progress-list"
|
||||
className="at-nav"
|
||||
>
|
||||
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey progress-heading">
|
||||
{t("newappeal:new-appeal-progress-nav-label")}:{" "}
|
||||
<span className="progress-case-reference">
|
||||
{props.appealType.caseReference.ticketnumber}
|
||||
</span>
|
||||
</h3>
|
||||
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||
<ol className="govuk-list document-list">
|
||||
|
||||
<ol className="govuk-list">
|
||||
<ul className="govuk-list ">
|
||||
<li className="at-nav__page">
|
||||
<ol className="govuk-list govuk-list--bullet">
|
||||
{Object.entries(documentListObj).map(
|
||||
([key, value]) => {
|
||||
return (
|
||||
<li key={key}>{value}</li>
|
||||
);
|
||||
}
|
||||
<ol className="govuk-list">
|
||||
{Object.keys(titleList).map((key) =>
|
||||
parseInt(key) + 1 ==
|
||||
currentSection ? (
|
||||
<li key={key}>
|
||||
<b>
|
||||
{FieldsTranslations(
|
||||
titleList[key].value
|
||||
)}{" "}
|
||||
</b>
|
||||
</li>
|
||||
) : (
|
||||
<li key={key}>
|
||||
{props.appealType
|
||||
.formComplete ==
|
||||
"true" ||
|
||||
parseInt(key) + 1 <
|
||||
currentSection ? (
|
||||
<a
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
gotoSection(
|
||||
parseInt(
|
||||
key
|
||||
) + 1
|
||||
);
|
||||
}}
|
||||
>
|
||||
{FieldsTranslations(
|
||||
titleList[key]
|
||||
.value
|
||||
)}
|
||||
</a>
|
||||
) : (
|
||||
FieldsTranslations(
|
||||
titleList[key].value
|
||||
)
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
)}
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
</ol>
|
||||
</div>
|
||||
)}
|
||||
</nav>
|
||||
|
||||
{Object.keys(documentListObj).length > 0 && (
|
||||
<div>
|
||||
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
|
||||
{t("newappeal:new-appeal-documentlist-nav")}:
|
||||
</h3>
|
||||
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||
<ol className="govuk-list document-list">
|
||||
<ul className="govuk-list ">
|
||||
<li className="at-nav__page">
|
||||
<ol className="govuk-list govuk-list--bullet">
|
||||
{Object.entries(
|
||||
documentListObj
|
||||
).map(([key, value]) => {
|
||||
return (
|
||||
<li key={key}>{value}</li>
|
||||
);
|
||||
})}
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
</ol>
|
||||
</div>
|
||||
)}
|
||||
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||
<button
|
||||
className="govuk-button govuk-button--secondary progress-save "
|
||||
onClick={() => {
|
||||
let valuesObj = props.props.form[props.form].values;
|
||||
|
||||
console.log("valuesobj:", valuesObj);
|
||||
|
||||
delete valuesObj["_pinswg_appellant_value"];
|
||||
|
||||
console.log("on save:", valuesObj);
|
||||
updateCaseProgress(valuesObj);
|
||||
router.replace(
|
||||
router.locale != "en"
|
||||
? router.locale + "/myportal"
|
||||
: "/myportal"
|
||||
);
|
||||
}}
|
||||
>
|
||||
Save and exit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -289,6 +381,7 @@ const mapStateToProps = (state) => {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
initialValues: state.appealType.caseReference.caseDetails,
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -316,5 +409,6 @@ export default connect(
|
||||
reduxForm({
|
||||
form: "appealForm",
|
||||
destroyOnUnmount: false,
|
||||
enableReinitialize: true, // this is needed!!
|
||||
})(BuildSection)
|
||||
);
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -3,6 +3,7 @@ import data from "../../data/collections.json";
|
||||
import {
|
||||
getBasicSearchDetails,
|
||||
getBasicSearchDetailsPaged,
|
||||
getBasicPartSavedDetails,
|
||||
} from "../../actions";
|
||||
|
||||
/*
|
||||
@@ -69,6 +70,37 @@ export const getSearchDetails = (searchResultsObj) => {
|
||||
return Promise.all(detailsArr);
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the partially saved details of a case from the appeal type
|
||||
* @param object searchResultsObj
|
||||
*/
|
||||
export const getPartSavedDetails = (searchResultsObj) => {
|
||||
//console.log(searchResultsObj);
|
||||
|
||||
let detailsArr = [];
|
||||
searchResultsObj = searchResultsObj.value;
|
||||
const detailsObj = searchResultsObj.map((searchDetail, index) => {
|
||||
if (searchDetail.pinswg_appealcasetype == null) {
|
||||
console.log(searchDetail.title);
|
||||
} else {
|
||||
let formMeta = getFormCollectionByID(
|
||||
searchDetail.pinswg_appealcasetype
|
||||
);
|
||||
console.log(formMeta);
|
||||
detailsArr.push(
|
||||
getBasicPartSavedDetails(
|
||||
formMeta.LogicalCollectionName,
|
||||
searchDetail.title,
|
||||
formMeta.PrimaryIdAttribute,
|
||||
searchDetail.incidentid
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
//console.log(detailsArr);
|
||||
return Promise.all(detailsArr);
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the details of a case from the appeal type
|
||||
* @param object searchResultsObj
|
||||
|
||||
@@ -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,50 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { getToken, azureHeadersNoOdata } from "../../../actions";
|
||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
const hashAPIPath = (queryPath) => {
|
||||
var hashlink = CryptoJS.HmacSHA256(
|
||||
queryPath,
|
||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
||||
);
|
||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var appealTypeName = req.query.appealTypeName;
|
||||
var primaryIdAttribute = req.query.primaryIdAttribute;
|
||||
var incidentID = req.query.incidentID;
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
appealTypeName +
|
||||
"?$filter=_" +
|
||||
primaryIdAttribute +
|
||||
"s_value eq " +
|
||||
incidentID +
|
||||
"&$count=true";
|
||||
|
||||
queryUrl = queryUrl; //+ getSelectQuery(appealTypeName);
|
||||
|
||||
//console.log("query: ", queryUrl, "<<<<end query");
|
||||
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeadersNoOdata(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch(({ err }) => {
|
||||
res.status(400).json(err);
|
||||
});
|
||||
}
|
||||
@@ -32,7 +32,7 @@ export default async function ApiProxy(req, res) {
|
||||
searchString +
|
||||
"')) and pinswg_appealcasetype ne null 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()
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeadersPaged } from "../../../actions";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
const hashAPIPath = (queryPath) => {
|
||||
var hashlink = CryptoJS.HmacSHA256(
|
||||
queryPath,
|
||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
||||
);
|
||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||
|
||||
//return "&hash=" + hashlink;
|
||||
|
||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var searchString = req.query.searchString;
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"incidents?$select=description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=(contains(title, '" +
|
||||
searchString +
|
||||
"') or contains(ticketnumber, '" +
|
||||
searchString +
|
||||
"')) and pinswg_appealcasetype ne null&$orderby=createdon desc&$count=true";
|
||||
|
||||
console.log("basic search ", queryUrl);
|
||||
|
||||
var apiResponse = _.isEmpty(req.query)
|
||||
? res.status(400).json()
|
||||
: searchString.length > 0
|
||||
? axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeadersPaged(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
var dataStr;
|
||||
// dataStr = dataStr.replace(/: true/gm, `: "Yes"`);
|
||||
// dataStr = dataStr.replace(/: false/gm, `: "No"`);
|
||||
|
||||
// console.log("replaced strinig:", dataStr);
|
||||
|
||||
_.has(data, "@odata.nextLink") == true &&
|
||||
((dataStr = JSON.stringify(data["@odata.nextLink"])),
|
||||
(data["@odata.nextLink"] = dataStr.split("/v8.2/")[1]));
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch(({ err }) => {
|
||||
res.status(400).json(err);
|
||||
})
|
||||
: res.status(400).json();
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
@@ -20,9 +20,11 @@ const hashAPIPath = (queryPath) => {
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var appealType = req.query.appealType;
|
||||
var caseReference = req.query.caseReference;
|
||||
var caseReference = req.query.caseReference.split("'").join("''");
|
||||
var token = await getToken();
|
||||
|
||||
//console.log("the case:", caseReference);
|
||||
|
||||
var queryUrl =
|
||||
appealType +
|
||||
"?$filter=pinswg_name eq '" +
|
||||
@@ -31,6 +33,8 @@ export default async function ApiProxy(req, res) {
|
||||
|
||||
queryUrl = queryUrl + getSelectQuery(appealType);
|
||||
|
||||
//console.log("test:", queryUrl);
|
||||
|
||||
return axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
|
||||
@@ -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} />
|
||||
|
||||
@@ -26,6 +26,7 @@ const Home = (props) => {
|
||||
footerLinks,
|
||||
pages,
|
||||
showLogin,
|
||||
showMap,
|
||||
loggedInUserId,
|
||||
hasGGCode,
|
||||
loginEmailStr,
|
||||
@@ -141,6 +142,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}
|
||||
@@ -166,6 +168,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
console.log("auth sess:", thisSession);
|
||||
|
||||
const showLoginCheck = process.env.SHOWLOGIN || false;
|
||||
const showMapCheck = process.env.SHOWMAPS || false;
|
||||
|
||||
const hasLoginCode = thisSession != null;
|
||||
|
||||
@@ -215,6 +218,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
props: {
|
||||
ggLocale: ggLocale,
|
||||
showLogin: showLoginCheck,
|
||||
showMap: showMapCheck,
|
||||
hasGGCode: hasLoginCode,
|
||||
loggedInUserId: portalUserObj,
|
||||
loggedInUserEmail: loginEmailStr,
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
getAppealsTypes,
|
||||
getMandatoryFields,
|
||||
getPickLists,
|
||||
getPartSavedAppeal,
|
||||
} from "../../actions";
|
||||
import { getProviderConfig } from "../../actions/govgateway";
|
||||
import Breadcrumbs from "../../components/breadcrumbs";
|
||||
@@ -32,6 +33,7 @@ import {
|
||||
import { setForm } from "../../store/formData/action";
|
||||
import { getGovGatewayConfig } from "../../store/govgateway/action";
|
||||
import { wrapper } from "../../store/store";
|
||||
import { getPartSavedDetails } from "../../components/utils";
|
||||
|
||||
let Home = (props) => {
|
||||
const { footerLinks, pages, formData } = props;
|
||||
@@ -218,10 +220,23 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
await getPickLists(query.appealtypes),
|
||||
]);
|
||||
|
||||
let searchResultsObj = await getPartSavedAppeal(query.casereference);
|
||||
//console.log("eeee:", searchResultsObj);
|
||||
let searchDetailsObj = await getPartSavedDetails(searchResultsObj);
|
||||
console.log("appeal:", searchDetailsObj[0].value[0]);
|
||||
|
||||
searchDetailsObj = searchDetailsObj[0].value[0];
|
||||
|
||||
searchDetailsObj = JSON.stringify(searchDetailsObj);
|
||||
searchDetailsObj = searchDetailsObj.replace(/:true/gm, `:"Yes"`);
|
||||
searchDetailsObj = searchDetailsObj.replace(/:false/gm, `:"No"`);
|
||||
searchDetailsObj = JSON.parse(searchDetailsObj);
|
||||
|
||||
let caseReference = {};
|
||||
|
||||
caseReference.ticketnumber = query.casereference;
|
||||
caseReference.incidentid = query.inid;
|
||||
caseReference.caseDetails = searchDetailsObj;
|
||||
|
||||
var path = require("path");
|
||||
const configDirectory = path.resolve(process.cwd(), "data/formsxml");
|
||||
@@ -255,6 +270,8 @@ const mapStateToProps = (state) => {
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
govGateway: state.govGateway,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
currentView: state.currentView,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+7
-1
@@ -122,9 +122,15 @@ const makeStore = ({ isServer }) => {
|
||||
"govGateway",
|
||||
"form",
|
||||
],
|
||||
version: 1,
|
||||
version: 1.1,
|
||||
storage: storage,
|
||||
stateReconciler: autoMergeLevel2, // if needed, use a safer storage
|
||||
migrate: (state) => {
|
||||
console.log("Migration Running!");
|
||||
// console.log(state);
|
||||
|
||||
return Promise.resolve(state);
|
||||
},
|
||||
};
|
||||
|
||||
const persistedReducer = persistReducer(persistConfig, reducer); // Create a new reducer with our existing reducer
|
||||
|
||||
@@ -683,11 +683,28 @@ textarea,
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
// .at-nav-container{
|
||||
// @media screen and (min-width: 480px) {
|
||||
// position: fixed;
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
.at-nav {
|
||||
border-top: 5px solid #1d70b8;
|
||||
padding-top: 25px;
|
||||
.progress-heading{
|
||||
display:flex;
|
||||
}
|
||||
.progress-case-reference{
|
||||
margin-left:10px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.at-nav ul.govuk-list.js-hidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -841,6 +858,19 @@ textarea,
|
||||
}
|
||||
}
|
||||
|
||||
.progress-save{
|
||||
padding: 10px 15px !important;
|
||||
font-size: 16px;
|
||||
float: right;
|
||||
border-color: $midgrey !important;
|
||||
color: $midgrey !important;
|
||||
|
||||
&:hover {
|
||||
background-color: $midgrey !important;
|
||||
color: $white !important;
|
||||
}
|
||||
}
|
||||
|
||||
.results .govuk-summary-list__row {
|
||||
@media screen and (max-width: 900px) {
|
||||
padding: 20px 10px;
|
||||
|
||||
Reference in New Issue
Block a user