Compare commits
177
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ffae7df890 | ||
|
|
18ada0f9b1 | ||
|
|
6900d02f8c | ||
|
|
4b92f40018 | ||
|
|
0df0ad5faa | ||
|
|
7eda5ffd37 | ||
|
|
65f6b65613 | ||
|
|
26130d12d4 | ||
|
|
e2df26c935 | ||
|
|
3b65133ea0 | ||
|
|
d31002f0ed | ||
|
|
ffd6943aa1 | ||
|
|
17f516b797 | ||
|
|
46876cdff6 | ||
|
|
b4451dc7ee | ||
|
|
4cea869256 | ||
|
|
89f1691c8f | ||
|
|
5fc3b3867c | ||
|
|
a80fa87ea2 | ||
|
|
19ae9b9f63 | ||
|
|
40f7b92dc6 | ||
|
|
9c42fc64f0 | ||
|
|
1514eef343 | ||
|
|
5561e9f9bf | ||
|
|
e920ea681e | ||
|
|
e97f514c3f | ||
|
|
941e030b57 | ||
|
|
28eb95018a | ||
|
|
d0c56d1741 | ||
|
|
193da6af2f | ||
|
|
5dee64dfec | ||
|
|
f11aa09412 | ||
|
|
3d897e6b26 | ||
|
|
d6fd08a8ff | ||
|
|
f40514b4ea | ||
|
|
408dae0ca3 | ||
|
|
c14b0d0a40 | ||
|
|
cdf48a81a7 | ||
|
|
954e58ee3f | ||
|
|
6e764e9364 | ||
|
|
dedd23dfb1 | ||
|
|
1220131cfd | ||
|
|
3555688e39 | ||
|
|
c38da6c8d8 | ||
|
|
297a5dfc77 | ||
|
|
6c7eca581b | ||
|
|
8b244ffb94 | ||
|
|
089c225e4d | ||
|
|
0e33718c34 | ||
|
|
511713eede | ||
|
|
ff85f525a5 | ||
|
|
2cfb06db2a | ||
|
|
eb020b014d | ||
|
|
6354cabde0 | ||
|
|
f725c811b3 | ||
|
|
8e6b88984f | ||
|
|
e04f87323f | ||
|
|
ea1d530155 | ||
|
|
b72df06349 | ||
|
|
87812a6bf2 | ||
|
|
7aa7e2819a | ||
|
|
26070426e8 | ||
|
|
d85b59a25f | ||
|
|
0cf344ea85 | ||
|
|
deb7b12313 | ||
|
|
29abd0efd0 | ||
|
|
3877323b9b | ||
|
|
b4bec11fa0 | ||
|
|
afa81d8bd6 | ||
|
|
ae25ad4673 | ||
|
|
ae007d18ad | ||
|
|
2fb7895234 | ||
|
|
c738d2bde9 | ||
|
|
bfac0d1ff9 | ||
|
|
f0059eb949 | ||
|
|
50c2feaeba | ||
|
|
72ef0f7f40 | ||
|
|
dd0ed06732 | ||
|
|
48f24a6330 | ||
|
|
4fc0917b78 | ||
|
|
38f7853723 | ||
|
|
9dc135ef66 | ||
|
|
e961a1dff4 | ||
|
|
5ebffe74af | ||
|
|
f498d1a09e | ||
|
|
c0b23fff6c | ||
|
|
7f5fd90a17 | ||
|
|
8f9fd50f36 | ||
|
|
2e454290c7 | ||
|
|
eae42c3622 | ||
|
|
4bd1cf9744 | ||
|
|
0346b57d19 | ||
|
|
a33018d225 | ||
|
|
0f7a9c36df | ||
|
|
372e1bf7ce | ||
|
|
ad5c726b54 | ||
|
|
b6798fbfca | ||
|
|
43a194bf98 | ||
|
|
0433304faf | ||
|
|
0d91e75811 | ||
|
|
f586842b39 | ||
|
|
81fe090ce0 | ||
|
|
2dc8a721ab | ||
|
|
0c8f166410 | ||
|
|
c7c74b6250 | ||
|
|
a26313c798 | ||
|
|
e24fe83d0a | ||
|
|
7c5582f6c2 | ||
|
|
d6206ee2be | ||
|
|
cb8b7938f5 | ||
|
|
13e598c60c | ||
|
|
2af5c712ab | ||
|
|
ed077214bb | ||
|
|
ac1c127548 | ||
|
|
9a44e36ceb | ||
|
|
8a24852961 | ||
|
|
c14c86cdbd | ||
|
|
46bd30cd76 | ||
|
|
7d86ac0ca4 | ||
|
|
479f30b0a4 | ||
|
|
e6498c813d | ||
|
|
a5df22a486 | ||
|
|
b912f9ecb8 | ||
|
|
1a740bd78b | ||
|
|
cc0e830cf8 | ||
|
|
927cd70d75 | ||
|
|
8cca0db6e9 | ||
|
|
a09c458aed | ||
|
|
93f385e0b0 | ||
|
|
5c829f1d26 | ||
|
|
1c65d49110 | ||
|
|
a6cdec43e1 | ||
|
|
b50f94074b | ||
|
|
4d4d1fe995 | ||
|
|
11c9df9483 | ||
|
|
19a377f49f | ||
|
|
cd750a9228 | ||
|
|
98251d5da9 | ||
|
|
d01d83ecc4 | ||
|
|
626b2720ab | ||
|
|
837d7c68f7 | ||
|
|
f7af4d4bcc | ||
|
|
528c3284c6 | ||
|
|
68d03ed93d | ||
|
|
9eace1b626 | ||
|
|
34ce7f73a8 | ||
|
|
07f3769d84 | ||
|
|
f6fdc79ae3 | ||
|
|
ebed61f75f | ||
|
|
d9a18f008d | ||
|
|
c5f893f91c | ||
|
|
373a6c0d27 | ||
|
|
884c62ee46 | ||
|
|
73ebd12cd2 | ||
|
|
05b034c328 | ||
|
|
a458a12c6a | ||
|
|
bbc1e3f0a1 | ||
|
|
83fed387f3 | ||
|
|
1a276be54d | ||
|
|
422b3ce98c | ||
|
|
2c7823f911 | ||
|
|
bef329453a | ||
|
|
8d3d356815 | ||
|
|
baa1f7c4f3 | ||
|
|
804f3a6f66 | ||
|
|
49baec5814 | ||
|
|
ae5c0b4e39 | ||
|
|
e1444887cb | ||
|
|
9d6f9c6c49 | ||
|
|
b699f1d359 | ||
|
|
dec96c0546 | ||
|
|
7fad19452b | ||
|
|
1a102ab6cd | ||
|
|
202e1efd51 | ||
|
|
4d6ed2d38d | ||
|
|
f9df42f361 | ||
|
|
53515afc49 |
+5
-2
@@ -16,8 +16,8 @@ yarn-error.log*
|
||||
.yarn
|
||||
|
||||
#lock files
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
# yarn.lock
|
||||
# package-lock.json
|
||||
|
||||
tmp
|
||||
|
||||
@@ -36,3 +36,6 @@ pages/polling.js
|
||||
# dev apis to no include
|
||||
|
||||
pages/api/endpoint/getaccounts_api.js
|
||||
|
||||
# certs
|
||||
certificates/*
|
||||
|
||||
+12
-1
@@ -369,6 +369,8 @@ export const createAppealPDFBlob = async (
|
||||
containerid: containerName,
|
||||
caseID: caseID,
|
||||
blobType: "Appeal PDF",
|
||||
documentLocationId: "846040000",
|
||||
ishareLocation: "846040000",
|
||||
};
|
||||
|
||||
//console.log("the tags:", tags);
|
||||
@@ -420,13 +422,16 @@ export const createRepPDFBlob = async (
|
||||
: repName.indexOf("_Comments") > 0
|
||||
? "846040003"
|
||||
: repName.indexOf("_Impact") > 0
|
||||
? "846040001"
|
||||
? "846040029"
|
||||
: repName.indexOf("_Consultation_Response_") > 0
|
||||
? "846040036"
|
||||
: "846040002";
|
||||
|
||||
const tags = {
|
||||
containerid: containerName,
|
||||
caseID: caseID,
|
||||
blobType: "Representation PDF",
|
||||
documentLocationId: whichLocation,
|
||||
ishareLocation: whichLocation,
|
||||
};
|
||||
|
||||
@@ -606,6 +611,10 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
||||
? "846040003"
|
||||
: files[prop][0].fieldName.indexOf("_Impact_") > 0
|
||||
? "846040001"
|
||||
: files[prop][0].fieldName.indexOf(
|
||||
"_Consultation_Response_"
|
||||
) > 0
|
||||
? "846040036"
|
||||
: "846040000";
|
||||
|
||||
const tags = {
|
||||
@@ -613,6 +622,7 @@ export const uploadFile = async (formContent, containerName, foldername) => {
|
||||
caseID: foldername.split("/")[0],
|
||||
documentType: files[prop][0].fieldName.split(".")[1],
|
||||
blobType: "RepresentationFile",
|
||||
documentLocationId: whichLocation,
|
||||
ishareLocation: whichLocation,
|
||||
};
|
||||
const withTags = blockBlobClient.setTags(tags);
|
||||
@@ -731,6 +741,7 @@ export const uploadSingleFile = async (
|
||||
{ pattern: /_Questionnaire_/, value: "846040001" },
|
||||
{ pattern: /_Comments_/, value: "846040003" },
|
||||
{ pattern: /_Impact_/, value: "846040001" },
|
||||
{ pattern: /_Consultation_Response_/, value: "846040036" },
|
||||
];
|
||||
|
||||
// Find a matching pattern or fallback to default
|
||||
|
||||
+88
-17
@@ -301,6 +301,18 @@ export const getBasicDNSURLSearch = (searchString) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getSIPSEvents = async (caseid) => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getsipsevents_api?caseid=" + caseid)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
return error.response;
|
||||
});
|
||||
};
|
||||
|
||||
export const getAddressSearchPaged = (
|
||||
searchString,
|
||||
pageNumber,
|
||||
@@ -377,7 +389,7 @@ export const getDNSCoords = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getDNSList = (searchString) => {
|
||||
export const getDNSList = async (searchString) => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getdnslist_api")
|
||||
.then((res) => res.data)
|
||||
@@ -634,6 +646,22 @@ export const getAppealsTypes = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getProjectTypes = () => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getprojecttypes_api")
|
||||
.then((res) => res.data)
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
let ErrResponse = {
|
||||
value: [],
|
||||
errorCode: error.response.status,
|
||||
errorMsg: error.response.statusText,
|
||||
};
|
||||
|
||||
return ErrResponse;
|
||||
});
|
||||
};
|
||||
|
||||
export const getAppealsTypesForNewAppeal = () => {
|
||||
return axios
|
||||
.get(BASE_URL + "/api/endpoint/getappealtypesfornewappeal_api")
|
||||
@@ -1433,9 +1461,10 @@ export const deleteMyRepresentationsFromBlob = (
|
||||
|
||||
export const deleteWatchedCases = (watchedCaseID) => {
|
||||
var queryUrl =
|
||||
"/api/endpoint/deletewatchedcases_api?watchedCaseID=" + watchedCaseID;
|
||||
"/api/endpoint/deletewatchedcasesproxy_api?watchedCaseID=" +
|
||||
watchedCaseID;
|
||||
var config = {
|
||||
method: "delete",
|
||||
method: "get",
|
||||
url: queryUrl,
|
||||
};
|
||||
|
||||
@@ -1868,22 +1897,30 @@ export const sendEmail = async (
|
||||
// personalisation,
|
||||
// reference
|
||||
// );
|
||||
var queryUrl = "/api/email/notify";
|
||||
// var queryUrl = "/api/email/notify";
|
||||
|
||||
var config = {
|
||||
method: "post",
|
||||
url: queryUrl,
|
||||
data: mailData,
|
||||
};
|
||||
// var config = {
|
||||
// method: "post",
|
||||
// url: queryUrl,
|
||||
// data: mailData,
|
||||
// };
|
||||
|
||||
return axios(config)
|
||||
.then((res) => {
|
||||
//console.log("posted ", res.data);
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
});
|
||||
// return axios(config)
|
||||
// .then((res) => {
|
||||
// //console.log("posted ", res.data);
|
||||
// return res.data;
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// consoleLogger(error);
|
||||
// });
|
||||
|
||||
try {
|
||||
const response = await axios.post("/api/email/notify", mailData);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
consoleLogger(error); // Optional custom logging
|
||||
throw error; // ✅ Ensure the calling function sees the error
|
||||
}
|
||||
};
|
||||
|
||||
export const getNotice = () => {
|
||||
@@ -2089,3 +2126,37 @@ export const getAddressSearch = async (searchString) => {
|
||||
return ErrResponse;
|
||||
});
|
||||
};
|
||||
|
||||
export const createCRMTask = async (formValues) => {
|
||||
var queryUrl = "/api/endpoint/createcrmtask_api";
|
||||
|
||||
var data = formValues;
|
||||
var config = {
|
||||
method: "post",
|
||||
url: queryUrl,
|
||||
data: data,
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await axios(config);
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
consoleLogger(error);
|
||||
}
|
||||
};
|
||||
|
||||
export const getPreferredLanguage = async (email) => {
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/endpoint/getpreferredlanguage_api?emailAddress=" +
|
||||
email
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
return error.response;
|
||||
});
|
||||
};
|
||||
|
||||
+33
-22
@@ -1,53 +1,58 @@
|
||||
export const getSelectQuery = (appealTypeName) => {
|
||||
switch (appealTypeName) {
|
||||
case "pinswg_advertses":
|
||||
return "&$select=pinswg_speacialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_procedure,pinswg_questionnaireduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_startdate,pinswg_otherpartiesstatement,pinswg_finalcommentsduedate,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_speacialistcaseprocess,pinswg_statementduedate";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,pinswg_speacialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_procedure,pinswg_questionnaireduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_startdate,pinswg_otherpartiesstatement,pinswg_finalcommentsduedate,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_speacialistcaseprocess,pinswg_statementduedate";
|
||||
break;
|
||||
case "pinswg_callinss77s":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_startdate,statuscode,pinswg_dateexportedtoiss,pinswg_startdateofevent,pinswg_typeofevent,pinswg_statementsduedate";
|
||||
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_startdate,statuscode,pinswg_dateexportedtoiss,pinswg_startdateofevent,pinswg_typeofevent,pinswg_statementsduedate";
|
||||
break;
|
||||
case "pinswg_commonlands":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_starttimeoftheevent,pinswg_typeofevent,pinswg_statementsduedate";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_starttimeoftheevent,pinswg_typeofevent,pinswg_statementsduedate";
|
||||
break;
|
||||
case "pinswg_environmentalpermittings":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_hedgeshedgerowstreepreservationreplacems":
|
||||
return "&$select=pinswg_specialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate,pinswg_specialistcaseprocess";
|
||||
return "&$select=pinswg_detailedeiascreening,pinswg_specialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate,pinswg_specialistcaseprocess";
|
||||
break;
|
||||
case "pinswg_miscellaneouscaseworks":
|
||||
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate";
|
||||
break;
|
||||
case "pinswg_wayleaves":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate";
|
||||
return "&$select=pinswg_detailedeiascreening,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate";
|
||||
break;
|
||||
case "pinswg_communityinfrastructurelevys117118119s":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_questionnaireduedate,pinswg_statementduedate";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_procedure,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_questionnaireduedate,pinswg_statementduedate";
|
||||
break;
|
||||
case "pinswg_compulsorypurchaseorderses":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate";
|
||||
return "&$select=pinswg_detailedeiascreening,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddresscounty,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate";
|
||||
break;
|
||||
case "pinswg_dnses":
|
||||
return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_electricityacts":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_harbourrevisionorders":
|
||||
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdiscription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_householderappealhases":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstmt,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode";
|
||||
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstmt,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode";
|
||||
break;
|
||||
case "pinswg_enforcementnoticeappeals174s":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,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_startdateoftheevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_eiarequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,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_startdateoftheevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_enforcementlistedbuildingconservationaps":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_maintenanceoflands217s":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdates,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_lawfuldevelopmentcertificates":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_detailedeiascreeningrequiered,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_listedbuildingandconservationareaconsens":
|
||||
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";
|
||||
return "&$select=pinswg_detailedeiascreeningrequiered,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(
|
||||
@@ -55,24 +60,30 @@ export const getSelectQuery = (appealTypeName) => {
|
||||
// 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";
|
||||
? "&$select=pinswg_eiarequired,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=pinswg_eiarequired,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";
|
||||
break;
|
||||
case "pinswg_planningconditionss73s79s":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,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_startdateofevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_detailedeiascreeningrequiered,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,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_startdateofevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_planningobligationappeals106s":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatements,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent";
|
||||
break;
|
||||
case "pinswg_rows":
|
||||
return "&$select=pinswg_specialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate,pinswg_specialistcaseprocess";
|
||||
return "&$select=pinswg_detailedeiascreeningrequired,pinswg_specialistcaseprocess,modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_proofsofevidencewrittenstatementsofeviden,pinswg_questionnaireduedate,pinswg_relevantauthorityname,pinswg_startdate,statuscode,pinswg_startdateoftheevent,pinswg_typeofevent,pinswg_statementduedate,pinswg_specialistcaseprocess";
|
||||
break;
|
||||
case "pinswg_ldps":
|
||||
return "&$select=modifiedon,pinswg_name";
|
||||
return "&$select=pinswg_eiarequired,modifiedon,pinswg_name";
|
||||
break;
|
||||
case "pinswg_nonvalidations":
|
||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_siteaddresspostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,statuscode";
|
||||
break;
|
||||
case "pinswg_transportandworkacts":
|
||||
return "&$select=pinswg_eiarequired,pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdate,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
case "pinswg_sipses":
|
||||
// return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
|
||||
return "&$select=_pinswg_projecttype_value,pinswg_eiarequired,pinswg_anticipatedgridrefeasting,pinswg_anticipatedgridrefnorthing,_pinswg_appellant_value,pinswg_name,_pinswg_associatedlpa_value,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,statuscode,pinswg_casestage,_pinswg_sipscase_value,pinswg_writtenacceptanceofnotification,pinswg_validnoticeofintentiontosubmit,pinswg_deadlineforsubmissionofapplication,pinswg_screeningstartdate,pinswg_eiatargetdate,pinswg_targetextended,pinswg_directionissueddate,pinswg_eiarequired,pinswg_scopingstartdate,pinswg_scopingtargetdate,pinswg_scopingtargetextended,pinswg_scopingoutcomeissueddate,pinswg_essubmitted,pinswg_deemedmarinelicenseappliedfor,pinswg_validationdeadlineextension,pinswg_casesuspensionstartdate,pinswg_casesuspensionenddate,pinswg_consultationopen,pinswg_consultationclose,pinswg_reportissuedtowelshministers,pinswg_decisionissuedtoapplicant,pinswg_decisionoutcome";
|
||||
break;
|
||||
default:
|
||||
return "";
|
||||
break;
|
||||
|
||||
@@ -246,183 +246,194 @@ let PersonalDetails = (props) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{props.accountUpdatedComplete == false ? (
|
||||
props.personalDetailsComplete == false ? (
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t("account:account-about-you-label")}
|
||||
</h2>
|
||||
</legend>
|
||||
<div className="govuk-form-group ">
|
||||
<span className="govuk-label ">
|
||||
{t("account:account-role-label")}:{" "}
|
||||
{
|
||||
<div className="govuk-form-group">
|
||||
{props.accountUpdatedComplete == false ? (
|
||||
props.personalDetailsComplete == false ? (
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t("account:account-about-you-label")}
|
||||
</h2>
|
||||
</legend>
|
||||
<div className="govuk-form-group ">
|
||||
<span className="govuk-label ">
|
||||
{t("account:account-role-label")}:{" "}
|
||||
{
|
||||
props.props.accountDetails
|
||||
.accountDetails[
|
||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
<Field
|
||||
name="pinswg_preferredlanguage"
|
||||
component={RenderPickList}
|
||||
datafieldname={"pinswg_preferredlanguage"}
|
||||
optionsArr={["English", "Welsh"]}
|
||||
className="govuk-input govuk-input--width-20 govuk-radios--inline"
|
||||
validate={[required]}
|
||||
label={t(
|
||||
"account:account-preferred-language-label"
|
||||
)}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
|
||||
<Field
|
||||
name="firstname"
|
||||
id="firstname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t(
|
||||
"account:account-first-name-label"
|
||||
)}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="lastname"
|
||||
id="lastname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t("account:account-last-name-label")}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="emailaddress1"
|
||||
id="emailaddress1"
|
||||
component={RenderTextfield}
|
||||
type="email"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, email]}
|
||||
label={t(
|
||||
"account:account-email-address-label"
|
||||
)}
|
||||
disabled
|
||||
/>
|
||||
<Field
|
||||
name="telephone1"
|
||||
id="telephone1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, phoneNumber]}
|
||||
label={t("account:account-telephone-label")}
|
||||
/>
|
||||
<Field
|
||||
name="company"
|
||||
id="company"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:account-company-group-label"
|
||||
)}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t(
|
||||
"account:account-your-address-label"
|
||||
)}
|
||||
</h2>
|
||||
</legend>
|
||||
|
||||
<Field
|
||||
name="address1_line1"
|
||||
id="address1_line1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:account-address-line-1-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_line2"
|
||||
id="address1_line2"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:account-address-line-2-label"
|
||||
)}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_city"
|
||||
id="address1_city"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t("account:account-town-city-label")}
|
||||
validate={[required]}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_county"
|
||||
id="address1_county"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t("account:account-county-label")}
|
||||
validate={[required]}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_postalcode"
|
||||
id="address1_postalcode"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-5"
|
||||
label={t("account:account-postcode-label")}
|
||||
validate={[required, postcode]}
|
||||
/>
|
||||
</fieldset>
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
<Link
|
||||
href={
|
||||
"/myportal?q=" +
|
||||
props.props.accountDetails
|
||||
.accountDetails[
|
||||
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
.loggedinUserId
|
||||
}
|
||||
</span>
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("common:cancel-link")}
|
||||
</Link>
|
||||
</div>
|
||||
<Field
|
||||
name="pinswg_preferredlanguage"
|
||||
component={RenderPickList}
|
||||
datafieldname={"pinswg_preferredlanguage"}
|
||||
optionsArr={["English", "Welsh"]}
|
||||
className="govuk-input govuk-input--width-20 govuk-radios--inline"
|
||||
validate={[required]}
|
||||
label={t(
|
||||
"account:account-preferred-language-label"
|
||||
)}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
|
||||
<Field
|
||||
name="firstname"
|
||||
id="firstname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t("account:account-first-name-label")}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="lastname"
|
||||
id="lastname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t("account:account-last-name-label")}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="emailaddress1"
|
||||
id="emailaddress1"
|
||||
component={RenderTextfield}
|
||||
type="email"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, email]}
|
||||
label={t("account:account-email-address-label")}
|
||||
disabled
|
||||
/>
|
||||
<Field
|
||||
name="telephone1"
|
||||
id="telephone1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, phoneNumber]}
|
||||
label={t("account:account-telephone-label")}
|
||||
/>
|
||||
<Field
|
||||
name="company"
|
||||
id="company"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t("account:account-company-group-label")}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t("account:account-your-address-label")}
|
||||
</h2>
|
||||
</legend>
|
||||
|
||||
<Field
|
||||
name="address1_line1"
|
||||
id="address1_line1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:account-address-line-1-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_line2"
|
||||
id="address1_line2"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:account-address-line-2-label"
|
||||
)}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_city"
|
||||
id="address1_city"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t("account:account-town-city-label")}
|
||||
validate={[required]}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_county"
|
||||
id="address1_county"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t("account:account-county-label")}
|
||||
validate={[required]}
|
||||
errorMsg={t("account:is-required-label")}
|
||||
/>
|
||||
<Field
|
||||
name="address1_postalcode"
|
||||
id="address1_postalcode"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-5"
|
||||
label={t("account:account-postcode-label")}
|
||||
validate={[required, postcode]}
|
||||
/>
|
||||
</fieldset>
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
<Link
|
||||
href={
|
||||
"/myportal?q=" +
|
||||
props.props.accountDetails.loggedinUserId
|
||||
</form>
|
||||
) : (
|
||||
<>
|
||||
<BuildCheckPersonalDetails
|
||||
props={props}
|
||||
setPersonalDetailsComplete={
|
||||
setPersonalDetailsComplete
|
||||
}
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("common:cancel-link")}
|
||||
</Link>
|
||||
</div>
|
||||
</form>
|
||||
setAccountUpdatedComplete={
|
||||
setAccountUpdatedComplete
|
||||
}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
) : (
|
||||
<>
|
||||
<BuildCheckPersonalDetails
|
||||
props={props}
|
||||
setPersonalDetailsComplete={
|
||||
setPersonalDetailsComplete
|
||||
}
|
||||
setAccountUpdatedComplete={
|
||||
setAccountUpdatedComplete
|
||||
}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
) : (
|
||||
<PersonalDetailsComplete props={props} />
|
||||
)}
|
||||
<PersonalDetailsComplete props={props} />
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useRouter } from "next/router";
|
||||
import React, { useEffect } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { updateAccount } from "../../actions";
|
||||
import { setCookie } from "nookies";
|
||||
|
||||
const PersonalDetailsComplete = (props) => {
|
||||
const {
|
||||
@@ -17,14 +18,39 @@ const PersonalDetailsComplete = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
// let contactid = props.accountDetails.loggedinUserId;
|
||||
// let updateBody = props.props.props.form.personalDetailsForm.values;
|
||||
// let prefLang =
|
||||
// props.props.props.form.personalDetailsForm.values
|
||||
// .pinswg_preferredlanguage;
|
||||
|
||||
const { loggedinUserId } = props.accountDetails || {};
|
||||
const formValues = props.props?.props?.form?.personalDetailsForm?.values;
|
||||
const prefLang = formValues?.pinswg_preferredlanguage;
|
||||
|
||||
useEffect(() => {
|
||||
let contactid = props.accountDetails.loggedinUserId;
|
||||
let updateBody = props.props.props.form.personalDetailsForm.values;
|
||||
updateAccount(contactid, updateBody);
|
||||
}, [
|
||||
props.accountDetails.loggedinUserId,
|
||||
props.props.props.form.personalDetailsForm.values,
|
||||
]);
|
||||
// let contactid = props.accountDetails.loggedinUserId;
|
||||
// let updateBody = props.props.props.form.personalDetailsForm.values;
|
||||
// let prefLang =
|
||||
// props.props.props.form.personalDetailsForm.values
|
||||
// .pinswg_preferredlanguage;
|
||||
if (!loggedinUserId || !formValues) return;
|
||||
|
||||
console.log("=============== pref lang", prefLang);
|
||||
const userLang = prefLang == "846040000" ? "cy" : "en";
|
||||
setCookie(null, "pedw_locale", userLang, {
|
||||
path: "/",
|
||||
maxAge: 60 * 60 * 24 * 365,
|
||||
});
|
||||
|
||||
console.log("Set cookie to:", userLang);
|
||||
|
||||
async function doUpdate() {
|
||||
const response = await updateAccount(loggedinUserId, formValues);
|
||||
}
|
||||
|
||||
doUpdate();
|
||||
}, [loggedinUserId, formValues, prefLang]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -33,10 +59,7 @@ const PersonalDetailsComplete = (props) => {
|
||||
{/* <p className="govuk-body">{t("account:account-complete-para-2")}</p> */}
|
||||
|
||||
<p className="govuk-body">
|
||||
<Link
|
||||
href={"/myportal?q=" + props.accountDetails.loggedinUserId}
|
||||
className="govuk-link"
|
||||
>
|
||||
<Link href={"/"} className="govuk-link">
|
||||
{" "}
|
||||
{t("account:account-complete-return-to-portal-link")}
|
||||
</Link>
|
||||
|
||||
+145
-141
@@ -137,149 +137,153 @@ const RegisterForm = (props) => {
|
||||
{props.accountCreatedComplete != true ? (
|
||||
props.registerFormComplete == false ? (
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t(
|
||||
"account:register-new-account-sub-heading-1"
|
||||
)}{" "}
|
||||
{loggedInUserEmail}
|
||||
</h2>
|
||||
</legend>
|
||||
<Field
|
||||
name="firstname"
|
||||
id="firstname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t(
|
||||
"account:register-new-account-first-name-label"
|
||||
)}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-first-name-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="lastname"
|
||||
id="lastname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t(
|
||||
"account:register-new-account-last-name-label"
|
||||
)}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-last-name-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="emailaddress1"
|
||||
id="emailaddress1"
|
||||
component={RenderTextfield}
|
||||
type="email"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, email]}
|
||||
label={t(
|
||||
"account:register-new-account-email-address-label"
|
||||
)}
|
||||
disabled
|
||||
/>
|
||||
<Field
|
||||
name="telephone1"
|
||||
id="telephone1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, phoneNumber]}
|
||||
label={t(
|
||||
"account:register-new-account-phone-label"
|
||||
)}
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t(
|
||||
"account:register-new-account-sub-heading-2"
|
||||
)}
|
||||
</h2>
|
||||
</legend>
|
||||
<div className="card" id="personalDetailsCard">
|
||||
<div className="card-body">
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t(
|
||||
"account:register-new-account-sub-heading-1"
|
||||
)}{" "}
|
||||
{loggedInUserEmail}
|
||||
</h2>
|
||||
</legend>
|
||||
<Field
|
||||
name="firstname"
|
||||
id="firstname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t(
|
||||
"account:register-new-account-first-name-label"
|
||||
)}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-first-name-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="lastname"
|
||||
id="lastname"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required]}
|
||||
label={t(
|
||||
"account:register-new-account-last-name-label"
|
||||
)}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-last-name-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="emailaddress1"
|
||||
id="emailaddress1"
|
||||
component={RenderTextfield}
|
||||
type="email"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, email]}
|
||||
label={t(
|
||||
"account:register-new-account-email-address-label"
|
||||
)}
|
||||
disabled
|
||||
/>
|
||||
<Field
|
||||
name="telephone1"
|
||||
id="telephone1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, phoneNumber]}
|
||||
label={t(
|
||||
"account:register-new-account-phone-label"
|
||||
)}
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset className="govuk-fieldset">
|
||||
<legend className="govuk-fieldset__legend govuk-fieldset__legend--m">
|
||||
<h2 className="govuk-fieldset__heading">
|
||||
{t(
|
||||
"account:register-new-account-sub-heading-2"
|
||||
)}
|
||||
</h2>
|
||||
</legend>
|
||||
|
||||
<Field
|
||||
name="address1_line1"
|
||||
id="address1_line1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:register-new-account-address-line-1-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-address-line-1-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_line2"
|
||||
id="address1_line2"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:register-new-account-address-line-2-label"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_city"
|
||||
id="address1_city"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t(
|
||||
"account:register-new-account-town-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-town-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_county"
|
||||
id="address1_county"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t(
|
||||
"account:register-new-account-county-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-county-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_postalcode"
|
||||
id="address1_postalcode"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-5"
|
||||
label={t(
|
||||
"account:register-new-account-postcode-label"
|
||||
)}
|
||||
validate={[required, postcode]}
|
||||
/>
|
||||
</fieldset>
|
||||
<Field
|
||||
name="address1_line1"
|
||||
id="address1_line1"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:register-new-account-address-line-1-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-address-line-1-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_line2"
|
||||
id="address1_line2"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
label={t(
|
||||
"account:register-new-account-address-line-2-label"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_city"
|
||||
id="address1_city"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t(
|
||||
"account:register-new-account-town-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-town-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_county"
|
||||
id="address1_county"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-10"
|
||||
label={t(
|
||||
"account:register-new-account-county-label"
|
||||
)}
|
||||
validate={[required]}
|
||||
errorMsg={t(
|
||||
"account:register-new-account-county-label-errormsg"
|
||||
)}
|
||||
/>
|
||||
<Field
|
||||
name="address1_postalcode"
|
||||
id="address1_postalcode"
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-5"
|
||||
label={t(
|
||||
"account:register-new-account-postcode-label"
|
||||
)}
|
||||
validate={[required, postcode]}
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
) : (
|
||||
|
||||
+28
-10
@@ -43,6 +43,7 @@ const Breadcrumbs = (props) => {
|
||||
? 9
|
||||
: "";
|
||||
|
||||
var viewAllKey = currentView?.viewKey || router.query.viewKey;
|
||||
return (
|
||||
<>
|
||||
<nav
|
||||
@@ -155,6 +156,27 @@ const Breadcrumbs = (props) => {
|
||||
</li>
|
||||
</>
|
||||
)}
|
||||
{router.pathname == "/myportal/contactus" && (
|
||||
<>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth"
|
||||
: "/myportal"
|
||||
}
|
||||
className="govuk-breadcrumbs__link"
|
||||
>
|
||||
{t("common:breadcrumb-my-portal")}
|
||||
</Link>
|
||||
</li>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
{t("common:footer-contact-us-link-label")}
|
||||
</li>
|
||||
</>
|
||||
)}
|
||||
{router.pathname == "/addresssearchresults" && (
|
||||
<>
|
||||
{" "}
|
||||
@@ -475,24 +497,20 @@ const Breadcrumbs = (props) => {
|
||||
</Link>
|
||||
</li>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
{currentView.currentView.viewKey ==
|
||||
{viewAllKey ==
|
||||
"awaitingSubmissionDetails" &&
|
||||
t(
|
||||
"myportal:awatitingsubmission-card-title"
|
||||
)}
|
||||
{currentView.currentView.viewKey ==
|
||||
"watchedCases" &&
|
||||
{viewAllKey == "watchedCases" &&
|
||||
t("myportal:watchedcases-card-title")}
|
||||
{currentView.currentView.viewKey ==
|
||||
"myCases" &&
|
||||
{viewAllKey == "myCases" &&
|
||||
t("myportal:mycases-card-title")}
|
||||
{currentView.currentView.viewKey ==
|
||||
"myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
t(
|
||||
"myportal:myrepresentations-card-title"
|
||||
)}
|
||||
{currentView.currentView.viewKey ==
|
||||
"mySubmittedReps" &&
|
||||
{viewAllKey == "mySubmittedReps" &&
|
||||
"Submitted representations"}
|
||||
</li>
|
||||
</>
|
||||
@@ -1081,7 +1099,7 @@ const Breadcrumbs = (props) => {
|
||||
{router.pathname == "/dns/contact-us" && (
|
||||
<>
|
||||
<li className="govuk-breadcrumbs__list-item">
|
||||
Contact us
|
||||
{t("common:footer-contact-us-link-label")}
|
||||
</li>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -40,6 +40,7 @@ const Case = (props) => {
|
||||
docsOffline={props.props.docsOffline}
|
||||
documentDetailsObj={props.documentDetailsObj}
|
||||
showFilteredDocs={props.showFilteredDocs}
|
||||
eventsObj={props.eventsObj}
|
||||
/>
|
||||
{showRepresentations == true && (
|
||||
<RepresentationList
|
||||
|
||||
@@ -15,67 +15,89 @@ export default function CaseNoticeBanner(props) {
|
||||
const bannerOpenCookie = typeof cookie.get("pedwNotice") == "undefined";
|
||||
let messagesObjArr = messagesObj.value;
|
||||
|
||||
let todaysDate = new Date();
|
||||
|
||||
return (
|
||||
<>
|
||||
{messagesObjArr.map((message, index) => (
|
||||
<div className="govuk-warning-text noticebanner" key={index}>
|
||||
<strong className="govuk-warning-text__text">
|
||||
<span className="govuk-visually-hidden">Warning</span>
|
||||
</strong>
|
||||
<div>
|
||||
<div className=" govuk-body-s">
|
||||
<h2 className="govuk-heading-s">
|
||||
{(
|
||||
message.subject.match(
|
||||
new RegExp(">>>", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(">>>")[1]
|
||||
: message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(">>>")[0]
|
||||
: (
|
||||
message.subject.match(
|
||||
new RegExp(";", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(";")[1]
|
||||
: message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(";")[0]
|
||||
: message.subject.split("Banner ")[1]}
|
||||
</h2>
|
||||
</div>
|
||||
<div className="govuk-body-s">
|
||||
{(
|
||||
message.description.match(
|
||||
new RegExp(">>>", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.description.split(">>>")[1]
|
||||
: message.description.split(">>>")[0]
|
||||
: (
|
||||
message.description.match(
|
||||
new RegExp(";", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.description.split(";")[1]
|
||||
: message.description.split(";")[0]
|
||||
: message.description}
|
||||
</div>
|
||||
<div className="govuk-body-xs govuk-!-margin-bottom-0 ">
|
||||
{t("case:date-raised")}:{" "}
|
||||
{formatDates(message.createdon)}
|
||||
</div>
|
||||
</div>
|
||||
<div key={index}>
|
||||
{todaysDate.toISOString() >= message.scheduledstart &&
|
||||
todaysDate.toISOString() <= message.scheduledend && (
|
||||
<div
|
||||
className="govuk-warning-text noticebanner"
|
||||
key={index}
|
||||
>
|
||||
<strong className="govuk-warning-text__text">
|
||||
<span className="govuk-visually-hidden">
|
||||
{t("case:notice-label")}
|
||||
</span>
|
||||
</strong>
|
||||
<div>
|
||||
<div className=" govuk-body-s">
|
||||
<h2 className="govuk-heading-s">
|
||||
{(
|
||||
message.subject.match(
|
||||
new RegExp(">>>", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(">>>")[1]
|
||||
: message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(">>>")[0]
|
||||
: (
|
||||
message.subject.match(
|
||||
new RegExp(";", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(";")[1]
|
||||
: message.subject
|
||||
.split("Banner ")[1]
|
||||
.split(";")[0]
|
||||
: message.subject.split(
|
||||
"Banner "
|
||||
)[1]}
|
||||
</h2>
|
||||
</div>
|
||||
<div className="govuk-body-s">
|
||||
{(
|
||||
message.description.match(
|
||||
new RegExp(">>>", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.description.split(
|
||||
">>>"
|
||||
)[1]
|
||||
: message.description.split(
|
||||
">>>"
|
||||
)[0]
|
||||
: (
|
||||
message.description.match(
|
||||
new RegExp(";", "g")
|
||||
) || []
|
||||
).length > 0
|
||||
? router.locale == "cy"
|
||||
? message.description.split(
|
||||
";"
|
||||
)[1]
|
||||
: message.description.split(
|
||||
";"
|
||||
)[0]
|
||||
: message.description}
|
||||
</div>
|
||||
<div className="govuk-body-xs govuk-!-margin-bottom-0 ">
|
||||
{t("case:date-raised")}:{" "}
|
||||
{formatDates(message.createdon)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
|
||||
@@ -287,9 +287,12 @@ const DocumentDetails = (props) => {
|
||||
{/* {t("case:documents-date-published-label")} */}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => sortDataBy("createdon")}
|
||||
onClick={() =>
|
||||
sortDataBy("pinswg_documentpublisheddate")
|
||||
}
|
||||
className={
|
||||
orderByState == "createdon"
|
||||
orderByState ==
|
||||
"pinswg_documentpublisheddate"
|
||||
? fieldSortState == "asc"
|
||||
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||
@@ -504,7 +507,7 @@ const DocumentDetails = (props) => {
|
||||
</p>
|
||||
<div>
|
||||
<button onClick={clearCheckboxes}>
|
||||
Clear filter
|
||||
{t("case:documents-clear-filter-label")}
|
||||
</button>
|
||||
</div>
|
||||
<div className="govuk-checkboxes govuk-checkboxes--small">
|
||||
@@ -525,7 +528,10 @@ const DocumentDetails = (props) => {
|
||||
className="govuk-label-s govuk-checkboxes__label"
|
||||
htmlFor={"all" + "__" + 0}
|
||||
>
|
||||
All - (
|
||||
{router.locale == "cy"
|
||||
? "Pawb"
|
||||
: "All"}{" "}
|
||||
- (
|
||||
{documentTypes.reduce(
|
||||
(accumulator, currentItem) => {
|
||||
return (
|
||||
@@ -605,7 +611,7 @@ const DocumentDetails = (props) => {
|
||||
setCurrentPage(1);
|
||||
}}
|
||||
>
|
||||
Filter documents
|
||||
{t("case:documents-filter-button")}
|
||||
</button>
|
||||
</div>
|
||||
{documentDetailsObj["@odata.count"] > 5 && (
|
||||
@@ -694,9 +700,14 @@ const DocumentDetails = (props) => {
|
||||
{/* {t("case:documents-date-published-label")} */}
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => sortDataBy("createdon")}
|
||||
onClick={() =>
|
||||
sortDataBy(
|
||||
"pinswg_documentpublisheddate"
|
||||
)
|
||||
}
|
||||
className={
|
||||
orderByState == "createdon"
|
||||
orderByState ==
|
||||
"pinswg_documentpublisheddate"
|
||||
? fieldSortState == "asc"
|
||||
? `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortAsc`
|
||||
: `govuk-link govuk-link--no-underline govuk-!-font-weight-bold govuk-!-font-size-16 sortDesc`
|
||||
@@ -847,14 +858,36 @@ const DocumentDetails = (props) => {
|
||||
:
|
||||
</span>
|
||||
|
||||
{_.has(
|
||||
{/* {
|
||||
detailsObj.pinswg_documentpublisheddate
|
||||
}
|
||||
{
|
||||
detailsObj.pinswg_latestpublisheddate
|
||||
} */}
|
||||
|
||||
{detailsObj.pinswg_documentpublisheddate !=
|
||||
null
|
||||
? formatDates(
|
||||
detailsObj.pinswg_documentpublisheddate
|
||||
)
|
||||
: formatDates(
|
||||
detailsObj.pinswg_latestpublisheddate
|
||||
)}
|
||||
{/* {_.has(
|
||||
detailsObj,
|
||||
"pinswg_latestpublisheddate"
|
||||
"pinswg_documentpublisheddate"
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_documentpublisheddate
|
||||
)
|
||||
: _.has(
|
||||
detailsObj,
|
||||
"pinswg_latestpublisheddate"
|
||||
)
|
||||
? formatDates(
|
||||
detailsObj.pinswg_latestpublisheddate
|
||||
)
|
||||
: ""}
|
||||
: ""} */}
|
||||
</dd>
|
||||
{/* <dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
@@ -898,8 +931,9 @@ const DocumentDetails = (props) => {
|
||||
selectedOption,
|
||||
selectedDocumentType
|
||||
)
|
||||
.then((data) => data)
|
||||
// .then((data) => data)
|
||||
.then((data) => {
|
||||
setDocumentSearchState(true);
|
||||
setDocumentDetails(data);
|
||||
setShowSpinnerState(false);
|
||||
});
|
||||
@@ -969,8 +1003,10 @@ const DocumentDetails = (props) => {
|
||||
};
|
||||
|
||||
const [showDocumentSearchState, setDocumentSearchState] = useState(false);
|
||||
const [orderByState, setOrderbyState] = useState("createdon");
|
||||
const [fieldSortState, setfieldSortState] = useState("asc");
|
||||
const [orderByState, setOrderbyState] = useState(
|
||||
"pinswg_documentpublisheddate"
|
||||
);
|
||||
const [fieldSortState, setfieldSortState] = useState("desc");
|
||||
|
||||
let documentSearchState = () => {
|
||||
showDocumentSearchState == true
|
||||
@@ -980,14 +1016,14 @@ const DocumentDetails = (props) => {
|
||||
|
||||
const sortDataBy = (whichField) => {
|
||||
setOrderbyState(whichField);
|
||||
setfieldSortState("asc");
|
||||
setfieldSortState("desc");
|
||||
|
||||
getDocumentResults(1, whichField, fieldSortState);
|
||||
whichField == orderByState
|
||||
? fieldSortState == "desc"
|
||||
? setfieldSortState("asc")
|
||||
: setfieldSortState("desc")
|
||||
: setfieldSortState("asc");
|
||||
? fieldSortState == "asc"
|
||||
? setfieldSortState("desc")
|
||||
: setfieldSortState("asc")
|
||||
: setfieldSortState("desc");
|
||||
setCurrentPage(1);
|
||||
setShowSpinnerState(true);
|
||||
};
|
||||
@@ -1022,7 +1058,7 @@ const DocumentDetails = (props) => {
|
||||
return docObj;
|
||||
};
|
||||
|
||||
const searchDocumentResultsObj = docDetailsObj();
|
||||
//const searchDocumentResultsObj = docDetailsObj();
|
||||
}, [
|
||||
incidentid,
|
||||
setDocumentDetails,
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
import { setEventDetails } from "../../store/searchOutput/action";
|
||||
import { setCurrentPage } from "../../store/currentView/action";
|
||||
import { connect } from "react-redux";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { formatDates } from "../utils";
|
||||
|
||||
const EIADetails = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const EventView = (eventsArr) => {
|
||||
eventsArr = eventsArr.value;
|
||||
|
||||
return eventsArr.map((item, key) => {
|
||||
<div>{item.pinswg_name}</div>;
|
||||
});
|
||||
};
|
||||
|
||||
const eventsArr = props.eventsObj?.value || [];
|
||||
|
||||
// event publishiing flag set to true displa
|
||||
|
||||
function hasOwnPropertyAndNotNull(obj, property) {
|
||||
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||
}
|
||||
|
||||
//console.log(eventsArr.length > 0);
|
||||
|
||||
return (
|
||||
eventsArr.length > 0 && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="card">
|
||||
<div className="card-body">
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t("case:event-title")}
|
||||
</h2>
|
||||
{eventsArr.map(
|
||||
(item, key) =>
|
||||
item.pinswg_eventpublishflag && (
|
||||
<>
|
||||
{" "}
|
||||
<div className="eventContainer">
|
||||
<div className="eventColumn">
|
||||
<div>
|
||||
<b>
|
||||
{" "}
|
||||
{t(
|
||||
"case:event-name-label"
|
||||
)}
|
||||
</b>
|
||||
: {item.pinswg_name}
|
||||
</div>
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventname"
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-event-name-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{item.pinswg_eventname}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="eventColumn">
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddressline1"
|
||||
) && (
|
||||
<>
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-address-label"
|
||||
)}
|
||||
</b>
|
||||
:
|
||||
</div>
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddressline1
|
||||
}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddressline2"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddressline2
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddresstown"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddresstown
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddresscounty"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddresscounty
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddresscounty"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddresspostcode
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{/* type of event
|
||||
start date date of event - end date of event
|
||||
|
||||
if virtual event no address showNoOfRecords
|
||||
show event address */}
|
||||
<div className="eventColumn">
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_dateeventrequested"
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-start-date-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{formatDates(
|
||||
item.pinswg_dateeventrequested
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_enddateoftheevent"
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-end-date-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{item.pinswg_enddateoftheevent !=
|
||||
null &&
|
||||
formatDates(
|
||||
item.pinswg_enddateoftheevent
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="eventColumn">
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue",
|
||||
]
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-type-of-event-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{
|
||||
item[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
)}{" "}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setEventDetails: (eventsObj) => {
|
||||
dispatch(setEventDetails(eventsObj));
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(EIADetails);
|
||||
@@ -0,0 +1,221 @@
|
||||
import { setEventDetails } from "../../store/searchOutput/action";
|
||||
import { setCurrentPage } from "../../store/currentView/action";
|
||||
import { connect } from "react-redux";
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { formatDates } from "../utils";
|
||||
|
||||
const EventsDetails = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const EventView = (eventsArr) => {
|
||||
eventsArr = eventsArr.value;
|
||||
|
||||
return eventsArr.map((item, key) => {
|
||||
<div>{item.pinswg_name}</div>;
|
||||
});
|
||||
};
|
||||
|
||||
const eventsArr = props.eventsObj?.value || [];
|
||||
|
||||
// event publishiing flag set to true displa
|
||||
|
||||
function hasOwnPropertyAndNotNull(obj, property) {
|
||||
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||
}
|
||||
|
||||
//console.log(eventsArr.length > 0);
|
||||
|
||||
return (
|
||||
eventsArr.length > 0 && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="card">
|
||||
<div className="card-body">
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t("case:event-title")}
|
||||
</h2>
|
||||
{eventsArr.map(
|
||||
(item, key) =>
|
||||
item.pinswg_eventpublishflag && (
|
||||
<>
|
||||
{" "}
|
||||
<div className="eventContainer">
|
||||
<div className="eventColumn">
|
||||
<div>
|
||||
<b>
|
||||
{" "}
|
||||
{t(
|
||||
"case:event-name-label"
|
||||
)}
|
||||
</b>
|
||||
: {item.pinswg_name}
|
||||
</div>
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventname"
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-event-name-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{item.pinswg_eventname}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="eventColumn">
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddressline1"
|
||||
) && (
|
||||
<>
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-address-label"
|
||||
)}
|
||||
</b>
|
||||
:
|
||||
</div>
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddressline1
|
||||
}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddressline2"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddressline2
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddresstown"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddresstown
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddresscounty"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddresscounty
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_eventaddresscounty"
|
||||
) && (
|
||||
<div>
|
||||
{
|
||||
item.pinswg_eventaddresspostcode
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{/* type of event
|
||||
start date date of event - end date of event
|
||||
|
||||
if virtual event no address showNoOfRecords
|
||||
show event address */}
|
||||
<div className="eventColumn">
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_dateeventrequested"
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-start-date-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{formatDates(
|
||||
item.pinswg_dateeventrequested
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
"pinswg_enddateoftheevent"
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-end-date-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{item.pinswg_enddateoftheevent !=
|
||||
null &&
|
||||
formatDates(
|
||||
item.pinswg_enddateoftheevent
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="eventColumn">
|
||||
{hasOwnPropertyAndNotNull(
|
||||
item,
|
||||
[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue",
|
||||
]
|
||||
) && (
|
||||
<div>
|
||||
<b>
|
||||
{t(
|
||||
"case:event-type-of-event-label"
|
||||
)}
|
||||
</b>
|
||||
:{" "}
|
||||
{
|
||||
item[
|
||||
"pinswg_typeofevent@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
)}{" "}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setEventDetails: (eventsObj) => {
|
||||
dispatch(setEventDetails(eventsObj));
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(EventsDetails);
|
||||
@@ -0,0 +1,364 @@
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, change, reduxForm } from "redux-form";
|
||||
import { useState } from "react";
|
||||
|
||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||
import {
|
||||
FileUploadField,
|
||||
RenderCondtionalRadioList,
|
||||
RenderPickList,
|
||||
RenderRichMultiline,
|
||||
shouldDisableButton,
|
||||
} from "./representationElements";
|
||||
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setFilesForRepresentations,
|
||||
} from "../../../store/currentView/action";
|
||||
|
||||
const ConsultationAgent = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
appellantApplicantRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
currentView,
|
||||
setRepFileName,
|
||||
updateRepresentation,
|
||||
setSavingStatus,
|
||||
savingStatus,
|
||||
setFilesForRepresentations,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
|
||||
if (JSON.stringify(formObj) != "{}") {
|
||||
setRepFileName(formObj.representationForm.values);
|
||||
|
||||
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||
function (el) {
|
||||
return el != null;
|
||||
}
|
||||
)
|
||||
: []
|
||||
: [];
|
||||
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
{typeof formObj.representationForm.values
|
||||
.representationType == "undefined" &&
|
||||
props.representationType != "Select..." ? (
|
||||
<>
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t(
|
||||
"myrepresentations:consultation-from-an-agent-heading"
|
||||
)}
|
||||
</h2>
|
||||
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:kind-of-consultation-label"
|
||||
)}
|
||||
</label>
|
||||
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={
|
||||
appellantApplicantRepresentationArr
|
||||
}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<label className="govuk-label govuk-body-m">
|
||||
{t("myrepresentations:representation-type")}:{" "}
|
||||
{router.locale == "cy"
|
||||
? formObj.representationForm.values
|
||||
.representationType == "Questionnaire"
|
||||
? "Holiadur"
|
||||
: formObj.representationForm.values
|
||||
.representationType == "Statement"
|
||||
? "Datganiad"
|
||||
: formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Final comments"
|
||||
? "Sylwadau terfynol"
|
||||
: formObj.representationForm.values
|
||||
.representationType
|
||||
: formObj.representationForm.values
|
||||
.representationType}
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{(typeof props.representationType != "undefined" ||
|
||||
typeof formObj.representationForm.values
|
||||
.representationType != "undefined") && (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationOnBehalfOf"
|
||||
datafieldname="representationOnBehalfOf"
|
||||
// label={t("myrepresentations:capacity-select-what-capacity-label")}
|
||||
options={["Yes", "No"]}
|
||||
id="representationOnBehalfOf"
|
||||
className="govuk-radios__input"
|
||||
errorMsg={t(
|
||||
"myrepresentations:select-an-option-label"
|
||||
)}
|
||||
component={RenderCondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t("case:representation-onbehalfof")}
|
||||
hint={t(
|
||||
"myrepresentations:representation-onbehalfof-hint"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
{formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Consultation Response"
|
||||
? t(
|
||||
"myrepresentations:enter-comment-label"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:consultation-comment-label"
|
||||
)}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
{formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Consultation Response" && (
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderRichMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
{formObj.representationForm.values
|
||||
.appealType == "846040004" ? (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label"
|
||||
)}{" "}
|
||||
<a
|
||||
href={t(
|
||||
"myrepresentations:publish-policy-link"
|
||||
)}
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:publish-policy-link-label"
|
||||
)}
|
||||
</a>{" "}
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label-two"
|
||||
)}
|
||||
</p>
|
||||
) : (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label"
|
||||
)}{" "}
|
||||
<a
|
||||
href={t(
|
||||
"myrepresentations:publish-policy-link"
|
||||
)}
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:publish-policy-link-label"
|
||||
)}
|
||||
</a>{" "}
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label-two"
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
id={"representationDocuments"}
|
||||
label={t(
|
||||
"myrepresentations:add-files-label"
|
||||
)}
|
||||
ticketnumber={
|
||||
props.props.caseReference
|
||||
}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.fileList
|
||||
|
||||
// props.currentView.caseReference.hasOwnProperty(
|
||||
// "repDetails"
|
||||
// )
|
||||
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
// "filesList"
|
||||
// ) &&
|
||||
// props.currentView
|
||||
// .caseReference
|
||||
// .repDetails.filesList
|
||||
// .length > 0
|
||||
// ? props.currentView
|
||||
// .caseReference
|
||||
// .repDetails
|
||||
// .filesList
|
||||
// : []
|
||||
// : []
|
||||
}
|
||||
setFilesForRepresentations={
|
||||
setFilesForRepresentations
|
||||
}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
filenamePrefix={props.formObj}
|
||||
props={props.props.props}
|
||||
setCurrentReference={
|
||||
props.setCurrentReference
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{typeof formObj.representationForm.values.representationType !=
|
||||
"undefined" && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
disabled={shouldDisableButton({
|
||||
props,
|
||||
formObj,
|
||||
})}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* {router.query.state != "edit" && (
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationCapacity",
|
||||
""
|
||||
);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("common:back-link")}
|
||||
</a>
|
||||
)} */}
|
||||
{savingStatus ? (
|
||||
<span className=" progress-save-active">
|
||||
{router.locale == "cy"
|
||||
? "Nôl data"
|
||||
: "Saving data"}
|
||||
<img
|
||||
className="data-loading-icon"
|
||||
src="/assets/images/loading.gif"
|
||||
alt={
|
||||
router.locale == "cy"
|
||||
? "Nôl data"
|
||||
: "Saving data"
|
||||
}
|
||||
/>
|
||||
</span>
|
||||
) : (
|
||||
<button
|
||||
className="govuk-button progress-save "
|
||||
onClick={() => {
|
||||
let valuesObj =
|
||||
props.props.props.form[props.form]
|
||||
.values || {};
|
||||
|
||||
//console.log("valuesobj:", valuesObj);
|
||||
|
||||
delete valuesObj[
|
||||
"_pinswg_appellant_value"
|
||||
];
|
||||
|
||||
//console.log("on save:", valuesObj);
|
||||
updateRepresentation(
|
||||
valuesObj,
|
||||
false,
|
||||
true
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t("common:save-exit-button")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
updateField: (form, field, newValue) =>
|
||||
dispatch(change(form, field, newValue)),
|
||||
|
||||
setFilesForRepresentations: (fileList) => {
|
||||
dispatch(setFilesForRepresentations(fileList));
|
||||
},
|
||||
});
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
form: "representationForm",
|
||||
enableReinitialize: true,
|
||||
destroyOnUnmount: false,
|
||||
})(ConsultationAgent)
|
||||
);
|
||||
@@ -0,0 +1,337 @@
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, change, reduxForm } from "redux-form";
|
||||
import { useState } from "react";
|
||||
|
||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||
import {
|
||||
FileUploadField,
|
||||
RenderPickList,
|
||||
RenderRichMultiline,
|
||||
shouldDisableButton,
|
||||
} from "./representationElements";
|
||||
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setFilesForRepresentations,
|
||||
} from "../../../store/currentView/action";
|
||||
|
||||
const ConsultationAppellant = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
appellantApplicantRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
currentView,
|
||||
setRepFileName,
|
||||
updateRepresentation,
|
||||
setSavingStatus,
|
||||
savingStatus,
|
||||
setFilesForRepresentations,
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
|
||||
console.log(JSON.stringify(formObj) == "{}" ? "empty" : "value");
|
||||
|
||||
if (JSON.stringify(formObj) != "{}") {
|
||||
setRepFileName(formObj.representationForm.values);
|
||||
|
||||
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||
function (el) {
|
||||
return el != null;
|
||||
}
|
||||
)
|
||||
: []
|
||||
: [];
|
||||
|
||||
filterFilesList = filterFilesList.filter(
|
||||
(value, index, self) =>
|
||||
index === self.findIndex((t) => t.name === value.name)
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
{typeof formObj.representationForm.values
|
||||
.representationType == "undefined" &&
|
||||
props.representationType != "Select..." ? (
|
||||
<>
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t(
|
||||
"myrepresentations:consultation-from-an-appellant-heading"
|
||||
)}
|
||||
</h2>
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:kind-of-consultation-label"
|
||||
)}
|
||||
</label>
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
optionsArr={
|
||||
appellantApplicantRepresentationArr
|
||||
}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<label className="govuk-label govuk-body-m">
|
||||
{t("myrepresentations:representation-type")}:{" "}
|
||||
{router.locale == "cy"
|
||||
? formObj.representationForm.values
|
||||
.representationType == "Questionnaire"
|
||||
? "Holiadur"
|
||||
: formObj.representationForm.values
|
||||
.representationType == "Statement"
|
||||
? "Datganiad"
|
||||
: formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Final comments"
|
||||
? "Sylwadau terfynol"
|
||||
: formObj.representationForm.values
|
||||
.representationType
|
||||
: formObj.representationForm.values
|
||||
.representationType}
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{(typeof props.representationType != "undefined" ||
|
||||
typeof formObj.representationForm.values
|
||||
.representationType != "undefined") && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
{formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Consultation Response"
|
||||
? t("myrepresentations:enter-comment-label")
|
||||
: t(
|
||||
"myrepresentations:consultation-comment-label"
|
||||
)}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
{formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Consultation Response" && (
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderRichMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
{formObj.representationForm.values
|
||||
.appealType == "846040004" ? (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label"
|
||||
)}{" "}
|
||||
<a
|
||||
href={t(
|
||||
"myrepresentations:publish-policy-link"
|
||||
)}
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:publish-policy-link-label"
|
||||
)}
|
||||
</a>{" "}
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label-two"
|
||||
)}
|
||||
</p>
|
||||
) : (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label"
|
||||
)}{" "}
|
||||
<a
|
||||
href={t(
|
||||
"myrepresentations:publish-policy-link"
|
||||
)}
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:publish-policy-link-label"
|
||||
)}
|
||||
</a>{" "}
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label-two"
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
id={"representationDocuments"}
|
||||
label={t(
|
||||
"myrepresentations:add-files-label"
|
||||
)}
|
||||
ticketnumber={props.props.caseReference}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.fileList
|
||||
// props.currentView.caseReference.hasOwnProperty(
|
||||
// "repDetails"
|
||||
// )
|
||||
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
// "filesList"
|
||||
// ) &&
|
||||
// props.currentView
|
||||
// .caseReference.repDetails
|
||||
// .filesList.length > 0
|
||||
// ? props.currentView
|
||||
// .caseReference
|
||||
// .repDetails.filesList
|
||||
// : []
|
||||
// : []
|
||||
}
|
||||
setFilesForRepresentations={
|
||||
setFilesForRepresentations
|
||||
}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
filenamePrefix={props.formObj}
|
||||
props={props.props.props}
|
||||
setCurrentReference={
|
||||
props.setCurrentReference
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{typeof formObj.representationForm.values.representationType !=
|
||||
"undefined" && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
disabled={shouldDisableButton({
|
||||
props,
|
||||
formObj,
|
||||
})}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* {router.query.state != "edit" && (
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationType",
|
||||
""
|
||||
);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("common:back-link")}
|
||||
</a>
|
||||
)} */}
|
||||
|
||||
{savingStatus ? (
|
||||
<span className=" progress-save-active">
|
||||
{router.locale == "cy"
|
||||
? "Nôl data"
|
||||
: "Saving data"}
|
||||
<img
|
||||
className="data-loading-icon"
|
||||
src="/assets/images/loading.gif"
|
||||
alt={
|
||||
router.locale == "cy"
|
||||
? "Nôl data"
|
||||
: "Saving data"
|
||||
}
|
||||
/>
|
||||
</span>
|
||||
) : (
|
||||
<button
|
||||
className="govuk-button progress-save "
|
||||
onClick={() => {
|
||||
let valuesObj =
|
||||
props.props.props.form[props.form]
|
||||
.values || {};
|
||||
|
||||
//console.log("valuesobj:", valuesObj);
|
||||
|
||||
delete valuesObj[
|
||||
"_pinswg_appellant_value"
|
||||
];
|
||||
|
||||
//console.log("on save:", valuesObj);
|
||||
updateRepresentation(
|
||||
valuesObj,
|
||||
false,
|
||||
true
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t("common:save-exit-button")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//const mapStateToProps = (state, props) => {};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
updateField: (form, field, newValue) =>
|
||||
dispatch(change(form, field, newValue)),
|
||||
|
||||
setFilesForRepresentations: (fileList) => {
|
||||
dispatch(setFilesForRepresentations(fileList));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
form: "representationForm",
|
||||
enableReinitialize: true,
|
||||
destroyOnUnmount: false,
|
||||
})(ConsultationAppellant)
|
||||
);
|
||||
@@ -0,0 +1,378 @@
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, change, reduxForm } from "redux-form";
|
||||
import { useState } from "react";
|
||||
|
||||
import { bytesToSize, getThumbnailIconByExtension } from "../../utils";
|
||||
import {
|
||||
FileUploadField,
|
||||
RenderCondtionalRadioList,
|
||||
RenderPickList,
|
||||
RenderRichMultiline,
|
||||
shouldDisableButton,
|
||||
} from "./representationElements";
|
||||
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setFilesForRepresentations,
|
||||
} from "../../../store/currentView/action";
|
||||
|
||||
const ConsultationInterestedPartyPerson = (props) => {
|
||||
let { t } = useTranslation();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const {
|
||||
formObj,
|
||||
interestedPersonRepresentationArr,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationSubmit,
|
||||
setRepFileName,
|
||||
updateRepresentation,
|
||||
setSavingStatus,
|
||||
savingStatus,
|
||||
setFilesForRepresentations,
|
||||
} = props;
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
|
||||
if (JSON.stringify(formObj) != "{}") {
|
||||
setRepFileName(formObj.representationForm.values);
|
||||
|
||||
let filterFilesList = props.currentView.caseReference.hasOwnProperty(
|
||||
"repDetails"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
"filesList"
|
||||
)
|
||||
? props.currentView.caseReference.repDetails.filesList.filter(
|
||||
function (el) {
|
||||
return el != null;
|
||||
}
|
||||
)
|
||||
: []
|
||||
: [];
|
||||
|
||||
const files = acceptedFiles.map((file) => (
|
||||
<li key={file.path}>
|
||||
{file.path} - {file.size} bytes
|
||||
</li>
|
||||
));
|
||||
return (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
{typeof formObj.representationForm.values
|
||||
.representationType == "undefined" &&
|
||||
props.representationType != "Select..." ? (
|
||||
<>
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t(
|
||||
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||
)}
|
||||
</h2>
|
||||
|
||||
<label
|
||||
className="govuk-label govuk-body-m"
|
||||
htmlFor="representationType"
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:kind-of-consultation-label"
|
||||
)}
|
||||
</label>
|
||||
|
||||
<Field
|
||||
name="representationType"
|
||||
component={RenderPickList}
|
||||
datafieldname="representationType"
|
||||
validate={[required]}
|
||||
optionsArr={
|
||||
interestedPersonRepresentationArr
|
||||
}
|
||||
errorMsg={t(
|
||||
"myrepresentations:select-an-option-label"
|
||||
)}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<label className="govuk-label govuk-body-m">
|
||||
{t("myrepresentations:representation-type")}:{" "}
|
||||
{router.locale == "cy"
|
||||
? formObj.representationForm.values
|
||||
.representationType == "Questionnaire"
|
||||
? "Holiadur"
|
||||
: formObj.representationForm.values
|
||||
.representationType == "Statement"
|
||||
? "Datganiad"
|
||||
: formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Final comments"
|
||||
? "Sylwadau terfynol"
|
||||
: formObj.representationForm.values
|
||||
.representationType
|
||||
: formObj.representationForm.values
|
||||
.representationType}
|
||||
</label>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{(typeof props.representationType != "undefined" ||
|
||||
typeof formObj.representationForm.values
|
||||
.representationType != "undefined") && (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationOnBehalfOf"
|
||||
datafieldname="representationOnBehalfOf"
|
||||
// label="In what capacity do you wish to make representations on this case?"
|
||||
options={[
|
||||
t(
|
||||
"myrepresentations:questionnaire-yes"
|
||||
),
|
||||
t("myrepresentations:questionnaire-no"),
|
||||
]}
|
||||
id="representationOnBehalfOf"
|
||||
className="govuk-radios__input"
|
||||
errorMsg={t(
|
||||
"myrepresentations:select-an-option-label"
|
||||
)}
|
||||
component={RenderCondtionalRadioList}
|
||||
validate={[required]}
|
||||
legend={t("case:representation-onbehalfof")}
|
||||
hint={t(
|
||||
"myrepresentations:representation-onbehalfof-hint"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-form-group">
|
||||
<p className="govuk-body">
|
||||
{formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Consultation Response"
|
||||
? t(
|
||||
"myrepresentations:enter-comment-label"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:consultation-comment-label"
|
||||
)}
|
||||
</p>
|
||||
<fieldset
|
||||
className="govuk-fieldset"
|
||||
aria-describedby="commentBox-hint"
|
||||
>
|
||||
{" "}
|
||||
{formObj.representationForm.values
|
||||
.representationType ==
|
||||
"Consultation Response" && (
|
||||
<div className="govuk-form-group">
|
||||
<Field
|
||||
name="representationComments"
|
||||
id="representationComments"
|
||||
component={RenderRichMultiline}
|
||||
type="text"
|
||||
rows="5"
|
||||
className="govuk-textarea govuk-input--width-30"
|
||||
aria-describedby={
|
||||
props.name + "-hint"
|
||||
}
|
||||
/>
|
||||
{formObj.representationForm.values
|
||||
.appealType == "846040004" ? (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label"
|
||||
)}{" "}
|
||||
<a
|
||||
href={t(
|
||||
"myrepresentations:publish-policy-link"
|
||||
)}
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:publish-policy-link-label"
|
||||
)}
|
||||
</a>{" "}
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label-two"
|
||||
)}
|
||||
</p>
|
||||
) : (
|
||||
<p className="govuk-hint govuk-!-font-size-14 govuk-!-margin-top-5">
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label"
|
||||
)}{" "}
|
||||
<a
|
||||
href={t(
|
||||
"myrepresentations:publish-policy-link"
|
||||
)}
|
||||
>
|
||||
{t(
|
||||
"myrepresentations:publish-policy-link-label"
|
||||
)}
|
||||
</a>{" "}
|
||||
{t(
|
||||
"myrepresentations:publish-policy-label-two"
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-form-group govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={"representationDocuments"}
|
||||
id={"representationDocuments"}
|
||||
label={t(
|
||||
"myrepresentations:add-files-label"
|
||||
)}
|
||||
ticketnumber={
|
||||
props.props.caseReference
|
||||
}
|
||||
hint={"sdsd"}
|
||||
fileList={
|
||||
props.currentView.fileList
|
||||
|
||||
// props.currentView.caseReference.hasOwnProperty(
|
||||
// "repDetails"
|
||||
// )
|
||||
// ? props.currentView.caseReference.repDetails.hasOwnProperty(
|
||||
// "filesList"
|
||||
// ) &&
|
||||
// props.currentView
|
||||
// .caseReference
|
||||
// .repDetails.filesList
|
||||
// .length > 0
|
||||
// ? props.currentView
|
||||
// .caseReference
|
||||
// .repDetails
|
||||
// .filesList
|
||||
// : []
|
||||
// : []
|
||||
}
|
||||
setFilesForRepresentations={
|
||||
setFilesForRepresentations
|
||||
}
|
||||
containerID={
|
||||
props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
filenamePrefix={props.formObj}
|
||||
props={props.props.props}
|
||||
setCurrentReference={
|
||||
props.setCurrentReference
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>{" "}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{typeof formObj.representationForm.values.representationType !=
|
||||
"undefined" && (
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-button-group">
|
||||
<button
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
disabled={shouldDisableButton({
|
||||
props,
|
||||
formObj,
|
||||
})}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/*
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationCapacity",
|
||||
""
|
||||
);
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationType",
|
||||
""
|
||||
);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("case:summary-back-button-label")}
|
||||
</a> */}
|
||||
{savingStatus ? (
|
||||
<span className=" progress-save-active">
|
||||
{router.locale == "cy"
|
||||
? "Nôl data"
|
||||
: "Saving data"}
|
||||
<img
|
||||
className="data-loading-icon"
|
||||
src="/assets/images/loading.gif"
|
||||
alt={
|
||||
router.locale == "cy"
|
||||
? "Nôl data"
|
||||
: "Saving data"
|
||||
}
|
||||
/>
|
||||
</span>
|
||||
) : (
|
||||
<button
|
||||
className="govuk-button progress-save "
|
||||
onClick={() => {
|
||||
let valuesObj =
|
||||
props.props.props.form[props.form]
|
||||
.values || {};
|
||||
|
||||
//console.log("valuesobj:", valuesObj);
|
||||
|
||||
delete valuesObj[
|
||||
"_pinswg_appellant_value"
|
||||
];
|
||||
|
||||
//console.log("on save:", valuesObj);
|
||||
updateRepresentation(
|
||||
valuesObj,
|
||||
false,
|
||||
true
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t("common:save-exit-button")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
//const mapStateToProps = (state, props) => {};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
updateField: (form, field, newValue) =>
|
||||
dispatch(change(form, field, newValue)),
|
||||
setFilesForRepresentations: (fileList) => {
|
||||
dispatch(setFilesForRepresentations(fileList));
|
||||
},
|
||||
});
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(
|
||||
reduxForm({
|
||||
form: "representationForm",
|
||||
enableReinitialize: true,
|
||||
destroyOnUnmount: false,
|
||||
})(ConsultationInterestedPartyPerson)
|
||||
);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@ import {
|
||||
RenderCondtionalRadioList,
|
||||
RenderPickList,
|
||||
RenderRichMultiline,
|
||||
shouldDisableButton,
|
||||
} from "./representationElements";
|
||||
|
||||
import { useDropzone } from "react-dropzone";
|
||||
@@ -246,24 +247,14 @@ const RepAgent = (props) => {
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
disabled={shouldDisableButton({
|
||||
props,
|
||||
formObj,
|
||||
})}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* {router.query.state != "edit" && (
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationCapacity",
|
||||
""
|
||||
);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("common:back-link")}
|
||||
</a>
|
||||
)} */}
|
||||
|
||||
{savingStatus ? (
|
||||
<span className=" progress-save-active">
|
||||
{router.locale == "cy"
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
FileUploadField,
|
||||
RenderPickList,
|
||||
RenderRichMultiline,
|
||||
shouldDisableButton,
|
||||
} from "./representationElements";
|
||||
|
||||
import { useDropzone } from "react-dropzone";
|
||||
@@ -225,6 +226,7 @@ const RepAppellant = (props) => {
|
||||
</div>{" "}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{typeof formObj.representationForm.values.representationType !=
|
||||
"undefined" && (
|
||||
<div className="govuk-grid-row">
|
||||
@@ -233,24 +235,13 @@ const RepAppellant = (props) => {
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
disabled={shouldDisableButton({
|
||||
props,
|
||||
formObj,
|
||||
})}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
{/* {router.query.state != "edit" && (
|
||||
<a
|
||||
onClick={() => {
|
||||
setRepresentationCapacity();
|
||||
props.updateField(
|
||||
"representationForm",
|
||||
"representationType",
|
||||
""
|
||||
);
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
{t("common:back-link")}
|
||||
</a>
|
||||
)} */}
|
||||
|
||||
{savingStatus ? (
|
||||
<span className=" progress-save-active">
|
||||
|
||||
@@ -27,6 +27,7 @@ let RepCapacitySelection = (props) => {
|
||||
));
|
||||
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
const appealType = props.props.currentView.caseReference.appealType;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -39,6 +40,7 @@ let RepCapacitySelection = (props) => {
|
||||
myRepresentations={props.props.myRepresentations}
|
||||
props={props}
|
||||
setCurrentReference={setCurrentReference}
|
||||
appealType={appealType}
|
||||
/>{" "}
|
||||
<div id="rep-details" className="">
|
||||
<div className="govuk-grid-column-full">
|
||||
@@ -52,9 +54,15 @@ let RepCapacitySelection = (props) => {
|
||||
<Field
|
||||
name="representationCapacity"
|
||||
datafieldname="representationCapacity"
|
||||
label={t(
|
||||
"myrepresentations:capacity-select-what-capacity-label"
|
||||
)}
|
||||
label={
|
||||
appealType != 846040002
|
||||
? t(
|
||||
"myrepresentations:capacity-select-what-capacity-label"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:sips-capacity-select-what-capacity-label"
|
||||
)
|
||||
}
|
||||
options={capacityOptionsArr}
|
||||
id="representationCapacity"
|
||||
className="govuk-radios__input"
|
||||
|
||||
@@ -264,21 +264,33 @@ const RepCompleteSubmit = (props) => {
|
||||
<div className="govuk-grid-row govuk-body">
|
||||
<h1 className="govuk-heading-m ">
|
||||
{" "}
|
||||
{t(
|
||||
"myrepresentations:rep-check-submit-heading"
|
||||
)}
|
||||
{repFormData.appealType == 846040002
|
||||
? t(
|
||||
"myrepresentations:consultation-check-submit-heading"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:rep-check-submit-heading"
|
||||
)}
|
||||
</h1>
|
||||
<dl className="govuk-summary-list ">
|
||||
<h2 className="govuk-heading-m govuk-!-margin-top-9">
|
||||
{t(
|
||||
"myrepresentations:rep-check-your-rep-heading"
|
||||
)}
|
||||
{repFormData.appealType == 846040002
|
||||
? t(
|
||||
"myrepresentations:consultation-check-your-rep-heading"
|
||||
)
|
||||
: t(
|
||||
"myrepresentations:rep-check-your-rep-heading"
|
||||
)}
|
||||
</h2>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:representation-representation-type"
|
||||
)}
|
||||
{repFormData.appealType == 846040002
|
||||
? t(
|
||||
"case:consultation-representation-type"
|
||||
)
|
||||
: t(
|
||||
"case:representation-representation-type"
|
||||
)}
|
||||
</dt>
|
||||
|
||||
<dd className="govuk-summary-list__value">
|
||||
@@ -427,58 +439,63 @@ const RepCompleteSubmit = (props) => {
|
||||
</>
|
||||
)}
|
||||
{repFormData.representationType !=
|
||||
"Questionnaire" && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:representation-comments")}
|
||||
</dt>
|
||||
"Questionnaire" &&
|
||||
repFormData.appealType != 846040002 && (
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:representation-comments"
|
||||
)}
|
||||
</dt>
|
||||
|
||||
<dd className="govuk-summary-list__value">
|
||||
<span
|
||||
className="multiline-elipsis"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: repFormData.representationComments,
|
||||
}}
|
||||
/>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value">
|
||||
<span
|
||||
className="multiline-elipsis"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: repFormData.representationComments,
|
||||
}}
|
||||
/>
|
||||
</dd>
|
||||
|
||||
<dd className="govuk-summary-list__actions">
|
||||
<a
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
// setSubmitBack();
|
||||
<dd className="govuk-summary-list__actions">
|
||||
<a
|
||||
className="govuk-link"
|
||||
href="#"
|
||||
onClick={() => {
|
||||
// setSubmitBack();
|
||||
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
repFormData.ticketnumber,
|
||||
"currentReference":
|
||||
repFormData.caseRef,
|
||||
"currentType":
|
||||
"myRepresentations",
|
||||
"incidentid":
|
||||
repFormData.incidentID,
|
||||
"appealType":
|
||||
repFormData.appealType,
|
||||
"repDetails":
|
||||
repFormData,
|
||||
});
|
||||
setRepresentationSubmit(
|
||||
false
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t("common:change-link-label")}
|
||||
<span className="govuk-visually-hidden">
|
||||
{" "}
|
||||
{/* {FieldsTranslations(
|
||||
setCurrentReference({
|
||||
"ticketnumber":
|
||||
repFormData.ticketnumber,
|
||||
"currentReference":
|
||||
repFormData.caseRef,
|
||||
"currentType":
|
||||
"myRepresentations",
|
||||
"incidentid":
|
||||
repFormData.incidentID,
|
||||
"appealType":
|
||||
repFormData.appealType,
|
||||
"repDetails":
|
||||
repFormData,
|
||||
});
|
||||
setRepresentationSubmit(
|
||||
false
|
||||
);
|
||||
}}
|
||||
>
|
||||
{t(
|
||||
"common:change-link-label"
|
||||
)}
|
||||
<span className="govuk-visually-hidden">
|
||||
{" "}
|
||||
{/* {FieldsTranslations(
|
||||
rows[0].value
|
||||
)} */}
|
||||
</span>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
</span>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:representation-files")}
|
||||
|
||||
@@ -8,7 +8,7 @@ const RepDetails = (props) => {
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
const { currentType, casesObj } = props;
|
||||
const { currentType, casesObj, appealType } = props;
|
||||
|
||||
let { caseReference } = props;
|
||||
|
||||
@@ -97,10 +97,14 @@ const RepDetails = (props) => {
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:capacity-para-one")}
|
||||
{appealType == 846040002
|
||||
? t("myrepresentations:sips-capacity-para-one")
|
||||
: t("myrepresentations:capacity-para-one")}
|
||||
</p>
|
||||
<p className="govuk-body">
|
||||
{t("myrepresentations:capacity-para-two")}
|
||||
{appealType == 846040002
|
||||
? t("myrepresentations:sips-capacity-para-two")
|
||||
: t("myrepresentations:capacity-para-two")}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1390,6 +1390,12 @@ export function FileUploadField(props) {
|
||||
);
|
||||
}
|
||||
|
||||
export const shouldDisableButton = ({ props, formObj }) =>
|
||||
!(
|
||||
props?.currentView?.fileList?.length > 0 ||
|
||||
typeof formObj?.representationForm?.values?.representationComments !==
|
||||
"undefined"
|
||||
);
|
||||
// export const RepresentationGuidanceText = (appealType) => {
|
||||
// let { t } = useTranslation();
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
RenderCondtionalRadioList,
|
||||
RenderPickList,
|
||||
RenderRichMultiline,
|
||||
shouldDisableButton,
|
||||
} from "./representationElements";
|
||||
|
||||
import { useDropzone } from "react-dropzone";
|
||||
@@ -71,7 +72,7 @@ const RepInterestedPartyPerson = (props) => {
|
||||
<>
|
||||
<h2 className="govuk-heading-m ">
|
||||
{t(
|
||||
"myrepresentations:representation-from-an-interested-person-heading"
|
||||
"myrepresentations:consultation-from-an-interested-person-heading"
|
||||
)}
|
||||
</h2>
|
||||
|
||||
@@ -238,6 +239,10 @@ const RepInterestedPartyPerson = (props) => {
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
disabled={shouldDisableButton({
|
||||
props,
|
||||
formObj,
|
||||
})}
|
||||
>
|
||||
{t("common:continue-button")}
|
||||
</button>
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
FileUploadField,
|
||||
RenderMultiline,
|
||||
RenderPickList,
|
||||
shouldDisableButton,
|
||||
} from "./representationElements";
|
||||
import RepresentationProgress_enforcement from "./representationProgress/representationProgress_enforcement";
|
||||
import RepresentationProgress_s78 from "./representationProgress/representationProgress_s78";
|
||||
@@ -510,6 +511,10 @@ let RepLPA = (props) => {
|
||||
type="submit"
|
||||
className="govuk-button"
|
||||
data-module="govuk-button"
|
||||
disabled={shouldDisableButton({
|
||||
props,
|
||||
formObj,
|
||||
})}
|
||||
onClick={() => {
|
||||
let valuesObj =
|
||||
props.props.props.form[props.form]
|
||||
|
||||
+1667
-887
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,81 @@
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
export function capitalizeFirstLetter(val) {
|
||||
return String(val).charAt(0).toUpperCase() + String(val).slice(1);
|
||||
}
|
||||
|
||||
export function formatDates(dateObj, showTime) {
|
||||
const d = new Date(dateObj);
|
||||
const dd = String(d.getDate()).padStart(2, "0");
|
||||
const mm = String(d.getMonth() + 1).padStart(2, "0");
|
||||
const yyyy = d.getFullYear();
|
||||
const hh = String(d.getHours()).padStart(2, "0");
|
||||
const mins = String(d.getMinutes()).padStart(2, "0");
|
||||
|
||||
return showTime && !(hh === "00" && mins === "00")
|
||||
? `${hh}:${mins}`
|
||||
: `${dd}/${mm}/${yyyy}`;
|
||||
}
|
||||
|
||||
export function hasValidKey(obj, key) {
|
||||
return obj?.hasOwnProperty(key) && obj[key] !== null && obj[key] !== "";
|
||||
}
|
||||
|
||||
export function showReps(startDate, endDate) {
|
||||
const now = new Date();
|
||||
const start = new Date(startDate);
|
||||
const end = new Date(endDate);
|
||||
return now >= start && now <= end;
|
||||
}
|
||||
|
||||
export function showRepsEnded(startDate, endDate) {
|
||||
const now = new Date();
|
||||
const start = new Date(startDate);
|
||||
const end = new Date(endDate);
|
||||
return now > start && now > end;
|
||||
}
|
||||
|
||||
export function isObjectNotEmpty(obj, key) {
|
||||
return obj.hasOwnProperty(key) && Object.keys(obj[key]).length > 0;
|
||||
}
|
||||
|
||||
export function hasOwnPropertyAndNotNull(obj, property) {
|
||||
return obj.hasOwnProperty(property) && obj[property] !== null;
|
||||
}
|
||||
|
||||
export function linkedCasesList(linkedCasesReference) {
|
||||
//console.log(linkedCasesReference);
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
linkedCasesReference = linkedCasesReference.value || [];
|
||||
|
||||
return (
|
||||
<>
|
||||
<ul className="govuk-list govuk-!-font-size-16">
|
||||
{linkedCasesReference.map((item, key) => {
|
||||
return (
|
||||
<li key={key}>
|
||||
<Link
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? "/canlyniadauchwilio?q=" +
|
||||
item.title +
|
||||
"&lk=1"
|
||||
: "/searchresults?q=" +
|
||||
item.title +
|
||||
"&lk=1"
|
||||
}
|
||||
className=""
|
||||
>
|
||||
{item.title}
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
//console.log(item.incidentid, item.title);
|
||||
})}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
export { default as Pinswg_advertsid } from "./pinswg_advertsid";
|
||||
export { default as Pinswg_callinss77id } from "./pinswg_callinss77id";
|
||||
export { default as Pinswg_commonlandid } from "./pinswg_commonlandid";
|
||||
export { default as Pinswg_communityinfrastructurelevyid } from "./pinswg_communityinfrastructurelevyid";
|
||||
export { default as Pinswg_compulsorypurchaseordersid } from "./pinswg_compulsorypurchaseordersid";
|
||||
export { default as Pinswg_dnsid } from "./pinswg_dnsid";
|
||||
export { default as Pinswg_sipscase } from "./pinswg_sipscase";
|
||||
export { default as Pinswg_electricityactid } from "./pinswg_electricityactid";
|
||||
export { default as Pinswg_enforcementlistedbuildingconseid } from "./pinswg_enforcementlistedbuildingconseid";
|
||||
export { default as Pinswg_enforcementnoticeappeals174id } from "./pinswg_enforcementnoticeappeals174id";
|
||||
export { default as Pinswg_environmentalpermittingid } from "./pinswg_environmentalpermittingid";
|
||||
export { default as Pinswg_harbourrevisionorderid } from "./pinswg_harbourrevisionorderid";
|
||||
export { default as Pinswg_hedgeshedgerowstreepreservatioid } from "./pinswg_hedgeshedgerowstreepreservatioid";
|
||||
export { default as Pinswg_householderappealhasid } from "./pinswg_householderappealhasid";
|
||||
export { default as Pinswg_lawfuldevelopmentcertificatappid } from "./pinswg_lawfuldevelopmentcertificatappid";
|
||||
export { default as Pinswg_ldpid } from "./pinswg_ldpid";
|
||||
export { default as Pinswg_listedbuildingandconservationrid } from "./pinswg_listedbuildingandconservationrid";
|
||||
export { default as Pinswg_maintenanceoflands217id } from "./pinswg_maintenanceoflands217id";
|
||||
export { default as Pinswg_miscellaneouscasewordid } from "./pinswg_miscellaneouscasewordid";
|
||||
export { default as Pinswg_nonvalidationid } from "./pinswg_nonvalidationid";
|
||||
export { default as Pinswg_planningappeals78id } from "./pinswg_planningappeals78id";
|
||||
export { default as Pinswg_planningconditionss73s79id } from "./pinswg_planningconditionss73s79id";
|
||||
export { default as Pinswg_planningobligationappeals106id } from "./pinswg_planningobligationappeals106id";
|
||||
export { default as Pinswg_rowid } from "./pinswg_rowid";
|
||||
export { default as Pinswg_transportandworkactid } from "./pinswg_transportandworkactid";
|
||||
export { default as Pinswg_wayleaveid } from "./pinswg_wayleaveid";
|
||||
@@ -91,17 +91,24 @@ const Pinswg_advertsid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_callinss77id = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_commonlandid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_communityinfrastructurelevyid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -48,17 +48,24 @@ const Pinswg_compulsorypurchaseordersid = (props) => {
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -204,6 +204,30 @@ const Pinswg_dnsid = (props) => {
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-procedure-label")}
|
||||
|
||||
@@ -104,6 +104,30 @@ const Pinswg_electricityactid = (props) => {
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_enforcementlistedbuildingconseid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_enforcementnoticeappeals174id = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_environmentalpermittingid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -104,6 +104,30 @@ const Pinswg_harbourrevisionorderid = (props) => {
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
|
||||
@@ -91,17 +91,24 @@ const Pinswg_hedgeshedgerowstreepreservatioid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_householderappealhasid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_lawfuldevelopmentcertificatappid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -66,21 +66,7 @@ const Pinswg_ldpid = (props) => {
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-procedure-label")}
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_listedbuildingandconservationrid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_maintenanceoflands217id = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_miscellaneouscasewordid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -66,21 +66,7 @@ const Pinswg_nonvalidationid = (props) => {
|
||||
] || ""}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{/* <div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-procedure-label")}
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_planningappeals78id = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_planningconditionss73s79id = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequiered@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_planningobligationappeals106id = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -91,17 +91,24 @@ const Pinswg_rowid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreeningrequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -83,6 +83,30 @@ const Pinswg_transportandworkactid = (props) => {
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t(
|
||||
"case:summary-eia-required-label"
|
||||
)}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
|
||||
@@ -68,17 +68,24 @@ const Pinswg_wayleaveid = (props) => {
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
<dt className="govuk-summary-list__key">
|
||||
{t("case:summary-case-officer-label")}
|
||||
{t("case:summary-eia-required-label")}
|
||||
</dt>
|
||||
<dd className="govuk-summary-list__value">
|
||||
{" "}
|
||||
{/* {casesObj.caseDetails.caseOfficer ||
|
||||
""} */}
|
||||
{_.has(casesObj, "_ownerid_value")
|
||||
? casesObj[
|
||||
"_ownerid_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
{router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: detailsObj[
|
||||
"pinswg_detailedeiascreening@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
t(
|
||||
"case:summary-to-be-confirmed-label"
|
||||
)}
|
||||
</dd>
|
||||
</div>
|
||||
<div className="govuk-summary-list__row">
|
||||
|
||||
@@ -748,7 +748,7 @@ const RenderDatePicker = ({
|
||||
: value
|
||||
: null
|
||||
} //{parseISO(value) || null}
|
||||
className="govuk-input govuk-input--width-10"
|
||||
className="govuk-input govuk-input--width-12"
|
||||
minDate={minDate}
|
||||
maxDate={maxDate}
|
||||
autoComplete="off"
|
||||
@@ -2179,7 +2179,8 @@ const RenderFileUpload = (field) => {
|
||||
).then((data) => {
|
||||
console.log(data);
|
||||
let buildAppealFilesArray = [];
|
||||
let values = field.form.appealForm.values;
|
||||
//let values = field.form.appealForm.values;
|
||||
let values = field.props.form.appealForm.values;
|
||||
let filesUploadObj = renamedAcceptedFiles;
|
||||
|
||||
for (let key in filesUploadObj) {
|
||||
@@ -2434,6 +2435,18 @@ const RenderSubFields = ({ fields, meta: { touched, error }, ...custom }) => {
|
||||
const required = (value) =>
|
||||
value ? undefined : t("newappeal:is-required-label");
|
||||
|
||||
const email = (value) => {
|
||||
let errors;
|
||||
|
||||
const emailRegex =
|
||||
/(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/gi;
|
||||
|
||||
if (!emailRegex.test(value)) {
|
||||
errors = t("newappeal:invalid-email-address-errormsg");
|
||||
}
|
||||
return errors;
|
||||
};
|
||||
|
||||
//fields.push({});
|
||||
fields.length == 0 && fields.push({});
|
||||
return (
|
||||
@@ -2445,40 +2458,75 @@ const RenderSubFields = ({ fields, meta: { touched, error }, ...custom }) => {
|
||||
</h4>
|
||||
|
||||
<div className="fieldArrayContainer">
|
||||
<Field
|
||||
id={`${member}.${fields.name}`}
|
||||
name={`${member}.${fields.name}`}
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
validate={[checkValue]}
|
||||
label={
|
||||
subTitle == "owners"
|
||||
? "Owner name"
|
||||
: "Tenant name"
|
||||
}
|
||||
className="govuk-input govuk-input--width-10"
|
||||
showErrorBottom={true}
|
||||
/>
|
||||
<Field
|
||||
name={`${member}.dateserved`}
|
||||
type="text"
|
||||
component={RenderDatePicker}
|
||||
label="Date served "
|
||||
dateStart={"-6m"}
|
||||
dateEnd={"0"}
|
||||
validate={[required]}
|
||||
className="govuk-input govuk-input--width-10"
|
||||
showErrorBottom={true}
|
||||
/>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
title="Remove"
|
||||
onClick={() => fields.remove(index)}
|
||||
className="govuk-button fieldArrayDelete"
|
||||
<div className="govuk-grid-column-full">
|
||||
<div
|
||||
className="gouk-grid-row"
|
||||
style={{
|
||||
display: "flex",
|
||||
marginBottom: "20px",
|
||||
}}
|
||||
>
|
||||
<Field
|
||||
id={`${member}.${fields.name}_firstname`}
|
||||
name={`${member}.${fields.name}_firstname`}
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
validate={[checkValue]}
|
||||
label={"First name"}
|
||||
className="govuk-input govuk-input--width-12"
|
||||
showErrorBottom={true}
|
||||
/>
|
||||
<Field
|
||||
id={`${member}.${fields.name}_lastname`}
|
||||
name={`${member}.${fields.name}_lastname`}
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
validate={[checkValue]}
|
||||
label={"Last name"}
|
||||
className="govuk-input govuk-input--width-12"
|
||||
showErrorBottom={true}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="gouk-grid-row"
|
||||
style={{ display: "flex" }}
|
||||
>
|
||||
<Field
|
||||
id={`${member}.${fields.name}_email`}
|
||||
name={`${member}.${fields.name}_email`}
|
||||
type="text"
|
||||
component={RenderTextfield}
|
||||
validate={[email]}
|
||||
label={"Email"}
|
||||
className="govuk-input govuk-input--width-12"
|
||||
showErrorBottom={true}
|
||||
/>
|
||||
<Field
|
||||
name={`${member}.dateserved`}
|
||||
type="text"
|
||||
component={RenderDatePicker}
|
||||
label="Date served "
|
||||
dateStart={"-6m"}
|
||||
dateEnd={"0"}
|
||||
validate={[required]}
|
||||
className="govuk-input govuk-input--width-12"
|
||||
showErrorBottom={true}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="gouk-grid-row"
|
||||
style={{ display: "flex" }}
|
||||
>
|
||||
X
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
title="Remove"
|
||||
onClick={() => fields.remove(index)}
|
||||
className="govuk-button fieldArrayDelete"
|
||||
>
|
||||
X
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
+69
-100
@@ -19,6 +19,7 @@ const Header = (props) => {
|
||||
"/",
|
||||
"/logout",
|
||||
"/dns",
|
||||
"/dns/[developmentName]",
|
||||
"/dns/application-process",
|
||||
"/dns/help",
|
||||
"/dns/contact-us",
|
||||
@@ -47,12 +48,22 @@ const Header = (props) => {
|
||||
"/newappeal/[appealtypes]",
|
||||
"/newappeal",
|
||||
"/myportal/dnsapplications",
|
||||
"/myportal/dns/[developmentName]",
|
||||
"/myportal/dnsdetails",
|
||||
"/myportal/addresssearch",
|
||||
"/myportal/addresssearchresults",
|
||||
"/myportal/advancedsearch",
|
||||
"/myportal/advancedsearchresults",
|
||||
"/myportal/case/[ticketnumber]",
|
||||
"/account/personaldetails",
|
||||
"/register",
|
||||
"/myportal/searchresults",
|
||||
"/myportal/representation",
|
||||
"/myportal/viewall",
|
||||
"/contactus",
|
||||
"/myportal/contactus",
|
||||
"/unsubscribe/[watchlistid]",
|
||||
"/unsubscribeall/[watchlistid]",
|
||||
];
|
||||
|
||||
const hasContactLink = [
|
||||
@@ -83,6 +94,41 @@ const Header = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
//const switchLocale = locale === "en" ? "cy" : "en";
|
||||
|
||||
const switchLocale = router.asPath.startsWith("/cy") ? "en" : "cy";
|
||||
|
||||
console.log("switch locale", locale === "en" ? "cy" : "en");
|
||||
|
||||
const handleLocaleSwitch = () => {
|
||||
// const router = useRouter();
|
||||
const isWelsh = router.asPath.startsWith("/cy");
|
||||
|
||||
console.log(
|
||||
isWelsh,
|
||||
router.asPath,
|
||||
router.basePath,
|
||||
router.pathname,
|
||||
router.route
|
||||
);
|
||||
|
||||
// Switch path: remove /cy if switching to English, add /cy if switching to Welsh
|
||||
const newPath = isWelsh
|
||||
? router.asPath.replace(/^\/cy/, "") || "/"
|
||||
: router.asPath === "/"
|
||||
? "/cy"
|
||||
: `/cy${router.asPath}`;
|
||||
|
||||
// Persist user's choice in cookie
|
||||
setCookie(null, "pedw_locale", isWelsh ? "en" : "cy", {
|
||||
path: "/",
|
||||
maxAge: 60 * 60 * 24 * 365, // 1 year
|
||||
});
|
||||
|
||||
// Navigate to new language path
|
||||
router.push(newPath);
|
||||
};
|
||||
|
||||
return (
|
||||
<header
|
||||
className="govuk-header "
|
||||
@@ -105,106 +151,6 @@ const Header = (props) => {
|
||||
</div>
|
||||
|
||||
<div className="languageSwitch">
|
||||
{/* <div className="mobileNav">
|
||||
<div className="mobileMenu">
|
||||
<input
|
||||
type="radio"
|
||||
id="mobileMenu-1"
|
||||
name="mobileMenu-group-1"
|
||||
/>
|
||||
<label htmlFor="mobileMenu-1">
|
||||
{t("common:mobile-nav-label")} <i>▼</i>
|
||||
</label>
|
||||
<div className="mobileMenu close-mobileMenu">
|
||||
<input
|
||||
type="radio"
|
||||
id="mobileMenu-close"
|
||||
name="mobileMenu-group-1"
|
||||
/>
|
||||
<label htmlFor="mobileMenu-close">
|
||||
{t("common:mobile-nav-label")} <i>▲</i>
|
||||
</label>
|
||||
</div>
|
||||
<div className="content">
|
||||
<ul>
|
||||
{hasContactLink.includes(router.pathname) ==
|
||||
true ? (
|
||||
<li>
|
||||
<Link href="/dns/contact-us">
|
||||
<a className="govuk-header__link ">
|
||||
Contact
|
||||
</a>
|
||||
</Link>
|
||||
</li>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{noSignoutLink.includes(router.pathname) ==
|
||||
true ? (
|
||||
""
|
||||
) : (
|
||||
<li>
|
||||
<a
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? "/allgofnodi"
|
||||
: "/logout"
|
||||
}
|
||||
onClick={() => {
|
||||
setLogout(),
|
||||
window.localStorage.clear();
|
||||
}}
|
||||
className="govuk-header__link "
|
||||
>
|
||||
{t("common:signout-label")}
|
||||
</a>
|
||||
</li>
|
||||
)}
|
||||
|
||||
<li>
|
||||
<Link
|
||||
href={
|
||||
locale == "en"
|
||||
? router.query.q != null
|
||||
? router.pathname +
|
||||
"?q=" +
|
||||
router.query.q
|
||||
: router.pathname
|
||||
: router.query.q != null
|
||||
? process.env.I18N_DOMAIN +
|
||||
"/" +
|
||||
router.asPath +
|
||||
"?q=" +
|
||||
router.query.q
|
||||
: router.asPath
|
||||
}
|
||||
locale={
|
||||
locale == "en" ? "cy" : "en"
|
||||
}
|
||||
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"
|
||||
}
|
||||
>
|
||||
{" "}
|
||||
{t("common:available-in")}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className="fullNavs">
|
||||
{hasContactLink.includes(router.pathname) == true ? (
|
||||
<Link
|
||||
@@ -234,6 +180,29 @@ const Header = (props) => {
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{/* <span
|
||||
onClick={handleLocaleSwitch}
|
||||
className="govuk-header__link"
|
||||
lang={switchLocale}
|
||||
hrefLang={switchLocale}
|
||||
role="link"
|
||||
tabIndex={0}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") handleLocaleSwitch();
|
||||
}}
|
||||
data-journey-click={
|
||||
locale === "en"
|
||||
? "link - click:lang-select:Cymraeg"
|
||||
: "link - click:lang-select:English"
|
||||
}
|
||||
aria-label={
|
||||
locale === "en"
|
||||
? "Dewiswch Cymraeg"
|
||||
: "Select English"
|
||||
}
|
||||
>
|
||||
{t("common:available-in")}
|
||||
</span> */}
|
||||
<Link
|
||||
href={
|
||||
Object.keys(router.query).length > 0
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import useTranslation from "next-translate/useTranslation";
|
||||
import { useRouter } from "next/router";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function CaseComment() {
|
||||
let { t } = useTranslation();
|
||||
@@ -24,6 +25,15 @@ export default function CaseComment() {
|
||||
<p className="govuk-body-s">
|
||||
{t("home:casescomment-card-paragraph-two")}
|
||||
</p>
|
||||
|
||||
<div className="govuk-form-group">
|
||||
<Link
|
||||
href={router.locale == "cy" ? "/cyswllt" : "/contactus"}
|
||||
className="govuk-button withChevron govuk-button-cta"
|
||||
>
|
||||
{t("common:footer-contact-us-link-label")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
+63
-15
@@ -1,3 +1,4 @@
|
||||
import { he } from "date-fns/locale";
|
||||
import GoogleMapReact from "google-map-react";
|
||||
const GoogleMapComponent = (props) => {
|
||||
const { center, zoom } = props;
|
||||
@@ -21,22 +22,69 @@ const GoogleMapComponent = (props) => {
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// console.log(
|
||||
// "https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||
// props.center.lng +
|
||||
// "," +
|
||||
// props.center.lat +
|
||||
// "&zoom=12#/"
|
||||
// );
|
||||
return (
|
||||
<GoogleMapReact
|
||||
options={function (maps) {
|
||||
return {
|
||||
overviewMapControl: true,
|
||||
mapTypeControl: true,
|
||||
};
|
||||
}}
|
||||
bootstrapURLKeys={{
|
||||
key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||
}}
|
||||
defaultCenter={center}
|
||||
defaultZoom={zoom}
|
||||
yesIWantToUseGoogleMapApiInternals
|
||||
onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||
></GoogleMapReact>
|
||||
// <GoogleMapReact
|
||||
// options={function (maps) {
|
||||
// return {
|
||||
// overviewMapControl: true,
|
||||
// mapTypeControl: true,
|
||||
// };
|
||||
// }}
|
||||
// bootstrapURLKeys={{
|
||||
// key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||
// }}
|
||||
// defaultCenter={center}
|
||||
// defaultZoom={zoom}
|
||||
// yesIWantToUseGoogleMapApiInternals
|
||||
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||
// ></GoogleMapReact>
|
||||
<>
|
||||
{" "}
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<a
|
||||
href={
|
||||
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||
props.center.lng +
|
||||
"," +
|
||||
props.center.lat +
|
||||
"&zoom=7#/"
|
||||
}
|
||||
rel="noreferrer noopener"
|
||||
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
|
||||
target="_blank"
|
||||
>
|
||||
See this map on Datamap Wales
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<iframe
|
||||
src={
|
||||
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||
props.center.lng +
|
||||
"," +
|
||||
props.center.lat +
|
||||
"&zoom=7#/"
|
||||
}
|
||||
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||
width={"100%"}
|
||||
maxheight={"400px"}
|
||||
height={"500px"}
|
||||
className={"mappingFrame"}
|
||||
></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -24,25 +24,15 @@ let AdvancedSearch = (props) => {
|
||||
|
||||
//console.log("props here:", props.props);
|
||||
|
||||
const appealOptionsObj = _.isEmpty(props)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType.appealTypeOptions)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType.appealTypeOptions.value)
|
||||
? [{}]
|
||||
: props.appealType.appealTypeOptions.value;
|
||||
const appealOptionsObj =
|
||||
props?.appealType?.appealTypeOptions?.value?.length > 0
|
||||
? props.appealType.appealTypeOptions.value
|
||||
: [{}];
|
||||
|
||||
let lpaOptionsObj = _.isEmpty(props)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: props.LPAData.LPAData.value;
|
||||
const lpaOptionsObj =
|
||||
props?.LPAData?.LPAData?.value?.length > 0
|
||||
? props.LPAData.LPAData.value
|
||||
: [{}];
|
||||
|
||||
const RenderTextfield = ({
|
||||
id,
|
||||
|
||||
@@ -34,11 +34,12 @@ const AwaitingSubmission = (props) => {
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
(router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
: "/myportal/viewall") +
|
||||
"?viewKey=awaitingSubmission"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -351,11 +351,12 @@ const AwaitingSubmissionFromBlob = (props) => {
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
(router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
: "/myportal/viewall") +
|
||||
"?viewKey=awaitingSubmissionDetails"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -29,11 +29,11 @@ const MyCases = (props) => {
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
(router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
: "/myportal/viewall") + "?viewKey=myCases"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -34,11 +34,12 @@ const MyRepresentations = (props) => {
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
(router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
: "/myportal/viewall") +
|
||||
"?viewKey=myRepresentations"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -33,11 +33,12 @@ const MyRepresentations = (props) => {
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
(router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
: "/myportal/viewall") +
|
||||
"?viewKey=myRepresentations"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -40,11 +40,12 @@ const MySubmittedReps = (props) => {
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
(router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
: "/myportal/viewall") +
|
||||
"?viewKey=mySubmittedReps"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -171,6 +171,18 @@ let CaseSearch = (props) => {
|
||||
>
|
||||
{t("myportal:searchcases-card-advanced-link")}
|
||||
</Link>
|
||||
<div className="govuk-form-group govuk-!-margin-top-5">
|
||||
<Link
|
||||
href={
|
||||
router.locale == "cy"
|
||||
? "/fymhorth/cyswllt"
|
||||
: "/myportal/contactus"
|
||||
}
|
||||
className="govuk-button withChevron govuk-button-cta"
|
||||
>
|
||||
{t("common:footer-contact-us-link-label")}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -75,7 +75,7 @@ const ServiceBanner = (props) => {
|
||||
<div className="serviceBanner_userDetails_name">
|
||||
<Link
|
||||
href="/account/personaldetails"
|
||||
className="govuk-button-secondary govuk-link"
|
||||
className="govuk-button-secondary govuk-link--no-underline"
|
||||
>
|
||||
{props.accountDetails.accountDetails.firstname}{" "}
|
||||
{props.accountDetails.accountDetails.lastname}
|
||||
|
||||
@@ -115,6 +115,27 @@ const TopThree = (props) => {
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
||||
let showWatchedCases = (submittedArr) => {
|
||||
const required = submittedArr.value.filter((el) => {
|
||||
return (
|
||||
el.pinswg_representationsubmitted == null
|
||||
);
|
||||
});
|
||||
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
});
|
||||
};
|
||||
|
||||
data = showWatchedCases(data);
|
||||
|
||||
data.value.sort(function compare(a, b) {
|
||||
var dateA = new Date(a.createdon);
|
||||
var dateB = new Date(b.createdon);
|
||||
return dateB - dateA;
|
||||
});
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
@@ -207,13 +228,19 @@ const TopThree = (props) => {
|
||||
showTopThreeArr[key].incidentid
|
||||
: router.locale == "cy"
|
||||
? "/fymhorth/achos/" +
|
||||
showTopThreeArr[key].pinswg_title +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType
|
||||
topThreeType +
|
||||
"&appealType=" +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
: "/myportal/case/" +
|
||||
showTopThreeArr[key].pinswg_title +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType
|
||||
topThreeType +
|
||||
"&appealType=" +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
data-id={index}
|
||||
|
||||
+261
-103
@@ -12,6 +12,8 @@ import {
|
||||
getAwaitingSubmissionFromBlobProxy,
|
||||
getRepsFromBlobProxy,
|
||||
getWatchedCasesProxy,
|
||||
getWatchedCases,
|
||||
createWatchedCases,
|
||||
} from "../../actions";
|
||||
import { getDetailsProxy, getFormCollectionByID } from "../../components/utils";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
@@ -36,6 +38,8 @@ import {
|
||||
setMyRepresentationsDetails,
|
||||
} from "../../store/myRepresentations/action";
|
||||
|
||||
import RepsOnResults from "../search/repsonresults";
|
||||
|
||||
const ViewAllResults = (props) => {
|
||||
const {
|
||||
searchString,
|
||||
@@ -75,18 +79,20 @@ const ViewAllResults = (props) => {
|
||||
};
|
||||
|
||||
let currentView = props.currentView.currentView;
|
||||
//console.log("currentView.viewKey:", typeof currentView.viewKey);
|
||||
//console.log("viewAllKey:", typeof viewAllKey);
|
||||
|
||||
// typeof currentView.viewKey == "undefined"
|
||||
// typeof viewAllKey == "undefined"
|
||||
// ? console.log("no currentview")
|
||||
// : console.log("has currentview");
|
||||
|
||||
var viewAllKey = currentView?.viewKey || router.query.viewKey;
|
||||
|
||||
var resultsArr =
|
||||
currentView.viewKey == "awaitingSubmissionDetails"
|
||||
viewAllKey == "awaitingSubmissionDetails"
|
||||
? props["awaitingSubmission"].awaitingSubmissionDetails.case
|
||||
: currentView.viewKey == "mySubmittedReps"
|
||||
? props[currentView.viewKey][currentView.viewKey]
|
||||
: props[currentView.viewKey][currentView.viewKey].value || [];
|
||||
: viewAllKey == "mySubmittedReps"
|
||||
? props[viewAllKey][viewAllKey]
|
||||
: props[viewAllKey][viewAllKey].value || [];
|
||||
|
||||
const [orderByState, setOrderbyState] = useState("createdon");
|
||||
const [fieldSortState, setfieldSortState] = useState("asc");
|
||||
@@ -103,11 +109,11 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
|
||||
var searchDetailsObj =
|
||||
currentView.viewKey == "awaitingSubmissionDetails"
|
||||
viewAllKey == "awaitingSubmissionDetails"
|
||||
? props["awaitingSubmission"].awaitingSubmissionDetails.value
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: viewAllKey == "myRepresentations"
|
||||
? props["myRepresentations"].myRepresentations.value
|
||||
: props[currentView.viewKey][currentView.viewKey + "Details"] || [];
|
||||
: props[viewAllKey][viewAllKey + "Details"] || [];
|
||||
|
||||
let resultsRowArr = [];
|
||||
const buildResultsRowArr = () => {
|
||||
@@ -115,15 +121,13 @@ const ViewAllResults = (props) => {
|
||||
let detailsObj = jsonpath({
|
||||
path:
|
||||
"$" +
|
||||
(currentView.viewKey == "myRepresentations"
|
||||
? ""
|
||||
: "..value") +
|
||||
(viewAllKey == "myRepresentations" ? "" : "..value") +
|
||||
'[?(@ && @.pinswg_name=="' +
|
||||
(currentView.viewKey == "awaitingSubmissionDetails"
|
||||
(viewAllKey == "awaitingSubmissionDetails"
|
||||
? item.title
|
||||
: currentView.viewKey == "watchedCases"
|
||||
: viewAllKey == "watchedCases"
|
||||
? item.ticketnumber
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: viewAllKey == "myRepresentations"
|
||||
? item.pinswg_name
|
||||
: item.pinswg_title) +
|
||||
'")]',
|
||||
@@ -135,7 +139,7 @@ const ViewAllResults = (props) => {
|
||||
//console.log(searchDetailsObj[key]);
|
||||
|
||||
// searchDetailsObj[key] =
|
||||
// currentView.viewKey == "myRepresentations"
|
||||
// viewAllKey == "myRepresentations"
|
||||
// ? searchDetailsObj[key].value[0]
|
||||
// : searchDetailsObj[key];
|
||||
|
||||
@@ -143,7 +147,7 @@ const ViewAllResults = (props) => {
|
||||
resultsRowArr.push(
|
||||
<div className="govuk-summary-list__row" key={key}>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 govuk-!-padding-left-2">
|
||||
{currentView.viewKey == "myCases" &&
|
||||
{viewAllKey == "myCases" &&
|
||||
resultsArr[key].pinswg_publishtoweb === false ? (
|
||||
<div className="cardModuleReference">
|
||||
{resultsArr[key].ticketnumber}{" "}
|
||||
@@ -153,8 +157,7 @@ const ViewAllResults = (props) => {
|
||||
<>
|
||||
<Link
|
||||
href={
|
||||
currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
viewAllKey == "myRepresentations"
|
||||
? {
|
||||
pathname:
|
||||
"/myportal/representation",
|
||||
@@ -167,7 +170,7 @@ const ViewAllResults = (props) => {
|
||||
.repfile_name,
|
||||
},
|
||||
}
|
||||
: currentView.viewKey ==
|
||||
: viewAllKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? "/fymhorth/parhauigyflwyno"
|
||||
@@ -189,7 +192,7 @@ const ViewAllResults = (props) => {
|
||||
"&inid=" +
|
||||
resultsArr[key].incidentid +
|
||||
"&key=" +
|
||||
currentView.viewKey
|
||||
viewAllKey
|
||||
: router.locale == "cy"
|
||||
? myportal == true
|
||||
? "/fymhorth/achos"
|
||||
@@ -198,12 +201,12 @@ const ViewAllResults = (props) => {
|
||||
? "/myportal/case/" +
|
||||
resultsArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
currentView.viewKey
|
||||
viewAllKey
|
||||
: "/case/" +
|
||||
resultsArr[key].ticketnumber
|
||||
}
|
||||
onClick={() => {
|
||||
currentView.viewKey == "watchedCases" &&
|
||||
viewAllKey == "watchedCases" &&
|
||||
setSearchResults(
|
||||
props.watchedCases.watchedCases
|
||||
),
|
||||
@@ -216,9 +219,8 @@ const ViewAllResults = (props) => {
|
||||
resultsArr[key]
|
||||
.ticketnumber,
|
||||
"currentReference":
|
||||
currentView.viewKey !=
|
||||
"watchedCases"
|
||||
? currentView.viewKey ==
|
||||
viewAllKey != "watchedCases"
|
||||
? viewAllKey ==
|
||||
"myRepresentations"
|
||||
? resultsArr[key]
|
||||
.caseRef
|
||||
@@ -228,11 +230,9 @@ const ViewAllResults = (props) => {
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
|
||||
"currentType":
|
||||
currentView.viewKey,
|
||||
"currentType": viewAllKey,
|
||||
"incidentid":
|
||||
currentView.viewKey !=
|
||||
"watchedCases"
|
||||
viewAllKey != "watchedCases"
|
||||
? resultsArr[key]
|
||||
.incidentid
|
||||
: resultsArr[key][
|
||||
@@ -243,14 +243,14 @@ const ViewAllResults = (props) => {
|
||||
resultsArr[key]
|
||||
.pinswg_appealcasetype,
|
||||
"repDetails":
|
||||
currentView.viewKey ==
|
||||
viewAllKey ==
|
||||
"myRepresentations" &&
|
||||
resultsArr[key],
|
||||
}),
|
||||
setCurrentView({
|
||||
"viewName":
|
||||
currentView.viewName,
|
||||
"viewKey": currentView.viewKey,
|
||||
"viewKey": viewAllKey,
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -260,23 +260,35 @@ const ViewAllResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{currentView.viewKey != "watchedCases"
|
||||
? currentView.viewKey ==
|
||||
"myRepresentations"
|
||||
{viewAllKey != "watchedCases"
|
||||
? viewAllKey == "myRepresentations"
|
||||
? resultsArr[key].caseRef
|
||||
: resultsArr[key].ticketnumber
|
||||
: resultsArr[key][
|
||||
"_pinswg_watchedcase_value@OData.Community.Display.V1.FormattedValue"
|
||||
]}
|
||||
</Link>
|
||||
{currentView.viewKey == "myRepresentations" && (
|
||||
<RepsOnResults
|
||||
detailsObj={detailsObj}
|
||||
appealType={item.pinswg_appealcasetype}
|
||||
/>
|
||||
{viewAllKey == "myRepresentations" && (
|
||||
<>
|
||||
<br />
|
||||
<span>
|
||||
<span className="govuk-body govuk-!-font-size-14">
|
||||
{resultsArr[key].representationType}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
{viewAllKey == "mySubmittedReps" && (
|
||||
<>
|
||||
<span className="govuk-body govuk-!-font-size-14">
|
||||
{item.pinswg_representationtype}{" "}
|
||||
{formatDates(
|
||||
item.pinswg_representationsubmitted
|
||||
)}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</dd>
|
||||
@@ -285,14 +297,14 @@ const ViewAllResults = (props) => {
|
||||
{t("search:searchresults-site-address-label")}:
|
||||
</span>
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
||||
? searchDetailsObj[key].pinswg_siteaddressline1
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
? detailsObj.pinswg_siteaddressline1
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||
? searchDetailsObj[key].value[0]
|
||||
.pinswg_siteaddressline1
|
||||
@@ -300,14 +312,14 @@ const ViewAllResults = (props) => {
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
? detailsObj.pinswg_siteaddressline1
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddressline1"
|
||||
) &&
|
||||
searchDetailsObj[key].pinswg_siteaddressline1 !=
|
||||
null && <br />}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
_.has(
|
||||
searchDetailsObj[key].pinswg_siteaddressline1
|
||||
) &&
|
||||
@@ -317,25 +329,25 @@ const ViewAllResults = (props) => {
|
||||
detailsObj.pinswg_siteaddressline1 != null && (
|
||||
<br />
|
||||
)}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddressline1")
|
||||
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key].pinswg_siteaddressline1)
|
||||
? searchDetailsObj[key].pinswg_siteaddressline2
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddressline1")
|
||||
? detailsObj.pinswg_siteaddressline2
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddressline2"
|
||||
) &&
|
||||
searchDetailsObj[key].pinswg_siteaddressline2 !=
|
||||
null && <br />}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
_.has(
|
||||
searchDetailsObj[key].pinswg_siteaddressline2
|
||||
) &&
|
||||
@@ -345,25 +357,25 @@ const ViewAllResults = (props) => {
|
||||
detailsObj.pinswg_siteaddressline2 != null && (
|
||||
<br />
|
||||
)}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
||||
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresstown")
|
||||
? searchDetailsObj[key].pinswg_siteaddresstown
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddresstown")
|
||||
? detailsObj.pinswg_siteaddresstown
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresstown"
|
||||
) &&
|
||||
searchDetailsObj[key].pinswg_siteaddresstown !=
|
||||
null && <br />}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresstown"
|
||||
@@ -372,18 +384,18 @@ const ViewAllResults = (props) => {
|
||||
null && <br />}
|
||||
{_.has(detailsObj, "pinswg_siteaddresstown") &&
|
||||
detailsObj.pinswg_siteaddresstown != null && <br />}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
||||
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||
: ""}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
_.has(searchDetailsObj[key], "pinswg_siteaddresscounty")
|
||||
? searchDetailsObj[key].pinswg_siteaddresscounty
|
||||
: ""}
|
||||
{_.has(detailsObj, "pinswg_siteaddresscounty")
|
||||
? detailsObj.pinswg_siteaddresscounty
|
||||
: ""}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresscounty"
|
||||
@@ -394,7 +406,7 @@ const ViewAllResults = (props) => {
|
||||
detailsObj.pinswg_siteaddresscounty != null && (
|
||||
<br />
|
||||
)}
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(
|
||||
searchDetailsObj[key],
|
||||
"pinswg_siteaddresspostcode"
|
||||
@@ -414,19 +426,23 @@ const ViewAllResults = (props) => {
|
||||
{/* Helper function to extract address lines based on current view and data */}
|
||||
{[
|
||||
"pinswg_siteaddressline1",
|
||||
"pinswg_addressline1",
|
||||
"pinswg_siteaddressline2",
|
||||
"pinswg_addressline2",
|
||||
"pinswg_siteaddresstown",
|
||||
"pinswg_addresstown",
|
||||
"pinswg_siteaddresscounty",
|
||||
"pinswg_siteaddresspostcode",
|
||||
"pinswg_postcode",
|
||||
"pinswg_projectlocation",
|
||||
].map((field, idx) => {
|
||||
const isAwaitingSubmission =
|
||||
currentView.viewKey ===
|
||||
"awaitingSubmissionDetails";
|
||||
viewAllKey === "awaitingSubmissionDetails";
|
||||
const isMyRepresentations =
|
||||
currentView.viewKey === "myRepresentations";
|
||||
viewAllKey === "myRepresentations";
|
||||
const searchValue = _.get(
|
||||
searchDetailsObj,
|
||||
`${key}.${field}`
|
||||
`${key}.${field} `
|
||||
);
|
||||
const detailsValue = _.get(detailsObj, field);
|
||||
|
||||
@@ -451,11 +467,11 @@ const ViewAllResults = (props) => {
|
||||
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{viewAllKey == "awaitingSubmissionDetails"
|
||||
? t("search:searchresults-created-on-label")
|
||||
: t("search:searchresults-applicant-label")}
|
||||
</span>
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{viewAllKey == "awaitingSubmissionDetails"
|
||||
? formatDates(item.createdon)
|
||||
: _.has(detailsObj, [
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||
@@ -463,7 +479,7 @@ const ViewAllResults = (props) => {
|
||||
? detailsObj[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: viewAllKey == "myRepresentations"
|
||||
? searchDetailsObj[key][
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
@@ -475,7 +491,7 @@ const ViewAllResults = (props) => {
|
||||
<span className="results-visually-hidden">
|
||||
{t("search:searchresults-authority-label")}:
|
||||
</span>
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
_.has(resultsArr[key], "pinswg_lpaname")
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
@@ -520,7 +536,7 @@ const ViewAllResults = (props) => {
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
})
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: viewAllKey == "myRepresentations"
|
||||
? searchDetailsObj[key].value
|
||||
: searchDetailsObj[key].value[0][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -543,10 +559,10 @@ const ViewAllResults = (props) => {
|
||||
: resultsArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
(currentView.viewKey == "myRepresentations"
|
||||
(viewAllKey == "myRepresentations"
|
||||
? ""
|
||||
: "N/A")
|
||||
: currentView.viewKey == "myRepresentations" &&
|
||||
: viewAllKey == "myRepresentations" &&
|
||||
router.locale == "cy" &&
|
||||
jsonpath({
|
||||
path:
|
||||
@@ -564,7 +580,7 @@ const ViewAllResults = (props) => {
|
||||
{t("search:searchresults-case-type-label")}:
|
||||
</span>
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{viewAllKey == "awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
@@ -593,11 +609,9 @@ const ViewAllResults = (props) => {
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] ||
|
||||
(currentView.viewKey == "myRepresentations"
|
||||
? ""
|
||||
: "N/A")}
|
||||
(viewAllKey == "myRepresentations" ? "" : "N/A")}
|
||||
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
(router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
@@ -619,13 +633,13 @@ const ViewAllResults = (props) => {
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{currentView.viewKey == "myRepresentations"
|
||||
{viewAllKey == "myRepresentations"
|
||||
? "Created"
|
||||
: t("search:searchresults-status-label")}
|
||||
:
|
||||
</span>
|
||||
|
||||
{currentView.viewKey == "awaitingSubmissionDetails"
|
||||
{viewAllKey == "awaitingSubmissionDetails"
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
@@ -643,7 +657,7 @@ const ViewAllResults = (props) => {
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
}) || "N/A"
|
||||
: currentView.viewKey == "myRepresentations"
|
||||
: viewAllKey == "myRepresentations"
|
||||
? repRaisedDate(item.repfile_name) // ? router.locale == "cy"
|
||||
: // ? jsonpath({path:
|
||||
//
|
||||
@@ -681,7 +695,7 @@ const ViewAllResults = (props) => {
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
</dd>
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" && (
|
||||
{viewAllKey == "awaitingSubmissionDetails" && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
||||
<button
|
||||
title={t(
|
||||
@@ -709,7 +723,7 @@ const ViewAllResults = (props) => {
|
||||
</button>
|
||||
</dd>
|
||||
)}
|
||||
{currentView.viewKey == "myRepresentations" && (
|
||||
{viewAllKey == "myRepresentations" && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
||||
<button
|
||||
title={t(
|
||||
@@ -739,13 +753,14 @@ const ViewAllResults = (props) => {
|
||||
</dd>
|
||||
)}
|
||||
|
||||
{currentView.viewKey == "watchedCases" && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem ">
|
||||
{viewAllKey == "watchedCases" && (
|
||||
<dd
|
||||
className="govuk-summary-list__value govuk-!-font-size-16 cardModuleItem govuk-!-font-size-14 govuk-summary-list__action"
|
||||
style={{ display: "flex", flexDirection: "column" }}
|
||||
>
|
||||
<button
|
||||
title={t(
|
||||
"case:do-you-want-to-delete-case-label"
|
||||
)}
|
||||
className=" cardModuleRemoveCase govuk-link govuk-link--no-underline govuk-link--inverse "
|
||||
title={t("case:stop-watching-case-link")}
|
||||
className=" govuk-summary-list__actionLink watched_link"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
@@ -761,15 +776,67 @@ const ViewAllResults = (props) => {
|
||||
);
|
||||
}}
|
||||
>
|
||||
—
|
||||
<span className="eye"></span>
|
||||
</button>
|
||||
{item.pinswg_emailnotifications == true ? (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink watched_link"
|
||||
title={t("common:unsubscribe-title-label")}
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-unsubscribe-mail-label"
|
||||
) +
|
||||
item.pinswg_title +
|
||||
"?"
|
||||
) &&
|
||||
selectEmailNotifications(
|
||||
props.accountDetails
|
||||
.accountDetails
|
||||
.emailaddress1,
|
||||
props.accountDetails
|
||||
.loggedinUserId,
|
||||
item._pinswg_watchedcase_value,
|
||||
item.pinswg_appealcasetype,
|
||||
null
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink"
|
||||
title={t("common:subscribe-title-label")}
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-subscribe-mail-label"
|
||||
) +
|
||||
item.pinswg_title +
|
||||
"?"
|
||||
) &&
|
||||
selectEmailNotifications(
|
||||
props.accountDetails
|
||||
.accountDetails
|
||||
.emailaddress1,
|
||||
props.accountDetails
|
||||
.loggedinUserId,
|
||||
item._pinswg_watchedcase_value,
|
||||
item.pinswg_appealcasetype,
|
||||
true
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
)}
|
||||
</dd>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
});
|
||||
};
|
||||
buildResultsRowArr();
|
||||
|
||||
const sortDataBy = (whichField) => {
|
||||
setOrderbyState(whichField);
|
||||
@@ -863,6 +930,7 @@ const ViewAllResults = (props) => {
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const deleteItem = (caseID, topThreeType) => {
|
||||
let cookies = parseCookies();
|
||||
//console.log("sssss", caseID, topThreeType);
|
||||
@@ -871,6 +939,27 @@ const ViewAllResults = (props) => {
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
||||
let showWatchedCases = (submittedArr) => {
|
||||
const required = submittedArr.value.filter((el) => {
|
||||
return (
|
||||
el.pinswg_representationsubmitted == null
|
||||
);
|
||||
});
|
||||
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
});
|
||||
};
|
||||
|
||||
data = showWatchedCases(data);
|
||||
|
||||
data.value.sort(function compare(a, b) {
|
||||
var dateA = new Date(a.createdon);
|
||||
var dateB = new Date(b.createdon);
|
||||
return dateB - dateA;
|
||||
});
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases")
|
||||
.then((data) => {
|
||||
@@ -886,20 +975,92 @@ const ViewAllResults = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
const isEmailSignUp = (whichIncident) => {
|
||||
let isEmail = jsonpath({
|
||||
path:
|
||||
"$[?(@ && @._pinswg_watchedcase_value=='" +
|
||||
whichIncident +
|
||||
"' && @.pinswg_emailnotifications==true)]",
|
||||
|
||||
json: resultsArr,
|
||||
eval: true,
|
||||
});
|
||||
return isEmail;
|
||||
};
|
||||
|
||||
const selectEmailNotifications = (
|
||||
emailaddress,
|
||||
loggedInUser,
|
||||
incidentID,
|
||||
appealType,
|
||||
updateEmailNotifications
|
||||
) => {
|
||||
let updateBody = {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
"pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")",
|
||||
"pinswg_appealcasetype": appealType,
|
||||
"pinswg_emailnotifications": updateEmailNotifications,
|
||||
};
|
||||
|
||||
console.log("Email signed up");
|
||||
createWatchedCases(updateBody)
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
|
||||
(data) => {
|
||||
let showWatchedCases = (submittedArr) => {
|
||||
const required = submittedArr.value.filter((el) => {
|
||||
return (
|
||||
el.pinswg_representationsubmitted == null
|
||||
);
|
||||
});
|
||||
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
});
|
||||
};
|
||||
|
||||
data = showWatchedCases(data);
|
||||
|
||||
data.value.sort(function compare(a, b) {
|
||||
var dateA = new Date(a.createdon);
|
||||
var dateB = new Date(b.createdon);
|
||||
return dateB - dateA;
|
||||
});
|
||||
|
||||
setWatchedCases(data);
|
||||
getDetailsProxy(data, "myWatchedCases")
|
||||
.then((data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
})
|
||||
.then(() => {
|
||||
setCurrentView({
|
||||
"viewName": "Watched Cases",
|
||||
"viewKey": "watchedCases",
|
||||
});
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
buildResultsRowArr();
|
||||
return (
|
||||
<>
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<h1 className="govuk-heading-xl govuk-!-margin-bottom-7">
|
||||
{currentView.viewKey == "awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
t("myportal:awatitingsubmission-card-title")}
|
||||
{currentView.viewKey == "watchedCases" &&
|
||||
{viewAllKey == "watchedCases" &&
|
||||
t("myportal:watchedcases-card-title")}
|
||||
{currentView.viewKey == "myCases" &&
|
||||
{viewAllKey == "myCases" &&
|
||||
t("myportal:mycases-card-title")}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
t("myportal:myrepresentations-card-title")}
|
||||
{currentView.viewKey == "mySubmittedReps" &&
|
||||
{viewAllKey == "mySubmittedReps" &&
|
||||
"Submitted representations"}
|
||||
</h1>
|
||||
|
||||
@@ -907,14 +1068,13 @@ const ViewAllResults = (props) => {
|
||||
<h3>
|
||||
{" "}
|
||||
There are no{" "}
|
||||
{currentView.viewKey ==
|
||||
"awaitingSubmissionDetails" &&
|
||||
{viewAllKey == "awaitingSubmissionDetails" &&
|
||||
t("myportal:awatitingsubmission-card-title")}
|
||||
{currentView.viewKey == "watchedCases" &&
|
||||
{viewAllKey == "watchedCases" &&
|
||||
t("myportal:watchedcases-card-title")}
|
||||
{currentView.viewKey == "myCases" &&
|
||||
{viewAllKey == "myCases" &&
|
||||
t("myportal:mycases-card-title")}
|
||||
{currentView.viewKey == "myRepresentations" &&
|
||||
{viewAllKey == "myRepresentations" &&
|
||||
t("myportal:myrepresentations-card-title")}{" "}
|
||||
records
|
||||
</h3>
|
||||
@@ -926,7 +1086,7 @@ const ViewAllResults = (props) => {
|
||||
type="button"
|
||||
onClick={() =>
|
||||
sortDataBy(
|
||||
currentView.viewKey ==
|
||||
viewAllKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "title"
|
||||
: "pinswg_title"
|
||||
@@ -934,7 +1094,7 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
className={
|
||||
orderByState ==
|
||||
(currentView.viewKey ==
|
||||
(viewAllKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "title"
|
||||
: "pinswg_title")
|
||||
@@ -954,8 +1114,7 @@ const ViewAllResults = (props) => {
|
||||
"search:searchresults-site-address-label"
|
||||
)}
|
||||
</dd>
|
||||
{currentView.viewKey ==
|
||||
"awaitingSubmissionDetails" ? (
|
||||
{viewAllKey == "awaitingSubmissionDetails" ? (
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
<button
|
||||
type="button"
|
||||
@@ -987,7 +1146,7 @@ const ViewAllResults = (props) => {
|
||||
type="button"
|
||||
onClick={() =>
|
||||
sortDataBy(
|
||||
currentView.viewKey ==
|
||||
viewAllKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "pinswg_lpaname"
|
||||
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -995,7 +1154,7 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
className={
|
||||
orderByState ==
|
||||
(currentView.viewKey ==
|
||||
(viewAllKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "pinswg_lpaname"
|
||||
: "_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue")
|
||||
@@ -1011,7 +1170,7 @@ const ViewAllResults = (props) => {
|
||||
</button>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
{currentView.viewKey !=
|
||||
{viewAllKey !=
|
||||
"awaitingSubmissionDetails" ? (
|
||||
<button
|
||||
type="button"
|
||||
@@ -1022,7 +1181,7 @@ const ViewAllResults = (props) => {
|
||||
}
|
||||
className={
|
||||
orderByState ==
|
||||
(currentView.viewKey ==
|
||||
(viewAllKey ==
|
||||
"awaitingSubmissionDetails"
|
||||
? "pinswg_lpaname"
|
||||
: "pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue")
|
||||
@@ -1043,8 +1202,7 @@ const ViewAllResults = (props) => {
|
||||
)}{" "}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16">
|
||||
{currentView.viewKey ==
|
||||
"myRepresentations" ? (
|
||||
{viewAllKey == "myRepresentations" ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() =>
|
||||
|
||||
@@ -40,11 +40,12 @@ const WatchedCases = (props) => {
|
||||
<div className="cardVieAll">
|
||||
<Link
|
||||
href={
|
||||
router.locale != "en"
|
||||
(router.locale != "en"
|
||||
? "/" +
|
||||
router.locale +
|
||||
"/fymhorth/gweldpopeth"
|
||||
: "/myportal/viewall"
|
||||
: "/myportal/viewall") +
|
||||
"?viewKey=watchedCases"
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
|
||||
@@ -317,11 +317,11 @@ let BuildCheckRow = (props) => {
|
||||
datafieldname[0].value
|
||||
].map((tenant, index) => {
|
||||
console.log(
|
||||
typeof tenant.pinswg_owners
|
||||
typeof tenant.pinswg_owners_firstname
|
||||
);
|
||||
return typeof tenant.pinswg_owners !=
|
||||
return typeof tenant.pinswg_owners_firstname !=
|
||||
"undefined" ||
|
||||
typeof tenant.pinswg_agriculturaltenantname !=
|
||||
typeof tenant.pinswg_agriculturaltenantname_firstname !=
|
||||
"undefined" ? (
|
||||
<div
|
||||
key={index}
|
||||
@@ -330,8 +330,15 @@ let BuildCheckRow = (props) => {
|
||||
}}
|
||||
>
|
||||
<div className="govuk-!-width-one-half">
|
||||
{tenant.pinswg_agriculturaltenantname ||
|
||||
tenant.pinswg_owners}
|
||||
{tenant?.pinswg_agriculturaltenantname_firstname &&
|
||||
tenant.pinswg_agriculturaltenantname_firstname +
|
||||
" " +
|
||||
tenant.pinswg_agriculturaltenantname_lastname}
|
||||
|
||||
{tenant?.pinswg_owners_firstname &&
|
||||
tenant.pinswg_owners_firstname +
|
||||
" " +
|
||||
tenant.pinswg_owners_lastname}
|
||||
</div>
|
||||
<div className="govuk-!-width-one-half">
|
||||
Served:{" "}
|
||||
|
||||
+216
-235
@@ -17,246 +17,227 @@ import {
|
||||
} from "../elements";
|
||||
|
||||
export default function BuildField(props) {
|
||||
let { t } = useTranslation();
|
||||
const { t } = useTranslation();
|
||||
const { locale } = useRouter();
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
const { fieldType, label, datafieldname, mandatoryFieldData } = props;
|
||||
const parser = new DOMParser();
|
||||
// Destructure frequently used props for clarity
|
||||
const {
|
||||
fieldType,
|
||||
label,
|
||||
datafieldname,
|
||||
picklistData,
|
||||
validation,
|
||||
hint,
|
||||
maxFieldLength,
|
||||
dateStart,
|
||||
dateEnd,
|
||||
documentTypeCode,
|
||||
uploadCount,
|
||||
setUploadCount,
|
||||
setFileCount,
|
||||
parentField,
|
||||
parentFieldShowOnValue,
|
||||
requiredDocumentValue,
|
||||
requiredDocumentLabel,
|
||||
setDocumentsList,
|
||||
documentList,
|
||||
maxSubField,
|
||||
datafieldcontent,
|
||||
} = props;
|
||||
|
||||
const whichFieldType = (classid) => {
|
||||
//console.log(props.datafieldname, classid);
|
||||
// Extract deeply nested props for convenience (avoid props.props.props all over)
|
||||
// Defensive checks in case nested props don't exist
|
||||
const appealType = props?.props?.props?.appealType || {};
|
||||
const form = props?.props?.props?.form || {};
|
||||
const formProps = props?.props?.props?.props?.form || {};
|
||||
const setFilesForAppeal = props?.props?.props?.setFilesForAppeal;
|
||||
const accountDetails = props?.props?.props?.props?.accountDetails || {};
|
||||
const ticketnumber = appealType.caseReference?.ticketnumber || "";
|
||||
const fileList = appealType.fileList || {};
|
||||
const containerID = accountDetails.containerID || "";
|
||||
|
||||
switch (classid) {
|
||||
case "{270BD3DB-D9AF-4782-9025-509E298DEC0A}":
|
||||
return (
|
||||
<ReadOnlyfield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
value={
|
||||
props.props.props.appealType.caseReference
|
||||
.ticketnumber
|
||||
}
|
||||
props={props}
|
||||
ticketnumber={
|
||||
props.props.props.appealType.caseReference
|
||||
.ticketnumber
|
||||
}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}":
|
||||
return (
|
||||
<PickList
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
datafieldname={props.datafieldname}
|
||||
picklistData={props.picklistData}
|
||||
validation={props.validation}
|
||||
hint={props.hint}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
||||
return (
|
||||
<YesNofield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
requiredDocumentValue={props.requiredDocumentValue}
|
||||
requiredDocumentLabel={props.requiredDocumentLabel}
|
||||
validation={props.validation}
|
||||
setDocumentsList={props.setDocumentsList}
|
||||
documentList={props.documentList}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}":
|
||||
return (
|
||||
<Radiofield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
datafieldname={props.datafieldname}
|
||||
options={props.datafieldcontent}
|
||||
inline={false}
|
||||
hint={props.hint}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
validation={props.validation}
|
||||
setDocumentsList={props.setDocumentsList}
|
||||
documentList={props.documentList}
|
||||
requiredDocumentValue={props.requiredDocumentValue}
|
||||
requiredDocumentLabel={props.requiredDocumentLabel}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{4273EDBD-AC1D-40d3-9FB2-095C621B552D}":
|
||||
const required = (value) =>
|
||||
value ? undefined : t("newappeal:is-required-label");
|
||||
|
||||
return (
|
||||
<Textfield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
props={props}
|
||||
ticketnumber={
|
||||
props.props.props.appealType.caseReference
|
||||
.ticketnumber
|
||||
}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
validation={props.validation}
|
||||
hint={props.hint}
|
||||
maxFieldLength={props.maxFieldLength}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}":
|
||||
return (
|
||||
<DateFieldPicker
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
validation={props.validation}
|
||||
dateStart={props.dateStart}
|
||||
dateEnd={props.dateEnd}
|
||||
hint={props.hint}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{E0DECE4B-6FC8-4a8f-A065-082708572369}":
|
||||
return (
|
||||
<MultiLinefield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
validation={props.validation}
|
||||
maxFieldLength={props.maxFieldLength}
|
||||
hint={props.hint}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{E0DECE4B-6666-4a8f-A065-082708572369}":
|
||||
return (
|
||||
<RichMultiLinefield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
validation={props.validation}
|
||||
maxFieldLength={props.maxFieldLength}
|
||||
hint={props.hint}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{C6D124CA-7EDA-4a60-AEA9-7FB8D318B68F}":
|
||||
return (
|
||||
<NumericField
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
validation={props.validation}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
maxFieldLength={props.maxFieldLength}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{C3EFE0C3-0EC6-42be-8349-CBD9079DFD8E}":
|
||||
return (
|
||||
<DecimalField
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
validation={props.validation}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
maxFieldLength={props.maxFieldLength}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "{16D63FD6-119B-4353-BDCA-18358721C3FE}":
|
||||
return (
|
||||
<div className="govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
ticketnumber={
|
||||
props.props.props.props.appealType.caseReference
|
||||
.ticketnumber
|
||||
}
|
||||
documentTypeCode={props.documentTypeCode}
|
||||
hint={props.hint}
|
||||
fileList={
|
||||
props.props.props.props.appealType.fileList
|
||||
}
|
||||
setFilesForAppeal={
|
||||
props.props.props.setFilesForAppeal
|
||||
}
|
||||
containerID={
|
||||
props.props.props.props.accountDetails
|
||||
.containerID
|
||||
}
|
||||
uploadCount={props.uploadCount}
|
||||
setFileCount={props.props.setFileCount}
|
||||
setUploadCount={props.setUploadCount}
|
||||
props={props.props.props.props}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
break;
|
||||
|
||||
case "{0273EDBD-AC1D-40d3-9FB2-095C621B552D}":
|
||||
return (
|
||||
<FieldArrayForm
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
maxSubField={props.maxSubField}
|
||||
/>
|
||||
);
|
||||
case "{9EF39988-22BB-4f0b-BBBE-64B5A3748AEE}":
|
||||
return (
|
||||
<CheckBoxfield
|
||||
name={props.datafieldname}
|
||||
label={props.label}
|
||||
props={props}
|
||||
form={props.props.props.form}
|
||||
formProps={props.props.props.props.form}
|
||||
parentField={props.parentField}
|
||||
parentFieldShowOnValue={props.parentFieldShowOnValue}
|
||||
validation={props.validation}
|
||||
/>
|
||||
);
|
||||
break;
|
||||
default:
|
||||
return (
|
||||
<Textfield name={props.datafieldname} label={props.label} />
|
||||
);
|
||||
}
|
||||
// Mapping fieldType to components
|
||||
const fieldTypeMap = {
|
||||
"{270BD3DB-D9AF-4782-9025-509E298DEC0A}": (
|
||||
<ReadOnlyfield
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
value={ticketnumber}
|
||||
props={props}
|
||||
ticketnumber={ticketnumber}
|
||||
/>
|
||||
),
|
||||
"{3EF39988-22BB-4f0b-BBBE-64B5A3748AEE}": (
|
||||
<PickList
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
datafieldname={datafieldname}
|
||||
picklistData={picklistData}
|
||||
validation={validation}
|
||||
hint={hint}
|
||||
/>
|
||||
),
|
||||
"{67FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}": (
|
||||
<YesNofield
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
requiredDocumentValue={requiredDocumentValue}
|
||||
requiredDocumentLabel={requiredDocumentLabel}
|
||||
validation={validation}
|
||||
setDocumentsList={setDocumentsList}
|
||||
documentList={documentList}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
/>
|
||||
),
|
||||
"{07FAC785-CD58-4f9f-ABB3-4B7DDC6ED5ED}": (
|
||||
<Radiofield
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
datafieldname={datafieldname}
|
||||
options={datafieldcontent}
|
||||
inline={false}
|
||||
hint={hint}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
validation={validation}
|
||||
setDocumentsList={setDocumentsList}
|
||||
documentList={documentList}
|
||||
requiredDocumentValue={requiredDocumentValue}
|
||||
requiredDocumentLabel={requiredDocumentLabel}
|
||||
/>
|
||||
),
|
||||
"{4273EDBD-AC1D-40d3-9FB2-095C621B552D}": (
|
||||
<Textfield
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
props={props}
|
||||
ticketnumber={ticketnumber}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
validation={validation}
|
||||
hint={hint}
|
||||
maxFieldLength={maxFieldLength}
|
||||
/>
|
||||
),
|
||||
"{5B773807-9FB2-42db-97C3-7A91EFF8ADFF}": (
|
||||
<DateFieldPicker
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
validation={validation}
|
||||
dateStart={dateStart}
|
||||
dateEnd={dateEnd}
|
||||
hint={hint}
|
||||
/>
|
||||
),
|
||||
"{E0DECE4B-6FC8-4a8f-A065-082708572369}": (
|
||||
<MultiLinefield
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
validation={validation}
|
||||
maxFieldLength={maxFieldLength}
|
||||
hint={hint}
|
||||
/>
|
||||
),
|
||||
"{E0DECE4B-6666-4a8f-A065-082708572369}": (
|
||||
<RichMultiLinefield
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
validation={validation}
|
||||
maxFieldLength={maxFieldLength}
|
||||
hint={hint}
|
||||
/>
|
||||
),
|
||||
"{C6D124CA-7EDA-4a60-AEA9-7FB8D318B68F}": (
|
||||
<NumericField
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
validation={validation}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
maxFieldLength={maxFieldLength}
|
||||
/>
|
||||
),
|
||||
"{C3EFE0C3-0EC6-42be-8349-CBD9079DFD8E}": (
|
||||
<DecimalField
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
validation={validation}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
maxFieldLength={maxFieldLength}
|
||||
/>
|
||||
),
|
||||
"{16D63FD6-119B-4353-BDCA-18358721C3FE}": (
|
||||
<div className="govuk-!-margin-bottom-9">
|
||||
<FileUploadField
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
ticketnumber={ticketnumber}
|
||||
documentTypeCode={documentTypeCode}
|
||||
hint={hint}
|
||||
fileList={fileList}
|
||||
setFilesForAppeal={setFilesForAppeal}
|
||||
containerID={containerID}
|
||||
uploadCount={uploadCount}
|
||||
setFileCount={setFileCount}
|
||||
setUploadCount={setUploadCount}
|
||||
props={props?.props?.props}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
"{0273EDBD-AC1D-40d3-9FB2-095C621B552D}": (
|
||||
<FieldArrayForm
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
maxSubField={maxSubField}
|
||||
/>
|
||||
),
|
||||
"{9EF39988-22BB-4f0b-BBBE-64B5A3748AEE}": (
|
||||
<CheckBoxfield
|
||||
name={datafieldname}
|
||||
label={label}
|
||||
props={props}
|
||||
form={form}
|
||||
formProps={formProps}
|
||||
parentField={parentField}
|
||||
parentFieldShowOnValue={parentFieldShowOnValue}
|
||||
validation={validation}
|
||||
/>
|
||||
),
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="govuk-grid-row">{whichFieldType(props.fieldType)}</div>
|
||||
<div className="govuk-grid-row">
|
||||
{fieldTypeMap[fieldType] || (
|
||||
<Textfield name={datafieldname} label={label} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,31 +4,65 @@ import { connect } from "react-redux";
|
||||
import { setCurrentSection } from "../../store/appealType/action";
|
||||
import { FieldsTranslations } from "../elements";
|
||||
|
||||
const BuildProgress = (props) => {
|
||||
let { t } = useTranslation();
|
||||
const BuildProgress = ({
|
||||
progObj,
|
||||
titleList,
|
||||
currentSection,
|
||||
documentListObj,
|
||||
formObjXML,
|
||||
mandatoryFieldsData,
|
||||
gotoSection,
|
||||
setCurrentSection,
|
||||
props: outerProps,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
const { locale } = router;
|
||||
|
||||
const {
|
||||
progObj,
|
||||
titleList,
|
||||
currentSection,
|
||||
documentListObj,
|
||||
formObjXML,
|
||||
mandatoryFieldsData,
|
||||
gotoSection,
|
||||
setCurrentSection,
|
||||
} = props;
|
||||
const parser = new DOMParser();
|
||||
// Helper to safely access nested form values
|
||||
const getFormValue = (field) =>
|
||||
outerProps?.props?.form?.appealForm?.values?.[field];
|
||||
|
||||
//const progObj = getProgressObj(
|
||||
// formObjXML,
|
||||
// titleList,
|
||||
// mandatoryFieldsData,
|
||||
// props
|
||||
// );
|
||||
const renderDocumentList = () => {
|
||||
const formValues = outerProps?.props?.form?.appealForm?.values || {};
|
||||
|
||||
//console.log(progObj);
|
||||
return (
|
||||
<>
|
||||
<li>{t("newappeal:application-form")}</li>
|
||||
|
||||
{formValues.pinswg_developmentdescriptionchanged === "true" && (
|
||||
<li>Description of development change confirmation</li>
|
||||
)}
|
||||
|
||||
{formValues.pinswg_caseworkreason === "846040005" && (
|
||||
<li>{t("newappeal:registration-of-application-letter")}</li>
|
||||
)}
|
||||
|
||||
{formValues.pinswg_caseworkreason === "846040000" && (
|
||||
<li>Decision notice</li>
|
||||
)}
|
||||
|
||||
{formValues.pinswg_attachsoc === "true" && (
|
||||
<li>{t("newappeal:statement-of-case")}</li>
|
||||
)}
|
||||
|
||||
{formValues.pinswg_attachcostapplication === "true" && (
|
||||
<li>{t("newappeal:cost-application")}</li>
|
||||
)}
|
||||
|
||||
{formValues.pinswg_s106unilateralsubmitted === "true" && (
|
||||
<li>Planning obligation (S106/Unilateral)</li>
|
||||
)}
|
||||
|
||||
{/* Additional document list items from documentListObj if needed */}
|
||||
{/* {Object.entries(documentListObj).map(([key, value]) => (
|
||||
<li key={key}>{value}</li>
|
||||
))} */}
|
||||
|
||||
<li>{t("newappeal:site-location-plan")}</li>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -40,16 +74,17 @@ const BuildProgress = (props) => {
|
||||
<h2 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey progress-heading">
|
||||
{t("newappeal:new-appeal-progress-nav-label")}:{" "}
|
||||
<span className="progress-case-reference">
|
||||
{props.props.appealType.caseReference.ticketnumber}
|
||||
{
|
||||
outerProps?.props?.appealType?.caseReference
|
||||
?.ticketnumber
|
||||
}
|
||||
</span>
|
||||
</h2>
|
||||
|
||||
{/* <hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" /> */}
|
||||
|
||||
<div
|
||||
id="step-by-step-navigation"
|
||||
data-module="gemstepnav"
|
||||
className="app-step-nav app-step-nav--active"
|
||||
className="app-step-nav app-step-nav--active"
|
||||
data-id="e01e924b-9c7c-4c71-8241-66a575c2f61f"
|
||||
data-show-text="show"
|
||||
data-hide-text="hide"
|
||||
@@ -57,290 +92,105 @@ const BuildProgress = (props) => {
|
||||
data-hide-all-text="Hide all"
|
||||
>
|
||||
<ol className="app-step-nav__steps">
|
||||
{Object.keys(progObj).map((key, index) => (
|
||||
<li
|
||||
key={key}
|
||||
className={
|
||||
"app-step-nav__step js-step app-step-nav__step--active" +
|
||||
(progObj[index].allFieldsComplete
|
||||
? " sectionComplete"
|
||||
: " sectionIncomplete")
|
||||
}
|
||||
aria-current="step"
|
||||
data-show=""
|
||||
id={FieldsTranslations(progObj[index].title)
|
||||
.toString()
|
||||
.replace(/\s+/g, "-")
|
||||
.toLowerCase()}
|
||||
>
|
||||
<div
|
||||
className="app-step-nav__header js-toggle-panel "
|
||||
data-position={index}
|
||||
{Object.keys(progObj).map((key, index) => {
|
||||
const step = progObj[index];
|
||||
const stepId = FieldsTranslations(step.title)
|
||||
.toString()
|
||||
.replace(/\s+/g, "-")
|
||||
.toLowerCase();
|
||||
|
||||
return (
|
||||
<li
|
||||
key={key}
|
||||
className={`app-step-nav__step js-step app-step-nav__step--active ${
|
||||
step.allFieldsComplete
|
||||
? "sectionComplete"
|
||||
: "sectionIncomplete"
|
||||
}`}
|
||||
aria-current="step"
|
||||
data-show=""
|
||||
id={stepId}
|
||||
>
|
||||
<h3 className="app-step-nav__title ">
|
||||
<span className="app-step-nav__circle app-step-nav__circle--number">
|
||||
<span className="app-step-nav__circle-inner">
|
||||
<span className="app-step-nav__circle-background">
|
||||
<span className="app-step-nav__circle-step-label govuk-visually-hidden">
|
||||
Step
|
||||
</span>{" "}
|
||||
{index + 1}
|
||||
<span
|
||||
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||
aria-hidden="true"
|
||||
>
|
||||
:
|
||||
<div
|
||||
className="app-step-nav__header js-toggle-panel"
|
||||
data-position={index}
|
||||
>
|
||||
<h3 className="app-step-nav__title">
|
||||
<span className="app-step-nav__circle app-step-nav__circle--number">
|
||||
<span className="app-step-nav__circle-inner">
|
||||
<span className="app-step-nav__circle-background">
|
||||
<span className="app-step-nav__circle-step-label govuk-visually-hidden">
|
||||
Step
|
||||
</span>{" "}
|
||||
{index + 1}
|
||||
<span
|
||||
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||
aria-hidden="true"
|
||||
>
|
||||
:
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span className="js-step-title">
|
||||
<a
|
||||
href="#"
|
||||
onClick={() => {
|
||||
gotoSection(
|
||||
parseInt(key) + 1
|
||||
);
|
||||
}}
|
||||
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||
aria-expanded="false"
|
||||
aria-controls={
|
||||
"step-panel-" +
|
||||
FieldsTranslations(
|
||||
progObj[index].title
|
||||
)
|
||||
.toString()
|
||||
.replace(/\s+/g, "-")
|
||||
.toLowerCase()
|
||||
}
|
||||
>
|
||||
<span className="js-step-title-text govuk-!-font-size-16">
|
||||
{FieldsTranslations(
|
||||
progObj[index].title
|
||||
)}{" "}
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
{/* <li
|
||||
className={
|
||||
"app-step-nav__step js-step app-step-nav__step--active"
|
||||
}
|
||||
>
|
||||
<div
|
||||
className="app-step-nav__header js-toggle-panel "
|
||||
data-position={10}
|
||||
>
|
||||
<h3 className="app-step-nav__title ">
|
||||
<span className="app-step-nav__circle app-step-nav__circle--number">
|
||||
<span className="app-step-nav__circle-inner">
|
||||
<span className="app-step-nav__circle-background">
|
||||
<span className="app-step-nav__circle-step-label govuk-visually-hidden">
|
||||
Step
|
||||
</span>{" "}
|
||||
{progObj.length + 1}
|
||||
<span
|
||||
className="app-step-nav__circle-step-colon govuk-visually-hidden"
|
||||
aria-hidden="true"
|
||||
<span className="js-step-title">
|
||||
<a
|
||||
href="#"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
gotoSection(
|
||||
parseInt(key, 10) +
|
||||
1
|
||||
);
|
||||
}}
|
||||
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||
aria-expanded="false"
|
||||
aria-controls={`step-panel-${stepId}`}
|
||||
>
|
||||
:
|
||||
</span>
|
||||
<span className="js-step-title-text govuk-!-font-size-16">
|
||||
{FieldsTranslations(
|
||||
step.title
|
||||
)}{" "}
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<span className="js-step-title">
|
||||
<a
|
||||
href="#"
|
||||
onClick={() => {
|
||||
gotoSection(progObj.length + 1);
|
||||
}}
|
||||
className="app-step-nav__button app-step-nav__button--title js-step-title-button"
|
||||
aria-expanded="false"
|
||||
aria-controls={
|
||||
"step-panel-confirmation"
|
||||
}
|
||||
>
|
||||
<span className="js-step-title-text govuk-!-font-size-16">
|
||||
Confirmation
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
</li> */}
|
||||
</h3>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ol>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div>
|
||||
<section>
|
||||
<h3 className="govuk-heading-s govuk-!-font-weight-bold gov-font-dark-grey">
|
||||
{t("newappeal:new-appeal-documentlist-nav")}:
|
||||
</h3>
|
||||
<hr className="govuk-section-break govuk-section-break--m govuk-section-break--visible" />
|
||||
<ol className="govuk-list document-list">
|
||||
<ul className="govuk-list ">
|
||||
<li className="at-nav__page">
|
||||
<ol className="govuk-list govuk-list--bullet">
|
||||
<li>{t("newappeal:application-form")}</li>
|
||||
|
||||
{props.props.props.form.hasOwnProperty(
|
||||
"appealForm"
|
||||
) &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].hasOwnProperty("values") &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].values.hasOwnProperty(
|
||||
"pinswg_developmentdescriptionchanged"
|
||||
)
|
||||
? props.props.props.form["appealForm"]
|
||||
.values
|
||||
.pinswg_developmentdescriptionchanged ==
|
||||
"true" && (
|
||||
<li>
|
||||
Description of development change
|
||||
confirmation
|
||||
</li>
|
||||
)
|
||||
: ""}
|
||||
|
||||
{props.props.props.form.hasOwnProperty(
|
||||
"appealForm"
|
||||
) &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].hasOwnProperty("values") &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].values.hasOwnProperty("pinswg_caseworkreason")
|
||||
? props.props.props.form["appealForm"]
|
||||
.values.pinswg_caseworkreason ==
|
||||
"846040005" && (
|
||||
<li>
|
||||
{t(
|
||||
"newappeal:registration-of-application-letter"
|
||||
)}
|
||||
</li>
|
||||
)
|
||||
: ""}
|
||||
|
||||
{props.props.props.form.hasOwnProperty(
|
||||
"appealForm"
|
||||
) &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].hasOwnProperty("values") &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].values.hasOwnProperty("pinswg_caseworkreason")
|
||||
? props.props.props.form["appealForm"]
|
||||
.values.pinswg_caseworkreason ==
|
||||
"846040000" && (
|
||||
<li>Decision notice</li>
|
||||
)
|
||||
: ""}
|
||||
|
||||
{props.props.props.form.hasOwnProperty(
|
||||
"appealForm"
|
||||
) &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].hasOwnProperty("values") &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].values.hasOwnProperty("pinswg_attachsoc")
|
||||
? props.props.props.form["appealForm"]
|
||||
.values.pinswg_attachsoc ==
|
||||
"true" && (
|
||||
<li>
|
||||
{t("newappeal:statement-of-case")}
|
||||
</li>
|
||||
)
|
||||
: ""}
|
||||
|
||||
{props.props.props.form.hasOwnProperty(
|
||||
"appealForm"
|
||||
) &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].hasOwnProperty("values") &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].values.hasOwnProperty(
|
||||
"pinswg_attachcostapplication"
|
||||
)
|
||||
? props.props.props.form["appealForm"]
|
||||
.values
|
||||
.pinswg_attachcostapplication ==
|
||||
"true" && (
|
||||
<li>
|
||||
{t("newappeal:cost-application")}
|
||||
</li>
|
||||
)
|
||||
: ""}
|
||||
|
||||
{props.props.props.form.hasOwnProperty(
|
||||
"appealForm"
|
||||
) &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].hasOwnProperty("values") &&
|
||||
props.props.props.form[
|
||||
"appealForm"
|
||||
].values.hasOwnProperty(
|
||||
"pinswg_s106unilateralsubmitted"
|
||||
)
|
||||
? props.props.props.form["appealForm"]
|
||||
.values
|
||||
.pinswg_s106unilateralsubmitted ==
|
||||
"true" && (
|
||||
<li>
|
||||
Planning obligation
|
||||
(S106/Unilateral)
|
||||
</li>
|
||||
)
|
||||
: ""}
|
||||
|
||||
{/* {Object.keys(documentListObj).length > 0 &&
|
||||
Object.entries(documentListObj).map(
|
||||
([key, value]) => {
|
||||
return <li key={key}>{value}</li>;
|
||||
}
|
||||
)} */}
|
||||
|
||||
<li>{t("newappeal:site-location-plan")}</li>
|
||||
</ol>
|
||||
</li>
|
||||
</ul>
|
||||
<li className="at-nav__page">
|
||||
<ol className="govuk-list govuk-list--bullet">
|
||||
{renderDocumentList()}
|
||||
</ol>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
initialValues: state.appealType.caseReference.caseDetails,
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
const mapStateToProps = (state) => ({
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
initialValues: state.appealType.caseReference.caseDetails,
|
||||
//form: state.form,
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
gotoSection: (thisSection) => {
|
||||
dispatch(setCurrentSection(thisSection));
|
||||
},
|
||||
};
|
||||
};
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
gotoSection: (thisSection) => dispatch(setCurrentSection(thisSection)),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(BuildProgress);
|
||||
|
||||
@@ -376,25 +376,15 @@ let CreateCase = (props) => {
|
||||
|
||||
const { LPAData, onSubmit, handleSubmit, formData } = props;
|
||||
|
||||
const appealOptionsObj = _.isEmpty(props)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType.appealTypeOptions)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType.appealTypeOptions.value)
|
||||
? [{}]
|
||||
: props.appealType.appealTypeOptions.value;
|
||||
const appealOptionsObj =
|
||||
props?.appealType?.appealTypeOptions?.value?.length > 0
|
||||
? props.appealType.appealTypeOptions.value
|
||||
: [{}];
|
||||
|
||||
let lpaOptionsObj = _.isEmpty(props)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: props.LPAData.LPAData.value;
|
||||
const lpaOptionsObj =
|
||||
props?.LPAData?.LPAData?.value?.length > 0
|
||||
? props.LPAData.LPAData.value
|
||||
: [{}];
|
||||
|
||||
const required = (value) => (value ? undefined : "Required");
|
||||
|
||||
|
||||
@@ -505,9 +505,9 @@ export const AppealRow_pdf = (props) => {
|
||||
.value
|
||||
].map(
|
||||
(tenant, index) => {
|
||||
return typeof tenant.pinswg_owners !=
|
||||
return typeof tenant.pinswg_owners_firstname !=
|
||||
"undefined" ||
|
||||
typeof tenant.pinswg_agriculturaltenantname !=
|
||||
typeof tenant.pinswg_agriculturaltenantname_firstname !=
|
||||
"undefined" ? (
|
||||
<View
|
||||
key={
|
||||
@@ -526,8 +526,22 @@ export const AppealRow_pdf = (props) => {
|
||||
"20",
|
||||
}}
|
||||
>
|
||||
{tenant.pinswg_agriculturaltenantname ||
|
||||
tenant.pinswg_owners}
|
||||
{tenant?.pinswg_agriculturaltenantname_firstname &&
|
||||
tenant.pinswg_agriculturaltenantname_firstname +
|
||||
" " +
|
||||
tenant.pinswg_agriculturaltenantname_lastname}
|
||||
|
||||
{tenant?.pinswg_owners_firstname &&
|
||||
tenant.pinswg_owners_firstname +
|
||||
" " +
|
||||
tenant.pinswg_owners_lastname}
|
||||
{
|
||||
" "
|
||||
}
|
||||
{tenant?.pinswg_owners_email &&
|
||||
tenant.pinswg_owners_email}
|
||||
{tenant?.pinswg_agriculturaltenantname_email &&
|
||||
tenant.pinswg_agriculturaltenantname_email}
|
||||
</Text>
|
||||
|
||||
<Text
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function Search(props) {
|
||||
id="main-content"
|
||||
role="main"
|
||||
>
|
||||
<AdvancedSearch myportal={props.myportal || false} />
|
||||
<AdvancedSearch props={props} myportal={props.myportal || false} />
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -94,6 +94,36 @@ const SearchResults = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
const selectEmailNotifications = (
|
||||
emailaddress,
|
||||
loggedInUser,
|
||||
incidentID,
|
||||
appealType
|
||||
) => {
|
||||
let updateBody = {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
"pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")",
|
||||
"pinswg_appealcasetype": +appealType,
|
||||
"pinswg_emailnotifications": true,
|
||||
};
|
||||
|
||||
console.log("Email signed up");
|
||||
createWatchedCases(updateBody)
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
|
||||
(data) => {
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const isWatchedCase = (whichIncident) => {
|
||||
let isWatched = jsonpath({
|
||||
path:
|
||||
@@ -107,6 +137,19 @@ const SearchResults = (props) => {
|
||||
return isWatched;
|
||||
};
|
||||
|
||||
const isEmailSignUp = (whichIncident) => {
|
||||
let isEmail = jsonpath({
|
||||
path:
|
||||
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
|
||||
whichIncident +
|
||||
"' && @.pinswg_emailnotifications==true)]",
|
||||
|
||||
json: watchedCases,
|
||||
eval: true,
|
||||
});
|
||||
return isEmail;
|
||||
};
|
||||
|
||||
const deleteItem = (caseID, topThreeType) => {
|
||||
let cookies = parseCookies();
|
||||
topThreeType == "watchedCases" &&
|
||||
@@ -116,6 +159,27 @@ const SearchResults = (props) => {
|
||||
getWatchedCasesProxy(
|
||||
props.accountDetails.loggedinUserId
|
||||
).then((data) => {
|
||||
let showWatchedCases = (submittedArr) => {
|
||||
const required = submittedArr.value.filter((el) => {
|
||||
return (
|
||||
el.pinswg_representationsubmitted == null
|
||||
);
|
||||
});
|
||||
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
});
|
||||
};
|
||||
|
||||
data = showWatchedCases(data);
|
||||
|
||||
data.value.sort(function compare(a, b) {
|
||||
var dateA = new Date(a.createdon);
|
||||
var dateB = new Date(b.createdon);
|
||||
return dateB - dateA;
|
||||
});
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
@@ -594,6 +658,61 @@ const SearchResults = (props) => {
|
||||
<span className="eye"></span>
|
||||
</button>
|
||||
)}
|
||||
{isEmailSignUp(item.incidentid)
|
||||
.length >
|
||||
0 ==
|
||||
true ? (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink watched_link"
|
||||
title="Unsubscribe to email updates"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-unsubscribe-mail-label"
|
||||
) +
|
||||
item.title +
|
||||
"?"
|
||||
) &&
|
||||
deleteItem(
|
||||
isEmailSignUp(
|
||||
item.incidentid
|
||||
)[0]
|
||||
.pinswg_watchlistid,
|
||||
|
||||
"watchedCases"
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink"
|
||||
title="Email about changes"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-subscribe-mail-label"
|
||||
) +
|
||||
item.title +
|
||||
"?"
|
||||
) &&
|
||||
selectEmailNotifications(
|
||||
props
|
||||
.accountDetails
|
||||
.accountDetails
|
||||
.emailaddress1,
|
||||
props
|
||||
.accountDetails
|
||||
.loggedinUserId,
|
||||
item.incidentid,
|
||||
item.pinswg_appealcasetype
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
)}
|
||||
</dd>
|
||||
)}
|
||||
|
||||
@@ -639,6 +758,34 @@ const SearchResults = (props) => {
|
||||
>
|
||||
<span className="eye"></span>
|
||||
</button>
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink"
|
||||
title={t(
|
||||
"common:subscribe-title-label"
|
||||
)}
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-subscribe-mail-label"
|
||||
) +
|
||||
item.pinswg_name +
|
||||
"?"
|
||||
) &&
|
||||
signIn(undefined, {
|
||||
callbackUrl:
|
||||
"/myportal/addresssearchresults?" +
|
||||
new URLSearchParams(
|
||||
searchString
|
||||
) +
|
||||
"&toWatch=" +
|
||||
item.incidentid +
|
||||
"_" +
|
||||
item.pinswg_appealcasetype,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
</dd>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -166,25 +166,20 @@ let AdvancedSearch = (props) => {
|
||||
submitting,
|
||||
} = props;
|
||||
|
||||
const appealOptionsObj = _.isEmpty(props)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType.appealTypeOptions)
|
||||
? [{}]
|
||||
: _.isEmpty(props.appealType.appealTypeOptions.value)
|
||||
? [{}]
|
||||
: props.appealType.appealTypeOptions.value;
|
||||
const appealOptionsObj =
|
||||
props?.appealType?.appealTypeOptions?.value?.length > 0
|
||||
? props.appealType.appealTypeOptions.value
|
||||
: [{}];
|
||||
|
||||
let lpaOptionsObj = _.isEmpty(props)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: _.isEmpty(props.LPAData.LPAData)
|
||||
? [{}]
|
||||
: props.LPAData.LPAData.value;
|
||||
const projecttypeOptionsObj =
|
||||
props?.appealType?.projectTypeOptions?.value?.length > 0
|
||||
? props.appealType.projectTypeOptions.value
|
||||
: [{}];
|
||||
|
||||
const lpaOptionsObj =
|
||||
props?.LPAData?.LPAData?.value?.length > 0
|
||||
? props.LPAData.LPAData.value
|
||||
: [{}];
|
||||
|
||||
const RenderLPAList = ({
|
||||
name,
|
||||
@@ -368,9 +363,117 @@ let AdvancedSearch = (props) => {
|
||||
</>
|
||||
);
|
||||
};
|
||||
const RenderProjectTypeList = ({
|
||||
name,
|
||||
id,
|
||||
input,
|
||||
optionsObj,
|
||||
meta: { touched, error },
|
||||
label,
|
||||
errormsg,
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={
|
||||
touched && error
|
||||
? "govuk-form-group govuk-form-group--error"
|
||||
: "govuk-form-group "
|
||||
}
|
||||
>
|
||||
<label className="govuk-label" htmlFor={id}>
|
||||
{label}
|
||||
{name}
|
||||
</label>
|
||||
{touched && error && (
|
||||
<span
|
||||
id={name + "-error"}
|
||||
className="govuk-error-message"
|
||||
>
|
||||
<span className="govuk-visually-hidden">
|
||||
Error:
|
||||
</span>{" "}
|
||||
{errormsg}
|
||||
</span>
|
||||
)}
|
||||
<div>
|
||||
<select
|
||||
{...input}
|
||||
className="govuk-select"
|
||||
id={id}
|
||||
name={name}
|
||||
//onChange={(e) => props.onChangeSelectAppealType(e)}
|
||||
>
|
||||
<option value="" disabled defaultValue>
|
||||
{t("common:drop-down-select")}
|
||||
</option>
|
||||
{_.isEmpty(optionsObj)
|
||||
? ""
|
||||
: Object.keys(optionsObj).map((key, index) => {
|
||||
return (
|
||||
<option
|
||||
key={key}
|
||||
value={
|
||||
_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
)
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.pinswg_sipsprojecttypeid
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key]
|
||||
.pinswg_sipsprojecttypeid +
|
||||
"," +
|
||||
optionsObj[
|
||||
key
|
||||
].pinswg_name
|
||||
.replace(
|
||||
/(\band|[\s\-\+\(\)\,\&])/g,
|
||||
""
|
||||
)
|
||||
.toLowerCase()
|
||||
}
|
||||
>
|
||||
{_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.pinswg_name
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
optionsObj[key]
|
||||
.pinswg_name +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: optionsObj[key]
|
||||
.pinswg_name ||
|
||||
t(
|
||||
"case:summary-no-date-entered-label"
|
||||
)}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
//const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||
|
||||
const selectAppealTypesValue = props.formValues?.appealTypes || "";
|
||||
|
||||
// let spinnerState = () => {
|
||||
// showSpinnerState == true
|
||||
// ? setShowSpinnerState(false)
|
||||
@@ -396,7 +499,12 @@ let AdvancedSearch = (props) => {
|
||||
|
||||
searchString +=
|
||||
values.statusCode != null
|
||||
? "statuscode=" + values.statusCode + "&"
|
||||
? "statuscode=" + values.projecttype + "&"
|
||||
: "";
|
||||
|
||||
searchString +=
|
||||
values.projecttype != null
|
||||
? "projecttype=" + values.projecttype.split(",")[0] + "&"
|
||||
: "";
|
||||
|
||||
searchString = "?" + searchString.slice(0, -1);
|
||||
@@ -463,6 +571,26 @@ let AdvancedSearch = (props) => {
|
||||
label={t("search:appealtype-label")}
|
||||
errormsg="Appeal type is required"
|
||||
/>
|
||||
|
||||
{props.appealTypesValue?.split(
|
||||
","
|
||||
)[0] === "846040002" && (
|
||||
<Field
|
||||
name="projecttype"
|
||||
id="projecttype"
|
||||
component={
|
||||
RenderProjectTypeList
|
||||
}
|
||||
optionsObj={
|
||||
projecttypeOptionsObj
|
||||
}
|
||||
// validate={[required]}
|
||||
label={t(
|
||||
"search:project-type-label"
|
||||
)}
|
||||
errormsg="Project type is required"
|
||||
/>
|
||||
)}
|
||||
<Field
|
||||
name="lpaTypes"
|
||||
id="lpaTypes"
|
||||
@@ -506,7 +634,7 @@ let AdvancedSearch = (props) => {
|
||||
"statuscode": 5,
|
||||
},
|
||||
{
|
||||
"value": "Canceled",
|
||||
"value": "Cancelled",
|
||||
"value_cy": "Wedi'i ganslo",
|
||||
"statuscode": 6,
|
||||
},
|
||||
@@ -641,6 +769,14 @@ const mapDispatchToProps = (dispatch) => {
|
||||
|
||||
const selector = formValueSelector("advancedSearchForm"); // <-- same as form name
|
||||
|
||||
AdvancedSearch = connect((state) => {
|
||||
const appealTypesValue = selector(state, "appealTypes");
|
||||
|
||||
return {
|
||||
appealTypesValue,
|
||||
};
|
||||
})(AdvancedSearch);
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
|
||||
@@ -8,7 +8,7 @@ import { connect } from "react-redux";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import PaginationControl from "./pagination";
|
||||
|
||||
import { getBasicDNSSearchPaged } from "../../actions";
|
||||
import { getBasicDNSSearchPaged, getDNSCoords } from "../../actions";
|
||||
|
||||
import GoogleMapReact from "google-map-react";
|
||||
import { parseCookies } from "nookies";
|
||||
@@ -42,7 +42,6 @@ const DNSSearchResults = (props) => {
|
||||
setSearchDetails,
|
||||
advancedSearch,
|
||||
setCurrentPage,
|
||||
dnsCoords,
|
||||
myportal,
|
||||
watchedCases,
|
||||
setWatchedCases,
|
||||
@@ -59,82 +58,86 @@ const DNSSearchResults = (props) => {
|
||||
const [searchLoaded, setSearchLoaded] = useState(false);
|
||||
const [showSpinnerState, setShowSpinnerState] = useState(false);
|
||||
|
||||
let dataArray = [];
|
||||
//push your Json Data in the array
|
||||
if (showMap == "true") {
|
||||
dnsCoords.map((item) => {
|
||||
let point = new OSPoint(
|
||||
item.pinswg_anticipatedgridreferencenorthingtext || 0,
|
||||
item.pinswg_anticipatedgridreferenceeastingtext || 0
|
||||
);
|
||||
let siteCoords = point.toOSGB36();
|
||||
//console.log(siteCoords);
|
||||
//console.log(item);
|
||||
dataArray.push({
|
||||
appellant:
|
||||
item[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
],
|
||||
name: item.pinswg_projectname,
|
||||
lat: parseFloat(siteCoords.latitude),
|
||||
lng: parseFloat(siteCoords.longitude),
|
||||
title: item.pinswg_name,
|
||||
});
|
||||
});
|
||||
}
|
||||
// let dataArray = [];
|
||||
// //push your Json Data in the array
|
||||
// if (showMap == "true") {
|
||||
// dnsCoords.map((item) => {
|
||||
// let point = new OSPoint(
|
||||
// item.pinswg_anticipatedgridrefnorthing ||
|
||||
// item.pinswg_anticipatedgridreferencenorthingtext ||
|
||||
// 0,
|
||||
// item.pinswg_anticipatedgridrefeasting ||
|
||||
// item.pinswg_anticipatedgridreferenceeastingtext ||
|
||||
// 0
|
||||
// );
|
||||
// let siteCoords = point.toOSGB36();
|
||||
// //console.log(siteCoords);
|
||||
// //console.log(item);
|
||||
// dataArray.push({
|
||||
// appellant:
|
||||
// item[
|
||||
// "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
// ],
|
||||
// name: item.pinswg_projectname,
|
||||
// lat: parseFloat(siteCoords.latitude),
|
||||
// lng: parseFloat(siteCoords.longitude),
|
||||
// title: item.pinswg_name,
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
//console.log(dataArray);
|
||||
|
||||
const ModelsMap = (map, maps) => {
|
||||
//instantiate array that will hold your Json Data
|
||||
//console.log("here");
|
||||
var prev_infowindow = false;
|
||||
//Loop through the dataArray to create a marker per data using the coordinates in the json
|
||||
console.log(dataArray.length);
|
||||
for (let i = 0; i < dataArray.length; i++) {
|
||||
const infowindow = new google.maps.InfoWindow({
|
||||
content:
|
||||
"<div>" +
|
||||
(_.isEmpty(dataArray[i].name)
|
||||
? ""
|
||||
: dataArray[i].name.indexOf(";") > 0
|
||||
? router.locale == "cy"
|
||||
? dataArray[i].name.split(";")[1]
|
||||
: dataArray[i].name.split(";")[0]
|
||||
: dataArray[i].name) +
|
||||
"</div>" +
|
||||
(dataArray[i].appellant != null
|
||||
? "<div>" + dataArray[i].appellant + "</div>"
|
||||
: "") +
|
||||
"<div>" +
|
||||
dataArray[i].title +
|
||||
"</div>",
|
||||
});
|
||||
let marker = new maps.Marker({
|
||||
position: { lat: dataArray[i].lat, lng: dataArray[i].lng },
|
||||
title: _.isEmpty(dataArray[i].name)
|
||||
? ""
|
||||
: dataArray[i].name.indexOf(";") > 0
|
||||
? router.locale == "cy"
|
||||
? dataArray[i].name.split(";")[1]
|
||||
: dataArray[i].name.split(";")[0]
|
||||
: dataArray[i].name,
|
||||
map,
|
||||
});
|
||||
marker.addListener("click", () => {
|
||||
if (prev_infowindow) {
|
||||
prev_infowindow.close();
|
||||
}
|
||||
// const ModelsMap = (map, maps) => {
|
||||
// //instantiate array that will hold your Json Data
|
||||
// //console.log("here");
|
||||
// var prev_infowindow = false;
|
||||
// //Loop through the dataArray to create a marker per data using the coordinates in the json
|
||||
// console.log(dataArray.length);
|
||||
// for (let i = 0; i < dataArray.length; i++) {
|
||||
// const infowindow = new google.maps.InfoWindow({
|
||||
// content:
|
||||
// "<div>" +
|
||||
// (_.isEmpty(dataArray[i].name)
|
||||
// ? ""
|
||||
// : dataArray[i].name.indexOf(";") > 0
|
||||
// ? router.locale == "cy"
|
||||
// ? dataArray[i].name.split(";")[1]
|
||||
// : dataArray[i].name.split(";")[0]
|
||||
// : dataArray[i].name) +
|
||||
// "</div>" +
|
||||
// (dataArray[i].appellant != null
|
||||
// ? "<div>" + dataArray[i].appellant + "</div>"
|
||||
// : "") +
|
||||
// "<div>" +
|
||||
// dataArray[i].title +
|
||||
// "</div>",
|
||||
// });
|
||||
// let marker = new maps.Marker({
|
||||
// position: { lat: dataArray[i].lat, lng: dataArray[i].lng },
|
||||
// title: _.isEmpty(dataArray[i].name)
|
||||
// ? ""
|
||||
// : dataArray[i].name.indexOf(";") > 0
|
||||
// ? router.locale == "cy"
|
||||
// ? dataArray[i].name.split(";")[1]
|
||||
// : dataArray[i].name.split(";")[0]
|
||||
// : dataArray[i].name,
|
||||
// map,
|
||||
// });
|
||||
// marker.addListener("click", () => {
|
||||
// if (prev_infowindow) {
|
||||
// prev_infowindow.close();
|
||||
// }
|
||||
|
||||
prev_infowindow = infowindow;
|
||||
infowindow.open({
|
||||
anchor: marker,
|
||||
map,
|
||||
shouldFocus: true,
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
// prev_infowindow = infowindow;
|
||||
// infowindow.open({
|
||||
// anchor: marker,
|
||||
// map,
|
||||
// shouldFocus: true,
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// };
|
||||
|
||||
let spinnerState = () => {
|
||||
showSpinnerState == true
|
||||
@@ -167,6 +170,36 @@ const DNSSearchResults = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
const selectEmailNotifications = (
|
||||
emailaddress,
|
||||
loggedInUser,
|
||||
incidentID,
|
||||
appealType
|
||||
) => {
|
||||
let updateBody = {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
"pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")",
|
||||
"pinswg_appealcasetype": +appealType,
|
||||
"pinswg_emailnotifications": true,
|
||||
};
|
||||
|
||||
console.log("Email signed up");
|
||||
createWatchedCases(updateBody)
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
|
||||
(data) => {
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const isWatchedCase = (whichIncident) => {
|
||||
let isWatched = jsonpath({
|
||||
path:
|
||||
@@ -180,6 +213,19 @@ const DNSSearchResults = (props) => {
|
||||
return isWatched;
|
||||
};
|
||||
|
||||
const isEmailSignUp = (whichIncident) => {
|
||||
let isEmail = jsonpath({
|
||||
path:
|
||||
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
|
||||
whichIncident +
|
||||
"' && @.pinswg_emailnotifications==true)]",
|
||||
|
||||
json: watchedCases,
|
||||
eval: true,
|
||||
});
|
||||
return isEmail;
|
||||
};
|
||||
|
||||
const deleteItem = (caseID, topThreeType) => {
|
||||
let cookies = parseCookies();
|
||||
topThreeType == "watchedCases" &&
|
||||
@@ -187,6 +233,27 @@ const DNSSearchResults = (props) => {
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
||||
let showWatchedCases = (submittedArr) => {
|
||||
const required = submittedArr.value.filter((el) => {
|
||||
return (
|
||||
el.pinswg_representationsubmitted == null
|
||||
);
|
||||
});
|
||||
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
});
|
||||
};
|
||||
|
||||
data = showWatchedCases(data);
|
||||
|
||||
data.value.sort(function compare(a, b) {
|
||||
var dateA = new Date(a.createdon);
|
||||
var dateB = new Date(b.createdon);
|
||||
return dateB - dateA;
|
||||
});
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
@@ -197,6 +264,15 @@ const DNSSearchResults = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
function hasValidKey(obj, key) {
|
||||
return (
|
||||
obj.hasOwnProperty(key) &&
|
||||
obj[key] !== null &&
|
||||
obj[key] !== undefined &&
|
||||
obj[key] !== ""
|
||||
);
|
||||
}
|
||||
|
||||
const ResultsView = (resultsArr) => {
|
||||
return (
|
||||
<div className="govuk-grid-row govuk-!-margin-top-9">
|
||||
@@ -277,7 +353,9 @@ const DNSSearchResults = (props) => {
|
||||
</button>
|
||||
</dd>
|
||||
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16 govuk-summary-list__action"></dd>
|
||||
<dd className="govuk-summary-list__key govuk-!-font-size-16 govuk-summary-list__action">
|
||||
Type
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
{showSpinnerState == true ? (
|
||||
@@ -307,6 +385,28 @@ const DNSSearchResults = (props) => {
|
||||
});
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
var appType =
|
||||
router.locale == "cy"
|
||||
? jsonpath(
|
||||
'$..[?(@.value=="' +
|
||||
item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] +
|
||||
'")].value_cy',
|
||||
transLookup
|
||||
)
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A";
|
||||
|
||||
appType =
|
||||
appType ==
|
||||
"Datblygiadau o Arwyddocâd Cenedlaethol" ||
|
||||
appType ==
|
||||
"Developments of National Significance"
|
||||
? "DNS"
|
||||
: "SIP";
|
||||
|
||||
return (
|
||||
<div
|
||||
className="govuk-summary-list__row"
|
||||
@@ -318,7 +418,8 @@ const DNSSearchResults = (props) => {
|
||||
router.locale == "cy"
|
||||
? myportal == true
|
||||
? "/fymhorth/dns"
|
||||
: "/dns"
|
||||
: "/dns/" +
|
||||
item.ticketnumber
|
||||
: myportal == true
|
||||
? "/myportal/dns/" +
|
||||
item.ticketnumber
|
||||
@@ -376,7 +477,26 @@ const DNSSearchResults = (props) => {
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: hasValidKey(
|
||||
item,
|
||||
"pinswg_caseaddress"
|
||||
)
|
||||
? item.pinswg_caseaddress !=
|
||||
null
|
||||
? item.pinswg_caseaddress.indexOf(
|
||||
";"
|
||||
) < 0
|
||||
? item.pinswg_caseaddress
|
||||
: router.locale == "cy"
|
||||
? item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[1]
|
||||
: item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: ""}
|
||||
|
||||
{_.has(
|
||||
detailsObj,
|
||||
"pinswg_siteaddressline1"
|
||||
@@ -480,7 +600,6 @@ const DNSSearchResults = (props) => {
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
|
||||
{router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
@@ -496,13 +615,22 @@ const DNSSearchResults = (props) => {
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
] || "N/A"}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
{t(
|
||||
"search:searchresults-status-label"
|
||||
)}
|
||||
:
|
||||
</span>
|
||||
{appType}
|
||||
</dd>
|
||||
{myportal == true && (
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-14 govuk-summary-list__action">
|
||||
{isWatchedCase(item.incidentid)
|
||||
.length >
|
||||
0 ==
|
||||
true ? (
|
||||
<span
|
||||
<button
|
||||
className="govuk-summary-list__actionLink watched_link"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
@@ -526,9 +654,9 @@ const DNSSearchResults = (props) => {
|
||||
)}
|
||||
>
|
||||
<span className="eye"></span>
|
||||
</span>
|
||||
</button>
|
||||
) : (
|
||||
<span
|
||||
<button
|
||||
className="govuk-summary-list__actionLink watchLink"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
@@ -549,7 +677,61 @@ const DNSSearchResults = (props) => {
|
||||
)}
|
||||
>
|
||||
<span className="eye"></span>
|
||||
</span>
|
||||
</button>
|
||||
)}
|
||||
{isEmailSignUp(item.incidentid)
|
||||
.length >
|
||||
0 ==
|
||||
true ? (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink watched_link"
|
||||
title="Unsubscribe to email updates"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-unsubscribe-mail-label"
|
||||
) +
|
||||
item.title +
|
||||
"?"
|
||||
) &&
|
||||
deleteItem(
|
||||
isEmailSignUp(
|
||||
item.incidentid
|
||||
)[0]
|
||||
.pinswg_watchlistid,
|
||||
|
||||
"watchedCases"
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink"
|
||||
title="Email about changes"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-subscribe-mail-label"
|
||||
) +
|
||||
item.title +
|
||||
"?"
|
||||
) &&
|
||||
selectEmailNotifications(
|
||||
props
|
||||
.accountDetails
|
||||
.emailaddress1,
|
||||
props
|
||||
.accountDetails
|
||||
.loggedinUserId,
|
||||
item.incidentid,
|
||||
item.pinswg_appealcasetype
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
)}
|
||||
</dd>
|
||||
)}
|
||||
@@ -664,33 +846,46 @@ const DNSSearchResults = (props) => {
|
||||
<p className="govuk-body">
|
||||
{t("dnsApplications:page-intro-paragraph-1")}
|
||||
</p>
|
||||
<ul className="govuk-list govuk-list--bullet">
|
||||
<li>
|
||||
{" "}
|
||||
{t("dnsApplications:page-intro-list-item-1")}
|
||||
</li>
|
||||
<p className="govuk-body">
|
||||
{t("dnsApplications:page-intro-list-item-1")}{" "}
|
||||
<a
|
||||
href={t(
|
||||
"dnsApplications:page-intro-list-item-1-link"
|
||||
)}
|
||||
rel="noreferrer noopener"
|
||||
target="_blank"
|
||||
>
|
||||
{t(
|
||||
"dnsApplications:page-intro-list-item-1-link"
|
||||
)}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<li>
|
||||
{" "}
|
||||
{t("dnsApplications:page-intro-list-item-2")}
|
||||
</li>
|
||||
|
||||
<li>
|
||||
{" "}
|
||||
{t("dnsApplications:page-intro-list-item-3")}
|
||||
</li>
|
||||
</ul>
|
||||
<p className="govuk-body">
|
||||
{t("dnsApplications:page-intro-list-item-2")}
|
||||
<a
|
||||
href={t(
|
||||
"dnsApplications:page-intro-list-item-2-link"
|
||||
)}
|
||||
rel="noreferrer noopener"
|
||||
target="_blank"
|
||||
>
|
||||
{t(
|
||||
"dnsApplications:page-intro-list-item-2-link"
|
||||
)}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{showMap == "true" && (
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
style={{
|
||||
height: "45vh",
|
||||
width: "100%",
|
||||
}}
|
||||
// style={{
|
||||
// height: "45vh",
|
||||
// width: "100%",
|
||||
// }}
|
||||
>
|
||||
<GoogleMapReact
|
||||
{/* <GoogleMapReact
|
||||
options={function (maps) {
|
||||
return {
|
||||
overviewMapControl: true,
|
||||
@@ -709,7 +904,18 @@ const DNSSearchResults = (props) => {
|
||||
onGoogleApiLoaded={({ map, maps }) =>
|
||||
ModelsMap(map, maps)
|
||||
}
|
||||
/>
|
||||
/> */}
|
||||
|
||||
<iframe
|
||||
src={
|
||||
"https://datamap.gov.wales/maps/pedw-dev/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/"
|
||||
}
|
||||
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||
width={"100%"}
|
||||
maxheight={"400px"}
|
||||
height={"500px"}
|
||||
className={"mappingFrame"}
|
||||
></iframe>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -780,4 +986,13 @@ const mapDispatchToProps = (dispatch) => {
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(null, mapDispatchToProps)(DNSSearchResults);
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
// currentView: state.currentView,
|
||||
accountDetails: state.accountDetails,
|
||||
// search: state.search,
|
||||
// searchResultsObj: state.searchResultsObj,
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DNSSearchResults);
|
||||
|
||||
@@ -91,15 +91,17 @@ const RepsOnResults = (props) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<br />
|
||||
<br />
|
||||
{(_.has(detailsObj, "pinswg_startdate") ||
|
||||
_.has(detailsObj, "pinswg_applicationacceptedasvalid")) &&
|
||||
_.has(detailsObj, "pinswg_applicationacceptedasvalid") ||
|
||||
_.has(detailsObj, "pinswg_consultationopen")) &&
|
||||
showReps(
|
||||
detailsObj.pinswg_startdate ||
|
||||
detailsObj.pinswg_applicationacceptedasvalid,
|
||||
detailsObj.pinswg_applicationacceptedasvalid ||
|
||||
detailsObj.pinswg_consultationopen,
|
||||
detailsObj.pinswg_finalcommentsduedate ||
|
||||
detailsObj.pinswg_endofrepresentationperiod
|
||||
detailsObj.pinswg_endofrepresentationperiod ||
|
||||
detailsObj.pinswg_consultationclose
|
||||
) && (
|
||||
<>
|
||||
{showRepButton(detailsObj.appealType) ? (
|
||||
@@ -119,9 +121,13 @@ const RepsOnResults = (props) => {
|
||||
)}
|
||||
</Link> */}
|
||||
<div className="govuk-body govuk-!-font-size-14">
|
||||
{t(
|
||||
"case:summary-representation-open-label"
|
||||
)}{" "}
|
||||
{props.appealType == 846040002
|
||||
? t(
|
||||
"case:summary-consultation-open-label"
|
||||
)
|
||||
: t(
|
||||
"case:summary-representation-open-label"
|
||||
)}{" "}
|
||||
</div>
|
||||
</>
|
||||
) : !isLPA &&
|
||||
|
||||
@@ -100,6 +100,36 @@ const SearchResults = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
const selectEmailNotifications = (
|
||||
emailaddress,
|
||||
loggedInUser,
|
||||
incidentID,
|
||||
appealType
|
||||
) => {
|
||||
let updateBody = {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
"pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")",
|
||||
"pinswg_appealcasetype": +appealType,
|
||||
"pinswg_emailnotifications": true,
|
||||
};
|
||||
|
||||
console.log("Email signed up");
|
||||
createWatchedCases(updateBody)
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
|
||||
(data) => {
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
const isWatchedCase = (whichIncident) => {
|
||||
let isWatched = jsonpath({
|
||||
path:
|
||||
@@ -114,6 +144,33 @@ const SearchResults = (props) => {
|
||||
return isWatched;
|
||||
};
|
||||
|
||||
const isEmailSignUp = (whichIncident) => {
|
||||
let isEmail = jsonpath({
|
||||
path:
|
||||
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
|
||||
whichIncident +
|
||||
"' && @.pinswg_emailnotifications==true)]",
|
||||
|
||||
json: watchedCases,
|
||||
eval: true,
|
||||
});
|
||||
return isEmail;
|
||||
};
|
||||
|
||||
const isEmailNotifications = (whichIncident) => {
|
||||
let isWatched = jsonpath({
|
||||
path:
|
||||
"$..value[?(@ && @._pinswg_watchedcase_value=='" +
|
||||
whichIncident +
|
||||
"')]",
|
||||
|
||||
json: watchedCases,
|
||||
eval: true,
|
||||
});
|
||||
|
||||
return isWatched;
|
||||
};
|
||||
|
||||
const deleteItem = (caseID, topThreeType) => {
|
||||
let cookies = parseCookies();
|
||||
topThreeType == "watchedCases" &&
|
||||
@@ -123,6 +180,27 @@ const SearchResults = (props) => {
|
||||
getWatchedCasesProxy(
|
||||
props.accountDetails.loggedinUserId
|
||||
).then((data) => {
|
||||
let showWatchedCases = (submittedArr) => {
|
||||
const required = submittedArr.value.filter((el) => {
|
||||
return (
|
||||
el.pinswg_representationsubmitted == null
|
||||
);
|
||||
});
|
||||
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
});
|
||||
};
|
||||
|
||||
data = showWatchedCases(data);
|
||||
|
||||
data.value.sort(function compare(a, b) {
|
||||
var dateA = new Date(a.createdon);
|
||||
var dateB = new Date(b.createdon);
|
||||
return dateB - dateA;
|
||||
});
|
||||
setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
@@ -133,6 +211,15 @@ const SearchResults = (props) => {
|
||||
});
|
||||
};
|
||||
|
||||
function hasValidKey(obj, key) {
|
||||
return (
|
||||
obj.hasOwnProperty(key) &&
|
||||
obj[key] !== null &&
|
||||
obj[key] !== undefined &&
|
||||
obj[key] !== ""
|
||||
);
|
||||
}
|
||||
|
||||
const ResultsView = (resultsArr) => {
|
||||
return (
|
||||
<>
|
||||
@@ -251,6 +338,8 @@ const SearchResults = (props) => {
|
||||
eval: true,
|
||||
});
|
||||
|
||||
Object.assign(item, item.pinswg_sipscase);
|
||||
|
||||
detailsObj = detailsObj[0] || {};
|
||||
return (
|
||||
<div
|
||||
@@ -315,8 +404,26 @@ const SearchResults = (props) => {
|
||||
</span>
|
||||
{item.title}
|
||||
</Link>
|
||||
|
||||
{item.hasOwnProperty(
|
||||
"pinswg_sipscase"
|
||||
) &&
|
||||
item.hasOwnProperty(
|
||||
"_pinswg_projecttype_value@OData.Community.Display.V1.FormattedValue"
|
||||
) && (
|
||||
<div className="govuk-!-font-size-14">
|
||||
{
|
||||
item[
|
||||
"_pinswg_projecttype_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<RepsOnResults
|
||||
detailsObj={detailsObj}
|
||||
appealType={
|
||||
item.pinswg_appealcasetype
|
||||
}
|
||||
/>
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
@@ -344,6 +451,23 @@ const SearchResults = (props) => {
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: hasValidKey(
|
||||
item,
|
||||
"pinswg_caseaddress"
|
||||
)
|
||||
? item.pinswg_caseaddress != null
|
||||
? item.pinswg_caseaddress.indexOf(
|
||||
";"
|
||||
) < 0
|
||||
? item.pinswg_caseaddress
|
||||
: router.locale == "cy"
|
||||
? item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[1]
|
||||
: item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: ""}
|
||||
{_.has(
|
||||
detailsObj,
|
||||
@@ -554,6 +678,61 @@ const SearchResults = (props) => {
|
||||
<span className="eye"></span>
|
||||
</button>
|
||||
)}
|
||||
{isEmailSignUp(item.incidentid)
|
||||
.length >
|
||||
0 ==
|
||||
true ? (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink watched_link"
|
||||
title="Unsubscribe to email updates"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-unsubscribe-mail-label"
|
||||
) +
|
||||
item.title +
|
||||
"?"
|
||||
) &&
|
||||
deleteItem(
|
||||
isEmailSignUp(
|
||||
item.incidentid
|
||||
)[0]
|
||||
.pinswg_watchlistid,
|
||||
|
||||
"watchedCases"
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink"
|
||||
title="Email about changes"
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-subscribe-mail-label"
|
||||
) +
|
||||
item.title +
|
||||
"?"
|
||||
) &&
|
||||
selectEmailNotifications(
|
||||
props
|
||||
.accountDetails
|
||||
.accountDetails
|
||||
.emailaddress1,
|
||||
props
|
||||
.accountDetails
|
||||
.loggedinUserId,
|
||||
item.incidentid,
|
||||
item.pinswg_appealcasetype
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
)}
|
||||
</dd>
|
||||
)}
|
||||
|
||||
@@ -596,6 +775,34 @@ const SearchResults = (props) => {
|
||||
>
|
||||
<span className="eye"></span>
|
||||
</button>
|
||||
<button
|
||||
className="govuk-summary-list__actionLink mailLink"
|
||||
title={t(
|
||||
"common:subscribe-title-label"
|
||||
)}
|
||||
onClick={() => {
|
||||
confirm(
|
||||
t(
|
||||
"case:summary-subscribe-mail-label"
|
||||
) +
|
||||
item.title +
|
||||
"?"
|
||||
) &&
|
||||
selectEmailNotifications(
|
||||
props
|
||||
.accountDetails
|
||||
.accountDetails
|
||||
.emailaddress1,
|
||||
props
|
||||
.accountDetails
|
||||
.loggedinUserId,
|
||||
item.incidentid,
|
||||
item.pinswg_appealcasetype
|
||||
);
|
||||
}}
|
||||
>
|
||||
<span className="mailicon icon"></span>
|
||||
</button>
|
||||
</dd>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -370,6 +370,16 @@
|
||||
"appealTypeID": "846040012",
|
||||
"NavigationProperty": "pinswg_ElectricityActIds",
|
||||
"value": "Electricity Act"
|
||||
},
|
||||
{
|
||||
"LogicalCollectionName": "pinswg_sipses",
|
||||
"LogicalName": "pinswg_sips",
|
||||
"PrimaryIdAttribute": "pinswg_sipscase",
|
||||
"UrlName": "sips",
|
||||
"MetadataId": "8d31911b-b8ea-ef11-ab08-00224800be9c",
|
||||
"appealTypeID": "846040002",
|
||||
"NavigationProperty": "pinswg_SIPSIds",
|
||||
"value": "SIP"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -66,6 +66,12 @@
|
||||
"stringmapid": "bc56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040011
|
||||
},
|
||||
{
|
||||
"value": "Significant Infrastructure Projects",
|
||||
"value_cy": "Prosiectau Seilwaith Arwyddocaol",
|
||||
"stringmapid": "bc56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040002
|
||||
},
|
||||
{
|
||||
"value": "Electricity Act",
|
||||
"value_cy": "Deddf Trydan",
|
||||
|
||||
@@ -84,6 +84,12 @@
|
||||
"stringmapid": "bc56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040011
|
||||
},
|
||||
{
|
||||
"value": "Significant Infrastructure Projects",
|
||||
"value_cy": "Prosiectau Seilwaith Arwyddocaol",
|
||||
"stringmapid": "bc56f05c-7f90-eb11-aac2-00224800be9c",
|
||||
"attributevalue": 846040002
|
||||
},
|
||||
{
|
||||
"value": "Electricity Act",
|
||||
"value_cy": "Deddf Trydan",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
module.exports = {
|
||||
"locales": ["en", "cy"],
|
||||
"defaultLocale": "en",
|
||||
"localeDetection": false,
|
||||
"domains": [
|
||||
{
|
||||
"domain": process.env.I18N_DOMAIN,
|
||||
@@ -11,6 +12,8 @@ module.exports = {
|
||||
"pages": {
|
||||
"*": ["common", "search"],
|
||||
"/": ["common", "home", "case"],
|
||||
"/contactus": ["newappeal", "account", "common"],
|
||||
"/myportal/contactus": ["newappeal", "account", "common"],
|
||||
"/error": ["common", "home", "myportal"],
|
||||
"/furtherdetails": ["common", "home", "myportal"],
|
||||
"/myportal": ["myportal", "common", "home", "case"],
|
||||
@@ -20,7 +23,12 @@ module.exports = {
|
||||
"/myportal/searchresults": ["search", "myportal", "case"],
|
||||
"/myportal/case": ["case"],
|
||||
"/myportal/case/[ticketnumber]": ["case"],
|
||||
"/myportal/dnsapplications": ["search", "dnsCommon", "dnsApplications"],
|
||||
"/myportal/dnsapplications": [
|
||||
"search",
|
||||
"dnsCommon",
|
||||
"dnsApplications",
|
||||
"case",
|
||||
],
|
||||
"/myportal/dnsdetails": [
|
||||
"case",
|
||||
"search",
|
||||
@@ -59,7 +67,7 @@ module.exports = {
|
||||
"/dns": ["dnsCommon", "dnsHome"],
|
||||
"/dns/applications": ["dnsCommon", "dnsApplications"],
|
||||
"/dns/application-view": ["dnsCommon", "dnsApplicationView"],
|
||||
"/dnsapplications": ["search", "dnsCommon", "dnsApplications"],
|
||||
"/dnsapplications": ["search", "dnsCommon", "dnsApplications", "case"],
|
||||
"/dnsdetails": ["case", "search", "dnsCommon", "dnsApplications"],
|
||||
"/help/cookies": ["common", "cookies"],
|
||||
"/account/register": ["common", "account"],
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"auth-error-Signin-label": "Ceisiwch fewngofnodi gyda chyfrif gwahanol.",
|
||||
"auth-error-OAuthSignin-label": "Ceisiwch fewngofnodi gyda chyfrif gwahanol.",
|
||||
"auth-error-OAuthCallback-label": "Ceisiwch fewngofnodi gyda chyfrif gwahanol.",
|
||||
"auth-error- OAuthCreateAccount-label": "Ceisiwch fewngofnodi gyda chyfrif gwahanol.",
|
||||
"auth-error-OAuthCreateAccount-label": "Ceisiwch fewngofnodi gyda chyfrif gwahanol.",
|
||||
"auth-error-EmailCreateAccount-label": "Ceisiwch fewngofnodi gyda chyfrif gwahanol.",
|
||||
"auth-error-Callback-label": "Ceisiwch fewngofnodi gyda chyfrif gwahanol.",
|
||||
"auth-error-OAuthAccountNotLinked-label": "I gadarnhau pwy ydych, mewngofnodwch gyda'r un cyfrif a ddefnyddioch yn wreiddiol.",
|
||||
|
||||
+35
-1
@@ -1,6 +1,11 @@
|
||||
{
|
||||
"page-title": "Cyfeirnod",
|
||||
"case-card-title": "Cyfeirnod: APP/B1415/W/20/3271702",
|
||||
"summary-tab-details-label": "Manylion",
|
||||
"summary-tab-summary-label": "Crynodeb",
|
||||
"summary-tab-map-label": " Map",
|
||||
"summary-tab-events-label": " Digwyddiadau",
|
||||
"summary-tab-documents-label": "Dogfennau",
|
||||
"summary-reference-label": "Cyfeirnod",
|
||||
"summary-applicant-label": "Apelydd",
|
||||
"summary-applicantonly-label": "Ymgeisydd",
|
||||
@@ -9,9 +14,12 @@
|
||||
"summary-site-address-label": "Cyfeiriad y Safle",
|
||||
"summary-description-label": "Disgrifiad",
|
||||
"summary-case-stage-label": "Cam yr Achos",
|
||||
"summary-environmental-statement-label": "Lleoliad Datganiad Amgylcheddol",
|
||||
"summary-last-modified-label": "Addaswyd ddiwethaf",
|
||||
"summary-make-representation-label": "Cyflwyno sylwadau",
|
||||
"summary-make-consultation-label": "Cyflwyno Ymateb i'r Ymgynghoriad",
|
||||
"summary-representation-open-label": "Cynrychioliadau yn agor",
|
||||
"summary-consultation-open-label": "Ymgynghoriad ar agor",
|
||||
"summary-back-button-label": "Ewch yn ôl",
|
||||
"summary-case-details-label": "Manylion yr Achos",
|
||||
"summary-project-details-label": "Manylion y Prosiect",
|
||||
@@ -23,6 +31,7 @@
|
||||
"summary-type-of-event-label": "Math o ddigwyddiad",
|
||||
"summary-status-label": "Statws",
|
||||
"summary-decision-label": "Penderfyniad",
|
||||
"summary-eia-required-label": "Angen AEA",
|
||||
"summary-case-link-status-label": "Statws Cysylltiad yr Achos",
|
||||
"summary-case-link-status-not-linked": "Heb ei gysylltu",
|
||||
"summary-case-link-status-linked": "Wedi'i gysylltu",
|
||||
@@ -60,6 +69,8 @@
|
||||
"documents-count-label-1a": "Mae yna",
|
||||
"documents-count-label-2a": "dogfen",
|
||||
"documents-show-label": "Dangos",
|
||||
"documents-clear-filter-label": "Clirio'r hidlydd",
|
||||
"documents-filter-button": "Hidlo dogfen",
|
||||
"summary-application-accepted-as-valid": "Derbyniwyd y Cais yn Un Dilys",
|
||||
"summary-application-rejected-as-invalid": "Gwrthodwyd y Cais fel Un Annilys",
|
||||
"summary-confirm-request-to-vary-application": "Cadarnhewch y Cais i Amrywio Cais",
|
||||
@@ -84,11 +95,13 @@
|
||||
"summary-no-details-label": "Nid oes unrhyw fanylion ar gael ar hyn o bryd",
|
||||
"summary-case-relevant-authoritylabel": "Awdurdod perthnasol",
|
||||
"representation-representation-type": "Pa fath o sylw ydych chi'n ei wneud?",
|
||||
"consultation-representation-type": "Pa fath o ymgynghoriad ydych chi'n ei wneud?",
|
||||
"representation-onbehalfof": "A ydych yn gweithredu ar ran cwmni, grŵp neu sefydliad",
|
||||
"representation-onbehalfof-details": "Enw'r cwmni/grŵp/sefydliad",
|
||||
"representation-comments": "Sylwadau",
|
||||
"representation-files": "Ffeiliau perthnasol",
|
||||
"representation-period-ended-on-label": "Daeth y Cyfnod Sylwadau i ben ar ",
|
||||
"consultation-period-ended-on-label": "Daeth y Cyfnod Ymgynghori i ben ar",
|
||||
"stop-watching-case-link": "Stopiwch wylio'r achos hwn",
|
||||
"watch-this-case-link": "Gwyliwch yr achos hwn",
|
||||
"you-are-watching-label": "Ydych chi eisiau gwylio achos ",
|
||||
@@ -99,5 +112,26 @@
|
||||
"do-you-want-to-delete-case-disclaimer-label": "Ar ôl dileu, bydd yr holl wybodaeth a gyflwynwyd gennych yn cael ei cholli.",
|
||||
"representation-date-passed-label": "Mae'r cyfnod cyflwyno sylwadau ar gyfer yr apêl hon rhwng {{startDate}} a {{endDate}}",
|
||||
"representation-date-passed-additional-label": "Gallwch wneud sylw drwy e-bostio,",
|
||||
"date-raised": "Dyddiad codi"
|
||||
"date-raised": "Dyddiad codi",
|
||||
"event-title": "Digwyddiadau",
|
||||
"event-name-label": " Enw",
|
||||
"event-event-name-label": "Enw'r digwyddiad ",
|
||||
"event-address-label": "Cyfeiriad ",
|
||||
"event-start-date-label": "Dyddiad cychwyn ",
|
||||
"event-end-date-label": "Dyddiad gorffen ",
|
||||
"event-type-of-event-label": "Math o ddigwyddiad",
|
||||
"notice-label": "Hysbysiad",
|
||||
"summary-subscribe-mail-label": "Ydych chi eisiau derbyn diweddariadau e-bost ar gyfer ",
|
||||
"summary-unsubscribe-mail-label": "Ydych chi eisiau dad-danysgrifio i ddiweddariadau e-bost ar gyfer ",
|
||||
"send-email-notifications": "Anfon hysbysiadau e-bost am ddiweddariadau i'r achos hwn",
|
||||
"stop-sending-email-notifications": "Stopio anfon diweddariadau e-bost",
|
||||
"summary-pre-submission-sub-title": "Cyn-gyflwyno",
|
||||
"summary-submission-sub-title": "Cyflwyniad",
|
||||
"summary-validation-deadline-extension": "Dilysu - Estyniad dyddiad cau",
|
||||
"summary-case-suspension-start-date": "Dyddiad Dechrau Atal Achos",
|
||||
"summary-case-suspension-end-date": "Dyddiad Gorffen Atal Achos",
|
||||
"summary-reporting-decision-sub-title": "Adrodd/Penderfyniad",
|
||||
"summary-report-issued-to-welsh-ministers": "Adroddiad a Gyhoeddwyd i Weinidogion Cymru",
|
||||
"summary-decision-issued-to-applicant": "Penderfyniad a Gyhoeddwyd i'r Ymgeisydd",
|
||||
"summary-decision-outcome": "Canlyniad y Penderfyniad"
|
||||
}
|
||||
+31
-1
@@ -85,5 +85,35 @@
|
||||
"further-details-para-one": "Mae angen i PEDW gadarnhau ychydig mwy o wybodaeth amdanoch cyn y gallwch barhau.",
|
||||
"further-details-para-two": "Ffoniwch 0300 123 1590 neu cysylltwch â ni ar ",
|
||||
"login-modal-message": "Mae eich sesiwn ar fin dod i ben mewn {{remaining}} eiliad oherwydd anweithgarwch. Byddwch yn cael eich ailgyfeirio i'r dudalen fewngofnodi.",
|
||||
"login-modal-button": "Arhoswch wedi mewngofnodi"
|
||||
"login-modal-button": "Arhoswch wedi mewngofnodi",
|
||||
"unsubscribe-case-title": "Wedi dad-danysgrifio i'r Achos",
|
||||
"unsubscribe-case-all-label": "Rydych chi wedi dad-danysgrifio o dderbyn diweddariadau o'r achos canlynol",
|
||||
"unsubscribe-case-none-label": "Dim byd i'w ddad-danysgrifio",
|
||||
"unsubscribe-case-label": "Rydych chi wedi dad-danysgrifio o dderbyn diweddariadau e-bost ar gyfer",
|
||||
"mycases-viewall-title": "Gweld fy holl achosion",
|
||||
"awaitingsubmissiondetails-viewall-title": "Gweld pob apêl sy'n aros i gael ei chyflwyno",
|
||||
"myrepresentations-viewall-title": "Gweld pob cynrychiolaeth sy'n aros i gael ei chyflwyno",
|
||||
"watchedcases-viewall-title": "Gweld pob achos a wyliwyd",
|
||||
"mySubmittedreps-viewall-title": "Gweld pob cynrychiolaeth a gyflwynwyd",
|
||||
"contact-us-title": "Cysylltwch â Ni",
|
||||
"contact-us-email-label": "Eich cyfeiriad e-bost",
|
||||
"contact-us-contact-type-label": "Beth hoffech chi gysylltu â ni amdano?",
|
||||
"contact-us-contact-body-label": "Beth hoffech chi ei ofyn?",
|
||||
"contact-us-send-button": "Anfonwch eich cwestiwn",
|
||||
"contact-us-clear-form-button": "Clirio'r ffurflen",
|
||||
"contact-us-thank-you-title": "Diolch am eich ymholiad",
|
||||
"contact-us-thank-you-sub": "Byddwn yn cysylltu â chi cyn gynted â phosibl.",
|
||||
"contact-us-para": "Mae'r wybodaeth hon yn ddilys, ac mae'n rhaid i chi ddilyn eich ymholiad. Nid oes ganddyn nhw unrhyw beth i'w wneud, ond maen nhw wedi cael eu ffafrio'n rhydd. Mae'n anodd dweud dim byd arall wrthych. Os nad ydych chi'n gwybod, maen nhw'n byw bywyd. lacinia, enim tortor bibendum lorem, ut tincidunt lacus sapien quis lorem. Aenean interdum dolor augue, ac cursus lectus suscipit vitae.",
|
||||
"contact-us-select-plq": "Ymholiad deddfwriaeth gynllunio",
|
||||
"contact-us-select-ipq": "Ymholiad gweithdrefn seilwaith",
|
||||
"contact-us-select-pcpq": "Ymholiad gweithdrefn gwaith achos cynllunio",
|
||||
"contact-us-select-pi": "Materion Porth",
|
||||
"contact-us-select-appadvice": "Cyngor cyflwyno apêl",
|
||||
"contact-us-select-repadvice": "Cyngor cyflwyno sylwadau",
|
||||
"contact-us-select-ceq": "Ymholiad Digwyddiadau Gwaith Achos",
|
||||
"contact-us-select-other": "Unrhyw Ymholiadau Eraill",
|
||||
"contact-us-select-postdec": "Ar ôl Penderfyniad",
|
||||
"contact-us-select-comp": "Cwynion/Canmoliaethau",
|
||||
"unsubscribe-title-label": "Dad-danysgrifio i ddiweddariadau e-bost",
|
||||
"subscribe-title-label": "Tanysgrifio i ddiweddariadau e-bost"
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"page-title": "Ceisiadau Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"page-intro-paragraph-1": "Y ceisiadau a restrir yw’r rhai:",
|
||||
"page-intro-list-item-1": "Lle mae’r datblygwr wedi hysbysu Penderfyniadau Cynllunio ac Amgylchedd Cymru yn ysgrifenedig ei fod yn bwriadu cyflwyno cais i ni yn y dyfodol",
|
||||
"page-intro-list-item-2": "Lle mae cais eisoes wedi cael ei wneud i Benderfyniadau Cynllunio ac Amgylchedd Cymru ac mae’n mynd drwy’r broses archwilio",
|
||||
"page-title": "Prosiectau Isadeiledd",
|
||||
"page-intro-paragraph-1": "Mae dau fath gwahanol o gais ar gyfer prosiectau seilwaith, sef Datblygiadau o Arwyddocâd Cenedlaethol a Phrosiectau Seilwaith Arwyddocaol.",
|
||||
"page-intro-list-item-1": " Datblygiadau o Arwyddocâd Cenedlaethol yw datblygiadau a ddiffinnir yn ",
|
||||
"page-intro-list-item-1-link": "https://www.llyw.cymru/datblygiadau-o-arwyddocad-cenedlaethol-dns-ceisiadau",
|
||||
"page-intro-list-item-2": "Mae Prosiectau Seilwaith Arwyddocaol yn ddatblygiadau sydd wedi'u diffinio (YMA)",
|
||||
"page-intro-list-item-2-link": "https://www.llyw.cymru/datblygiadau-o-arwyddocad-cenedlaethol-dns-ceisiadau",
|
||||
"page-intro-list-item-3": "Lle penderfynwyd ar gynnig.",
|
||||
"page-intro-paragraph-2": "Defnyddiwch y tabl isod i ddod o hyd i geisiadau fesul cam neu fath. Fel arall, defnyddiwch y map trwy glicio ar y marcwyr i fynd i’r dudalen geisiadau. Mae rhestr o ddigwyddiadau a therfynau amser allweddol ar gyfer pob cais ar gael ar ein ",
|
||||
"page-intro-paragraph-2-link": "tudalen galendr",
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
"login-card-forgotten-link": "Cliciwch yma",
|
||||
"login-via-gov-gateway-label": "Mewngofnodwch drwy Borth y Llywodraeth",
|
||||
"login-via-nextuth-label": "Mewngofnodwch gyda'ch cyfeiriad e-bost",
|
||||
"casesearch-card-title": "Chwilio apeliadau a Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"casesearch-card-search-hint": "Defnyddiwch gyfeirnod yr achos neu deitl y Datblygiad o Arwyddocâd Cenedlaethol i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
|
||||
"casesearch-card-title": "Chwilio am achos",
|
||||
"casesearch-card-search-hint": "Defnyddiwch gyfeirnod yr achos neu deitl y prosiect Infrastructure i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
|
||||
"casesearch-card-search-example-label-1": "APP-A12345-A-21-1234567",
|
||||
"casesearch-card-search-example-label-2": "CAS-12345-A1B2C3",
|
||||
"casesearch-card-button": "Cyflwyno chwiliad",
|
||||
@@ -38,8 +38,8 @@
|
||||
"inspectorate-card-visit-label": "Ymweld â'r Arolygiaeth Gynllunio",
|
||||
"inspectorate-card-visit-link": "Hafan",
|
||||
"inspectorate-card-alt-text": "Yr Arolygiaeth Gynllunio",
|
||||
"dns-card-title": "Gweld yr holl Ddatblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"dns-card-paragraph": "Mae Datblygiad o Arwyddocâd Cenedlaethol yn fath o gais cynllunio ar gyfer prosiect seilwaith mawr sydd o bwysigrwydd cenedlaethol.",
|
||||
"dns-card-title": "Gweld yr holl Brosiectau Seilwaith",
|
||||
"dns-card-paragraph": "Mae Prosiect Seilwaith yn fath o gais cynllunio sy’n arwyddocaol yn genedlaethol.",
|
||||
"dns-card-button": "Gweld pob cais",
|
||||
"logging-in-heading": "Rydym yn dilysu eich cyfrif. Arhoswch a pheidiwch ag adnewyddu'r dudalen",
|
||||
"logging-in-paragraph": "Arhoswch os gwelwch yn dda...",
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
"makenewappeal-card-guidance-link": "https://www.llyw.cymru/arweiniad-ar-apeliadau-cheisiadau",
|
||||
"makenewappeal-card-button-label": "Gwneud apêl newydd",
|
||||
"mycases-card-title": "Fy achosion",
|
||||
"searchcases-card-title": "Chwilio apeliadau a Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||
"searchcases-card-search-hint": "Defnyddiwch gyfeirnod yr achos neu deitl y Datblygiad o Arwyddocâd Cenedlaethol i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
|
||||
"searchcases-card-title": "Chwilio am achos",
|
||||
"searchcases-card-search-hint": "Defnyddiwch gyfeirnod yr achos neu deitl y prosiect Infrastructure i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
|
||||
"searchcases-card-search-example-label-1": "APP-A12345-A-21-1234567",
|
||||
"searchcases-card-search-example-label-2": "CAS-12345-A1B2C3",
|
||||
"searchcases-card-button": "Cyflwyno Chwiliad",
|
||||
@@ -43,6 +43,7 @@
|
||||
"norecords-awaiting-submissions": "Nid oes gennych unrhyw gyflwyniadau sy'n aros",
|
||||
"on-behalf-of-label": "Ar ran",
|
||||
"appeal-type-label": "Math o apêl",
|
||||
"project-type-label": "Math o brosiect",
|
||||
"lpa-reference-label": "Cyfeirnod yr ACLl",
|
||||
"raised-by-label": "Codwyd gan",
|
||||
"representation-id": "Cyfeirnod y sylw",
|
||||
|
||||
@@ -3,18 +3,26 @@
|
||||
"sign-in-to-raise-rep-label": "I wneud sylwadau ar yr apêl hon, bydd angen i chi fewngofnodi gyda'ch cyfeiriad e-bost. Os nad ydych eisiau mewngofnodi i wneud sylwadau, cysylltwch â'r canlynol",
|
||||
"sign-in-to-raise-rep-button": "Mewngofnodwch i wneud sylwadau",
|
||||
"make-a-representation-on-label": "Gwnewch sylwadau ar",
|
||||
"make-a-consultation-on-label": "Gwneud ymateb i'r ymgynghoriad ar",
|
||||
"make-a-representation-for-label": "Gwnewch sylwadau ar ran",
|
||||
"timetable-title": "Amserlen",
|
||||
"questionnaire-due-label": "Holiadur i ddod",
|
||||
"local-impact-report": "Adroddiad ar yr Effaith Leol i ddod",
|
||||
"marine-impact-report": "Adroddiad Effaith Morol i'w gyhoeddi",
|
||||
"statements-due-label": "Datganiadau i ddod",
|
||||
"final-comments-due-label": "Sylwadau terfynol i ddod",
|
||||
"consultation-close-label": "Daeth y cyfnod ymgynghori i ben",
|
||||
"representation-from-an-agent-heading": "Sylwadau gan Asiant",
|
||||
"consultation-from-an-agent-heading": "Ymateb ymgynghorydd gan Asiant",
|
||||
"representation-from-an-lpa-heading": "Sylwadau gan ACLl",
|
||||
"representation-from-an-appellant-heading": "Sylwadau gan Apelydd",
|
||||
"consultation-from-an-appellant-heading": " Ymateb i'r ymgynghoriad gan Apelydd",
|
||||
"representation-from-an-interested-person-heading": "Sylwadau gan Barti/Unigolyn â Buddiant",
|
||||
"consultation-from-an-interested-person-heading": "Ymateb i'r ymgynghoriad gan Barti/Person â Diddordeb",
|
||||
"kind-of-rep-label": "Pa fath o sylw ydych chi'n ei wneud?",
|
||||
"kind-of-consultation-label": "Pa fath o ymateb i'r ymgynghoriad ydych chi'n ei wneud?",
|
||||
"enter-comment-label": "Gallwch roi eich cynrychioliad yn y gofod a ddarparwyd neu atodi dogfen ar wahân.",
|
||||
"consultation-comment-label": "Gallwch atodi'ch dogfennau sy'n gysylltiedig â'ch ymateb i'r ymgynghoriad.",
|
||||
"comments-set-out-label": "Mae fy sylwadau wedi'u nodi yn",
|
||||
"publish-policy-label": "Sylwch y gall pob sylw gael ei gyhoeddi yn unol â'n ",
|
||||
"publish-policy-link-label": "Polisi Cyhoeddi.",
|
||||
@@ -29,13 +37,18 @@
|
||||
"fileupload-file-error-invalid-label": "yn annilys",
|
||||
"capacity-para-one": "Mae'r ffurflen hon yn eich galluogi i gyflwyno sylwadau ar achos i Benderfyniadau Cynllunio ac Amgylchedd Cymru",
|
||||
"capacity-para-two": "Sylwch fod angen cyflwyno sylwadau gan bartïon â diddordeb o fewn yr amserlen. Mae hwn i'w weld ar y dudalen \"Crynodeb Achos\" flaenorol. Gall sylwadau a gyflwynir ar ôl y dyddiad hwn gael eu hystyried yn annilys.",
|
||||
"sips-capacity-para-one": "Mae'r ffurflen hon yn eich galluogi i gyflwyno ymateb i ymgynghoriad ar achos i Benderfyniadau Cynllunio ac Amgylchedd Cymru.",
|
||||
"sips-capacity-para-two": "Sylwch fod angen ymateb i'r ymgynghoriad gan bartïon â diddordeb o fewn yr amserlen. Mae hwn i'w weld ar y dudalen \"Crynodeb Achos\" flaenorol. Gall ymatebion i ymgynghoriadau a gyflwynir ar ôl y dyddiad hwn gael eu hystyried yn annilys.",
|
||||
"capacity-select-your-details": "Eich manylion",
|
||||
"capacity-select-what-capacity-label": "Ym mha rinwedd ydych chi am gyflwyno sylwadau ar yr achos hwn?",
|
||||
"sips-capacity-select-what-capacity-label": "Ym mha rinwedd ydych chi am wneud ymateb i ymgynghoriad ar yr achos hwn?",
|
||||
"capacity-options-arr-appellant": "Apelydd",
|
||||
"capacity-options-arr-agent": "Asiant",
|
||||
"capacity-options-arr-interested": "Parti â buddiant",
|
||||
"rep-check-submit-heading": "Gwiriwch eich sylwadau",
|
||||
"consultation-check-submit-heading ": "Gwiriwch eich ymateb i'r ymgynghoriad",
|
||||
"rep-check-your-rep-heading": "Eich sylwadau",
|
||||
"consultation-check-your-rep-heading": "Eich ymateb i'r ymgynghoriad",
|
||||
"rep-check-tandc-para-one": "Mae'r data personol a ddarparwyd gennych ar y ffurflen hon yn cael ei chasglu a'i phrosesu yn unol â thelerau ein cofrestriad o dan Ddeddf Diogelu Data 2018.",
|
||||
"rep-check-tandc-para-two": "Mae Penderfyniadau Cynllunio a'r Amgylchedd Cymru yn cymryd ei chyfrifoldebau diogelu data am y wybodaeth a roddwch i ni o ddifrif. I ddarganfod mwy am sut rydym yn defnyddio ac yn rheoli eich data personol, ewch i ein",
|
||||
"rep-check-tandc-para-three": "Cadarnhaf fod pob adran o’r ffurflen hon wedi’u llenwi’n llawn a bod y manylion yn gywir hyd eithaf fy ngwybodaeth.",
|
||||
|
||||
@@ -119,5 +119,6 @@
|
||||
"previously-added-files": "Ffeiliau wedi'u llwytho i fyny",
|
||||
"new-appeal-finalising-heading": "Cwblhau cyflwyniad eich apêl",
|
||||
"new-appeal-finalising-label": "Wrthi'n uwchlwytho ffeiliau ar hyn o bryd a chwblhau eich cyflwyniad apêl",
|
||||
"new-appeal-wait-label": "Arhoswch os gwelwch yn dda"
|
||||
"new-appeal-wait-label": "Arhoswch os gwelwch yn dda",
|
||||
"invalid-email-address-errormsg": "Cyfeiriad e-bost annilys"
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
"lpa-label": "Awdurdod Cynllunio Lleol",
|
||||
"lpa-reference-label": "Cyfeirnod yr Awdurdod Cynllunio Lleol",
|
||||
"appealtype-label": "Dewiswch fath o achos",
|
||||
"project-type-label": "Math o brosiect",
|
||||
"case-status-label": "Statws yr Achos",
|
||||
"case-type-label": "Math o Achos",
|
||||
"case-type-option-1": "--Dewiswch--",
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"account-title": "Your account",
|
||||
"account-about-you-label": "About you",
|
||||
"account-role-label": "Role",
|
||||
"account-preferred-language-label": "Prefered language",
|
||||
"account-preferred-language-label": "Preferred language",
|
||||
"account-preferred-language-english": "English",
|
||||
"account-preferred-language-welsh": "Welsh",
|
||||
"account-first-name-label": "First name",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"auth-error-Signin-label": "Try signing with a different account.",
|
||||
"auth-error-OAuthSignin-label": "Try signing with a different account.",
|
||||
"auth-error-OAuthCallback-label": "Try signing with a different account.",
|
||||
"auth-error- OAuthCreateAccount-label": "Try signing with a different account.",
|
||||
"auth-error-OAuthCreateAccount-label": "Try signing with a different account.",
|
||||
"auth-error-EmailCreateAccount-label": "Try signing with a different account.",
|
||||
"auth-error-Callback-label": "Try signing with a different account.",
|
||||
"auth-error-OAuthAccountNotLinked-label": "To confirm your identity, sign in with the same account you used originally.",
|
||||
|
||||
+36
-1
@@ -1,6 +1,11 @@
|
||||
{
|
||||
"page-title": "Reference",
|
||||
"case-card-title": "Reference: APP/B1415/W/20/3271702",
|
||||
"summary-tab-details-label": "Details",
|
||||
"summary-tab-summary-label": "Summary",
|
||||
"summary-tab-map-label": "Map",
|
||||
"summary-tab-events-label": "Events",
|
||||
"summary-tab-documents-label": "Documents",
|
||||
"summary-reference-label": "Reference",
|
||||
"summary-applicant-label": "Appellant",
|
||||
"summary-applicantonly-label": "Applicant",
|
||||
@@ -9,9 +14,12 @@
|
||||
"summary-site-address-label": "Site Address",
|
||||
"summary-description-label": "Description",
|
||||
"summary-case-stage-label": "Case Stage",
|
||||
"summary-environmental-statement-label": "Environmental Statement Location",
|
||||
"summary-last-modified-label": "Last modified",
|
||||
"summary-make-representation-label": "Make representation",
|
||||
"summary-make-consultation-label": "Submit a Consultation Response",
|
||||
"summary-representation-open-label": "Representations open",
|
||||
"summary-consultation-open-label": "Consultation open",
|
||||
"summary-back-button-label": "Go back",
|
||||
"summary-case-details-label": "Case Details",
|
||||
"summary-project-details-label": "Project Details",
|
||||
@@ -45,6 +53,7 @@
|
||||
"summary-start-event-time-label": "Start time of event",
|
||||
"summary-event-date-label": "Event Date",
|
||||
"summary-decision-date-label": "Decision Date",
|
||||
"summary-eia-required-label": "EIA required",
|
||||
"summary-documents-button-label": "Documents",
|
||||
"documents-not-available-label": "Documents are not available for download at this time, please check later.",
|
||||
"documents-document-count-label": "Document(s)",
|
||||
@@ -60,6 +69,8 @@
|
||||
"documents-count-label-1a": "There is",
|
||||
"documents-count-label-2a": "document",
|
||||
"documents-show-label": "Show",
|
||||
"documents-clear-filter-label": "Clear filter",
|
||||
"documents-filter-button": "Filter document",
|
||||
"summary-application-accepted-as-valid": "Application Accepted as Valid",
|
||||
"summary-application-rejected-as-invalid": "Application rejected as Invalid",
|
||||
"summary-confirm-request-to-vary-application": "Confirm Request to Vary Application",
|
||||
@@ -84,11 +95,14 @@
|
||||
"summary-no-details-label": "No details currently held",
|
||||
"summary-case-relevant-authoritylabel": "Relevant authority",
|
||||
"representation-representation-type": "What kind of representation are you making?",
|
||||
"consultation-representation-type": "What kind of consultation are you making?",
|
||||
"representation-consultation-type": "What kind of consultation response are you making?",
|
||||
"representation-onbehalfof": "Are you acting on behalf of a company, group or organisation",
|
||||
"representation-onbehalfof-details": "Name of the company/group/organisation",
|
||||
"representation-comments": "Representation",
|
||||
"representation-files": "Relevant files",
|
||||
"representation-period-ended-on-label": "Representation Period ended on ",
|
||||
"consultation-period-ended-on-label": "Consultation Period ended on ",
|
||||
"stop-watching-case-link": "Stop watching this case",
|
||||
"watch-this-case-link": "Watch this case",
|
||||
"you-are-watching-label": "Do you want to watch case ",
|
||||
@@ -99,5 +113,26 @@
|
||||
"do-you-want-to-delete-case-disclaimer-label": "Once deleted all information you have submited, will be lost.",
|
||||
"representation-date-passed-label": "The representation period for this appeal is between {{startDate}} and {{endDate}}",
|
||||
"representation-date-passed-additional-label": "You can make a representation by emailing,",
|
||||
"date-raised": "Date raised"
|
||||
"date-raised": "Date raised",
|
||||
"event-title": "Events",
|
||||
"event-name-label": "Name",
|
||||
"event-event-name-label": "Event name",
|
||||
"event-address-label": "Address",
|
||||
"event-start-date-label": "Start date",
|
||||
"event-end-date-label": "End date",
|
||||
"event-type-of-event-label": "Type of event",
|
||||
"notice-label": "Notice",
|
||||
"summary-subscribe-mail-label": "Do you want to be sent email updates for ",
|
||||
"summary-unsubscribe-mail-label": "Do you want to unsubscribe to email updates for ",
|
||||
"send-email-notifications": "Send email notifications for updates to this case",
|
||||
"stop-sending-email-notifications": "Stop sending email updates",
|
||||
"summary-pre-submission-sub-title": "Pre Submission",
|
||||
"summary-submission-sub-title": "Submission",
|
||||
"summary-validation-deadline-extension": "Validation - Deadline extension",
|
||||
"summary-case-suspension-start-date": "Case Suspension Start Date",
|
||||
"summary-case-suspension-end-date": "Case Suspension End Date",
|
||||
"summary-reporting-decision-sub-title": "Reporting/Decision",
|
||||
"summary-report-issued-to-welsh-ministers": "Report Issued to Welsh Ministers",
|
||||
"summary-decision-issued-to-applicant": "Decision Issued to Applicant",
|
||||
"summary-decision-outcome": "Decision Outcome"
|
||||
}
|
||||
+31
-1
@@ -85,5 +85,35 @@
|
||||
"further-details-para-one": "PEDW needs to confirm a bit more information about you before you can continue.",
|
||||
"further-details-para-two": "Please call 0300 123 1590 or contact us on ",
|
||||
"login-modal-message": "Your session is about to expire in {{remaining}} seconds due to inactivity. You will be redirected to the login page.",
|
||||
"login-modal-button": "Stay logged in "
|
||||
"login-modal-button": "Stay logged in ",
|
||||
"unsubscribe-case-title": "Unsubscribed to Case",
|
||||
"unsubscribe-case-all-label": "You have unsubscribed from receiving updates from the following case",
|
||||
"unsubscribe-case-none-label": "Nothing to unsubscribe",
|
||||
"unsubscribe-case-label": "You have unsubscribed from receiving email updates for",
|
||||
"mycases-viewall-title": "View all my cases",
|
||||
"awaitingsubmissiondetails-viewall-title": "View all appeals awaiting submission",
|
||||
"myrepresentations-viewall-title": "View all representations awaiting submission",
|
||||
"watchedcases-viewall-title": "View all watched cases",
|
||||
"mysubmittedreps-viewall-title": "View all submitted representations",
|
||||
"contact-us-title": "Contact Us",
|
||||
"contact-us-email-label": "Your email address",
|
||||
"contact-us-contact-type-label": "What do you want to contact us about?",
|
||||
"contact-us-contact-body-label": "What do you want to ask?",
|
||||
"contact-us-send-button": "Send your question",
|
||||
"contact-us-clear-form-button": "Clear form",
|
||||
"contact-us-thank-you-title": "Thank you for your enquiry",
|
||||
"contact-us-thank-you-sub": "We’ll get back to you as soon as we can.",
|
||||
"contact-us-para": "Lorem ipsum dolor sit amet,consectetur adipiscing elit.Nulla congue leo ac quam pulvinar, id vulputate libero volutpat. Maecenas ut odio id nisl laoreet dictum. Nam faucibus, leo vitae egestas lacinia, enim tortor bibendum lorem, ut tincidunt lacus sapien quis lorem. Aenean interdum dolor augue, ac cursus lectus suscipit vitae.",
|
||||
"contact-us-select-plq": "Planning legislation query",
|
||||
"contact-us-select-ipq": "Infrastructure procedure query",
|
||||
"contact-us-select-pcpq": "Planning casework procedure query",
|
||||
"contact-us-select-pi": "Portal Issues",
|
||||
"contact-us-select-appadvice": "Appeal submission advice",
|
||||
"contact-us-select-repadvice": "Representation submission advice",
|
||||
"contact-us-select-ceq": "Casework Events Query",
|
||||
"contact-us-select-other": "Any Other Enquiries",
|
||||
"contact-us-select-postdec": "Post Decision",
|
||||
"contact-us-select-comp": "Complaints/Complements",
|
||||
"unsubscribe-title-label": "Unsubscribe to email updates",
|
||||
"subscribe-title-label": "Subscribe to email updates"
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
{
|
||||
"page-title": "Developments of National Significance Applications",
|
||||
"page-intro-paragraph-1": "The applications listed are those:",
|
||||
"page-intro-list-item-1": "Where the developer has advised Planning and Environment Decisions Wales in writing that they intend to submit an application to us in the future",
|
||||
"page-intro-list-item-2": "Where an application has already been made to Planning and Environment Decisions Wales and is undergoing the examination process",
|
||||
"page-title": "Infrastructure Projects",
|
||||
"page-intro-paragraph-1": "There are two different types of application for infrastructure projects, Developments of National Significance and Significant Infrastructure Projects.",
|
||||
"page-intro-list-item-1": "Developments of National Significance are developments that are defined at",
|
||||
"page-intro-list-item-1-link": "https://www.gov.wales/developments-national-significance-dns-applications",
|
||||
"page-intro-list-item-2": "Significant Infrastructure Projects are developments that are defined at ",
|
||||
"page-intro-list-item-2-link": "https://www.gov.wales/significant-infrastructure-projects-applications",
|
||||
"page-intro-list-item-3": "Where a proposal has been decided.",
|
||||
"page-intro-paragraph-2": "Use the table below to find applications by stage or type. Alternatively, use the map by clicking on the markers to go to the applications page. A list of key events and deadlines for all applications is available on our ",
|
||||
"page-intro-paragraph-2-link": "calendar page",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"service-name": "Developments of National Significance",
|
||||
"service-name": "Infrastructure Projects",
|
||||
"result-list-show-label": "Show",
|
||||
"result-list-entries-label": "entries",
|
||||
"result-list-showing-label": "Showing {{recordIndex}} to {{pagingIndex}} of {{totalRecords}} entries",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user