@@ -271,12 +271,24 @@ let MakeRepresentation = (props) => {
|
|||||||
|
|
||||||
resultsObj = resultsObj[0];
|
resultsObj = resultsObj[0];
|
||||||
|
|
||||||
detailsObj = jsonpath(
|
detailsObj = router.query.hasOwnProperty("state")
|
||||||
'$..[?(@.pinswg_name=="' +
|
? router.query.state == "edit"
|
||||||
currentView.caseReference.currentReference +
|
? jsonpath(
|
||||||
'")]',
|
'$..[?(@.repfile_name =="' + router.query.created + '")]',
|
||||||
setCaseDetailsObj
|
setCaseDetailsObj
|
||||||
);
|
)
|
||||||
|
: jsonpath(
|
||||||
|
'$..[?(@.pinswg_name =="' +
|
||||||
|
currentView.caseReference.currentReference +
|
||||||
|
'")]',
|
||||||
|
setCaseDetailsObj
|
||||||
|
)
|
||||||
|
: jsonpath(
|
||||||
|
'$..[?(@.pinswg_name =="' +
|
||||||
|
currentView.caseReference.currentReference +
|
||||||
|
'")]',
|
||||||
|
setCaseDetailsObj
|
||||||
|
);
|
||||||
|
|
||||||
detailsObj = detailsObj[0];
|
detailsObj = detailsObj[0];
|
||||||
|
|
||||||
@@ -409,12 +421,11 @@ let MakeRepresentation = (props) => {
|
|||||||
const whichControl = () => {
|
const whichControl = () => {
|
||||||
if (
|
if (
|
||||||
isLPA &&
|
isLPA &&
|
||||||
_.isEmpty(
|
_.isEmpty(currentView.representationCapacity)
|
||||||
currentView.representationCapacity ||
|
// ||
|
||||||
(currentView.caseReference.hasOwnProperty("repDetails") &&
|
// (isLPA &&
|
||||||
currentView.caseReference.repDetails
|
// currentView.caseReference.hasOwnProperty("repDetails") &&
|
||||||
.representationCapacity)
|
// !currentView.caseReference.repDetails.representationCapacity)
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
//setRepresentationCapacity("LPA"),
|
//setRepresentationCapacity("LPA"),
|
||||||
@@ -502,7 +513,7 @@ let MakeRepresentation = (props) => {
|
|||||||
// setRepresentationCapacity("LPA");
|
// setRepresentationCapacity("LPA");
|
||||||
// }, []);
|
// }, []);
|
||||||
|
|
||||||
// console.log(currentView.caseReference.appealType);
|
console.log(currentView.caseReference.appealType);
|
||||||
return (
|
return (
|
||||||
<RepLPA
|
<RepLPA
|
||||||
formObj={formObj}
|
formObj={formObj}
|
||||||
@@ -789,10 +800,14 @@ let MakeRepresentation = (props) => {
|
|||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
"_pinswg_localplanningauthority_value":
|
"_pinswg_localplanningauthority_value":
|
||||||
detailsObj["_pinswg_localplanningauthority_value"],
|
detailsObj["_pinswg_localplanningauthority_value"] ||
|
||||||
|
detailsObj["_pinswg_associatedlpa_value"],
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
detailsObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
"representationCapacity": router.query.hasOwnProperty("state")
|
"representationCapacity": router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
@@ -970,10 +985,14 @@ let MakeRepresentation = (props) => {
|
|||||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
"_pinswg_localplanningauthority_value":
|
"_pinswg_localplanningauthority_value":
|
||||||
detailsObj["_pinswg_localplanningauthority_value"],
|
detailsObj["_pinswg_localplanningauthority_value"] ||
|
||||||
|
detailsObj["_pinswg_associatedlpa_value"],
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||||
detailsObj[
|
detailsObj[
|
||||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||||
|
] ||
|
||||||
|
detailsObj[
|
||||||
|
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||||
],
|
],
|
||||||
"representationCapacity": router.query.hasOwnProperty("state")
|
"representationCapacity": router.query.hasOwnProperty("state")
|
||||||
? router.query.state == "edit"
|
? router.query.state == "edit"
|
||||||
|
|||||||
@@ -8,7 +8,16 @@ import RepComplete from "./representationComplete";
|
|||||||
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||||
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
import {
|
||||||
|
bytesToSize,
|
||||||
|
getThumbnailIconByExtension,
|
||||||
|
formatDates,
|
||||||
|
} from "../../utils";
|
||||||
|
|
||||||
|
import {
|
||||||
|
setCurrentReference,
|
||||||
|
setCurrentView,
|
||||||
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
const RepCompleteSubmit = (props) => {
|
const RepCompleteSubmit = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -30,6 +39,7 @@ const RepCompleteSubmit = (props) => {
|
|||||||
showQuestionnaireSection,
|
showQuestionnaireSection,
|
||||||
questionnaireCount,
|
questionnaireCount,
|
||||||
finaliseAppealProcess,
|
finaliseAppealProcess,
|
||||||
|
setCurrentReference,
|
||||||
} = props;
|
} = props;
|
||||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||||
const files = acceptedFiles.map((file) => (
|
const files = acceptedFiles.map((file) => (
|
||||||
@@ -203,6 +213,34 @@ const RepCompleteSubmit = (props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let filterFiles = [];
|
let filterFiles = [];
|
||||||
|
|
||||||
|
function showRepsEnded(endDate) {
|
||||||
|
let date = new Date();
|
||||||
|
date = new Date(date.toDateString());
|
||||||
|
const end = new Date(endDate);
|
||||||
|
return end > date ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const checkRepDatePassed = () => {
|
||||||
|
if (repFormData.representationType == "Questionnaire") {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
if (repFormData.representationType == "Final comments") {
|
||||||
|
return repFormData.hasOwnProperty(
|
||||||
|
"pinswg_finalcommentsduedate"
|
||||||
|
) && showRepsEnded(repFormData.pinswg_finalcommentsduedate)
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
}
|
||||||
|
if (repFormData.representationType == "Statement") {
|
||||||
|
return repFormData.hasOwnProperty("pinswg_statementduedate") &&
|
||||||
|
showRepsEnded(repFormData.pinswg_statementduedate)
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{currentView.representationSubmitConfirmation == true ? (
|
{currentView.representationSubmitConfirmation == true ? (
|
||||||
@@ -291,7 +329,24 @@ const RepCompleteSubmit = (props) => {
|
|||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSubmitBack();
|
// setSubmitBack();
|
||||||
|
setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
});
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
@@ -326,7 +381,26 @@ const RepCompleteSubmit = (props) => {
|
|||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSubmitBack();
|
// setSubmitBack();
|
||||||
|
setCurrentReference(
|
||||||
|
{
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t(
|
{t(
|
||||||
@@ -365,7 +439,25 @@ const RepCompleteSubmit = (props) => {
|
|||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setSubmitBack();
|
// setSubmitBack();
|
||||||
|
|
||||||
|
setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
});
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:change-link-label")}
|
{t("common:change-link-label")}
|
||||||
@@ -427,7 +519,23 @@ const RepCompleteSubmit = (props) => {
|
|||||||
setRepresentationSubmit(
|
setRepresentationSubmit(
|
||||||
false
|
false
|
||||||
))
|
))
|
||||||
: setSubmitBack();
|
: (setCurrentReference({
|
||||||
|
"ticketnumber":
|
||||||
|
repFormData.ticketnumber,
|
||||||
|
"currentReference":
|
||||||
|
repFormData.caseRef,
|
||||||
|
"currentType":
|
||||||
|
"myRepresentations",
|
||||||
|
"incidentid":
|
||||||
|
repFormData.incidentID,
|
||||||
|
"appealType":
|
||||||
|
repFormData.appealType,
|
||||||
|
"repDetails":
|
||||||
|
repFormData,
|
||||||
|
}),
|
||||||
|
setRepresentationSubmit(
|
||||||
|
false
|
||||||
|
));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("common:change-link-label")}
|
{t("common:change-link-label")}
|
||||||
@@ -451,7 +559,6 @@ const RepCompleteSubmit = (props) => {
|
|||||||
"myrepresentations:rep-check-tandc-para-one"
|
"myrepresentations:rep-check-tandc-para-one"
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:rep-check-tandc-para-two"
|
"myrepresentations:rep-check-tandc-para-two"
|
||||||
@@ -466,25 +573,47 @@ const RepCompleteSubmit = (props) => {
|
|||||||
</Link>
|
</Link>
|
||||||
.
|
.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{t(
|
{t(
|
||||||
"myrepresentations:rep-check-tandc-para-three"
|
"myrepresentations:rep-check-tandc-para-three"
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
|
{checkRepDatePassed() ? (
|
||||||
{finaliseAppealProcess ? (
|
<div className="govuk-warning-text noticebanner">
|
||||||
|
<strong className="govuk-warning-text__text">
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
Warning
|
||||||
|
</span>
|
||||||
|
</strong>
|
||||||
|
<div>
|
||||||
|
<div className=" govuk-body-s">
|
||||||
|
<h2 className="govuk-heading-s">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-period-passed-heading"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
<p className="govuk-body-s">
|
||||||
|
{t(
|
||||||
|
"myrepresentations:rep-period-notice-label"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : finaliseAppealProcess ? (
|
||||||
<div className="">
|
<div className="">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
||||||
Finalising your representation
|
{t(
|
||||||
submission
|
"myrepresentations:rep-finalising-heading"
|
||||||
|
)}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
Currenly uploading files and finalising
|
{t(
|
||||||
your representation submission
|
"myrepresentations:rep-finalising-label"
|
||||||
|
)}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body textloading">
|
<p className="govuk-body textloading">
|
||||||
Please wait
|
{t("myrepresentations:rep-wait-label")}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
@@ -573,7 +702,11 @@ const mapStateToProps = (state) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
const mapDispatchToProps = (dispatch) => {
|
||||||
return {};
|
return {
|
||||||
|
setCurrentReference: (currentReference) => {
|
||||||
|
dispatch(setCurrentReference(currentReference));
|
||||||
|
},
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(RepCompleteSubmit);
|
export default connect(mapStateToProps, mapDispatchToProps)(RepCompleteSubmit);
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ import {
|
|||||||
setRepresentationCapacity,
|
setRepresentationCapacity,
|
||||||
setRepresentationSubmit,
|
setRepresentationSubmit,
|
||||||
setFilesForRepresentations,
|
setFilesForRepresentations,
|
||||||
|
setCurrentPage,
|
||||||
|
setCurrentReference,
|
||||||
} from "../../../store/currentView/action";
|
} from "../../../store/currentView/action";
|
||||||
|
|
||||||
let RepLPA = (props) => {
|
let RepLPA = (props) => {
|
||||||
@@ -611,6 +613,9 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
setFilesForRepresentations: (fileList) => {
|
setFilesForRepresentations: (fileList) => {
|
||||||
dispatch(setFilesForRepresentations(fileList));
|
dispatch(setFilesForRepresentations(fileList));
|
||||||
},
|
},
|
||||||
|
setCurrentReference: (currentReference) => {
|
||||||
|
dispatch(setCurrentReference(currentReference));
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapStateToProps = (state, props) => {
|
const mapStateToProps = (state, props) => {
|
||||||
|
|||||||
@@ -56,9 +56,13 @@ const TopThree = (props) => {
|
|||||||
let showTopThreeArr = showTopThree.value;
|
let showTopThreeArr = showTopThree.value;
|
||||||
|
|
||||||
Object.keys(showTopThreeArr).map((key, index) => {
|
Object.keys(showTopThreeArr).map((key, index) => {
|
||||||
let createdDate = parseInt(
|
let createdDate = showTopThreeArr[key].repfile_name.split("_-_");
|
||||||
showTopThreeArr[key].repfile_name.split("-")[3]
|
createdDate =
|
||||||
);
|
createdDate[0].replace(
|
||||||
|
/(?<=\d{4}-\d{2}-\d{2})-(?=\d{2}:\d{2}:\d{2})/,
|
||||||
|
"T"
|
||||||
|
) + "Z";
|
||||||
|
|
||||||
showTopThreeArr[key].createdDate = createdDate;
|
showTopThreeArr[key].createdDate = createdDate;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -163,18 +167,17 @@ const TopThree = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const repRaisedDate = (datePart) => {
|
const repRaisedDate = (datePart) => {
|
||||||
|
var dateStr = datePart.split("_-_")[0];
|
||||||
|
var timeStr = dateStr.split("-")[3];
|
||||||
|
|
||||||
var dateObj = new Date(
|
var dateObj = new Date(
|
||||||
datePart.split("-")[0] +
|
dateStr.split("-")[0] +
|
||||||
"-" +
|
"-" +
|
||||||
datePart.split("-")[1] +
|
dateStr.split("-")[1] +
|
||||||
"-" +
|
"-" +
|
||||||
datePart.split("-")[2] +
|
dateStr.split("-")[2] +
|
||||||
" " +
|
" " +
|
||||||
datePart.split("-")[3].split("_")[0].slice(0, 2) +
|
timeStr
|
||||||
":" +
|
|
||||||
datePart.split("-")[3].split("_")[0].slice(2, 4) +
|
|
||||||
":" +
|
|
||||||
datePart.split("-")[3].split("_")[0].slice(4, 6)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return dateObj.toLocaleString();
|
return dateObj.toLocaleString();
|
||||||
|
|||||||
+123
-106
@@ -148,117 +148,134 @@ const ViewAllResults = (props) => {
|
|||||||
<b> {t("myportal:appeal-pending-label")}</b>
|
<b> {t("myportal:appeal-pending-label")}</b>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Link
|
<>
|
||||||
href={
|
<Link
|
||||||
currentView.viewKey == "myRepresentations"
|
href={
|
||||||
? {
|
currentView.viewKey ==
|
||||||
pathname:
|
"myRepresentations"
|
||||||
"/myportal/representation",
|
? {
|
||||||
query: {
|
pathname:
|
||||||
case: resultsArr[key].caseRef,
|
"/myportal/representation",
|
||||||
state: "edit",
|
query: {
|
||||||
created:
|
case: resultsArr[key]
|
||||||
|
.caseRef,
|
||||||
|
state: "edit",
|
||||||
|
created:
|
||||||
|
resultsArr[key]
|
||||||
|
.repfile_name,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: currentView.viewKey ==
|
||||||
|
"awaitingSubmissionDetails"
|
||||||
|
? router.locale == "cy"
|
||||||
|
? "/fymhorth/parhauigyflwyno"
|
||||||
|
: "/myportal" +
|
||||||
|
"/" +
|
||||||
|
getFormCollectionByID(
|
||||||
resultsArr[key]
|
resultsArr[key]
|
||||||
.repfile_name,
|
.pinswg_appealcasetype
|
||||||
},
|
).UrlName +
|
||||||
}
|
"?lpa=" +
|
||||||
: currentView.viewKey ==
|
resultsArr[key][
|
||||||
"awaitingSubmissionDetails"
|
"_pinswg_associatedlpa_value"
|
||||||
? router.locale == "cy"
|
] +
|
||||||
? "/fymhorth/parhauigyflwyno"
|
"&apt=" +
|
||||||
: "/myportal" +
|
|
||||||
"/" +
|
|
||||||
getFormCollectionByID(
|
|
||||||
resultsArr[key]
|
resultsArr[key]
|
||||||
.pinswg_appealcasetype
|
.pinswg_appealcasetype +
|
||||||
).UrlName +
|
"&casereference=" +
|
||||||
"?lpa=" +
|
resultsArr[key].title +
|
||||||
resultsArr[key][
|
"&inid=" +
|
||||||
"_pinswg_associatedlpa_value"
|
resultsArr[key].incidentid +
|
||||||
] +
|
"&key=" +
|
||||||
"&apt=" +
|
currentView.viewKey
|
||||||
resultsArr[key]
|
: router.locale == "cy"
|
||||||
.pinswg_appealcasetype +
|
? myportal == true
|
||||||
"&casereference=" +
|
? "/fymhorth/achos"
|
||||||
resultsArr[key].title +
|
: "/achos"
|
||||||
"&inid=" +
|
: myportal == true
|
||||||
resultsArr[key].incidentid +
|
? "/myportal/case/" +
|
||||||
"&key=" +
|
resultsArr[key].ticketnumber +
|
||||||
|
"?key=" +
|
||||||
currentView.viewKey
|
currentView.viewKey
|
||||||
: router.locale == "cy"
|
: "/case/" +
|
||||||
? myportal == true
|
resultsArr[key].ticketnumber
|
||||||
? "/fymhorth/achos"
|
}
|
||||||
: "/achos"
|
onClick={() => {
|
||||||
: myportal == true
|
currentView.viewKey == "watchedCases" &&
|
||||||
? "/myportal/case/" +
|
setSearchResults(
|
||||||
resultsArr[key].ticketnumber +
|
props.watchedCases.watchedCases
|
||||||
"?key=" +
|
),
|
||||||
currentView.viewKey
|
setSearchDetails(
|
||||||
: "/case/" +
|
props.watchedCases
|
||||||
resultsArr[key].ticketnumber
|
.watchedCasesDetails
|
||||||
}
|
),
|
||||||
onClick={() => {
|
setCurrentReference({
|
||||||
currentView.viewKey == "watchedCases" &&
|
"ticketnumber":
|
||||||
setSearchResults(
|
resultsArr[key]
|
||||||
props.watchedCases.watchedCases
|
.ticketnumber,
|
||||||
),
|
"currentReference":
|
||||||
setSearchDetails(
|
currentView.viewKey !=
|
||||||
props.watchedCases
|
"watchedCases"
|
||||||
.watchedCasesDetails
|
? currentView.viewKey ==
|
||||||
),
|
"myRepresentations"
|
||||||
setCurrentReference({
|
? resultsArr[key]
|
||||||
"ticketnumber":
|
.caseRef
|
||||||
resultsArr[key].ticketnumber,
|
: resultsArr[key]
|
||||||
"currentReference":
|
.ticketnumber
|
||||||
currentView.viewKey !=
|
: resultsArr[key][
|
||||||
"watchedCases"
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
? currentView.viewKey ==
|
],
|
||||||
"myRepresentations"
|
|
||||||
|
"currentType":
|
||||||
|
currentView.viewKey,
|
||||||
|
"incidentid":
|
||||||
|
currentView.viewKey !=
|
||||||
|
"watchedCases"
|
||||||
? resultsArr[key]
|
? resultsArr[key]
|
||||||
.caseRef
|
.incidentid
|
||||||
: resultsArr[key]
|
: resultsArr[key][
|
||||||
.ticketnumber
|
"_pinswg_watchedcase_value"
|
||||||
: resultsArr[key][
|
],
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
|
||||||
],
|
|
||||||
|
|
||||||
"currentType": currentView.viewKey,
|
"appealType":
|
||||||
"incidentid":
|
resultsArr[key]
|
||||||
currentView.viewKey !=
|
.pinswg_appealcasetype,
|
||||||
"watchedCases"
|
"repDetails":
|
||||||
? resultsArr[key].incidentid
|
currentView.viewKey ==
|
||||||
: resultsArr[key][
|
"myRepresentations" &&
|
||||||
"_pinswg_watchedcase_value"
|
resultsArr[key],
|
||||||
],
|
}),
|
||||||
|
setCurrentView({
|
||||||
"appealType":
|
"viewName":
|
||||||
resultsArr[key]
|
currentView.viewName,
|
||||||
.pinswg_appealcasetype,
|
"viewKey": currentView.viewKey,
|
||||||
"repDetails":
|
});
|
||||||
currentView.viewKey ==
|
}}
|
||||||
"myRepresentations" &&
|
>
|
||||||
resultsArr[key],
|
<span className="results-visually-hidden">
|
||||||
}),
|
{t(
|
||||||
setCurrentView({
|
"search:searchresults-case-reference-label"
|
||||||
"viewName": currentView.viewName,
|
)}
|
||||||
"viewKey": currentView.viewKey,
|
:
|
||||||
});
|
</span>
|
||||||
}}
|
{currentView.viewKey != "watchedCases"
|
||||||
>
|
? currentView.viewKey ==
|
||||||
<span className="results-visually-hidden">
|
"myRepresentations"
|
||||||
{t(
|
? resultsArr[key].caseRef
|
||||||
"search:searchresults-case-reference-label"
|
: resultsArr[key].ticketnumber
|
||||||
)}
|
: resultsArr[key][
|
||||||
:
|
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||||
</span>
|
]}
|
||||||
{currentView.viewKey != "watchedCases"
|
</Link>
|
||||||
? currentView.viewKey == "myRepresentations"
|
{currentView.viewKey == "myRepresentations" && (
|
||||||
? resultsArr[key].caseRef
|
<>
|
||||||
: resultsArr[key].ticketnumber
|
<br />
|
||||||
: resultsArr[key][
|
<span>
|
||||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
{resultsArr[key].representationType}
|
||||||
]}
|
</span>
|
||||||
</Link>
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
{/* <dd className="govuk-summary-list__value govuk-!-font-size-16">
|
{/* <dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||||
|
|||||||
@@ -248,13 +248,14 @@ let BuildCheckSection = (props) => {
|
|||||||
{finaliseAppealProcess ? (
|
{finaliseAppealProcess ? (
|
||||||
<div className="">
|
<div className="">
|
||||||
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
||||||
Finalising your appeal submission
|
{t("newappeal:new-appeal-finalising-heading")}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
Currenly uploading files and finalising your appeal
|
{t("newappeal:new-appeal-finalising-label")}
|
||||||
submission
|
</p>
|
||||||
|
<p className="govuk-body textloading">
|
||||||
|
{t("newappeal:new-appeal-wait-label")}
|
||||||
</p>
|
</p>
|
||||||
<p className="govuk-body textloading">Please wait</p>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -489,6 +489,13 @@ export const AppealRow_pdf = (props) => {
|
|||||||
{props.props.hasOwnProperty(
|
{props.props.hasOwnProperty(
|
||||||
datafieldname[0].value
|
datafieldname[0].value
|
||||||
) &&
|
) &&
|
||||||
|
props.props[
|
||||||
|
datafieldname[0].value
|
||||||
|
] == null ? (
|
||||||
|
<View>
|
||||||
|
<Text>N/A</Text>
|
||||||
|
</View>
|
||||||
|
) : (
|
||||||
props.props[
|
props.props[
|
||||||
datafieldname[0]
|
datafieldname[0]
|
||||||
.value
|
.value
|
||||||
@@ -535,7 +542,8 @@ export const AppealRow_pdf = (props) => {
|
|||||||
""
|
""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
)}
|
)
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
+40
-17
@@ -561,14 +561,23 @@ export const updateLinks = (jsonObj) => {
|
|||||||
// Find all text nodes in the document
|
// Find all text nodes in the document
|
||||||
const walk = (node) => {
|
const walk = (node) => {
|
||||||
if (node.nodeType === Node.TEXT_NODE) {
|
if (node.nodeType === Node.TEXT_NODE) {
|
||||||
// Check if the text node contains a URL (simple check for a URL pattern)
|
|
||||||
const urlRegex =
|
const urlRegex =
|
||||||
/(?:https?:\/\/)?(?:www\.)?([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})(\/[^\s]*)?/g;
|
/(?:https?:\/\/)?(?:www\.)?([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})(\/[^\s]*)?/g;
|
||||||
let match;
|
let match;
|
||||||
|
let currentText = node.textContent;
|
||||||
|
let lastIndex = 0;
|
||||||
|
let newNodeContent = [];
|
||||||
|
|
||||||
// Process the text node if it contains a URL
|
// Process all URLs found in the current text node
|
||||||
while ((match = urlRegex.exec(node.textContent)) !== null) {
|
while ((match = urlRegex.exec(currentText)) !== null) {
|
||||||
// Construct the full URL by adding the protocol if missing, and the domain and path
|
// Before the URL
|
||||||
|
if (match.index > lastIndex) {
|
||||||
|
newNodeContent.push(
|
||||||
|
currentText.slice(lastIndex, match.index)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct the full URL (default to https://)
|
||||||
let fullUrl = match[0];
|
let fullUrl = match[0];
|
||||||
if (
|
if (
|
||||||
!fullUrl.startsWith("http://") &&
|
!fullUrl.startsWith("http://") &&
|
||||||
@@ -577,21 +586,35 @@ export const updateLinks = (jsonObj) => {
|
|||||||
fullUrl = `https://${match[1]}${match[2] || ""}`; // Default to https
|
fullUrl = `https://${match[1]}${match[2] || ""}`; // Default to https
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the match is already inside an <a> tag, if so, skip it
|
// Create the anchor element
|
||||||
if (node.parentNode.tagName !== "A") {
|
const anchor = document.createElement("a");
|
||||||
const anchor = document.createElement("a");
|
anchor.href = fullUrl;
|
||||||
anchor.href = fullUrl;
|
anchor.textContent = match[0];
|
||||||
anchor.textContent = match[0];
|
anchor.setAttribute("rel", "noopener noreferrer");
|
||||||
|
|
||||||
// Add rel="noopener noreferrer" for security
|
// Add the anchor tag to the node content
|
||||||
anchor.setAttribute("rel", "noopener noreferrer");
|
newNodeContent.push(anchor);
|
||||||
|
|
||||||
// Replace the URL with the anchor element in the text node
|
// Update the last index processed
|
||||||
const range = document.createRange();
|
lastIndex = urlRegex.lastIndex;
|
||||||
range.selectNodeContents(node);
|
}
|
||||||
range.deleteContents();
|
|
||||||
range.insertNode(anchor);
|
// Add the remaining text after the last URL
|
||||||
}
|
if (lastIndex < currentText.length) {
|
||||||
|
newNodeContent.push(currentText.slice(lastIndex));
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there were any replacements, update the text node
|
||||||
|
if (newNodeContent.length > 0) {
|
||||||
|
const fragment = document.createDocumentFragment();
|
||||||
|
newNodeContent.forEach((item) => {
|
||||||
|
if (typeof item === "string") {
|
||||||
|
fragment.appendChild(document.createTextNode(item));
|
||||||
|
} else {
|
||||||
|
fragment.appendChild(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
node.parentNode.replaceChild(fragment, node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-19
@@ -159,31 +159,13 @@
|
|||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
|
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
|
||||||
"LogicalName": "pinswg_enforcementlistedbuildingconservationap",
|
"LogicalName": "pinswg_enforcementlistedbuildingconservationap",
|
||||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconservationapid",
|
||||||
"UrlName": "enforcementlistedbuildingconservationap",
|
|
||||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
|
||||||
"appealTypeID": "846040006",
|
|
||||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
|
|
||||||
"LogicalName": "pinswg_enforcementlistedbuildingandconservationappeals39",
|
|
||||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
|
||||||
"UrlName": "enforcementlistedbuildingconservationap",
|
"UrlName": "enforcementlistedbuildingconservationap",
|
||||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
||||||
"appealTypeID": "846040006",
|
"appealTypeID": "846040006",
|
||||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
||||||
"value": "Enforcement Listed Building and Conservation Appeal - S39"
|
"value": "Enforcement Listed Building and Conservation Appeal - S39"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
|
|
||||||
"LogicalName": "pinswg_enforcementlistedbuildingandconservationap",
|
|
||||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
|
||||||
"UrlName": "enforcementlistedbuildingconservationap",
|
|
||||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
|
||||||
"appealTypeID": "846040006",
|
|
||||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"LogicalCollectionName": "pinswg_callinss77s",
|
"LogicalCollectionName": "pinswg_callinss77s",
|
||||||
"LogicalName": "pinswg_callinss77",
|
"LogicalName": "pinswg_callinss77",
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
"further-details-title": "Mae angen rhagor o fanylion",
|
"further-details-title": "Mae angen rhagor o fanylion",
|
||||||
"further-details-header": "Ni allwch fewngofnodi ar hyn o bryd",
|
"further-details-header": "Ni allwch fewngofnodi ar hyn o bryd",
|
||||||
"further-details-para-one": "Mae angen i PEDW gadarnhau ychydig mwy o wybodaeth amdanoch cyn y gallwch barhau.",
|
"further-details-para-one": "Mae angen i PEDW gadarnhau ychydig mwy o wybodaeth amdanoch cyn y gallwch barhau.",
|
||||||
"further-details-para-two": "Ffoniwch 01234 567890 neu cysylltwch â ni ar ",
|
"further-details-para-two": "Ffoniwch 0300 123 1590 neu cysylltwch â ni ar ",
|
||||||
"login-modal-message": "Mae eich sesiwn ar fin dod i ben mewn {{remaining}} eiliad oherwydd anweithgarwch. Byddwch yn cael eich ailgyfeirio i'r dudalen fewngofnodi.",
|
"login-modal-message": "Mae eich sesiwn ar fin dod i ben mewn {{remaining}} eiliad oherwydd anweithgarwch. Byddwch yn cael eich ailgyfeirio i'r dudalen fewngofnodi.",
|
||||||
"login-modal-button": "Arhoswch wedi mewngofnodi"
|
"login-modal-button": "Arhoswch wedi mewngofnodi"
|
||||||
}
|
}
|
||||||
@@ -229,5 +229,10 @@
|
|||||||
"is-required-label": "Yn ofynnol",
|
"is-required-label": "Yn ofynnol",
|
||||||
"select-a-date-label": "Dewiswch ddyddiad",
|
"select-a-date-label": "Dewiswch ddyddiad",
|
||||||
"questionnaire-evidence-label": "Tystiolaeth",
|
"questionnaire-evidence-label": "Tystiolaeth",
|
||||||
"questionnaire-hint-para": "Cwblhewch yr Holiadur canlynol. Os oes angen atodi dogfennau mewn ymateb i unrhyw gwestiynau, gallwch eu huwchlwytho yn y cam 'Ychwanegu eich ffeiliau'."
|
"questionnaire-hint-para": "Cwblhewch yr Holiadur canlynol. Os oes angen atodi dogfennau mewn ymateb i unrhyw gwestiynau, gallwch eu huwchlwytho yn y cam 'Ychwanegu eich ffeiliau'.",
|
||||||
|
"rep-finalising-heading": "Cwblhau eich cyflwyniad sylwadau ",
|
||||||
|
"rep-finalising-label": "Wrthi'n uwchlwytho ffeiliau ar hyn o bryd ac yn cwblhau eich cyflwyniad cynrychioliad ",
|
||||||
|
"rep-wait-label": "Arhoswch os gwelwch yn dda",
|
||||||
|
"rep-period-passed-heading": "Mae'r cyfnod cynrychioli wedi mynd heibio",
|
||||||
|
"rep-period-notice-label": "Aeth y dyddiad dyledus ar gyfer y sylw hwn heibio. Ni allwch gyflwyno'r wybodaeth a ddarparwyd gennych mwyach."
|
||||||
}
|
}
|
||||||
@@ -113,5 +113,8 @@
|
|||||||
"planning-obligation-(s106/unilateral)": "Rhwymedigaeth gynllunio (S106/Unochrog)",
|
"planning-obligation-(s106/unilateral)": "Rhwymedigaeth gynllunio (S106/Unochrog)",
|
||||||
"site-location-plan": "Cynllun Lleoliad Safle",
|
"site-location-plan": "Cynllun Lleoliad Safle",
|
||||||
"registration-of-application-letter": "Llythyr Cofrestru Cais",
|
"registration-of-application-letter": "Llythyr Cofrestru Cais",
|
||||||
"previously-added-files": "Ffeiliau wedi'u llwytho i fyny"
|
"previously-added-files": "Ffeiliau wedi'u llwytho i fyny",
|
||||||
|
"new-appeal-finalising-heading": "Cwblhau cyflwyniad eich apêl",
|
||||||
|
"new-appeal-finalising-label": "Wrthi'n uwchlwytho ffeiliau ar hyn o bryd a chwblhau eich cyflwyniad apêl",
|
||||||
|
"new-appeal-wait-label": "Arhoswch os gwelwch yn dda"
|
||||||
}
|
}
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
"error-instruction-label": "If you are unable to view your recent activity, press Ctrl, Shift and R to refresh your browser (or Cmd and R if you are using a Mac).",
|
"error-instruction-label": "If you are unable to view your recent activity, press Ctrl, Shift and R to refresh your browser (or Cmd and R if you are using a Mac).",
|
||||||
"further-details-title": "Further details required",
|
"further-details-title": "Further details required",
|
||||||
"further-details-header": "You can not be logged in at this time",
|
"further-details-header": "You can not be logged in at this time",
|
||||||
"further-details-para-one": "PEDW needs to confirm a bit more informtion about you before you can continue.",
|
"further-details-para-one": "PEDW needs to confirm a bit more information about you before you can continue.",
|
||||||
"further-details-para-two": "Please call 01234 567890 or contact us on ",
|
"further-details-para-two": "Please call 0300 123 1590 or contact us on ",
|
||||||
"login-modal-message": "Your session is about to expire in {{remaining}} seconds due to inactivity. You will be redirected to the login page.",
|
"login-modal-message": "Your session is about to expire in {{remaining}} seconds due to inactivity. You will be redirected to the login page.",
|
||||||
"login-modal-button": "Stay logged in "
|
"login-modal-button": "Stay logged in "
|
||||||
}
|
}
|
||||||
@@ -229,5 +229,10 @@
|
|||||||
"is-required-label": "Is required",
|
"is-required-label": "Is required",
|
||||||
"select-a-date-label": "Select a date",
|
"select-a-date-label": "Select a date",
|
||||||
"questionnaire-evidence-label": "Evidence",
|
"questionnaire-evidence-label": "Evidence",
|
||||||
"questionnaire-hint-para": "Please complete the following Questionnaire. If you need to attach documents in response to any questions, you can upload them in the 'Add your files' step."
|
"questionnaire-hint-para": "Please complete the following Questionnaire. If you need to attach documents in response to any questions, you can upload them in the 'Add your files' step.",
|
||||||
|
"rep-finalising-heading": "Finalising your representation submission",
|
||||||
|
"rep-finalising-label": "Currently uploading files and finalising your representation submission",
|
||||||
|
"rep-wait-label": "Please wait",
|
||||||
|
"rep-period-passed-heading": "Representation period has passed",
|
||||||
|
"rep-period-notice-label": "The due date for this representation passed. You can no longer submit the information you have provided."
|
||||||
}
|
}
|
||||||
@@ -113,5 +113,8 @@
|
|||||||
"planning-obligation-(s106/unilateral)": "Planning obligation (S106/Unilateral)",
|
"planning-obligation-(s106/unilateral)": "Planning obligation (S106/Unilateral)",
|
||||||
"site-location-plan": "Site Location Plan",
|
"site-location-plan": "Site Location Plan",
|
||||||
"registration-of-application-letter": "Registration of Application letter",
|
"registration-of-application-letter": "Registration of Application letter",
|
||||||
"previously-added-files": "Uploaded files"
|
"previously-added-files": "Uploaded files",
|
||||||
|
"new-appeal-finalising-heading": "Finalising your appeal submission",
|
||||||
|
"new-appeal-finalising-label": "Currently uploading files and finalising your appeal submission",
|
||||||
|
"new-appeal-wait-label": "Please wait"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user