diff --git a/components/breadcrumbs.js b/components/breadcrumbs.js index 1f5fc375..eaa80736 100644 --- a/components/breadcrumbs.js +++ b/components/breadcrumbs.js @@ -7,11 +7,20 @@ import { connect } from "react-redux"; import { useSession } from "next-auth/react"; import { setCurrentView } from "../store/currentView/action"; +import { Field, change, reduxForm } from "redux-form"; import { setCurrentSection } from "../store/appealType/action"; - +import { + setRepresentationCapacity, + setRepresentationSubmit, +} from "../store/currentView/action"; const Breadcrumbs = (props) => { - const { currentView, setCurrentView, setCurrentSection } = props; + const { + currentView, + setCurrentView, + setCurrentSection, + setRepresentationCapacity, + } = props; const router = useRouter(); let { t } = useTranslation(); @@ -28,7 +37,8 @@ const Breadcrumbs = (props) => {
+
+ ) : (
+
)}
+
+ ) : (
+
)}
diff --git a/components/case/representation/representationCapacitySelection.js b/components/case/representation/representationCapacitySelection.js
index aa843568..1e396958 100644
--- a/components/case/representation/representationCapacitySelection.js
+++ b/components/case/representation/representationCapacitySelection.js
@@ -56,7 +56,9 @@ let RepCapacitySelection = (props) => {
options={capacityOptionsArr}
id="representationCapacity"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderRadioListWithText}
validate={[required]}
/>
diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js
index a415f182..0cc34aa2 100644
--- a/components/case/representation/representationElements.js
+++ b/components/case/representation/representationElements.js
@@ -155,7 +155,7 @@ export const RenderRadioListWithText = ({
className={
custom.inline == true
? "govuk-radios govuk-radios--inline govuk-radios--small "
- : "govuk-radios govuk-radios--small govuk-grid-column-full"
+ : "govuk-radios govuk-radios--small govuk-grid-column-full conditionalText"
}
>
{Object.keys(options).map((key, index) => (
@@ -164,39 +164,28 @@ export const RenderRadioListWithText = ({
data-children-count={key}
key={key}
>
-
+
+ ) : (
+
+ )}
+
+ ) : (
+
+ )}
>
)}{" "}
{(typeof props.representationType != "undefined" ||
@@ -418,7 +467,7 @@ let RepLPA = (props) => {
>
{t("common:continue-button")}
- {router.query.state != "edit" && (
+ {/* {router.query.state != "edit" && (
{
//setRepresentationCapacity();
@@ -430,8 +479,51 @@ let RepLPA = (props) => {
}}
className="govuk-link"
>
- {t("common:back-link")}
+ {t("common:back-link")}www
+ )} */}
+ {savingStatus ? (
+
+ {router.locale == "cy"
+ ? "Nôl data"
+ : "Saving data"}
+
+
+ ) : (
+
)}
>
)}
diff --git a/components/case/representation/representationLPACapacitySelection.js b/components/case/representation/representationLPACapacitySelection.js
index d5bd531a..bfc2260e 100644
--- a/components/case/representation/representationLPACapacitySelection.js
+++ b/components/case/representation/representationLPACapacitySelection.js
@@ -54,7 +54,7 @@ let RepLPACapacitySelection = (props) => {
id="representationCapacity"
//className="govuk-radios__input "
errorMsg={t(
- "newappeal:select-an-option-label"
+ "myrepresentations:select-an-option-label"
)}
component="input"
validate={[required]}
diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js
index c26214b3..344ef934 100644
--- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js
+++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_enforcement.js
@@ -176,7 +176,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="enterNeighbouringLandToViewSite"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -203,7 +205,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="enterNeighbouringLandAccessRequired"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -230,7 +234,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="healthAndSafetyIssues"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -305,7 +311,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="feeExempt"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -340,7 +348,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="previousGrantedCerts"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -365,7 +375,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="stopNoticeServed"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -390,7 +402,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="relatedCases"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -415,7 +429,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="previousEnforcement"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -440,7 +456,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="subjectArticle4"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -465,7 +483,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="previousPDRRestriction"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -584,7 +604,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="ROW"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -609,7 +631,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="conservationArea"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -634,7 +658,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="affectListedBuilding"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -659,7 +685,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="TPO"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -684,7 +712,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="natureConservationSite"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -709,7 +739,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="protectedSpecies"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -753,7 +785,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="floodingIssue"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -778,7 +812,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="governmentDepartmentComments"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -817,7 +853,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="developmentCarriedOutInAccordance"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -870,7 +908,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="developmentAnyOtherConditions"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -906,7 +946,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="copyOfEnforcementNotice"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -931,7 +973,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="enforcementNoticePlan"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -956,7 +1000,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="listOfNotifiedOfEnforcement"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -981,7 +1027,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="copyOfLetterOfAppealNotification"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -1006,7 +1054,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="lpaEIAOS"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -1031,7 +1081,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="detailsOfOtherAppeals"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -1056,7 +1108,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="detailsOfPreviousAppeals"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -1081,7 +1135,9 @@ let Enforcement_Questionnaire = (props) => {
]}
id="otherRelevantInformation"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
diff --git a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js
index fe2af58d..fc82c2d0 100644
--- a/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js
+++ b/components/case/representation/representationQuestionnaires/representationLPAQuestionnaire_s78.js
@@ -209,7 +209,9 @@ let S78_Questionnaire = (props) => {
]}
id="enterNeighbouringLandToViewSite"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -236,7 +238,9 @@ let S78_Questionnaire = (props) => {
]}
id="enterNeighbouringLandAccessRequired"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -263,7 +267,9 @@ let S78_Questionnaire = (props) => {
]}
id="healthAndSafetyIssues"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -427,7 +433,9 @@ let S78_Questionnaire = (props) => {
]}
id="ROW"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -452,7 +460,9 @@ let S78_Questionnaire = (props) => {
]}
id="conservationArea"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -477,7 +487,9 @@ let S78_Questionnaire = (props) => {
]}
id="affectListedBuilding"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -502,7 +514,9 @@ let S78_Questionnaire = (props) => {
]}
id="TPO"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -527,7 +541,9 @@ let S78_Questionnaire = (props) => {
]}
id="natureConservationSite"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -552,7 +568,9 @@ let S78_Questionnaire = (props) => {
]}
id="protectedSpecies"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -594,7 +612,9 @@ let S78_Questionnaire = (props) => {
]}
id="governmentDepartmentComments"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -650,7 +670,9 @@ let S78_Questionnaire = (props) => {
]}
id="developmentCarriedOutInAccordance"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -705,7 +727,9 @@ let S78_Questionnaire = (props) => {
]}
id="developmentAnyOtherConditions"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={
@@ -741,7 +765,9 @@ let S78_Questionnaire = (props) => {
]}
id="copyOfApplicantsCertificate"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -765,7 +791,9 @@ let S78_Questionnaire = (props) => {
]}
id="advertismentGiven"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -789,7 +817,9 @@ let S78_Questionnaire = (props) => {
]}
id="copyOfLetterOfAppealNotification"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -813,7 +843,9 @@ let S78_Questionnaire = (props) => {
]}
id="lpaEIAOS"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -837,7 +869,9 @@ let S78_Questionnaire = (props) => {
]}
id="advertismentConsentDiscontinuanceNotice"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -861,7 +895,9 @@ let S78_Questionnaire = (props) => {
]}
id="detailsOfOtherAppeals"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -885,7 +921,9 @@ let S78_Questionnaire = (props) => {
]}
id="detailsOfPreviousAppeals"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
@@ -909,7 +947,9 @@ let S78_Questionnaire = (props) => {
]}
id="otherRelevantInformation"
className="govuk-radios__input"
- errorMsg={t("newappeal:select-an-option-label")}
+ errorMsg={t(
+ "myrepresentations:select-an-option-label"
+ )}
component={RenderLPACondtionalRadioList}
validate={[required]}
legend={t(
diff --git a/components/myportal/servicebanner.js b/components/myportal/servicebanner.js
index 5ea5967e..7f411afd 100644
--- a/components/myportal/servicebanner.js
+++ b/components/myportal/servicebanner.js
@@ -22,9 +22,10 @@ const ServiceBanner = (props) => {
console.info("////////////\n" + "logout" + "\n////////////");
window.localStorage.clear(),
destroyCookie(null, "next-auth.csrf-token"),
- destroyCookie(null, "next-auth.callback-url"),
- destroyCookie(null, "pedw_locale"),
- destroyCookie(null, "pinsUser"),
+ { path: "/" },
+ destroyCookie(null, "next-auth.callback-url", { path: "/" }),
+ destroyCookie(null, "pedw_locale", { path: "/" }),
+ destroyCookie(null, "pinsUser", { path: "/" }),
signOut({ callbackUrl: "/logout" });
};
@@ -32,6 +33,7 @@ const ServiceBanner = (props) => {
"/myportal/[appealtypes]",
"/newappeal",
"/newappeal/[appealtypes]",
+ "/myportal/representation",
];
return (