There has been a problem
-- Unfortunately something has gone wrong! -
-{dateString}
- - - Try again - - -+ return ( +
+ There has been a problem +
++ Unfortunately something has gone wrong! +
++ {dateString} +
+ + Try again + ++
diff --git a/.env.local b/.env.local index 26da4dca..7c8b5580 100644 --- a/.env.local +++ b/.env.local @@ -70,7 +70,8 @@ AZURE_CLIENT_SECRET = $CLIENT_SECRET // test key AZURE_STORAGE_ACCOUNT_NAME = "pedwtest" -AZURE_STORAGE_ACCOUNT_KEY = Dl8qUVEnR2mglklQorttMurmjUpe2lI3oMWl9V245U6BOLutXDwmpU36afeTrGLK+zfzNVLErsWM+AStiYsimw== +//AZURE_STORAGE_ACCOUNT_KEY = Dl8qUVEnR2mglklQorttMurmjUpe2lI3oMWl9V245U6BOLutXDwmpU36afeTrGLK+zfzNVLErsWM+AStiYsimw== +AZURE_STORAGE_ACCOUNT_KEY = iEQKwh4TB9BT63pU5a6+ivn6ItiDkuIkYCrUwjm9STJTdMBOKWUT06EEcP8pcy/qeQ89ogK75mFQ+AStT53G/g== AZURE_PEDW_STORAGE_ENDPOINT = https://pedwtest.blob.core.windows.net diff --git a/actions/azurestorage.js b/actions/azurestorage.js index ea65db7b..87d5d1ed 100644 --- a/actions/azurestorage.js +++ b/actions/azurestorage.js @@ -1,6 +1,7 @@ import { DefaultAzureCredential } from "@azure/identity"; import _ from "lodash"; import { hashAPIPath } from "."; +import { da } from "date-fns/locale"; const { ContainerClient, BlockBlobClient, @@ -143,7 +144,14 @@ export const createContainer = async (containerName) => { const blobServiceClient = new BlobServiceClient(`${STORAGE_PATH}`, creds); - const createContainerResponse = await containerClient.createIfNotExists(); + const createContainerResponse = await containerClient + .createIfNotExists() + .then((data) => { + return data; + }) + .catch((err) => { + console.log("has error", err); + }); //console.log( // "\n//////////////////\n container name :", @@ -151,7 +159,8 @@ export const createContainer = async (containerName) => { // "\n//////////////////\n" // ); - return containerName; + console.log(createContainerResponse); + return createContainerResponse; }; export const getContainers = async () => { diff --git a/actions/index.js b/actions/index.js index 1f6e5566..cbf27611 100644 --- a/actions/index.js +++ b/actions/index.js @@ -42,9 +42,13 @@ export const consoleLogger = (err) => { var errStr = "\n\n/////////////////////////////////////////////////\nServer Error " + "\n" + - (_.has(err, "response.status") - ? "Status: " + err.response.status + "\n" + (_.has(err, "name") ? "Name: " + err.name + "\n" : "") + + (_.has(err, "code") ? "Code: " + err.code + "\n" : "") + + (_.has(err, "message") ? "Message: " + err.message + "\n" : "") + + (_.has(err, "request.url") + ? "request.url: " + err.request.url + "\n" : "") + + (_.has(err, "response.status") ? "Status: " + err.code + "\n" : "") + (_.has(err, "response.statusText") ? "\nStatusText: " + err.response.status + "\n" : "") + @@ -96,7 +100,6 @@ export const getToken = () => { return data; }) .catch((error) => { - //console.log("error :", error.response); consoleLogger(error); return error; }); @@ -283,7 +286,6 @@ export const getAddressSearchPaged = ( fieldSort, showNumberOfRecords ) => { - //console.log(queryUrl); return axios .get( "/api/endpoint/getbasicsearch_by_address_paged_api?searchString=" + @@ -312,7 +314,6 @@ export const getBasicSearchPaged = ( fieldSort, showNumberOfRecords ) => { - //console.log(queryUrl); return axios .get( "/api/endpoint/getbasicsearchpaged_api?searchString=" + @@ -338,7 +339,6 @@ export const getDNSCoords = () => { return axios .get(BASE_URL + "/api/endpoint/getdnscoords_api") .then((res) => { - //console.log(res.data); return res.data; }) .catch((error) => { @@ -581,7 +581,6 @@ export const getLinkedCases = (parentIncidentid) => { parentIncidentid ) .then((res) => { - //console.log(" linked date", res.data); return res.data; }) .catch((error) => { @@ -626,7 +625,6 @@ export const getLPA = () => { return axios .get(BASE_URL + "/api/endpoint/getlpa_api") .then((res) => { - //console.log(res.data); return res.data; }) .catch((error) => { @@ -681,7 +679,6 @@ export const getPersonalAccount = (contactid) => { contactid ) .then((res) => { - //console.log(res.data); return res.data; }) .catch((error) => { @@ -1284,7 +1281,6 @@ export const getCase = (incidentID) => { return axios .get(BASE_URL + "/api/endpoint/getcase_api?incidentID=" + incidentID) .then((res) => { - //console.log("//////////----", res.data); return res.data; }) .catch((error) => { diff --git a/actions/selectQueryTypes.js b/actions/selectQueryTypes.js index 39a7ef3f..249cf816 100644 --- a/actions/selectQueryTypes.js +++ b/actions/selectQueryTypes.js @@ -50,10 +50,6 @@ export const getSelectQuery = (appealTypeName) => { return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent"; break; case "pinswg_planningappeals78s": - //console.log( - // "///////////////\n path:", - // process.env.RELAYPATH == "test-pedw-hc" - // ); return process.env.RELAYPATH == "dev-pedw-hc" ? "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_representation_period_end_date,pinswg_extend_representation_date,pinswg_typeofevent" : "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_localplanningauthority_value,pinswg_casedecisiondate,pinswg_dicision,pinswg_dateeventrequested,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdatetimeiftheevent,pinswg_typeofevent"; diff --git a/components/accessibility.js b/components/accessibility.js index e2dbf543..d07d12ca 100644 --- a/components/accessibility.js +++ b/components/accessibility.js @@ -1,8 +1,7 @@ -import Link from "next/link"; -import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; -import AccessibilityEN from "./footerDocs/accessibility_en"; +import { useRouter } from "next/router"; import AccessibilityCY from "./footerDocs/accessibility_cy"; +import AccessibilityEN from "./footerDocs/accessibility_en"; const AccessibilityStatement = (props) => { let { t } = useTranslation(); diff --git a/components/account/changepassword.js b/components/account/changepassword.js index 638c1836..8b53860e 100644 --- a/components/account/changepassword.js +++ b/components/account/changepassword.js @@ -1,15 +1,9 @@ -import Link from "next/link"; -import _ from "lodash"; -import React, { useState, useEffect } from "react"; -import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; -import { - Field, - reduxForm, - formValueSelector, - getFormSubmitErrors, -} from "redux-form"; -import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import React, { useState } from "react"; +import { connect } from "react-redux"; +import { Field, formValueSelector, reduxForm } from "redux-form"; import { updatePassword } from "../../actions"; const RenderTextfield = ({ @@ -95,63 +89,67 @@ const ChangePassword = (props) => { const [hasErrors, setHasErrors] = useState(""); - return <> - {passwordUpdated != true ? ( -
- ) : ( - <> -- - Go to My Portal - -
- > - )} - >; ++ + Go to My Portal + +
+ > + )} + > + ); }; const mapStateToProps = (state) => { diff --git a/components/account/personaldetails.js b/components/account/personaldetails.js index fa775187..cae2e87c 100644 --- a/components/account/personaldetails.js +++ b/components/account/personaldetails.js @@ -1,15 +1,9 @@ -import _ from "lodash"; -import Link from "next/link"; -import React, { useState } from "react"; -import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; -import { - Field, - reduxForm, - formValueSelector, - getFormSubmitErrors, -} from "redux-form"; -import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import React, { useState } from "react"; +import { connect } from "react-redux"; +import { Field, formValueSelector, reduxForm } from "redux-form"; import BuildCheckPersonalDetails from "./personaldetailsCheck"; import PersonalDetailsComplete from "./personaldetailsComplete"; diff --git a/components/account/personaldetailsCheck.js b/components/account/personaldetailsCheck.js index aad11ee0..efa40415 100644 --- a/components/account/personaldetailsCheck.js +++ b/components/account/personaldetailsCheck.js @@ -1,15 +1,8 @@ -import _ from "lodash"; -import Link from "next/link"; -import React, { useState } from "react"; -import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; -import { - Field, - reduxForm, - formValueSelector, - getFormSubmitErrors, -} from "redux-form"; -import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import React from "react"; +import { connect } from "react-redux"; const BuildCheckPersonalDetails = (props) => { const { @@ -31,325 +24,328 @@ const BuildCheckPersonalDetails = (props) => { : t("account:account-preferred-language-welsh"); }; - 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/registerCheck.js b/components/account/registerCheck.js index b2b11046..b4e9356e 100644 --- a/components/account/registerCheck.js +++ b/components/account/registerCheck.js @@ -1,14 +1,7 @@ -import _ from "lodash"; -import React, { useState } from "react"; -import { useRouter } from "next/router"; import useTranslation from "next-translate/useTranslation"; -import { - Field, - reduxForm, - formValueSelector, - getFormSubmitErrors, -} from "redux-form"; -import { useDispatch, useSelector, shallowEqual, connect } from "react-redux"; +import { useRouter } from "next/router"; +import React from "react"; +import { connect } from "react-redux"; import { setAccCr } from "../../store/accountDetails/action"; const RegisterFormCheck = (props) => { @@ -144,30 +137,6 @@ const RegisterFormCheck = (props) => {{t("dnsApplications:page-intro-paragraph-2")}{" "} - {t("dnsApplications:page-intro-paragraph-2-link")} - .
diff --git a/components/dns/applications/applicationsList.js b/components/dns/applications/applicationsList.js index cd2dede2..93199663 100644 --- a/components/dns/applications/applicationsList.js +++ b/components/dns/applications/applicationsList.js @@ -1,7 +1,6 @@ +import useTranslation from "next-translate/useTranslation"; import Link from "next/link"; import { useRouter } from "next/router"; -import { useContext } from "react"; -import useTranslation from "next-translate/useTranslation"; const ApplicationList = (props) => { let { t } = useTranslation(); diff --git a/components/dns/homepage/applicationsForComment.js b/components/dns/homepage/applicationsForComment.js index 43477e9f..7957cecd 100644 --- a/components/dns/homepage/applicationsForComment.js +++ b/components/dns/homepage/applicationsForComment.js @@ -1,6 +1,6 @@ +import useTranslation from "next-translate/useTranslation"; import Link from "next/link"; import { useRouter } from "next/router"; -import useTranslation from "next-translate/useTranslation"; const ApplicationsForComment = (props) => { let { t } = useTranslation(); @@ -15,10 +15,11 @@ const ApplicationsForComment = (props) => {{t( @@ -45,10 +46,9 @@ const DNSLinks = (props) => {
{t("dnsHome:links-guidance-intro-paragraph")} diff --git a/components/dns/homepage/latestApplications.js b/components/dns/homepage/latestApplications.js index bf4b2cdf..88e806c8 100644 --- a/components/dns/homepage/latestApplications.js +++ b/components/dns/homepage/latestApplications.js @@ -1,6 +1,6 @@ +import useTranslation from "next-translate/useTranslation"; import Link from "next/link"; import { useRouter } from "next/router"; -import useTranslation from "next-translate/useTranslation"; const LatestApplications = (props) => { let { t } = useTranslation(); diff --git a/components/dns/homepage/titleContent.js b/components/dns/homepage/titleContent.js index 1ca13ee9..56fd37c2 100644 --- a/components/dns/homepage/titleContent.js +++ b/components/dns/homepage/titleContent.js @@ -72,10 +72,9 @@ const TitleContent = (props) => { ? value.split(" - ")[1].split(" ").join("-") : value) } - className="govuk-button govuk-!-margin-bottom-0 "> - + className="govuk-button govuk-!-margin-bottom-0 " + > {t("dnsHome:title-application-search-button")} -
- Unfortunately something has gone wrong! -
-{dateString}
- - - Try again - - -+ Unfortunately something has gone wrong! +
++ {dateString} +
+ + Try again + +