-
-
+ {props.accountUpdatedComplete == false ? (
+ props.personalDetailsComplete == false ? (
+
- ) : (
- <>
-
- >
- )
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {t("common:cancel-link")}
+
+
+
+
) : (
-
- )}
- >
- );
+ <>
+
+ >
+ )
+ ) : (
+
+ )}
+ >;
};
const mapStateToProps = (state) => {
diff --git a/components/account/personaldetailsCheck.js b/components/account/personaldetailsCheck.js
index 1818a6b7..aad11ee0 100644
--- a/components/account/personaldetailsCheck.js
+++ b/components/account/personaldetailsCheck.js
@@ -31,327 +31,325 @@ const BuildCheckPersonalDetails = (props) => {
: t("account:account-preferred-language-welsh");
};
- return (
- <>
-
- {t("account:account-about-you-label")}
-
-
-
-
-
-
-
-
-
-
- {" "}
- {t("account:account-your-address-label")}
-
-
-
-
-
-
-
-
-
-
-
-
{t("common:back-link")}
-
+ return <>
+
+ {t("account:account-about-you-label")}
+
+
+
- >
- );
+
+
+
+
+
+
+
+ {" "}
+ {t("account:account-your-address-label")}
+
+
+
+
+
+
+
+
+
+
+
+ {t("common:back-link")}
+
+
+ >;
};
const mapStateToProps = (state) => {
diff --git a/components/account/personaldetailsComplete.js b/components/account/personaldetailsComplete.js
index 1819ef94..1e202af3 100644
--- a/components/account/personaldetailsComplete.js
+++ b/components/account/personaldetailsComplete.js
@@ -40,24 +40,22 @@ const PersonalDetailsComplete = (props) => {
props.props.props.form.personalDetailsForm.values,
]);
- return (
- <>
-
{t("account:account-complete-para-1")}
+ return <>
+
{t("account:account-complete-para-1")}
-
{t("account:account-complete-para-2")}
+
{t("account:account-complete-para-2")}
-
-
-
- {" "}
- {t("account:account-complete-return-to-portal-link")}
-
-
-
- >
- );
+
+
+
+ {" "}
+ {t("account:account-complete-return-to-portal-link")}
+
+
+
+ >;
};
const mapStateToProps = (state) => {
diff --git a/components/account/registerComplete.js b/components/account/registerComplete.js
index cac7970c..fb82290e 100644
--- a/components/account/registerComplete.js
+++ b/components/account/registerComplete.js
@@ -78,7 +78,7 @@ const RegisterComplete = (props) => {
var registerBody = "";
switch (props.accountDetails.accCr) {
case "created":
- return (registerBody = (
+ return registerBody = (
<>
{t("account:register-new-account-confirmation-email")}
@@ -95,33 +95,33 @@ const RegisterComplete = (props) => {
-
- {
- setLogout(),
- window.localStorage.clear(),
- destroyCookie(
- null,
- "next-auth.csrf-token"
- ),
- destroyCookie(
- null,
- "next-auth.callback-url"
- ),
- destroyCookie(null, "pedw_locale"),
- destroyCookie(null, "pinsUser"),
- signOut({ callbackUrl: "/logout" });
- }}
- >
- {t(
- "account:register-new-account-my-portal-link"
- )}
-
+ {
+ setLogout(),
+ window.localStorage.clear(),
+ destroyCookie(
+ null,
+ "next-auth.csrf-token"
+ ),
+ destroyCookie(
+ null,
+ "next-auth.callback-url"
+ ),
+ destroyCookie(null, "pedw_locale"),
+ destroyCookie(null, "pinsUser"),
+ signOut({ callbackUrl: "/logout" });
+ }}>
+
+ {t(
+ "account:register-new-account-my-portal-link"
+ )}
+
>
- ));
+ );
break;
diff --git a/components/breadcrumbs.js b/components/breadcrumbs.js
index 88bde13a..0d6af9d8 100644
--- a/components/breadcrumbs.js
+++ b/components/breadcrumbs.js
@@ -49,838 +49,834 @@ const Breadcrumbs = (props) => {
const { data: session, status } = useSession();
- return (
- <>
-
+ >;
};
export default Breadcrumbs;
diff --git a/components/case/documents.js b/components/case/documents.js
index 99476370..38d72805 100644
--- a/components/case/documents.js
+++ b/components/case/documents.js
@@ -204,8 +204,8 @@ const DocumentDetails = (props) => {
{/*
- {t("case:documents-size-label")}
- */}
+ {t("case:documents-size-label")}
+ */}
{showSpinnerState == true ? (
);
})
@@ -340,49 +332,6 @@ const DocumentDetails = (props) => {
);
};
- useEffect(() => {
- getDocumentTypes();
- if (selectedOption) {
- setShowSpinnerState(true);
- getDocumentResults(1, orderByState, fieldSortState);
- }
-
- if (selectedDocumentType) {
- setShowSpinnerState(true);
- getDocumentResults(
- 1,
- orderByState,
- fieldSortState,
- selectedDocumentType
- );
- }
-
- const docDetailsObj = async () => {
- let docObj = await getSearchDocumentDetails(incidentid).then(
- (data) => {
- //console.log(data);
- setDocumentDetails(data);
- setDocumentSearchState(true);
-
- return data;
- }
- );
-
- return docObj;
- };
-
- const searchDocumentResultsObj = docDetailsObj();
- }, [
- incidentid,
- setDocumentDetails,
- selectedOption,
- selectedDocumentType,
- fieldSortState,
- orderByState,
- getDocumentTypes,
- getDocumentResults,
- ]);
-
const getDocumentTypes = useCallback(() => {
getSearchDocumentTypes(props.incidentid).then((data) => {
setDocumentTypes(data);
@@ -495,6 +444,48 @@ const DocumentDetails = (props) => {
setShowSpinnerState(true);
};
+ useEffect(() => {
+ getDocumentTypes();
+ if (selectedOption) {
+ setShowSpinnerState(true);
+ getDocumentResults(1, orderByState, fieldSortState);
+ }
+
+ if (selectedDocumentType) {
+ setShowSpinnerState(true);
+ getDocumentResults(
+ 1,
+ orderByState,
+ fieldSortState,
+ selectedDocumentType
+ );
+ }
+
+ const docDetailsObj = async () => {
+ let docObj = await getSearchDocumentDetails(incidentid).then(
+ (data) => {
+ //console.log(data);
+ setDocumentDetails(data);
+ setDocumentSearchState(true);
+
+ return data;
+ }
+ );
+
+ return docObj;
+ };
+
+ const searchDocumentResultsObj = docDetailsObj();
+ }, [
+ incidentid,
+ setDocumentDetails,
+ selectedOption,
+ selectedDocumentType,
+ fieldSortState,
+ orderByState,
+ getDocumentTypes,
+ getDocumentResults,
+ ]);
return (
<>
diff --git a/components/case/representation/index.js b/components/case/representation/index.js
index 8d85a1e0..15eff4aa 100644
--- a/components/case/representation/index.js
+++ b/components/case/representation/index.js
@@ -394,7 +394,7 @@ let MakeRepresentation = (props) => {
let year = repDate.getFullYear();
let time = repDate.getTime();
- const repType = "";
+ let repType = "";
switch (values.representationCapacity) {
case t("myrepresentations:capacity-options-arr-appellant"):
repType = "APPELLANT";
diff --git a/components/case/representation/representationComplete.js b/components/case/representation/representationComplete.js
index 4348922c..d2265706 100644
--- a/components/case/representation/representationComplete.js
+++ b/components/case/representation/representationComplete.js
@@ -66,13 +66,13 @@ const RepComplete = (props) => {
diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js
index ea7fc8e1..55e08345 100644
--- a/components/case/representation/representationElements.js
+++ b/components/case/representation/representationElements.js
@@ -871,119 +871,116 @@ export const RenderFileUpload = (field) => {
});
};
- return (
- <>
-
{
- const renamedAcceptedFiles = filesToUpload.map(
- (file) =>
- new File([file], `${file.name}`, {
- type: file.type,
- })
- );
- field.input.onChange(renamedAcceptedFiles);
- }}
- >
- {({ getRootProps, getInputProps }) => (
- <>
- {/* {field.hint != false && (
- ss{t(field.hint)}
- )}
- */}
-
-
- {" "}
-
-
- {t(
- "newappeal:new-appeal-fileupload-drop-label"
- )}
-
-
- (
- {t(
- "newappeal:new-appeal-fileupload-file-list-label"
- )}
- )
-
+ return <>
+
{
+ const renamedAcceptedFiles = filesToUpload.map(
+ (file) =>
+ new File([file], `${file.name}`, {
+ type: file.type,
+ })
+ );
+ field.input.onChange(renamedAcceptedFiles);
+ }}
+ >
+ {({ getRootProps, getInputProps }) => (
+ <>
+ {/* {field.hint != false && (
+ ss{t(field.hint)}
+ )}
+ */}
+
+
+ {" "}
+
+
+ {t(
+ "newappeal:new-appeal-fileupload-drop-label"
+ )}
-
-
- >
- )}
-
- {field.meta.touched && field.meta.error && (
-
{field.meta.error}
- )}
- {files && Array.isArray(files) && (
-
- {files.map((file, i) => (
-
-

-
- {file.name} ({bytesToSize(file.size)})
-
+
+ (
+ {t(
+ "newappeal:new-appeal-fileupload-file-list-label"
+ )}
+ )
+
- ))}
-
+
+
+ >
)}
- {blobList.map((blob, i) => (
-
-
-
{
- deleteThisBlob(
- field.containerID,
- blob.name,
- blob.hasheddeletepath,
- blob.hashgetblobs,
- field.ticketnumber
- );
- }}
- title="Remove this file"
- >
- −
+
+ {field.meta.touched && field.meta.error && (
+ {field.meta.error}
+ )}
+ {files && Array.isArray(files) && (
+
)}
@@ -624,12 +623,13 @@ const CaseSummary = (props) => {
true ? (
""
) : (
-
-
- {t(
- "case:summary-make-representation-label"
- )}
-
+
+ {t(
+ "case:summary-make-representation-label"
+ )}
)}
@@ -996,8 +996,9 @@ const CaseSummary = (props) => {
item.title +
"&lk=1"
}
+ className=""
>
-
{item.title}
+ {item.title}
);
@@ -1009,7 +1010,7 @@ const CaseSummary = (props) => {
}
function showReps(startDate, endDate) {
- const date = new Date();
+ let date = new Date();
date = new Date(date.toDateString());
const start = new Date(startDate);
const end = new Date(endDate);
@@ -1018,7 +1019,7 @@ const CaseSummary = (props) => {
}
function showRepsEnded(startDate, endDate) {
- const date = new Date();
+ let date = new Date();
date = new Date(date.toDateString());
const start = new Date(startDate);
const end = new Date(endDate);
diff --git a/components/case/summaryTypes/pinswg_dnsid.js b/components/case/summaryTypes/pinswg_dnsid.js
index e3ec3f27..1e7a5d38 100644
--- a/components/case/summaryTypes/pinswg_dnsid.js
+++ b/components/case/summaryTypes/pinswg_dnsid.js
@@ -18,8 +18,8 @@ const Pinswg_dnsid = (props) => {
const router = useRouter();
const { locale } = router;
- const point = {};
- const siteCoords = {};
+ let point = {};
+ let siteCoords = {};
let center = {};
point = new OSPoint(
diff --git a/components/caseresults.js b/components/caseresults.js
index b7c0223e..da23c9e1 100644
--- a/components/caseresults.js
+++ b/components/caseresults.js
@@ -25,17 +25,17 @@ export default function Search({ children, pages }) {
diff --git a/components/cookieBanner.js b/components/cookieBanner.js
index fdd30e14..7c82c71f 100644
--- a/components/cookieBanner.js
+++ b/components/cookieBanner.js
@@ -36,104 +36,102 @@ const CookieBanner = () => {
setBannerVisible(false);
};
- return (
- <>
- {bannerVisible ? (
-
-
-
-
-
-
-
-
+ return <>
+ {bannerVisible ? (
+
+
+
+
+
+
+
+
+ {t(
+ "common:cookie-banner-line-1"
+ )}
+
+
+ -
+ {" "}
{t(
- "common:cookie-banner-line-1"
+ "common:cookie-banner-list-item-1"
)}
-
-
- -
- {" "}
- {t(
- "common:cookie-banner-list-item-1"
- )}
-
-
-
+
+
+
+ {t(
+ "common:cookie-banner-line-2"
+ )}
+
+
+ -
{t(
- "common:cookie-banner-line-2"
+ "common:cookie-banner-list-item-2"
)}
-
-
- -
- {t(
- "common:cookie-banner-list-item-2"
- )}
-
- -
- {t(
- "common:cookie-banner-list-item-3"
- )}
-
-
-
+
+
+ {t(
+ "common:cookie-banner-list-item-3"
+ )}
+
+
-
-
- ) : (
- ""
- )}
- >
- );
+
+
+
+
+
+ {t("common:cookie-banner-change-settings")}
+
+
+
+
+
+ ) : (
+ ""
+ )}
+ >;
};
export default CookieBanner;
diff --git a/components/cookiemanager/index.js b/components/cookiemanager/index.js
index b4dc457a..007f773a 100644
--- a/components/cookiemanager/index.js
+++ b/components/cookiemanager/index.js
@@ -431,12 +431,12 @@ const CookieManagementMain = (props) => {
href={t(
"cookies:cookie-settings-essential-link"
)}
- >
-
- {t(
- "cookies:cookie-settings-essential-link-label"
- )}
-
+ className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold">
+
+ {t(
+ "cookies:cookie-settings-essential-link-label"
+ )}
+
diff --git a/components/dns/applications/applicationsIntro.js b/components/dns/applications/applicationsIntro.js
index 883f4f06..4a0d7a0d 100644
--- a/components/dns/applications/applicationsIntro.js
+++ b/components/dns/applications/applicationsIntro.js
@@ -27,10 +27,10 @@ const ApplicationIntro = (props) => {
{t("dnsApplications:page-intro-paragraph-2")}{" "}
-
-
- {t("dnsApplications:page-intro-paragraph-2-link")}
-
+
+
+ {t("dnsApplications:page-intro-paragraph-2-link")}
+
.
diff --git a/components/dns/applications/applicationsList.js b/components/dns/applications/applicationsList.js
index db5a3f46..22fe73f5 100644
--- a/components/dns/applications/applicationsList.js
+++ b/components/dns/applications/applicationsList.js
@@ -9,505 +9,487 @@ const ApplicationList = (props) => {
const router = useRouter();
const { locale } = router;
- return (
- <>
-
-
-
-
+ return <>
+
+
+
+
+
+
+
+
+
+
+ {t("dnsCommon:result-list-showing-label", {
+ recordIndex: "1",
+ pagingIndex: "10",
+ totalRecords: "55",
+ })}
+
+
+
+
+
+
+
+
-
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+
+ -
+ {t(
+ "dnsApplications:result-list-heading-label-application"
+ )}
+
+ -
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+
+ -
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+
+ -
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+
-
-
-
-
-
- {t("dnsCommon:result-list-showing-label", {
- recordIndex: "1",
- pagingIndex: "10",
- totalRecords: "55",
- })}
-
-
-
-
-
-
-
-
-
+
+
-
+
{t(
"dnsApplications:result-list-heading-label-reference"
)}
-
- -
- {t(
- "dnsApplications:result-list-heading-label-application"
- )}
-
- -
+ :
+
+ CAS-00009-W8N6W4
+
+ -
+
+
+
+ {t(
+ "dnsApplications:result-list-heading-label-application"
+ )}
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+ -
+
{t(
"dnsApplications:result-list-heading-label-developer"
)}
-
- -
+ :
+
+ Menter Mon
+
+ -
+
{t(
"dnsApplications:result-list-heading-label-type"
)}
-
- -
+ :
+
+ Energy
+
+ -
+
{t(
"dnsApplications:result-list-heading-label-status"
)}
-
-
-
-
-
+ :
+
+ Recommendation
+
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+ :
+
+ CAS-00009-W8N6W4
+
+
-
+
+
{t(
- "dnsApplications:result-list-heading-label-reference"
+ "dnsApplications:result-list-heading-label-application"
)}
- :
-
- CAS-00009-W8N6W4
-
-
-
-
-
-
- {t(
- "dnsApplications:result-list-heading-label-application"
- )}
- :{" "}
-
- TWA - Morlais Demonstration Zone
-
-
-
-
-
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+ :
+
+ Menter Mon
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+ :
+
+ Energy
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+ :
+
+ Recommendation
+
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+ :
+
+ CAS-00009-W8N6W4
+
+ -
+
+
{t(
- "dnsApplications:result-list-heading-label-developer"
+ "dnsApplications:result-list-heading-label-application"
)}
- :
-
- Menter Mon
-
- -
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+ :
+
+ Menter Mon
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+ :
+
+ Energy
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+ :
+
+ Recommendation
+
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+ :
+
+ CAS-00009-W8N6W4
+
+ -
+
+
{t(
- "dnsApplications:result-list-heading-label-type"
+ "dnsApplications:result-list-heading-label-application"
)}
- :
-
- Energy
-
- -
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+ :
+
+ Menter Mon
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+ :
+
+ Energy
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+ :
+
+ Recommendation
+
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+ :
+
+ CAS-00009-W8N6W4
+
+ -
+
+
{t(
- "dnsApplications:result-list-heading-label-status"
+ "dnsApplications:result-list-heading-label-application"
)}
- :
-
- Recommendation
-
-
-
-
-
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+ :
+
+ Menter Mon
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+ :
+
+ Energy
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+ :
+
+ Recommendation
+
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+ :
+
+ CAS-00009-W8N6W4
+
+
-
+
+
{t(
- "dnsApplications:result-list-heading-label-reference"
+ "dnsApplications:result-list-heading-label-application"
)}
- :
-
- CAS-00009-W8N6W4
-
-
-
-
-
-
- {t(
- "dnsApplications:result-list-heading-label-application"
- )}
- :{" "}
-
- TWA - Morlais Demonstration Zone
-
-
-
-
-
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+ :
+
+ Menter Mon
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+ :
+
+ Energy
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+ :
+
+ Recommendation
+
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+ :
+
+ CAS-00009-W8N6W4
+
+ -
+
+
{t(
- "dnsApplications:result-list-heading-label-developer"
+ "dnsApplications:result-list-heading-label-application"
)}
- :
-
- Menter Mon
-
- -
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+ :
+
+ Menter Mon
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+ :
+
+ Energy
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+ :
+
+ Recommendation
+
+
+
+
-
+
+ {t(
+ "dnsApplications:result-list-heading-label-reference"
+ )}
+ :
+
+ CAS-00009-W8N6W4
+
+ -
+
+
{t(
- "dnsApplications:result-list-heading-label-type"
+ "dnsApplications:result-list-heading-label-application"
)}
- :
-
- Energy
-
- -
-
- {t(
- "dnsApplications:result-list-heading-label-status"
- )}
- :
-
- Recommendation
-
-
-
-
-
-
-
-
-
-
+ :{" "}
+ TWA - Morlais Demonstration Zone
+
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-developer"
+ )}
+ :
+
+ Menter Mon
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-type"
+ )}
+ :
+
+ Energy
+
+ -
+
+ {t(
+ "dnsApplications:result-list-heading-label-status"
+ )}
+ :
+
+ Recommendation
+
+
+
-
-
-
- {t("dnsCommon:result-list-previous-label")}{" "}
- 1{" "}
-
- 2
- {" "}
-
- 3
- {" "}
-
- 4
- {" "}
-
- 5
- {" "}
-
- {t("dnsCommon:result-list-next-label")}
-
-
-
+
+
+
+
+ {t("dnsCommon:result-list-previous-label")}{" "}
+ 1{" "}
+
+ 2
+ {" "}
+
+ 3
+ {" "}
+
+ 4
+ {" "}
+
+ 5
+ {" "}
+
+ {t("dnsCommon:result-list-next-label")}
+
+
- >
- );
+
+ >;
};
export default ApplicationList;
diff --git a/components/dns/homepage/applicationsForComment.js b/components/dns/homepage/applicationsForComment.js
index e8f7262b..43477e9f 100644
--- a/components/dns/homepage/applicationsForComment.js
+++ b/components/dns/homepage/applicationsForComment.js
@@ -15,10 +15,10 @@ const ApplicationsForComment = (props) => {
diff --git a/components/dns/homepage/dnsLinks.js b/components/dns/homepage/dnsLinks.js
index c9dd151b..0b7b30f3 100644
--- a/components/dns/homepage/dnsLinks.js
+++ b/components/dns/homepage/dnsLinks.js
@@ -13,10 +13,10 @@ const DNSLinks = (props) => {
diff --git a/components/elements/index.js b/components/elements/index.js
index bf6412fe..eca03b17 100644
--- a/components/elements/index.js
+++ b/components/elements/index.js
@@ -1431,125 +1431,121 @@ const RenderFileUpload = (field) => {
});
};
- return (
- <>
-
{
- const renamedAcceptedFiles = filesToUpload.map(
- (file) =>
- new File(
- [file],
- `${getDocumentType(field.documentTypeCode)}_${
- file.name
- }`,
- {
- type: file.type,
- }
- )
- );
- field.input.onChange(renamedAcceptedFiles);
- }}
- >
- {({ getRootProps, getInputProps }) => (
- <>
- {/* {field.hint != false && (
- ss{t(field.hint)}
- )}
- */}
-
-
- {" "}
-
-
- {t(
- "newappeal:new-appeal-fileupload-drop-label"
- )}
-
-
- (
- {t(
- "newappeal:new-appeal-fileupload-file-list-label"
- )}
- )
-
+ return <>
+
{
+ const renamedAcceptedFiles = filesToUpload.map(
+ (file) =>
+ new File(
+ [file],
+ `${getDocumentType(field.documentTypeCode)}_${
+ file.name
+ }`,
+ {
+ type: file.type,
+ }
+ )
+ );
+ field.input.onChange(renamedAcceptedFiles);
+ }}
+ >
+ {({ getRootProps, getInputProps }) => (
+ <>
+ {/* {field.hint != false && (
+ ss{t(field.hint)}
+ )}
+ */}
+
+
+ {" "}
+
+
+ {t(
+ "newappeal:new-appeal-fileupload-drop-label"
+ )}
-
-
- >
- )}
-
- {field.meta.touched && field.meta.error && (
-
{field.meta.error}
- )}
- {files && Array.isArray(files) && (
-
- {files.map((file, i) => (
-
-

-
- {/* {file.name.slice(file.name.indexOf("_") + 1)} ( */}{" "}
- {file.name}( ({bytesToSize(file.size)})
-
+
+ (
+ {t(
+ "newappeal:new-appeal-fileupload-file-list-label"
+ )}
+ )
+
- ))}
-
+
+
+ >
)}
- {blobList.map((blob, i) => (
-
-
-
{
- deleteThisBlob(
- field.containerID,
- blob.name,
- blob.hasheddeletepath,
- blob.hashgetblobs,
- field.ticketnumber
- );
- }}
- title="Remove this file"
- >
- −
+
+ {field.meta.touched && field.meta.error && (
+ {field.meta.error}
+ )}
+ {files && Array.isArray(files) && (
+
diff --git a/components/footer.js b/components/footer.js
index 7a55114f..a3de78f3 100644
--- a/components/footer.js
+++ b/components/footer.js
@@ -13,8 +13,8 @@ export default function Footer(props) {
const linksBlock = Object.keys(linksArr).map((key) => (
-
- {linksArr[key].title}
+
+ {linksArr[key].title}
));
@@ -34,257 +34,247 @@ export default function Footer(props) {
" " +
t("common:gov-wales-label").toLowerCase();
- return (
- <>
-
-
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
- >
- );
+
+ >;
}
diff --git a/components/header.js b/components/header.js
index e8d20a34..beee003d 100644
--- a/components/header.js
+++ b/components/header.js
@@ -74,15 +74,17 @@ const Header = (props) => {
>
@@ -209,10 +211,12 @@ const Header = (props) => {
*/}
{hasContactLink.includes(router.pathname) == true ? (
-
-
+
+
Contact
-
+
) : (
""
@@ -220,22 +224,20 @@ const Header = (props) => {
{noSignoutLink.includes(router.pathname) == true ? (
""
) : (
-
-
{
- handleLogout();
- }}
- className="govuk-header__link govuk-!-margin-right-3"
- >
- {t("common:signout-label")}
-
-
+ onClick={() => {
+ handleLogout();
+ }}
+ className="govuk-header__link govuk-!-margin-right-3">
+
+ {t("common:signout-label")}
+
+ )
)}
{
: router.asPath
}
locale={locale == "en" ? "cy" : "en"}
- >
-
{
- setCookie(
- null,
- "pedw_locale",
- locale == "en" ? "cy" : "en",
- {
- path: "/",
- }
- );
- }}
- >
- {" "}
- {t("common:available-in")}
-
+ className="govuk-header__link "
+ lang={locale == "en" ? "cy" : "en"}
+ hrefLang={locale == "en" ? "cy" : "en"}
+ data-journey-click={
+ locale == "en"
+ ? "link - click:lang-select:Cymraeg"
+ : "link - click:lang-select:English"
+ }
+ aria-label={
+ locale == "en"
+ ? "Dewiswch Cymraeg"
+ : "Select English"
+ }
+ onClick={() => {
+ setCookie(
+ null,
+ "pedw_locale",
+ locale == "en" ? "cy" : "en",
+ {
+ path: "/",
+ }
+ );
+ }}>
+
+ {" "}
+ {t("common:available-in")}
+
diff --git a/components/homepage/casesearch.js b/components/homepage/casesearch.js
index e1a03631..56517f78 100644
--- a/components/homepage/casesearch.js
+++ b/components/homepage/casesearch.js
@@ -94,64 +94,62 @@ let CaseSearch = (props) => {
});
};
- return (
- <>
-
diff --git a/components/homepage/inspectorate.js b/components/homepage/inspectorate.js
index 82a3867b..c7b00c8d 100644
--- a/components/homepage/inspectorate.js
+++ b/components/homepage/inspectorate.js
@@ -21,7 +21,7 @@ export default function Inspectorate() {
{t("home:inspectorate-card-visit-label")}:{" "}
- {t("home:inspectorate-card-visit-link")}
+ {t("home:inspectorate-card-visit-link")}
diff --git a/components/myportal.js b/components/myportal.js
index bd523734..7692deaa 100644
--- a/components/myportal.js
+++ b/components/myportal.js
@@ -39,142 +39,138 @@ const MyPortal = (props) => {
? true
: false;
- return (
- <>
-
-
-
-
-
+ return <>
+
+
+
+
+
-
-

{" "}
-
-
-
-
- {isLPA && (
-
-
+
+

{" "}
+
+
+
+ {
+ props.accountDetails.accountDetails
+ .firstname
+ }{" "}
+ {
+ props.accountDetails.accountDetails
+ .lastname
+ }
+ {" - "}
{
props.accountDetails.accountDetails[
- "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
+ "pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
]
- }{" "}
- LPA Portal
-
-
- )}
-
-
-
- {!isLPA &&
}
-
- {/* {props.awaitingSubmission.awaitingSubmission[
- "@odata.count"
- ] > 0 && (
-
- )} */}
- {isLPA
- ? ""
- : props.awaitingSubmission
- .awaitingSubmissionFromBlob[
- "@odata.count"
- ] > 0 && (
-
- )}
- {props.myCases.myCases["@odata.count"] > 0 && (
-
- )}
- {props.watchedCases.watchedCases["@odata.count"] >
- 0 && (
-
- )}
- {props.myRepresentations.myRepresentations[
- "@odata.count"
- ] > 0 && (
-
- )}
- {!isLPA &&
}
+ }
- {/*
*/}
-
+
+
+
+ {
+ handleLogout();
+ }}
+ className="govuk-header__link govuk-!-margin-right-3">
+
+ {t("common:signout-label")}
+
+
-
-
- >
- );
+
+ {isLPA && (
+
+
+ {
+ props.accountDetails.accountDetails[
+ "pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
+ ]
+ }{" "}
+ LPA Portal
+
+
+ )}
+
+
+
+ {!isLPA &&
}
+
+ {/* {props.awaitingSubmission.awaitingSubmission[
+ "@odata.count"
+ ] > 0 && (
+
+ )} */}
+ {isLPA
+ ? ""
+ : props.awaitingSubmission
+ .awaitingSubmissionFromBlob[
+ "@odata.count"
+ ] > 0 && (
+
+ )}
+ {props.myCases.myCases["@odata.count"] > 0 && (
+
+ )}
+ {props.watchedCases.watchedCases["@odata.count"] >
+ 0 && (
+
+ )}
+ {props.myRepresentations.myRepresentations[
+ "@odata.count"
+ ] > 0 && (
+
+ )}
+ {!isLPA &&
}
+
+ {/*
*/}
+
+
+
+
+
+ >;
};
export default MyPortal;
diff --git a/components/myportal/advancedsearch.js b/components/myportal/advancedsearch.js
index 526f62b9..49c57496 100644
--- a/components/myportal/advancedsearch.js
+++ b/components/myportal/advancedsearch.js
@@ -179,98 +179,96 @@ let AdvancedSearch = (props) => {
label,
errormsg,
}) => {
- return (
- <>
-
-
- {touched && error && (
-
-
- Error:
- {" "}
- {errormsg}
-
- )}
-
-
+ >;
};
// const [showSpinnerState, setShowSpinnerState] = useState(false);
diff --git a/components/myportal/awaitingsubmission.js b/components/myportal/awaitingsubmission.js
index 2995009e..cd296a53 100644
--- a/components/myportal/awaitingsubmission.js
+++ b/components/myportal/awaitingsubmission.js
@@ -40,18 +40,16 @@ const AwaitingSubmission = (props) => {
"/fymhorth/gweldpopeth"
: "/myportal/viewall"
}
- >
-
{
- setCurrentView({
- "viewName": "Awaiting Submission",
- "viewKey": "awaitingSubmission",
- });
- }}
- >
- {t("myportal:viewall-link")}
-
+ className="govuk-link--no-underline"
+ onClick={() => {
+ setCurrentView({
+ "viewName": "Awaiting Submission",
+ "viewKey": "awaitingSubmission",
+ });
+ }}>
+
+ {t("myportal:viewall-link")}
+
)}
diff --git a/components/myportal/awaitingsubmissionfromblob.js b/components/myportal/awaitingsubmissionfromblob.js
index acdecee1..aa28e440 100644
--- a/components/myportal/awaitingsubmissionfromblob.js
+++ b/components/myportal/awaitingsubmissionfromblob.js
@@ -76,28 +76,26 @@ const AwaitingSubmissionFromBlob = (props) => {
"&inid=" +
showTopThreeArr[key].incidentid
}
- >
- {
- props.setCurrentReference({
- "currentReference":
- showTopThreeArr[key].ticketnumber,
+ className="govuk-link--no-underline"
+ data-id={index}
+ onClick={() => {
+ props.setCurrentReference({
+ "currentReference":
+ showTopThreeArr[key].ticketnumber,
- "currentType": "awaitingSubmission",
+ "currentType": "awaitingSubmission",
- "incidentid":
- showTopThreeArr[key].incidentid,
+ "incidentid":
+ showTopThreeArr[key].incidentid,
+
+ "appealType":
+ showTopThreeArr[key]
+ .pinswg_appealcasetype,
+ });
+ }}>
+
+ {showTopThreeArr[index].pinswg_name}
- "appealType":
- showTopThreeArr[key]
- .pinswg_appealcasetype,
- });
- }}
- >
- {showTopThreeArr[index].pinswg_name}
-
)}
diff --git a/components/myportal/dns.js b/components/myportal/dns.js
index 955e4263..6d4b00ac 100644
--- a/components/myportal/dns.js
+++ b/components/myportal/dns.js
@@ -33,15 +33,13 @@ export default function Dns() {
? "/fymhorth/ceisiadaudns"
: "/myportal/dnsapplications"
}
- >
- {
- // spinnerState();
- // }}
- >
- {t("home:dns-card-button")}
-
+ // onClick={() => {
+ // spinnerState();
+ // }}
+ className="govuk-button withChevron govuk-button-cta">
+
+ {t("home:dns-card-button")}
+
diff --git a/components/myportal/makenewappeal.js b/components/myportal/makenewappeal.js
index ad42d108..b300ccf3 100644
--- a/components/myportal/makenewappeal.js
+++ b/components/myportal/makenewappeal.js
@@ -20,10 +20,10 @@ export default function MakeNewAppeal() {
{t("myportal:makenewappeal-card-paragraph-two")}
diff --git a/components/myportal/mycases.js b/components/myportal/mycases.js
index ed428b21..f080c25e 100644
--- a/components/myportal/mycases.js
+++ b/components/myportal/mycases.js
@@ -34,21 +34,19 @@ const MyCases = (props) => {
"/fymhorth/gweldpopeth"
: "/myportal/viewall"
}
- >
- {
- setCurrentView({
- "viewName": "My Cases",
- "viewKey": "myCases",
- });
- }}
- >
- {t("myportal:viewall-link")}{" "}
- {props.isLPA &&
- props.myCases.myCases["@odata.count"] +
- " appeals"}
-
+ className="govuk-link--no-underline"
+ onClick={() => {
+ setCurrentView({
+ "viewName": "My Cases",
+ "viewKey": "myCases",
+ });
+ }}>
+
+ {t("myportal:viewall-link")}{" "}
+ {props.isLPA &&
+ props.myCases.myCases["@odata.count"] +
+ " appeals"}
+
)}
diff --git a/components/myportal/myrepresentations.js b/components/myportal/myrepresentations.js
index 7bbe0bd8..dcd1b6cb 100644
--- a/components/myportal/myrepresentations.js
+++ b/components/myportal/myrepresentations.js
@@ -40,18 +40,16 @@ const MyRepresentations = (props) => {
: "/myportal/viewall"
}
shallow
- >
- {
- setCurrentView({
- "viewName": "My Representations",
- "viewKey": "myRepresentations",
- });
- }}
- >
- {t("myportal:viewall-link")}
-
+ className="govuk-link--no-underline"
+ onClick={() => {
+ setCurrentView({
+ "viewName": "My Representations",
+ "viewKey": "myRepresentations",
+ });
+ }}>
+
+ {t("myportal:viewall-link")}
+
)}
diff --git a/components/myportal/myrepresentationsfromblob.js b/components/myportal/myrepresentationsfromblob.js
index 63a47c1b..4c9492e5 100644
--- a/components/myportal/myrepresentationsfromblob.js
+++ b/components/myportal/myrepresentationsfromblob.js
@@ -40,18 +40,16 @@ const MyRepresentations = (props) => {
: "/myportal/viewall"
}
shallow
- >
-
{
- setCurrentView({
- "viewName": "My Representations",
- "viewKey": "myRepresentations",
- });
- }}
- >
- {t("myportal:viewall-link")}
-
+ className="govuk-link--no-underline"
+ onClick={() => {
+ setCurrentView({
+ "viewName": "My Representations",
+ "viewKey": "myRepresentations",
+ });
+ }}>
+
+ {t("myportal:viewall-link")}
+
)}
diff --git a/components/myportal/searchcases.js b/components/myportal/searchcases.js
index d06c69c6..cd556f0b 100644
--- a/components/myportal/searchcases.js
+++ b/components/myportal/searchcases.js
@@ -95,64 +95,62 @@ let CaseSearch = (props) => {
});
};
- return (
- <>
-
-
{/* {(topThreeType == "awaitingSubmission" ||
diff --git a/components/myportal/topthree_reps.js b/components/myportal/topthree_reps.js
index dad94159..ab8d610c 100644
--- a/components/myportal/topthree_reps.js
+++ b/components/myportal/topthree_reps.js
@@ -156,6 +156,7 @@ const TopThree = (props) => {
{t("myportal:case-reference")}:{" "}
{
state: "edit",
},
}}
- // href="#"
- >
-
{
- setCurrentReference({
- "currentReference":
- showTopThreeArr[key].caseRef,
- "currentType": topThreeType,
- "incidentid":
- showTopThreeArr[key].incidentID,
- "appealType":
- showTopThreeArr[key].appealType,
- "repDetails": showTopThreeArr[key],
- });
- }}
- >
- {showTopThreeArr[key].pinswg_name}
-
+ className="govuk-link--no-underline"
+ data-id={index}
+ onClick={() => {
+ setCurrentReference({
+ "currentReference":
+ showTopThreeArr[key].caseRef,
+ "currentType": topThreeType,
+ "incidentid":
+ showTopThreeArr[key].incidentID,
+ "appealType":
+ showTopThreeArr[key].appealType,
+ "repDetails": showTopThreeArr[key],
+ });
+ }}>
+
+ {showTopThreeArr[key].pinswg_name}
+
diff --git a/components/myportal/viewall.js b/components/myportal/viewall.js
index 33fd4201..925cd75f 100644
--- a/components/myportal/viewall.js
+++ b/components/myportal/viewall.js
@@ -100,49 +100,47 @@ const ViewAllResults = (props) => {
? "/myportal/case"
: "/case"
}
- >
-
{
- setCurrentReference({
- "currentReference":
- currentView.viewKey != "watchedCases"
- ? currentView.viewKey ==
- "myRepresentations"
- ? resultsArr[key].caseRef
- : resultsArr[key].ticketnumber
- : resultsArr[key][
- "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
- ],
+ onClick={() => {
+ setCurrentReference({
+ "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].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],
+ });
+ }}>
+
+
+ {t("search:searchresults-case-reference-label")}
+ :
+
+ {currentView.viewKey != "watchedCases"
+ ? currentView.viewKey == "myRepresentations"
+ ? resultsArr[key].caseRef
+ : resultsArr[key].ticketnumber
+ : resultsArr[key][
+ "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
+ ]}
- "appealType":
- resultsArr[key].pinswg_appealcasetype,
- "repDetails":
- currentView.viewKey ==
- "myRepresentations" &&
- resultsArr[key],
- });
- }}
- >
-
- {t("search:searchresults-case-reference-label")}
- :
-
- {currentView.viewKey != "watchedCases"
- ? currentView.viewKey == "myRepresentations"
- ? resultsArr[key].caseRef
- : resultsArr[key].ticketnumber
- : resultsArr[key][
- "_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
- ]}
-
diff --git a/components/myportal/watchedcases.js b/components/myportal/watchedcases.js
index a279ed3d..e5ff6c13 100644
--- a/components/myportal/watchedcases.js
+++ b/components/myportal/watchedcases.js
@@ -37,18 +37,16 @@ const WatchedCases = (props) => {
: "/myportal/viewall"
}
shallow
- >
- {
- setCurrentView({
- "viewName": "Watched Cases",
- "viewKey": "watchedCases",
- });
- }}
- >
- {t("myportal:viewall-link")}
-
+ className="govuk-link--no-underline"
+ onClick={() => {
+ setCurrentView({
+ "viewName": "Watched Cases",
+ "viewKey": "watchedCases",
+ });
+ }}>
+
+ {t("myportal:viewall-link")}
+
)}
diff --git a/components/myportal/youraccount.js b/components/myportal/youraccount.js
index 439d5734..126a7d17 100644
--- a/components/myportal/youraccount.js
+++ b/components/myportal/youraccount.js
@@ -7,44 +7,42 @@ export default function YourAccount() {
const router = useRouter();
const { locale } = router;
- return (
- <>
-