@@ -271,12 +271,24 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
resultsObj = resultsObj[0];
|
||||
|
||||
detailsObj = jsonpath(
|
||||
'$..[?(@.pinswg_name=="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]',
|
||||
setCaseDetailsObj
|
||||
);
|
||||
detailsObj = router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
? jsonpath(
|
||||
'$..[?(@.repfile_name =="' + router.query.created + '")]',
|
||||
setCaseDetailsObj
|
||||
)
|
||||
: jsonpath(
|
||||
'$..[?(@.pinswg_name =="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]',
|
||||
setCaseDetailsObj
|
||||
)
|
||||
: jsonpath(
|
||||
'$..[?(@.pinswg_name =="' +
|
||||
currentView.caseReference.currentReference +
|
||||
'")]',
|
||||
setCaseDetailsObj
|
||||
);
|
||||
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
@@ -409,12 +421,11 @@ let MakeRepresentation = (props) => {
|
||||
const whichControl = () => {
|
||||
if (
|
||||
isLPA &&
|
||||
_.isEmpty(
|
||||
currentView.representationCapacity ||
|
||||
(currentView.caseReference.hasOwnProperty("repDetails") &&
|
||||
currentView.caseReference.repDetails
|
||||
.representationCapacity)
|
||||
)
|
||||
_.isEmpty(currentView.representationCapacity)
|
||||
// ||
|
||||
// (isLPA &&
|
||||
// currentView.caseReference.hasOwnProperty("repDetails") &&
|
||||
// !currentView.caseReference.repDetails.representationCapacity)
|
||||
) {
|
||||
return (
|
||||
//setRepresentationCapacity("LPA"),
|
||||
@@ -502,7 +513,7 @@ let MakeRepresentation = (props) => {
|
||||
// setRepresentationCapacity("LPA");
|
||||
// }, []);
|
||||
|
||||
// console.log(currentView.caseReference.appealType);
|
||||
console.log(currentView.caseReference.appealType);
|
||||
return (
|
||||
<RepLPA
|
||||
formObj={formObj}
|
||||
@@ -789,10 +800,14 @@ let MakeRepresentation = (props) => {
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"_pinswg_localplanningauthority_value":
|
||||
detailsObj["_pinswg_localplanningauthority_value"],
|
||||
detailsObj["_pinswg_localplanningauthority_value"] ||
|
||||
detailsObj["_pinswg_associatedlpa_value"],
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||
detailsObj[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"representationCapacity": router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
@@ -970,10 +985,14 @@ let MakeRepresentation = (props) => {
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"_pinswg_localplanningauthority_value":
|
||||
detailsObj["_pinswg_localplanningauthority_value"],
|
||||
detailsObj["_pinswg_localplanningauthority_value"] ||
|
||||
detailsObj["_pinswg_associatedlpa_value"],
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue":
|
||||
detailsObj[
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
"representationCapacity": router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
|
||||
@@ -8,7 +8,16 @@ import RepComplete from "./representationComplete";
|
||||
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||
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) => {
|
||||
let { t } = useTranslation();
|
||||
@@ -30,6 +39,7 @@ const RepCompleteSubmit = (props) => {
|
||||
showQuestionnaireSection,
|
||||
questionnaireCount,
|
||||
finaliseAppealProcess,
|
||||
setCurrentReference,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
@@ -203,6 +213,34 @@ const RepCompleteSubmit = (props) => {
|
||||
});
|
||||
|
||||
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 (
|
||||
<>
|
||||
{currentView.representationSubmitConfirmation == true ? (
|
||||
@@ -291,7 +329,24 @@ const RepCompleteSubmit = (props) => {
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
setSubmitBack();
|
||||
// setSubmitBack();
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
repFormData.ticketnumber,
|
||||
"currentReference":
|
||||
repFormData.caseRef,
|
||||
"currentType":
|
||||
"myRepresentations",
|
||||
"incidentid":
|
||||
repFormData.incidentID,
|
||||
"appealType":
|
||||
repFormData.appealType,
|
||||
"repDetails":
|
||||
repFormData,
|
||||
});
|
||||
setRepresentationSubmit(
|
||||
false
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t(
|
||||
@@ -326,7 +381,26 @@ const RepCompleteSubmit = (props) => {
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
setSubmitBack();
|
||||
// setSubmitBack();
|
||||
setCurrentReference(
|
||||
{
|
||||
"ticketnumber":
|
||||
repFormData.ticketnumber,
|
||||
"currentReference":
|
||||
repFormData.caseRef,
|
||||
"currentType":
|
||||
"myRepresentations",
|
||||
"incidentid":
|
||||
repFormData.incidentID,
|
||||
"appealType":
|
||||
repFormData.appealType,
|
||||
"repDetails":
|
||||
repFormData,
|
||||
}
|
||||
);
|
||||
setRepresentationSubmit(
|
||||
false
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t(
|
||||
@@ -365,7 +439,25 @@ const RepCompleteSubmit = (props) => {
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
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")}
|
||||
@@ -427,7 +519,23 @@ const RepCompleteSubmit = (props) => {
|
||||
setRepresentationSubmit(
|
||||
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")}
|
||||
@@ -451,7 +559,6 @@ const RepCompleteSubmit = (props) => {
|
||||
"myrepresentations:rep-check-tandc-para-one"
|
||||
)}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{t(
|
||||
"myrepresentations:rep-check-tandc-para-two"
|
||||
@@ -466,25 +573,47 @@ const RepCompleteSubmit = (props) => {
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{t(
|
||||
"myrepresentations:rep-check-tandc-para-three"
|
||||
)}
|
||||
</p>
|
||||
|
||||
{finaliseAppealProcess ? (
|
||||
{checkRepDatePassed() ? (
|
||||
<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="">
|
||||
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
||||
Finalising your representation
|
||||
submission
|
||||
{t(
|
||||
"myrepresentations:rep-finalising-heading"
|
||||
)}
|
||||
</h3>
|
||||
<p className="govuk-body">
|
||||
Currenly uploading files and finalising
|
||||
your representation submission
|
||||
{t(
|
||||
"myrepresentations:rep-finalising-label"
|
||||
)}
|
||||
</p>
|
||||
<p className="govuk-body textloading">
|
||||
Please wait
|
||||
{t("myrepresentations:rep-wait-label")}
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
@@ -573,7 +702,11 @@ const mapStateToProps = (state) => {
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {};
|
||||
return {
|
||||
setCurrentReference: (currentReference) => {
|
||||
dispatch(setCurrentReference(currentReference));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(RepCompleteSubmit);
|
||||
|
||||
@@ -21,6 +21,8 @@ import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setFilesForRepresentations,
|
||||
setCurrentPage,
|
||||
setCurrentReference,
|
||||
} from "../../../store/currentView/action";
|
||||
|
||||
let RepLPA = (props) => {
|
||||
@@ -611,6 +613,9 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
setFilesForRepresentations: (fileList) => {
|
||||
dispatch(setFilesForRepresentations(fileList));
|
||||
},
|
||||
setCurrentReference: (currentReference) => {
|
||||
dispatch(setCurrentReference(currentReference));
|
||||
},
|
||||
});
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
|
||||
@@ -56,9 +56,13 @@ const TopThree = (props) => {
|
||||
let showTopThreeArr = showTopThree.value;
|
||||
|
||||
Object.keys(showTopThreeArr).map((key, index) => {
|
||||
let createdDate = parseInt(
|
||||
showTopThreeArr[key].repfile_name.split("-")[3]
|
||||
);
|
||||
let createdDate = showTopThreeArr[key].repfile_name.split("_-_");
|
||||
createdDate =
|
||||
createdDate[0].replace(
|
||||
/(?<=\d{4}-\d{2}-\d{2})-(?=\d{2}:\d{2}:\d{2})/,
|
||||
"T"
|
||||
) + "Z";
|
||||
|
||||
showTopThreeArr[key].createdDate = createdDate;
|
||||
});
|
||||
|
||||
@@ -163,18 +167,17 @@ const TopThree = (props) => {
|
||||
};
|
||||
|
||||
const repRaisedDate = (datePart) => {
|
||||
var dateStr = datePart.split("_-_")[0];
|
||||
var timeStr = dateStr.split("-")[3];
|
||||
|
||||
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) +
|
||||
":" +
|
||||
datePart.split("-")[3].split("_")[0].slice(2, 4) +
|
||||
":" +
|
||||
datePart.split("-")[3].split("_")[0].slice(4, 6)
|
||||
timeStr
|
||||
);
|
||||
|
||||
return dateObj.toLocaleString();
|
||||
|
||||
+123
-106
@@ -148,117 +148,134 @@ const ViewAllResults = (props) => {
|
||||
<b> {t("myportal:appeal-pending-label")}</b>
|
||||
</div>
|
||||
) : (
|
||||
<Link
|
||||
href={
|
||||
currentView.viewKey == "myRepresentations"
|
||||
? {
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case: resultsArr[key].caseRef,
|
||||
state: "edit",
|
||||
created:
|
||||
<>
|
||||
<Link
|
||||
href={
|
||||
currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
? {
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
query: {
|
||||
case: resultsArr[key]
|
||||
.caseRef,
|
||||
state: "edit",
|
||||
created:
|
||||
resultsArr[key]
|
||||
.repfile_name,
|
||||
},
|
||||
}
|
||||
: currentView.viewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? "/fymhorth/parhauigyflwyno"
|
||||
: "/myportal" +
|
||||
"/" +
|
||||
getFormCollectionByID(
|
||||
resultsArr[key]
|
||||
.repfile_name,
|
||||
},
|
||||
}
|
||||
: currentView.viewKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? "/fymhorth/parhauigyflwyno"
|
||||
: "/myportal" +
|
||||
"/" +
|
||||
getFormCollectionByID(
|
||||
.pinswg_appealcasetype
|
||||
).UrlName +
|
||||
"?lpa=" +
|
||||
resultsArr[key][
|
||||
"_pinswg_associatedlpa_value"
|
||||
] +
|
||||
"&apt=" +
|
||||
resultsArr[key]
|
||||
.pinswg_appealcasetype
|
||||
).UrlName +
|
||||
"?lpa=" +
|
||||
resultsArr[key][
|
||||
"_pinswg_associatedlpa_value"
|
||||
] +
|
||||
"&apt=" +
|
||||
resultsArr[key]
|
||||
.pinswg_appealcasetype +
|
||||
"&casereference=" +
|
||||
resultsArr[key].title +
|
||||
"&inid=" +
|
||||
resultsArr[key].incidentid +
|
||||
"&key=" +
|
||||
.pinswg_appealcasetype +
|
||||
"&casereference=" +
|
||||
resultsArr[key].title +
|
||||
"&inid=" +
|
||||
resultsArr[key].incidentid +
|
||||
"&key=" +
|
||||
currentView.viewKey
|
||||
: router.locale == "cy"
|
||||
? myportal == true
|
||||
? "/fymhorth/achos"
|
||||
: "/achos"
|
||||
: myportal == true
|
||||
? "/myportal/case/" +
|
||||
resultsArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
currentView.viewKey
|
||||
: router.locale == "cy"
|
||||
? myportal == true
|
||||
? "/fymhorth/achos"
|
||||
: "/achos"
|
||||
: myportal == true
|
||||
? "/myportal/case/" +
|
||||
resultsArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
currentView.viewKey
|
||||
: "/case/" +
|
||||
resultsArr[key].ticketnumber
|
||||
}
|
||||
onClick={() => {
|
||||
currentView.viewKey == "watchedCases" &&
|
||||
setSearchResults(
|
||||
props.watchedCases.watchedCases
|
||||
),
|
||||
setSearchDetails(
|
||||
props.watchedCases
|
||||
.watchedCasesDetails
|
||||
),
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
resultsArr[key].ticketnumber,
|
||||
"currentReference":
|
||||
currentView.viewKey !=
|
||||
"watchedCases"
|
||||
? currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
: "/case/" +
|
||||
resultsArr[key].ticketnumber
|
||||
}
|
||||
onClick={() => {
|
||||
currentView.viewKey == "watchedCases" &&
|
||||
setSearchResults(
|
||||
props.watchedCases.watchedCases
|
||||
),
|
||||
setSearchDetails(
|
||||
props.watchedCases
|
||||
.watchedCasesDetails
|
||||
),
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
resultsArr[key]
|
||||
.ticketnumber,
|
||||
"currentReference":
|
||||
currentView.viewKey !=
|
||||
"watchedCases"
|
||||
? currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
? resultsArr[key]
|
||||
.caseRef
|
||||
: resultsArr[key]
|
||||
.ticketnumber
|
||||
: resultsArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
|
||||
"currentType":
|
||||
currentView.viewKey,
|
||||
"incidentid":
|
||||
currentView.viewKey !=
|
||||
"watchedCases"
|
||||
? resultsArr[key]
|
||||
.caseRef
|
||||
: resultsArr[key]
|
||||
.ticketnumber
|
||||
: resultsArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
.incidentid
|
||||
: resultsArr[key][
|
||||
"_pinswg_watchedcase_value"
|
||||
],
|
||||
|
||||
"currentType": currentView.viewKey,
|
||||
"incidentid":
|
||||
currentView.viewKey !=
|
||||
"watchedCases"
|
||||
? resultsArr[key].incidentid
|
||||
: resultsArr[key][
|
||||
"_pinswg_watchedcase_value"
|
||||
],
|
||||
|
||||
"appealType":
|
||||
resultsArr[key]
|
||||
.pinswg_appealcasetype,
|
||||
"repDetails":
|
||||
currentView.viewKey ==
|
||||
"myRepresentations" &&
|
||||
resultsArr[key],
|
||||
}),
|
||||
setCurrentView({
|
||||
"viewName": currentView.viewName,
|
||||
"viewKey": currentView.viewKey,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"search:searchresults-case-reference-label"
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{currentView.viewKey != "watchedCases"
|
||||
? currentView.viewKey == "myRepresentations"
|
||||
? resultsArr[key].caseRef
|
||||
: resultsArr[key].ticketnumber
|
||||
: resultsArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]}
|
||||
</Link>
|
||||
"appealType":
|
||||
resultsArr[key]
|
||||
.pinswg_appealcasetype,
|
||||
"repDetails":
|
||||
currentView.viewKey ==
|
||||
"myRepresentations" &&
|
||||
resultsArr[key],
|
||||
}),
|
||||
setCurrentView({
|
||||
"viewName":
|
||||
currentView.viewName,
|
||||
"viewKey": currentView.viewKey,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"search:searchresults-case-reference-label"
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{currentView.viewKey != "watchedCases"
|
||||
? currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
? resultsArr[key].caseRef
|
||||
: resultsArr[key].ticketnumber
|
||||
: resultsArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]}
|
||||
</Link>
|
||||
{currentView.viewKey == "myRepresentations" && (
|
||||
<>
|
||||
<br />
|
||||
<span>
|
||||
{resultsArr[key].representationType}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</dd>
|
||||
{/* <dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
|
||||
@@ -248,13 +248,14 @@ let BuildCheckSection = (props) => {
|
||||
{finaliseAppealProcess ? (
|
||||
<div className="">
|
||||
<h3 className="govuk-heading-m govuk-!-margin-top-9">
|
||||
Finalising your appeal submission
|
||||
{t("newappeal:new-appeal-finalising-heading")}
|
||||
</h3>
|
||||
<p className="govuk-body">
|
||||
Currenly uploading files and finalising your appeal
|
||||
submission
|
||||
{t("newappeal:new-appeal-finalising-label")}
|
||||
</p>
|
||||
<p className="govuk-body textloading">
|
||||
{t("newappeal:new-appeal-wait-label")}
|
||||
</p>
|
||||
<p className="govuk-body textloading">Please wait</p>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -489,6 +489,13 @@ export const AppealRow_pdf = (props) => {
|
||||
{props.props.hasOwnProperty(
|
||||
datafieldname[0].value
|
||||
) &&
|
||||
props.props[
|
||||
datafieldname[0].value
|
||||
] == null ? (
|
||||
<View>
|
||||
<Text>N/A</Text>
|
||||
</View>
|
||||
) : (
|
||||
props.props[
|
||||
datafieldname[0]
|
||||
.value
|
||||
@@ -535,7 +542,8 @@ export const AppealRow_pdf = (props) => {
|
||||
""
|
||||
);
|
||||
}
|
||||
)}
|
||||
)
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
+40
-17
@@ -561,14 +561,23 @@ export const updateLinks = (jsonObj) => {
|
||||
// Find all text nodes in the document
|
||||
const walk = (node) => {
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
// Check if the text node contains a URL (simple check for a URL pattern)
|
||||
const urlRegex =
|
||||
/(?:https?:\/\/)?(?:www\.)?([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})(\/[^\s]*)?/g;
|
||||
let match;
|
||||
let currentText = node.textContent;
|
||||
let lastIndex = 0;
|
||||
let newNodeContent = [];
|
||||
|
||||
// Process the text node if it contains a URL
|
||||
while ((match = urlRegex.exec(node.textContent)) !== null) {
|
||||
// Construct the full URL by adding the protocol if missing, and the domain and path
|
||||
// Process all URLs found in the current text node
|
||||
while ((match = urlRegex.exec(currentText)) !== null) {
|
||||
// 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];
|
||||
if (
|
||||
!fullUrl.startsWith("http://") &&
|
||||
@@ -577,21 +586,35 @@ export const updateLinks = (jsonObj) => {
|
||||
fullUrl = `https://${match[1]}${match[2] || ""}`; // Default to https
|
||||
}
|
||||
|
||||
// Check if the match is already inside an <a> tag, if so, skip it
|
||||
if (node.parentNode.tagName !== "A") {
|
||||
const anchor = document.createElement("a");
|
||||
anchor.href = fullUrl;
|
||||
anchor.textContent = match[0];
|
||||
// Create the anchor element
|
||||
const anchor = document.createElement("a");
|
||||
anchor.href = fullUrl;
|
||||
anchor.textContent = match[0];
|
||||
anchor.setAttribute("rel", "noopener noreferrer");
|
||||
|
||||
// Add rel="noopener noreferrer" for security
|
||||
anchor.setAttribute("rel", "noopener noreferrer");
|
||||
// Add the anchor tag to the node content
|
||||
newNodeContent.push(anchor);
|
||||
|
||||
// Replace the URL with the anchor element in the text node
|
||||
const range = document.createRange();
|
||||
range.selectNodeContents(node);
|
||||
range.deleteContents();
|
||||
range.insertNode(anchor);
|
||||
}
|
||||
// Update the last index processed
|
||||
lastIndex = urlRegex.lastIndex;
|
||||
}
|
||||
|
||||
// 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",
|
||||
"LogicalName": "pinswg_enforcementlistedbuildingconservationap",
|
||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
||||
"UrlName": "enforcementlistedbuildingconservationap",
|
||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
||||
"appealTypeID": "846040006",
|
||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds"
|
||||
},
|
||||
{
|
||||
"LogicalCollectionName": "pinswg_enforcementlistedbuildingconservationaps",
|
||||
"LogicalName": "pinswg_enforcementlistedbuildingandconservationappeals39",
|
||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconseid",
|
||||
"PrimaryIdAttribute": "pinswg_enforcementlistedbuildingconservationapid",
|
||||
"UrlName": "enforcementlistedbuildingconservationap",
|
||||
"MetadataId": "c697be96-9481-eb11-aac0-00224800be9c",
|
||||
"appealTypeID": "846040006",
|
||||
"NavigationProperty": "pinswg_EnforcementListedBuildingConseIds",
|
||||
"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",
|
||||
"LogicalName": "pinswg_callinss77",
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
"further-details-title": "Mae angen rhagor o fanylion",
|
||||
"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-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-button": "Arhoswch wedi mewngofnodi"
|
||||
}
|
||||
@@ -229,5 +229,10 @@
|
||||
"is-required-label": "Yn ofynnol",
|
||||
"select-a-date-label": "Dewiswch ddyddiad",
|
||||
"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)",
|
||||
"site-location-plan": "Cynllun Lleoliad Safle",
|
||||
"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).",
|
||||
"further-details-title": "Further details required",
|
||||
"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-two": "Please call 01234 567890 or contact us on ",
|
||||
"further-details-para-one": "PEDW needs to confirm a bit more information about you before you can continue.",
|
||||
"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-button": "Stay logged in "
|
||||
}
|
||||
@@ -229,5 +229,10 @@
|
||||
"is-required-label": "Is required",
|
||||
"select-a-date-label": "Select a date",
|
||||
"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)",
|
||||
"site-location-plan": "Site Location Plan",
|
||||
"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