Merged PR 1073: linked watched cases for all personnas
linked watched cases for all personnas Related work items: #9460, #9461, #9464, #9465, #9486, #9487, #9488, #9489
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ RELAYPATH = "dev-pedw-hc"
|
||||
|
||||
|
||||
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||
SHOWLOGIN = false
|
||||
SHOWLOGIN = true
|
||||
SHOWREPRESENTATIONS = false
|
||||
SHOWFILEUPLOAD = "false"
|
||||
SHOWMAPS = "false"
|
||||
|
||||
@@ -75,6 +75,7 @@ let MakeRepresentation = (props) => {
|
||||
var casesObj = {};
|
||||
|
||||
const [showQuestionnaireSection, setShowQuestionnaireSection] = useState(1);
|
||||
const [questionnaireCount, setQuestionnaireCount] = useState(0);
|
||||
|
||||
const isLPA =
|
||||
props.props.accountDetails.accountDetails[
|
||||
@@ -107,6 +108,8 @@ let MakeRepresentation = (props) => {
|
||||
? router.query.state == "edit"
|
||||
? props.props.myRepresentations.myRepresentations
|
||||
: props.props.searchResultsObj.searchDetailsObj
|
||||
: props.currentType == "watchedCases"
|
||||
? props.props.watchedCases.watchedCasesDetails
|
||||
: props.props.searchResultsObj.searchDetailsObj;
|
||||
|
||||
var detailsObj = {};
|
||||
@@ -240,6 +243,8 @@ let MakeRepresentation = (props) => {
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
showQuestionnaireSection={showQuestionnaireSection}
|
||||
setQuestionnaireCount={setQuestionnaireCount}
|
||||
questionnaireCount={questionnaireCount}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -347,6 +352,8 @@ let MakeRepresentation = (props) => {
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
setQuestionnaireCount={setQuestionnaireCount}
|
||||
questionnaireCount={questionnaireCount}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -363,6 +370,8 @@ let MakeRepresentation = (props) => {
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
setQuestionnaireCount={setQuestionnaireCount}
|
||||
questionnaireCount={questionnaireCount}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -555,7 +564,7 @@ let MakeRepresentation = (props) => {
|
||||
: isLPA
|
||||
? "lpa"
|
||||
: values.representationCapacity,
|
||||
"locale": locale,
|
||||
"locale": router.locale,
|
||||
}));
|
||||
currentView.representationSubmit != true
|
||||
? _.isEmpty(currentView.representationCapacity)
|
||||
@@ -566,10 +575,14 @@ let MakeRepresentation = (props) => {
|
||||
.replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||
.toLowerCase()
|
||||
)
|
||||
: questionnaireCount != 0 &&
|
||||
showQuestionnaireSection < questionnaireCount
|
||||
? setShowQuestionnaireSection(showQuestionnaireSection + 1)
|
||||
: setRepresentationSubmit(true)
|
||||
: currentView.representationSubmit == true
|
||||
? (console.log("capacity", currentView.representationCapacity),
|
||||
console.log("has errors:", props.invalid),
|
||||
Object.assign(values, { "locale": router.locale }),
|
||||
props.invalid == false &&
|
||||
updateRepresentation(values, false, false),
|
||||
values.hasOwnProperty("representationDocuments") &&
|
||||
@@ -579,7 +592,9 @@ let MakeRepresentation = (props) => {
|
||||
"size": Blob.size,
|
||||
})
|
||||
),
|
||||
Object.assign(values, { "filesList": buildFileArray })),
|
||||
Object.assign(values, {
|
||||
"filesList": buildFileArray,
|
||||
})),
|
||||
generateRepPDF(
|
||||
values,
|
||||
props.props.accountDetails.containerID,
|
||||
|
||||
@@ -76,20 +76,7 @@ const RepAgent = (props) => {
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
className="govuk-input govuk-!-width-three-quarters"
|
||||
id="representationDescription"
|
||||
name="representationDescription"
|
||||
value="email"
|
||||
data-aria-controls="representationDescription"
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
label="Description of representation"
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
@@ -194,14 +181,7 @@ const RepAgent = (props) => {
|
||||
>
|
||||
{t("common:continue-button")}{" "}
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")} ww
|
||||
</a> */}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
|
||||
@@ -78,21 +78,6 @@ const RepAppellant = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* <div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
className="govuk-input govuk-!-width-three-quarters"
|
||||
id="representationDescription"
|
||||
name="representationDescription"
|
||||
value="email"
|
||||
data-aria-controls="representationDescription"
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
label="Description of representation"
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
{(typeof props.representationType != "undefined" ||
|
||||
typeof formObj.representationForm.values.representationType !=
|
||||
"undefined") && (
|
||||
@@ -199,14 +184,7 @@ const RepAppellant = (props) => {
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")} ww
|
||||
</a> */}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
|
||||
@@ -19,7 +19,9 @@ const RepDetails = (props) => {
|
||||
? router.query.state == "edit"
|
||||
? props.myRepresentations.myRepresentations
|
||||
: props.searchResultsObj.searchDetailsObj
|
||||
: props.searchResultsObj.searchDetailsObj;
|
||||
: props.currentType == "watchedCases"
|
||||
? props.props.props.watchedCases.watchedCasesDetails
|
||||
: props.props.searchResultsObj.searchDetailsObj;
|
||||
|
||||
var detailsObj = {};
|
||||
|
||||
@@ -53,19 +55,9 @@ const RepDetails = (props) => {
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
{/* {detailsObj.firstName +
|
||||
" " +
|
||||
detailsObj.lastName || "not entered"} */}
|
||||
</dd>
|
||||
</div>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-agent-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
Mr A Agent
|
||||
</dd>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-site-address-label")}
|
||||
|
||||
@@ -645,11 +645,6 @@ export const RenderDatePicker = ({
|
||||
</span>
|
||||
)}
|
||||
|
||||
{/* {value}
|
||||
<br />
|
||||
{moment(value).format("DD/MM/YY")}
|
||||
<br /> */}
|
||||
|
||||
<DatePicker
|
||||
{...custom}
|
||||
locale={custom.locale}
|
||||
@@ -1007,10 +1002,6 @@ export const RenderFileUpload = (field) => {
|
||||
>
|
||||
{({ getRootProps, getInputProps }) => (
|
||||
<>
|
||||
{/* {field.hint != false && (
|
||||
<div className="govuk-hint">ss{t(field.hint)}</div>
|
||||
)}
|
||||
<div className="govuk-form-group"></div> */}
|
||||
<section className="container">
|
||||
<div {...getRootProps({ style })}>
|
||||
{" "}
|
||||
|
||||
@@ -151,16 +151,7 @@ const RepInterestedPartyPerson = (props) => {
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <Link href="/representation">
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</a>
|
||||
</Link> */}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
|
||||
@@ -24,7 +24,7 @@ import { select } from "xpath";
|
||||
import jsonpath from "jsonpath";
|
||||
import { useState } from "react";
|
||||
import Enforcement_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_enforcement";
|
||||
import S78_Qquestionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||
import S78_Questionnaire from "./representationQuestionnaires/representationLPAQuestionnaire_s78";
|
||||
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
||||
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
||||
import transLookup from "../../../data/lookuptranslations.json";
|
||||
@@ -35,6 +35,8 @@ let RepLPA = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
onSubmit,
|
||||
handleSubmit,
|
||||
formObj,
|
||||
appellantApplicantRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
@@ -44,6 +46,8 @@ let RepLPA = (props) => {
|
||||
onBehalfOfLPA,
|
||||
setShowQuestionnaireSection,
|
||||
showQuestionnaireSection,
|
||||
questionnaireCount,
|
||||
setQuestionnaireCount,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
@@ -53,6 +57,34 @@ let RepLPA = (props) => {
|
||||
));
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
const updateQuestionnaireCount = () => {
|
||||
{
|
||||
switch (currentView.caseReference.appealType) {
|
||||
case 846040000:
|
||||
case 846040001:
|
||||
case 846040006:
|
||||
case 846040025:
|
||||
case 846040004:
|
||||
case 846040018:
|
||||
case 846040003:
|
||||
case 846040009:
|
||||
case 846040008:
|
||||
setQuestionnaireCount(7);
|
||||
break;
|
||||
|
||||
case 846040005:
|
||||
case 846040006:
|
||||
case 846040007:
|
||||
setQuestionnaireCount(9);
|
||||
|
||||
break;
|
||||
default:
|
||||
setQuestionnaireCount(7);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
const whichQuestionnaire = () => {
|
||||
{
|
||||
switch (currentView.caseReference.appealType) {
|
||||
@@ -65,8 +97,9 @@ let RepLPA = (props) => {
|
||||
case 846040003:
|
||||
case 846040009:
|
||||
case 846040008:
|
||||
updateQuestionnaireCount();
|
||||
return (
|
||||
<S78_Qquestionnaire
|
||||
<S78_Questionnaire
|
||||
props={props}
|
||||
containerID={
|
||||
props.props.props.accountDetails.containerID
|
||||
@@ -76,6 +109,7 @@ let RepLPA = (props) => {
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
questionnaireCount={questionnaireCount}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -83,6 +117,7 @@ let RepLPA = (props) => {
|
||||
case 846040005:
|
||||
case 846040006:
|
||||
case 846040007:
|
||||
updateQuestionnaireCount();
|
||||
return (
|
||||
<Enforcement_Questionnaire
|
||||
props={props}
|
||||
@@ -94,6 +129,7 @@ let RepLPA = (props) => {
|
||||
setShowQuestionnaireSection={
|
||||
setShowQuestionnaireSection
|
||||
}
|
||||
questionnaireCount={questionnaireCount}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
@@ -235,7 +271,6 @@ let RepLPA = (props) => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
{typeof props.representationType != "undefined" &&
|
||||
@@ -306,18 +341,26 @@ let RepLPA = (props) => {
|
||||
{typeof props.representationType != "undefined" &&
|
||||
props.representationType == "Questionnaire" && (
|
||||
<>
|
||||
{showQuestionnaireSection < 7 && (
|
||||
<a
|
||||
href="#"
|
||||
onClick={() => {
|
||||
setShowQuestionnaireSection(
|
||||
showQuestionnaireSection + 1
|
||||
);
|
||||
}}
|
||||
{showQuestionnaireSection <=
|
||||
questionnaireCount && (
|
||||
<button
|
||||
// type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
Next section
|
||||
</a>
|
||||
{t("common:continue-button")}ww
|
||||
</button>
|
||||
// <a
|
||||
// href="#"
|
||||
// onClick={() => {
|
||||
// setShowQuestionnaireSection(
|
||||
// showQuestionnaireSection + 1
|
||||
// );
|
||||
// }}
|
||||
// className="govuk-button"
|
||||
// >
|
||||
// Next section
|
||||
// </a>
|
||||
)}
|
||||
{showQuestionnaireSection == 9 && (
|
||||
<button
|
||||
@@ -352,15 +395,6 @@ let RepLPA = (props) => {
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <a
|
||||
onClick={() => {
|
||||
|
||||
setRepresentationSubmit(false);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</a> */}
|
||||
<a
|
||||
onClick={() => {
|
||||
//setRepresentationCapacity();
|
||||
|
||||
@@ -16,7 +16,9 @@ const RepLPADetails = (props) => {
|
||||
let setCaseDetailsObj = router.query.hasOwnProperty("state")
|
||||
? router.query.state == "edit"
|
||||
? props.props.myRepresentations.myRepresentations
|
||||
: props.props.searchResultsObj.searchDetailsObj
|
||||
: props.searchResultsObj.searchDetailsObj
|
||||
: props.currentType == "watchedCases"
|
||||
? props.props.props.watchedCases.watchedCasesDetails
|
||||
: props.props.searchResultsObj.searchDetailsObj;
|
||||
|
||||
var detailsObj = {};
|
||||
@@ -45,14 +47,7 @@ const RepLPADetails = (props) => {
|
||||
] || "not entered"}
|
||||
</dd>
|
||||
</div>
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-agent-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
Mr A Agent
|
||||
</dd>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-site-address-label")}
|
||||
|
||||
@@ -60,20 +60,6 @@ const RepLandOwner = (props) => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
className="govuk-input govuk-!-width-three-quarters"
|
||||
id="representationDescription"
|
||||
name="representationDescription"
|
||||
value="email"
|
||||
data-aria-controls="representationDescription"
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
label="Description of representation"
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
@@ -128,16 +114,6 @@ const RepLandOwner = (props) => {
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* <Link href="/representation">
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationSubmit(true);
|
||||
}}
|
||||
className="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</a>
|
||||
</Link> */}
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
|
||||
+21
-3
@@ -23,10 +23,10 @@ import { select } from "xpath";
|
||||
import jsonpath from "jsonpath";
|
||||
import { getFormCollectionByID } from "../../../../components/utils";
|
||||
|
||||
let S78_Questionnaire = async (props) => {
|
||||
//let { t } = useTranslation();
|
||||
let S78_Questionnaire = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
let t = await getT(props.reqQuery.__nextLocale, "common");
|
||||
//let t = await getT(props.reqQuery.__nextLocale, "common");
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
@@ -89,10 +89,22 @@ let S78_Questionnaire = async (props) => {
|
||||
|
||||
console.log(resultsObj);
|
||||
|
||||
const onHandleSubmit = (values) => {
|
||||
//if (currentSection == sectionCount) {
|
||||
let valuesObj = values || {};
|
||||
|
||||
delete valuesObj["_pinswg_appellant_value"];
|
||||
console.log("has errors:", props.invalid);
|
||||
props.invalid == false && updateCaseProgress(valuesObj, false, false);
|
||||
|
||||
setCurrentSection(currentSection + 1);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{props.representationTypeValue}
|
||||
{props.procedureTypeValue}
|
||||
|
||||
{showQuestionnaireSection == 1 && (
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
@@ -186,6 +198,7 @@ let S78_Questionnaire = async (props) => {
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
validate={[required]}
|
||||
/>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
@@ -372,6 +385,7 @@ let S78_Questionnaire = async (props) => {
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
validate={[required]}
|
||||
/>
|
||||
</fieldset>
|
||||
)}
|
||||
@@ -399,6 +413,7 @@ let S78_Questionnaire = async (props) => {
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
validate={[required]}
|
||||
/>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
@@ -624,6 +639,7 @@ let S78_Questionnaire = async (props) => {
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
validate={[required]}
|
||||
/>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
@@ -667,6 +683,7 @@ let S78_Questionnaire = async (props) => {
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
validate={[required]}
|
||||
/>
|
||||
<Field
|
||||
label={
|
||||
@@ -684,6 +701,7 @@ let S78_Questionnaire = async (props) => {
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={props.name + "-hint"}
|
||||
validate={[required]}
|
||||
/>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
|
||||
+31
-97
@@ -76,9 +76,9 @@ const CaseSummary = (props) => {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
showMap,
|
||||
showLoginCheck,
|
||||
} = props;
|
||||
|
||||
const showLoginCheck = props.currentView.caseReference.showLoginCheck;
|
||||
const { data: session, status } = useSession();
|
||||
//console.log("session status:", status, session);
|
||||
|
||||
@@ -385,32 +385,7 @@ const CaseSummary = (props) => {
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
todays date - {formatDates(new Date())}
|
||||
<br />
|
||||
pinswg_startdate -{" "}
|
||||
{formatDates(detailsObj.pinswg_startdate)}
|
||||
<br />
|
||||
days between pinswg_startdate & todays date -
|
||||
{Math.floor(
|
||||
(new Date(detailsObj.pinswg_startdate) -
|
||||
new Date()) /
|
||||
(24 * 3600 * 1000)
|
||||
)}
|
||||
<br />
|
||||
pinswg_statementduedate -{" "}
|
||||
{formatDates(detailsObj.pinswg_statementduedate)}
|
||||
<br />
|
||||
pinswg_finalcommentsduedate -{" "}
|
||||
{formatDates(detailsObj.pinswg_finalcommentsduedate)}
|
||||
<br />
|
||||
pinswg_startdatetimeiftheevent -{" "}
|
||||
{formatDates(detailsObj.pinswg_startdatetimeiftheevent)}
|
||||
<br /> <br />
|
||||
</div>
|
||||
</div>
|
||||
*/}
|
||||
|
||||
{showLoginCheck == "true" && (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
@@ -596,50 +571,6 @@ const CaseSummary = (props) => {
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* 1{" "}
|
||||
{_.has(detailsObj, "pinswg_startdatetimeiftheevent") &&
|
||||
detailsObj.pinswg_startdatetimeiftheevent}
|
||||
2{" "}
|
||||
{_.has(detailsObj, "pinswg_startdateoftheevent") &&
|
||||
detailsObj.pinswg_startdateoftheevent}
|
||||
3{" "}
|
||||
{_.has(detailsObj, "pinswg_startdateofevent") &&
|
||||
detailsObj.pinswg_startdateofevent}
|
||||
4{" "}
|
||||
{_.has(detailsObj, "pinswg_starttimeoftheevent") &&
|
||||
detailsObj.pinswg_starttimeoftheevent} */}
|
||||
{/* <div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
{props.currentView.caseReference.showreps !=
|
||||
"true" ? (
|
||||
""
|
||||
) : noRepresentationLink.includes(
|
||||
router.pathname
|
||||
) == true ? (
|
||||
""
|
||||
) : (
|
||||
<Link href="/myportal/representation">
|
||||
<a className="govuk-button">
|
||||
{t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</a>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
//spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t("case:summary-back-button-label")}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
{showSummary(casesObj, detailsObj)}
|
||||
</div>
|
||||
) : (
|
||||
@@ -651,35 +582,38 @@ const CaseSummary = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
{noRepresentationLink.includes(router.pathname) ==
|
||||
true ? (
|
||||
""
|
||||
) : (
|
||||
<Link
|
||||
href="/representation"
|
||||
className="govuk-button"
|
||||
>
|
||||
{t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
)}
|
||||
{showLoginCheck == "true" && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="govuk-button-group">
|
||||
{noRepresentationLink.includes(
|
||||
router.pathname
|
||||
) == true ? (
|
||||
""
|
||||
) : (
|
||||
<Link
|
||||
href="/representation"
|
||||
className="govuk-button"
|
||||
>
|
||||
{t(
|
||||
"case:summary-make-representation-label"
|
||||
)}
|
||||
</Link>
|
||||
)}
|
||||
|
||||
<a
|
||||
onClick={() => {
|
||||
// spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t("case:summary-back-button-label")}
|
||||
</a>
|
||||
<a
|
||||
onClick={() => {
|
||||
// spinnerState();
|
||||
router.back();
|
||||
}}
|
||||
className="govuk-button govuk-button--secondary"
|
||||
>
|
||||
{t("case:summary-back-button-label")}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
|
||||
+114
-117
@@ -16,7 +16,7 @@ import UploadFile from "./myportal/uploadFile";
|
||||
import WatchedCases from "./myportal/watchedcases";
|
||||
|
||||
const MyPortal = (props) => {
|
||||
const { showFileUpload } = props;
|
||||
const { showFileUpload, showLoginCheck } = props;
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
@@ -39,86 +39,81 @@ const MyPortal = (props) => {
|
||||
? true
|
||||
: false;
|
||||
|
||||
return <>
|
||||
<main className="" id="main-content" role="main">
|
||||
<div className="servicebanner myportal govuk-!-margin-bottom-4">
|
||||
<h1>
|
||||
<img
|
||||
src={
|
||||
router.locale == "cy"
|
||||
? "/assets/images/planning-casework-cy.svg"
|
||||
: "/assets/images/planning-casework-en.svg"
|
||||
}
|
||||
alt={
|
||||
router.locale == "cy"
|
||||
? "Fy mhorth"
|
||||
: "My Portal"
|
||||
}
|
||||
/>
|
||||
</h1>
|
||||
|
||||
<div className="serviceBanner_userDetails">
|
||||
<img
|
||||
className="user_logo"
|
||||
src="/assets/images/user.svg"
|
||||
alt={router.locale == "cy" ? "Defnyddiwr" : "User"}
|
||||
/>{" "}
|
||||
<div className="serviceBanner_userDetails_name">
|
||||
<Link href="/account/personaldetails" className="govuk-button-secondary">
|
||||
|
||||
{
|
||||
props.accountDetails.accountDetails
|
||||
.firstname
|
||||
}{" "}
|
||||
{
|
||||
props.accountDetails.accountDetails
|
||||
.lastname
|
||||
return (
|
||||
<>
|
||||
<main className="" id="main-content" role="main">
|
||||
<div className="servicebanner myportal govuk-!-margin-bottom-4">
|
||||
<h1>
|
||||
<img
|
||||
src={
|
||||
router.locale == "cy"
|
||||
? "/assets/images/planning-casework-cy.svg"
|
||||
: "/assets/images/planning-casework-en.svg"
|
||||
}
|
||||
{" - "}
|
||||
alt={
|
||||
router.locale == "cy"
|
||||
? "Fy mhorth"
|
||||
: "My Portal"
|
||||
}
|
||||
/>
|
||||
</h1>
|
||||
|
||||
<div className="serviceBanner_userDetails">
|
||||
<img
|
||||
className="user_logo"
|
||||
src="/assets/images/user.svg"
|
||||
alt={router.locale == "cy" ? "Defnyddiwr" : "User"}
|
||||
/>{" "}
|
||||
<div className="serviceBanner_userDetails_name">
|
||||
<Link
|
||||
href="/account/personaldetails"
|
||||
className="govuk-button-secondary"
|
||||
>
|
||||
{props.accountDetails.accountDetails.firstname}{" "}
|
||||
{props.accountDetails.accountDetails.lastname}
|
||||
{" - "}
|
||||
{
|
||||
props.accountDetails.accountDetails[
|
||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
</Link>
|
||||
</div>
|
||||
<div>
|
||||
<Link
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? "/allgofnodi"
|
||||
: "/logout"
|
||||
}
|
||||
onClick={() => {
|
||||
handleLogout();
|
||||
}}
|
||||
className="govuk-header__link govuk-!-margin-right-3"
|
||||
>
|
||||
{t("common:signout-label")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{isLPA && (
|
||||
<div>
|
||||
<h2 className="heading-small card-heading">
|
||||
{
|
||||
props.accountDetails.accountDetails[
|
||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
|
||||
</Link>
|
||||
}{" "}
|
||||
LPA Portal
|
||||
</h2>
|
||||
</div>
|
||||
<div>
|
||||
<Link
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? "/allgofnodi"
|
||||
: "/logout"
|
||||
}
|
||||
onClick={() => {
|
||||
handleLogout();
|
||||
}}
|
||||
className="govuk-header__link govuk-!-margin-right-3">
|
||||
|
||||
{t("common:signout-label")}
|
||||
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{isLPA && (
|
||||
<div>
|
||||
<h2 className="heading-small card-heading">
|
||||
{
|
||||
props.accountDetails.accountDetails[
|
||||
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}{" "}
|
||||
LPA Portal
|
||||
</h2>
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="flex-container grid-row govuk-body ">
|
||||
{!isLPA && <MakeNewAppeal />}
|
||||
<SearchCases />
|
||||
{/* {props.awaitingSubmission.awaitingSubmission[
|
||||
)}
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<div className="flex-container grid-row govuk-body ">
|
||||
{!isLPA && <MakeNewAppeal />}
|
||||
<SearchCases />
|
||||
{/* {props.awaitingSubmission.awaitingSubmission[
|
||||
"@odata.count"
|
||||
] > 0 && (
|
||||
<AwaitingSubmission
|
||||
@@ -127,50 +122,52 @@ const MyPortal = (props) => {
|
||||
}
|
||||
/>
|
||||
)} */}
|
||||
{isLPA
|
||||
? ""
|
||||
: props.awaitingSubmission
|
||||
.awaitingSubmissionFromBlob[
|
||||
"@odata.count"
|
||||
] > 0 && (
|
||||
<AwaitingSubmissionFromBlob
|
||||
containerID={props.containerID}
|
||||
awaitingSubmissionFromBlob={
|
||||
props.awaitingSubmission
|
||||
.awaitingSubmissionFromBlob
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{props.myCases.myCases["@odata.count"] > 0 && (
|
||||
<MyCases
|
||||
myCases={props.myCases}
|
||||
isLPA={isLPA}
|
||||
/>
|
||||
)}
|
||||
{props.watchedCases.watchedCases["@odata.count"] >
|
||||
0 && (
|
||||
<WatchedCases
|
||||
watchedCases={props.watchedCases}
|
||||
isLPA={isLPA}
|
||||
/>
|
||||
)}
|
||||
{props.myRepresentations.myRepresentations[
|
||||
"@odata.count"
|
||||
] > 0 && (
|
||||
<MyRepresentations
|
||||
myRepresentations={props.myRepresentations}
|
||||
isLPA={isLPA}
|
||||
/>
|
||||
)}
|
||||
{!isLPA && <Dns />}
|
||||
{isLPA
|
||||
? ""
|
||||
: props.awaitingSubmission
|
||||
.awaitingSubmissionFromBlob[
|
||||
"@odata.count"
|
||||
] > 0 && (
|
||||
<AwaitingSubmissionFromBlob
|
||||
containerID={props.containerID}
|
||||
awaitingSubmissionFromBlob={
|
||||
props.awaitingSubmission
|
||||
.awaitingSubmissionFromBlob
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{props.myCases.myCases["@odata.count"] > 0 && (
|
||||
<MyCases
|
||||
myCases={props.myCases}
|
||||
isLPA={isLPA}
|
||||
/>
|
||||
)}
|
||||
{props.watchedCases.watchedCases["@odata.count"] >
|
||||
0 && (
|
||||
<WatchedCases
|
||||
watchedCases={props.watchedCases}
|
||||
isLPA={isLPA}
|
||||
showLoginCheck={props.showLoginCheck}
|
||||
/>
|
||||
)}
|
||||
{props.myRepresentations.myRepresentations[
|
||||
"@odata.count"
|
||||
] > 0 && (
|
||||
<MyRepresentations
|
||||
myRepresentations={props.myRepresentations}
|
||||
isLPA={isLPA}
|
||||
/>
|
||||
)}
|
||||
{!isLPA && <Dns />}
|
||||
|
||||
{/* <YourAccount /> */}
|
||||
{/* <YourAccount /> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<TimeOut />
|
||||
</>;
|
||||
</main>
|
||||
<TimeOut />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default MyPortal;
|
||||
|
||||
@@ -35,6 +35,7 @@ const TopThree = (props) => {
|
||||
setWatchedCasesDetails,
|
||||
setAwaitingSubmission,
|
||||
setAwaitingSubmissionDetails,
|
||||
showLoginCheck,
|
||||
} = props;
|
||||
|
||||
const router = useRouter();
|
||||
@@ -193,6 +194,7 @@ const TopThree = (props) => {
|
||||
"appealType":
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype,
|
||||
"showLoginCheck": props.showLoginCheck,
|
||||
});
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -19,10 +19,12 @@ const WatchedCases = (props) => {
|
||||
{t("myportal:watchedcases-card-title")}
|
||||
</h3>
|
||||
<div className="cardModuleContainer">
|
||||
<div>werwrew {props.showLoginCheck}</div>
|
||||
<TopThree
|
||||
showTopThree={props.watchedCases.watchedCases}
|
||||
showDetails={props.watchedCases.watchedCasesDetails}
|
||||
topThreeType={"watchedCases"}
|
||||
showLoginCheck={props.showLoginCheck}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ export const EnforcementQuestionnaire_pdf = ({ docProps }) => {
|
||||
}
|
||||
let values = docProps;
|
||||
let appealTypeValue = getFormCollectionByID(values.appealType);
|
||||
console.log("//////////////////////\n docpropseeeee:".docProps);
|
||||
|
||||
console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
||||
return (
|
||||
|
||||
@@ -113,6 +113,7 @@ export const lpaQuestionnaire_pdf = ({ docProps }) => {
|
||||
return dd + "/" + mm + "/" + yyyy;
|
||||
}
|
||||
let values = docProps;
|
||||
console.log("//////////////////////\n docprops:".docProps);
|
||||
let appealTypeValue = getFormCollectionByID(values.appealType);
|
||||
|
||||
console.log("sdffhjdhjdjdgkj: ", values.procedureType);
|
||||
|
||||
@@ -40,8 +40,11 @@
|
||||
"s78-section-question-5": "Pa weithdrefn ydych chi'n ystyried y dylai'r apêl ei dilyn?",
|
||||
"s78-section-question-6": "A fydd angen i'r Arolygydd fynd i mewn i safle/eiddo'r apźl?",
|
||||
"s78-section-question-7": "A ydych yn ystyried bod angen i'r Arolygydd fynd ar dir/eiddo preifat cyfagos i weld y safle?",
|
||||
"s78-section-question-7-hint": "Os Oes, rhowch resymau a rhowch gyfeiriad y safle cyfagos. Os oes gennych rai, rhowch fanylion cyswllt y tirfeddiannwr mewn atodiad.",
|
||||
"s78-section-question-8": "Os oes angen mynediad i dir/adeiladau preifat, a ydych yn fodlon i’r Arolygydd ymweld â’r safle ar sail ‘angen mynediad’, gyda dim ond y tirfeddiannwr neu ei gynrychiolydd yn bresennol?",
|
||||
"s78-section-question-8-hint": "Os Na, rhowch resymau pam yr ydych yn ystyried bod angen Ymweliad Safle Cydymaith",
|
||||
"s78-section-question-9": "A ydych yn ymwybodol o unrhyw faterion iechyd a diogelwch y byddai angen eu hystyried pan fydd yr Arolygydd yn ymweld â'r safle?",
|
||||
"s78-section-question-9-hint": "Os Oes, disgrifiwch y materion iechyd a diogelwch i'w hystyried",
|
||||
"s78-section-question-10": "Cyswllt ACLl ar gyfer ymweliad safle, gwrandawiad neu drefniadau ymchwiliad:",
|
||||
"s78-section-heading-two": "Dogfennau ategol",
|
||||
"s78-section-question-11": "Ffeil achos yr ACLl a sylwadau",
|
||||
|
||||
@@ -40,8 +40,11 @@
|
||||
"s78-section-question-5": "Which procedure do you consider the appeal should follow?",
|
||||
"s78-section-question-6": "Will the Inspector need to enter the appeal site/property?",
|
||||
"s78-section-question-7": "Do you consider that the Inspector needs to enter neighbouring private land/property to view the site?",
|
||||
"s78-section-question-7-hint": "If Yes, give reasons and provide the neighbouring site address. If you have them, provide the contact details of the landowner in an attachment.",
|
||||
"s78-section-question-8": "If access to private land/buildings is required, are you content for the Inspector to visit the site on an ‘access required’ basis, with only the landowner or their representative present?",
|
||||
"s78-section-question-8-hint": "If No, give reasons for why you consider an Accompanied Site Visit to be necessary",
|
||||
"s78-section-question-9": "Are you aware of any health and safety issues which would need to be considered when the Inspector visits the site?",
|
||||
"s78-section-question-9-hint": "If Yes, describe the health and safety issues to be considered",
|
||||
"s78-section-question-10": "LPA contact for site visit, hearing or inquiry arrangements:",
|
||||
"s78-section-heading-two": "Supporting documents",
|
||||
"s78-section-question-11": "LPA case file and representations",
|
||||
@@ -112,6 +115,7 @@
|
||||
"enf-section-question-8": "Are you aware of any health and safety issues which would need to be considered when the Inspector visits the site?",
|
||||
"enf-section-question-8-hint": "If Yes, describe the health and safety issues to be considered",
|
||||
"enf-section-question-9": "LPA contact for site visit, hearing or inquiry arrangements:",
|
||||
"enf-section-question-9-hint": "If Yes, describe the health and safety issues to be considered",
|
||||
"enf-section-heading-two": "Deemed Application Fee",
|
||||
"enf-section-question-10": "Has the local planning authority received the correct fee payable in relation to this appeal for the deemed planning application/ground (a) to be considered?",
|
||||
"enf-section-question-11": "Is the appeal fee exempt?",
|
||||
|
||||
@@ -106,7 +106,7 @@ import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
||||
|
||||
export default function handler(req, res) {
|
||||
var checkHash = req.query.hash;
|
||||
let reqBodyobj = JSON.parse(req.body);
|
||||
let reqBodyobj = req.body; //JSON.parse(req.body);
|
||||
|
||||
console.log(
|
||||
"//////////////////////\nreqBodyobj" +
|
||||
|
||||
@@ -89,6 +89,7 @@ const mapStateToProps = (state) => {
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
showLoginCheck: process.env.SHOWLOGIN || false,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@ const Home = (props) => {
|
||||
props.searchResultsObj.representationsObj
|
||||
}
|
||||
showRepresentations={showRepresentations}
|
||||
showLoginCheck={props.currentView.showLogin}
|
||||
showLoginCheck={
|
||||
props.currentView.caseReference.showLogin
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
|
||||
@@ -56,6 +56,7 @@ const Home = (props) => {
|
||||
awaitingSubmission,
|
||||
accountDetails,
|
||||
showFileUpload,
|
||||
showLoginCheck,
|
||||
} = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
@@ -146,6 +147,7 @@ const Home = (props) => {
|
||||
accountDetails={accountDetails}
|
||||
showFileUpload={showFileUpload}
|
||||
containerID={accountDetails.containerID}
|
||||
showLoginCheck={showLoginCheck}
|
||||
/>
|
||||
</div>
|
||||
<Footer footerLinks={footerLinks} />
|
||||
@@ -288,6 +290,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
props: {
|
||||
showFileUpload: process.env.SHOWFILEUPLOAD,
|
||||
containerID: thisSession.user.id,
|
||||
showLoginCheck: process.env.SHOWLOGIN,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user