updated with oauth, footer docs,
This commit is contained in:
+38
-27
@@ -1,3 +1,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
ACCESS_TOKEN_ENDPOINT = https://login.microsoftonline.com/
|
||||||
|
TENANT = a8d860de-d5e1-45af-8376-d93f02e6b502
|
||||||
|
GRANT_TYPE = "client_credentials"
|
||||||
|
|
||||||
|
HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||||
|
NEXT_PUBLIC_HASHKEY = 028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c
|
||||||
|
|
||||||
|
|
||||||
|
//Dev oauth
|
||||||
|
//CLIENT_ID = e082def0-3453-461f-9a5e-f4ab127dc015
|
||||||
|
//CLIENT_SECRET = qW.7Q~TSr3sZmLEnJQJPXEdOckb_yo2t1yJmY
|
||||||
|
|
||||||
// dev
|
// dev
|
||||||
//RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
//RELAY_ROOT = https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/
|
||||||
//RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
//RELAYURI = "dev-pedw-ns.servicebus.windows.net"
|
||||||
@@ -6,28 +20,9 @@
|
|||||||
//SASKEYNAME = "devpedwnspolicy"
|
//SASKEYNAME = "devpedwnspolicy"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ACCESS_TOKEN_ENDPOINT = https://login.microsoftonline.com/
|
|
||||||
TENANT = a8d860de-d5e1-45af-8376-d93f02e6b502
|
|
||||||
GRANT_TYPE = "client_credentials"
|
|
||||||
|
|
||||||
//Dev oauth
|
|
||||||
CLIENT_ID = e082def0-3453-461f-9a5e-f4ab127dc015
|
|
||||||
CLIENT_SECRET = qW.7Q~TSr3sZmLEnJQJPXEdOckb_yo2t1yJmY
|
|
||||||
|
|
||||||
|
|
||||||
//Test Oauth
|
//Test Oauth
|
||||||
//CLIENT_ID = e082def0-3453-461f-9a5e-f4ab127dc015
|
//CLIENT_ID = 6619ad85-c908-490d-811b-de8c93c0f2aa
|
||||||
//CLIENT_SECRET = qW.7Q~TSr3sZmLEnJQJPXEdOckb_yo2t1yJmY
|
//CLIENT_SECRET = qKo7Q~5QvLEplbwnBbint_I5lXqx_-kDm8Vj-
|
||||||
|
|
||||||
|
|
||||||
PORT= "3000"
|
|
||||||
DEFAULT_DOMAIN = "localhost"
|
|
||||||
I18N_DOMAIN = "cymru.local"
|
|
||||||
//I18N_DOMAIN ="dev-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
|
||||||
//I18N_DOMAIN ="stage-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
|
||||||
//I18N_DOMAIN ="pp-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
|
||||||
//I18N_DOMAIN ="gwaithcynllunio.gwasanaeth.llyw.cymru"
|
|
||||||
|
|
||||||
//test
|
//test
|
||||||
//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
//RELAY_ROOT = https://test-pedw-ns.servicebus.windows.net/test-pedw-hc/
|
||||||
@@ -36,20 +31,36 @@ I18N_DOMAIN = "cymru.local"
|
|||||||
//SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4="
|
//SASKEY = "kTLrs9UHwuW9Msc9uNfjf+89qLYT6ly80lK0zdTYJW4="
|
||||||
//SASKEYNAME = "testpedwhcpolicy"
|
//SASKEYNAME = "testpedwhcpolicy"
|
||||||
|
|
||||||
|
//Preprod Oauth
|
||||||
|
CLIENT_ID = 75594242-8773-45c7-a3da-85e62485b2f3
|
||||||
|
CLIENT_SECRET = UDF7Q~OwTLIV7LXPHlIYHSWbJunlBD53ieLt-
|
||||||
|
|
||||||
|
|
||||||
//preprod
|
//preprod
|
||||||
//RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
|
RELAY_ROOT = https://pp-pedw-ns.servicebus.windows.net/pp-pedw-hc/
|
||||||
//RELAYURI = "pp-pedw-ns.servicebus.windows.net"
|
RELAYURI = "pp-pedw-ns.servicebus.windows.net"
|
||||||
//RELAYPATH = "pp-pedw-hc"
|
RELAYPATH = "pp-pedw-hc"
|
||||||
//SASKEY = "JzrOYfMTsGBD1cZHH2nkzqsbfDCqg0brO6jyiIDNVPo="
|
//SASKEY = "JzrOYfMTsGBD1cZHH2nkzqsbfDCqg0brO6jyiIDNVPo="
|
||||||
//SASKEYNAME = "pppedwnspolicy"
|
//SASKEYNAME = "pppedwnspolicy"
|
||||||
|
|
||||||
|
|
||||||
|
//Prod Oauth
|
||||||
|
//CLIENT_ID = 01904c07-9035-4cf9-a535-3945f6e470d2
|
||||||
|
//CLIENT_SECRET = PRo7Q~GQoKSdARRqF-NOXQDx2Ka8UCINyvagk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
GOOGLE_TAG_MANAGER = GTM-T78CBC3
|
||||||
SHOWLOGIN = "true"
|
SHOWLOGIN = "true"
|
||||||
SHOWREPRESENTATIONS = "false"
|
SHOWREPRESENTATIONS = "false"
|
||||||
BASIC_AUTH_CREDENTIALS,, = pinswg:password|pinswg2:password2
|
BASIC_AUTH_CREDENTIALS = pinswg:password|pinswg2:password2
|
||||||
|
|
||||||
HASHKEY = "028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c"
|
|
||||||
|
|
||||||
NEXT_PUBLIC_HASHKEY = "028ffbae928d7191c0017f298260995f901d78eabde1436c0af0423459cc3715832136d84f68818d3a96399467b52143e273d4f3bf4ae190848891535421cd6c"
|
PORT= "3000"
|
||||||
|
DEFAULT_DOMAIN = "localhost"
|
||||||
|
I18N_DOMAIN = "cymru.local"
|
||||||
|
//I18N_DOMAIN ="dev-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||||
|
//I18N_DOMAIN ="stage-gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||||
|
//I18N_DOMAIN ="pp-gwaithcynllunio.gwasanaeth.llyw.cymru"s
|
||||||
|
//I18N_DOMAIN ="gwaithcynllunio.gwasanaeth.llyw.cymru"
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
"extends": "next"
|
"extends": "next",
|
||||||
|
"rules": {
|
||||||
|
"@next/next/no-img-element": "off"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+41
-82
@@ -31,25 +31,21 @@ const agent = new https.Agent({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const getToken = () => {
|
export const getToken = () => {
|
||||||
if (cache.tokenResponse) {
|
return axios
|
||||||
return cache.tokenResponse;
|
.post(
|
||||||
} else {
|
`${accessTokenEndpoint}${tenantId}/oauth2/v2.0/token`,
|
||||||
return axios
|
tokenBody,
|
||||||
.post(
|
tokenConfig
|
||||||
`${accessTokenEndpoint}${tenantId}/oauth2/v2.0/token`,
|
)
|
||||||
tokenBody,
|
.then((res) => res.data)
|
||||||
tokenConfig
|
.then((data) => {
|
||||||
)
|
cache.tokenResponse = data;
|
||||||
.then((res) => res.data)
|
return data;
|
||||||
.then((data) => {
|
})
|
||||||
cache.tokenResponse = data;
|
.catch((error) => {
|
||||||
return data;
|
console.log("error :", error.response);
|
||||||
})
|
// return error;
|
||||||
.catch((error) => {
|
});
|
||||||
console.log("error :", error.response);
|
|
||||||
// return error;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const tokenBody =
|
const tokenBody =
|
||||||
@@ -76,7 +72,7 @@ const azureHeaders = (access_token) => {
|
|||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": "Bearer " + access_token,
|
"Authorization": "Bearer " + access_token,
|
||||||
@@ -89,7 +85,7 @@ const azureHeadersPaged = (access_token) => {
|
|||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer":
|
"Prefer":
|
||||||
'odata.include-annotations="*",return=representation, odata.maxpagesize=10',
|
'odata.include-annotations="*",return=representation, odata.maxpagesize=10',
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -110,7 +106,9 @@ const hashAPIPath = (queryPath) => {
|
|||||||
);
|
);
|
||||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||||
|
|
||||||
return "&hash=" + hashlink;
|
//return "&hash=" + hashlink;
|
||||||
|
|
||||||
|
return (hashPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getBasicSearch = (token, searchString) => {
|
export const getBasicSearch = (token, searchString) => {
|
||||||
@@ -183,8 +181,6 @@ export const getBasicDNSSearch = (token, searchString) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getBasicDNSSearchPaged = (pageNumber) => {
|
export const getBasicDNSSearchPaged = (pageNumber) => {
|
||||||
var token = getToken();
|
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/proxy/incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true" +
|
"/api/proxy/incidents?$select=numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value&$expand=primarycontactid($select=fullname)&$filter=pinswg_appealcasetype eq 846040011 and pinswg_publishtoweb eq true&$orderby=createdon desc&$count=true" +
|
||||||
(typeof pageNumber != "undefined"
|
(typeof pageNumber != "undefined"
|
||||||
@@ -200,6 +196,7 @@ export const getBasicDNSSearchPaged = (pageNumber) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getAdvancedSearch = (token, searchString) => {
|
export const getAdvancedSearch = (token, searchString) => {
|
||||||
|
console.log("debug showing token: ", token);
|
||||||
console.log(searchString.caseReference);
|
console.log(searchString.caseReference);
|
||||||
|
|
||||||
var queryString = "";
|
var queryString = "";
|
||||||
@@ -252,8 +249,6 @@ export const getAdvancedSearch = (token, searchString) => {
|
|||||||
|
|
||||||
export const getAdvancedSearchPaged = (searchString, pageNumber) => {
|
export const getAdvancedSearchPaged = (searchString, pageNumber) => {
|
||||||
//console.log(searchString);
|
//console.log(searchString);
|
||||||
var token = getToken();
|
|
||||||
|
|
||||||
var queryString = "";
|
var queryString = "";
|
||||||
|
|
||||||
queryString +=
|
queryString +=
|
||||||
@@ -388,7 +383,6 @@ export const getSearchDocumentHistory = (token, documentID) => {
|
|||||||
|
|
||||||
export const getSearchDocumentDetailsPaged = (incidentID, pageNumber) => {
|
export const getSearchDocumentDetailsPaged = (incidentID, pageNumber) => {
|
||||||
console.log(incidentID);
|
console.log(incidentID);
|
||||||
var token = getToken();
|
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/proxy/pinswg_documents?$count=true&$filter=_pinswg_documentids_value eq " +
|
"/api/proxy/pinswg_documents?$count=true&$filter=_pinswg_documentids_value eq " +
|
||||||
@@ -408,8 +402,6 @@ export const getSearchDocumentDetailsPaged = (incidentID, pageNumber) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getSearchDocumentHistoryPaged = (documentID, pageNumber) => {
|
export const getSearchDocumentHistoryPaged = (documentID, pageNumber) => {
|
||||||
var token = getToken();
|
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/proxy/pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " +
|
"/api/proxy/pinswg_documenthistories?$count=true&$select=_pinswg_documentid_value,pinswg_createddate,pinswg_state,pinswg_fileexists,statecode,pinswg_publisheddate&$filter=_pinswg_documentid_value eq " +
|
||||||
documentID +
|
documentID +
|
||||||
@@ -501,8 +493,6 @@ export const getBasicDNSSearchDetails = (token, appealType, caseReference) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getBasicDNSSearchDetailsPaged = (caseReference) => {
|
export const getBasicDNSSearchDetailsPaged = (caseReference) => {
|
||||||
var token = getToken();
|
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"/api/proxy/pinswg_dnses?$filter=pinswg_name eq '" +
|
"/api/proxy/pinswg_dnses?$filter=pinswg_name eq '" +
|
||||||
caseReference +
|
caseReference +
|
||||||
@@ -535,9 +525,9 @@ export const getLinkedCases = (parentIncidentid) => {
|
|||||||
|
|
||||||
export const getFormData = (token, whichForm) => {
|
export const getFormData = (token, whichForm) => {
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"systemforms?$select=formid,name,formxml,type,objecttypecode&$filter=(objecttypecode%20eq%20%27pinswg_" +
|
"systemforms?$select=formid,name,formxml,type,objecttypecode&$filter=(objecttypecode eq 'pinswg_" +
|
||||||
whichForm +
|
whichForm +
|
||||||
"%27and%20type%20eq%202)&$count=true&$top=201";
|
"' and type eq 2)&$count=true&$top=201";
|
||||||
return axios
|
return axios
|
||||||
.get(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), azureHeaders(token))
|
.get(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl), azureHeaders(token))
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
@@ -650,10 +640,7 @@ export const getAppealID = (
|
|||||||
|
|
||||||
console.log("proxy url ", queryUrl);
|
console.log("proxy url ", queryUrl);
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(queryUrl + hashAPIPath(queryUrl))
|
||||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
|
||||||
azureHeaders(getToken())
|
|
||||||
)
|
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
var appealID = res.data.value[0][primaryAttribute];
|
var appealID = res.data.value[0][primaryAttribute];
|
||||||
return appealID;
|
return appealID;
|
||||||
@@ -669,7 +656,7 @@ export const getLogin = (emailAddress, pwd) => {
|
|||||||
emailAddress +
|
emailAddress +
|
||||||
"' and pinswg_custom_password eq '" +
|
"' and pinswg_custom_password eq '" +
|
||||||
pwd +
|
pwd +
|
||||||
"'&$count=true&$select=emailaddress1,%20contactid,pinswg_custom_password, yomifullname, firstname, lastname";
|
"'&$count=true&$select=emailaddress1,contactid,pinswg_custom_password,yomifullname,firstname,lastname";
|
||||||
|
|
||||||
return axios
|
return axios
|
||||||
.get(queryUrl + hashAPIPath(queryUrl))
|
.get(queryUrl + hashAPIPath(queryUrl))
|
||||||
@@ -693,14 +680,14 @@ export const createCase = (token, appealTypeId, lpaID, contactid) => {
|
|||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
method: "post",
|
method: "post",
|
||||||
url: queryUrl + hashAPIPath(queryUrl),
|
url: WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"ServiceBusAuthorization": token,
|
"Authorization": "Bearer " + token,
|
||||||
},
|
},
|
||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
@@ -740,10 +727,9 @@ export const updateCase = async (
|
|||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": getToken(),
|
|
||||||
},
|
},
|
||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
@@ -810,10 +796,9 @@ export const deleteMyRepresentations = (myRepresentationsID) => {
|
|||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": getToken(),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// console.log(config);
|
// console.log(config);
|
||||||
@@ -889,10 +874,9 @@ export const createWatchedCases = (formValues) => {
|
|||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": getToken(),
|
|
||||||
},
|
},
|
||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
@@ -915,10 +899,9 @@ export const deleteWatchedCases = (watchedCaseID) => {
|
|||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
"Accept": "application/json",
|
"Accept": "application/json;odata.metadata=none",
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"Authorization": getToken(),
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// console.log(config);
|
// console.log(config);
|
||||||
@@ -990,19 +973,11 @@ export const getEmailAccountCheck = (emailAddress) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const createAccount = (formValues) => {
|
export const createAccount = (formValues) => {
|
||||||
var data = JSON.stringify(formValues);
|
var data = formValues; //JSON.stringify(formValues);
|
||||||
var queryUrl = "/api/proxy/contacts";
|
var queryUrl = "/api/proxy/contacts";
|
||||||
var config = {
|
var config = {
|
||||||
method: "post",
|
method: "post",
|
||||||
url: queryUrl + hashAPIPath(queryUrl),
|
url: queryUrl + hashAPIPath(queryUrl),
|
||||||
headers: {
|
|
||||||
"OData-MaxVersion": "4.0",
|
|
||||||
"OData-Version": "4.0",
|
|
||||||
"Accept": "application/json",
|
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"Authorization": getToken(),
|
|
||||||
},
|
|
||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
// console.log(config);
|
// console.log(config);
|
||||||
@@ -1016,48 +991,32 @@ export const createAccount = (formValues) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updateAccount = (contactId, updateBody) => {
|
export const updateAccount = async (contactId, updateBody) => {
|
||||||
var data = JSON.stringify(updateBody);
|
var data = updateBody; //JSON.stringify(updateBody);
|
||||||
var queryUrl = "/api/proxy/contacts(" + contactId + ")";
|
var queryUrl = "/api/proxy/contacts(" + contactId + ")";
|
||||||
|
queryUrl = queryUrl + hashAPIPath(queryUrl);
|
||||||
var config = {
|
var config = {
|
||||||
method: "patch",
|
method: "patch",
|
||||||
url: queryUrl + hashAPIPath(queryUrl),
|
url: queryUrl,
|
||||||
headers: {
|
|
||||||
"OData-MaxVersion": "4.0",
|
|
||||||
"OData-Version": "4.0",
|
|
||||||
"Accept": "application/json",
|
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"Authorization": getToken(),
|
|
||||||
},
|
|
||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
// console.log(config);
|
|
||||||
return axios(config)
|
return axios(config)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
//console.log("posted ", res.data);
|
|
||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
console.log("this error:", error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const updatePassword = (contactId, newpassword) => {
|
export const updatePassword = (contactId, newpassword) => {
|
||||||
let updateBody = { "pinswg_custom_password": newpassword };
|
let updateBody = { "pinswg_custom_password": newpassword };
|
||||||
var data = JSON.stringify(updateBody);
|
var data = updateBody; //JSON.stringify(updateBody);
|
||||||
var queryUrl = "/api/proxy/contacts(" + contactId + ")";
|
var queryUrl = "/api/proxy/contacts(" + contactId + ")";
|
||||||
|
queryUrl = queryUrl + hashAPIPath(queryUrl);
|
||||||
var config = {
|
var config = {
|
||||||
method: "patch",
|
method: "patch",
|
||||||
url: queryUrl + hashAPIPath(queryUrl),
|
url: queryUrl,
|
||||||
headers: {
|
|
||||||
"OData-MaxVersion": "4.0",
|
|
||||||
"OData-Version": "4.0",
|
|
||||||
"Accept": "application/json",
|
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"Authorization": getToken(),
|
|
||||||
},
|
|
||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
// console.log(config);
|
// console.log(config);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import AccessibilityEN from "./footerDocs/accessibility_en";
|
||||||
|
import AccessibilityCY from "./footerDocs/accessibility_cy";
|
||||||
|
|
||||||
const AccessibilityStatement = (props) => {
|
const AccessibilityStatement = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -16,14 +18,7 @@ const AccessibilityStatement = (props) => {
|
|||||||
id="main-content"
|
id="main-content"
|
||||||
role="main"
|
role="main"
|
||||||
>
|
>
|
||||||
<div className="govuk-grid-row">
|
{router.locale != "en" ? <AccessibilityCY /> : <AccessibilityEN />}
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<h1 className="govuk-heading-l govuk-!-margin-bottom-7">
|
|
||||||
Accessibility Statement
|
|
||||||
</h1>
|
|
||||||
<p>bkah blah</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -75,52 +75,70 @@ const RegisterComplete = (props) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return props.accountDetails.accCr == "created" ? (
|
var registerBody = "";
|
||||||
<>
|
switch (props.accountDetails.accCr) {
|
||||||
<p className="govuk-body">
|
case "created":
|
||||||
{t("account:register-new-account-confirmation-email")}
|
return (registerBody = (
|
||||||
</p>
|
<>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{t("account:register-new-account-confirmation-email")}
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2 className="govuk-heading-m">
|
<h2 className="govuk-heading-m">
|
||||||
{t("account:register-new-account-sub-heading-what-next")}
|
{t(
|
||||||
</h2>
|
"account:register-new-account-sub-heading-what-next"
|
||||||
|
)}
|
||||||
|
</h2>
|
||||||
|
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
{t("account:register-new-account-paragraph-what-next")}
|
{t("account:register-new-account-paragraph-what-next")}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p className="govuk-body">
|
<p className="govuk-body">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<a
|
<a
|
||||||
className="govuk-link"
|
className="govuk-link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setLogout(), window.localStorage.clear();
|
setLogout(), window.localStorage.clear();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("account:register-new-account-my-portal-link")}
|
{t(
|
||||||
</a>
|
"account:register-new-account-my-portal-link"
|
||||||
</Link>
|
)}
|
||||||
</p>
|
</a>
|
||||||
</>
|
</Link>
|
||||||
) : (
|
</p>
|
||||||
<>
|
</>
|
||||||
<h2 className="govuk-heading-m">
|
));
|
||||||
{t("account:register-new-account-account-failed")}
|
|
||||||
</h2>
|
break;
|
||||||
<p className="govuk-body">
|
|
||||||
<a
|
case "exists":
|
||||||
onClick={() => {
|
return (registerBody = (
|
||||||
setRegisterFormComplete(false),
|
<>
|
||||||
setAccountCreatedComplete(false),
|
<h2 className="govuk-heading-m">
|
||||||
setAccCr("false");
|
{t("account:register-new-account-account-failed")}
|
||||||
}}
|
</h2>
|
||||||
className="govuk-link"
|
<p className="govuk-body">
|
||||||
>
|
<a
|
||||||
Try registering again
|
onClick={() => {
|
||||||
</a>
|
setRegisterFormComplete(false),
|
||||||
</p>
|
setAccountCreatedComplete(false),
|
||||||
</>
|
setAccCr(false);
|
||||||
);
|
}}
|
||||||
|
className="govuk-link"
|
||||||
|
>
|
||||||
|
Try registering again
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
));
|
||||||
|
|
||||||
|
default:
|
||||||
|
return (registerBody = "");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return registerBody;
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) => {
|
const mapStateToProps = (state) => {
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ const RegisterForm = (props) => {
|
|||||||
setRegisterFormComplete(true);
|
setRegisterFormComplete(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(pristine);
|
//console.log(pristine);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!pristine && !valid && (
|
{!pristine && !valid && (
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default function Footer(props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//console.log(router.asPath);
|
//console.log(router.asPath);
|
||||||
const shareBodyStr = t("common:gov-wales-link") + router.asPath;
|
const shareBodyStr = t("common:service-home-url") + router.asPath;
|
||||||
const shareSubjectStr =
|
const shareSubjectStr =
|
||||||
t("common:social-shared-from") +
|
t("common:social-shared-from") +
|
||||||
" " +
|
" " +
|
||||||
|
|||||||
@@ -0,0 +1,225 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
|
export default function AccessibilityCY() {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
return (
|
||||||
|
<div className="govuk-grid-row govuk-body">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
|
||||||
|
Datganiad Hygyrchedd ar gyfer Porth Penderfyniadau Cynllunio
|
||||||
|
ac Amgylchedd Cymru{" "}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mae’r datganiad hygyrchedd hwn yn berthnasol i borth ar-lein
|
||||||
|
Penderfyniadau Cynllunio ac Amgylchedd Cymru (PCAC) ar gyfer
|
||||||
|
cyflwyno ac adolygu dogfennau sy’n ymwneud â’r gwaith achos
|
||||||
|
rydym yn ei brosesu.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Cynhelir y wefan hon gan PCAC, sef un o Is-adrannau
|
||||||
|
Llywodraeth Cymru. Rydym eisiau i gynifer o bobl â phosibl
|
||||||
|
allu defnyddio’r wefan hon. Er enghraifft, mae hynny’n
|
||||||
|
golygu y dylech allu:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>newid lliwiau, lefelau cyferbynnedd a ffontiau</li>
|
||||||
|
<li>
|
||||||
|
chwyddo i mewn hyd at 300% heb i’r testun fynd oddi ar y
|
||||||
|
sgrin
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
llywio’r rhan fwyaf o’r wefan gan ddefnyddio bysellfwrdd
|
||||||
|
yn unig
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
llywio’r rhan fwyaf o’r wefan gan ddefnyddio meddalwedd
|
||||||
|
adnabod llais
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
gwrando ar y rhan fwyaf o’r wefan gan ddefnyddio rhaglen
|
||||||
|
darllen sgrin (gan gynnwys fersiynau diweddaraf JAWS,
|
||||||
|
NVDA a VoiceOver)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Rydym hefyd wedi gwneud testun y wefan mor syml ei ddeall â
|
||||||
|
phosibl.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Mae AbilityNet yn rhoi cyngor ar wneud eich dyfais yn haws
|
||||||
|
ei defnyddio os oes gennych anabledd.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Pa mor hygyrch yw’r wefan hon</h3>
|
||||||
|
<p>
|
||||||
|
Rydym yn gwybod nad yw rhai rhannau o’r wefan hon yn gwbl
|
||||||
|
hygyrch:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
ni fydd y testun yn ail-lifo mewn un golofn pan fyddwch
|
||||||
|
yn newid maint y ffenestr bori{" "}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
ni allwch addasu uchder llinell testun na’r gofod rhwng
|
||||||
|
testun
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
nid yw’r rhan fwyaf o ddogfennau PDF hŷn yn gwbl hygyrch
|
||||||
|
i feddalwedd darllen sgrin
|
||||||
|
</li>
|
||||||
|
<li>nid oes gan ffrydiau fideo byw gapsiynau</li>
|
||||||
|
<li>
|
||||||
|
mae rhai o’n ffurflenni ar-lein yn anodd eu llywio gan
|
||||||
|
ddefnyddio bysellfwrdd yn unig{" "}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
ni allwch neidio i’r prif gynnwys pan fyddwch yn
|
||||||
|
defnyddio rhaglen darllen sgrin{" "}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
mae terfyn ar ba mor fawr y gallwch chwyddo’r map ar ein
|
||||||
|
tudalen ‘cysylltwch â ni’
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Adborth a gwybodaeth gyswllt</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Os oes arnoch angen y wybodaeth ar y wefan hon mewn fformat
|
||||||
|
arall, fel PDF hygyrch, print bras, fersiwn hawdd ei
|
||||||
|
darllen, recordiad sain neu braille:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
Anfonwch neges e-bost at:{" "}
|
||||||
|
<a
|
||||||
|
className="govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
|
href="mailto:PEDW.GwaithAchos@llyw.cymru"
|
||||||
|
>
|
||||||
|
PEDW.GwaithAchos@llyw.cymru
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Ffoniwch:{" "}
|
||||||
|
<a
|
||||||
|
className="govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
|
href="tel:03000 604400"
|
||||||
|
>
|
||||||
|
03000 604400
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Byddwn yn ystyried eich cais ac yn cysylltu â chi ymhen 5
|
||||||
|
niwrnod.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Os na allwch weld y map ar ein tudalen ‘cysylltwch â ni’,
|
||||||
|
ffoniwch ni neu anfonwch neges e-bost atom i gael
|
||||||
|
cyfarwyddiadau;{" "}
|
||||||
|
<a
|
||||||
|
className="govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
|
href="https://llyw.cymru/penderfyndiadau-cynllunio-ac-amgylchedd-cymru/cysylltwch-ni"
|
||||||
|
>
|
||||||
|
Cysylltwch â Ni
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Gweithdrefn orfodi</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mae’r Comisiwn Cydraddoldeb a Hawliau Dynol (EHRC) yn
|
||||||
|
gyfrifol am orfodi Rheoliadau Hygyrchedd Cyrff Sector
|
||||||
|
Cyhoeddus (Gwefannau ac Apiau Symudol) (Rhif 2) 2018 (y
|
||||||
|
‘rheoliadau hygyrchedd’). Os nad ydych yn fodlon â’r ffordd
|
||||||
|
rydym yn ymateb i’ch cwyn, cysylltwch â’r Gwasanaeth
|
||||||
|
Cynghori a Chymorth Cydraddoldeb (EASS).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Cysylltu â ni ar y ffôn neu ymweld â ni’n bersonol</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Rydym yn darparu gwasanaeth cyfnewid testun ar gyfer pobl
|
||||||
|
B/byddar, pobl sydd â nam ar y clyw neu bobl sydd â nam ar y
|
||||||
|
lleferydd.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mae dolenni sain yn ein swyddfeydd hefyd, neu os byddwch yn
|
||||||
|
cysylltu â ni cyn eich ymweliad gallwn drefnu dehonglydd
|
||||||
|
Iaith Arwyddion Prydain (BSL).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>Dysgwch sut i gysylltu â ni.</p>
|
||||||
|
|
||||||
|
<h3>Gwybodaeth dechnegol am hygyrchedd y wefan hon</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mae PCAC wedi ymrwymo i wneud ei wefan yn hygyrch, yn unol â
|
||||||
|
Rheoliadau Hygyrchedd Cyrff Sector Cyhoeddus (Gwefannau ac
|
||||||
|
Apiau Symudol) (Rhif 2) 2018.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Statws cydymffurfio</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mae’r wefan hon yn cydymffurfio’n rhannol â Chanllawiau
|
||||||
|
Hygyrchedd Cynnwys y We (WCAG) fersiwn 2.1 – safon Lefel AA,
|
||||||
|
o ganlyniad i’r ‘achosion o ddiffyg
|
||||||
|
cydymffurfio’/’eithriadau’ neu’r ‘achosion o ddiffyg
|
||||||
|
cydymffurfio ac eithriadau’] a restrir isod.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Diffyg cydymffurfio â’r rheoliadau hygyrchedd</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Nid oes testun amgen ar gyfer rhai delweddau, felly ni all
|
||||||
|
pobl sy’n defnyddio rhaglen darllen sgrin gael at y
|
||||||
|
wybodaeth. Mae hyn yn methu maen prawf llwyddiant 1.1.1
|
||||||
|
(cynnwys nad yw’n destun).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Bwriadwn ychwanegu testun amgen at yr holl ddelweddau erbyn
|
||||||
|
mis Medi 2020. Pan fyddwn yn cyhoeddi cynnwys newydd, byddwn
|
||||||
|
yn sicrhau bod ein defnydd o ddelweddau’n bodloni safonau
|
||||||
|
hygyrchedd.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Paratoi’r datganiad hygyrchedd hwn</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Paratowyd y datganiad hwn ar [TBC]. Fe’i hadolygwyd
|
||||||
|
ddiwethaf ar [TBC when signed off].
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Profwyd y wefan hon ddiwethaf ar [TBC]. Cynhaliwyd y prawf
|
||||||
|
gan [add name of organisation that carried out test, or
|
||||||
|
indicate that you did your own testing].
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Gwnaethom ddefnyddio’r dull hwn i benderfynu ar sampl o
|
||||||
|
dudalennau i’w profi [add link to explanation of how you
|
||||||
|
decided which pages to test].
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Gallwch ddarllen yr adroddiad llawn ar y prawf hygyrchedd
|
||||||
|
[add link to report].
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
|
export default function AccessibilityEN() {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
return (
|
||||||
|
<div className="govuk-grid-row govuk-body">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
|
||||||
|
Accessibility Statement for Planning and Environment
|
||||||
|
Decisions Wales Portal
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This accessibility statement applies to Planning and
|
||||||
|
Environment Decisions Wales’ (PEDW) online portal for the
|
||||||
|
submission and review of documents related to the casework
|
||||||
|
we process.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This website is run by PEDW, a Division of The Welsh
|
||||||
|
Government. We want as many people as possible to be able to
|
||||||
|
use this website. For example, that means you should be able
|
||||||
|
to:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>change colours, contrast levels and fonts</li>
|
||||||
|
<li>
|
||||||
|
zoom in up to 300% without the text spilling off the
|
||||||
|
screen
|
||||||
|
</li>
|
||||||
|
<li>navigate most of the website using just a keyboard</li>
|
||||||
|
<li>
|
||||||
|
navigate most of the website using speech recognition
|
||||||
|
software
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
listen to most of the website using a screen reader
|
||||||
|
(including the most recent versions of JAWS, NVDA and
|
||||||
|
VoiceOver)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We’ve also made the website text as simple as possible to
|
||||||
|
understand.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
AbilityNet has advice on making your device easier to use if
|
||||||
|
you have a disability.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>How accessible this website is</h3>
|
||||||
|
<p>
|
||||||
|
We know some parts of this website are not fully accessible:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
the text will not reflow in a single column when you
|
||||||
|
change the size of the browser window
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
you cannot modify the line height or spacing of text
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
most older PDF documents are not fully accessible to
|
||||||
|
screen reader software
|
||||||
|
</li>
|
||||||
|
<li>live video streams do not have captions</li>
|
||||||
|
<li>
|
||||||
|
some of our online forms are difficult to navigate using
|
||||||
|
just a keyboard
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
you cannot skip to the main content when using a screen
|
||||||
|
reader
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
there’s a limit to how far you can magnify the map on
|
||||||
|
our ‘contact us’ page
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Feedback and contact information</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you need information on this website in a different
|
||||||
|
format like accessible PDF, large print, easy read, audio
|
||||||
|
recording or braille:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
Email:{" "}
|
||||||
|
<a
|
||||||
|
className="govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
|
href="mailto:PEDW.Casework@gov.wales"
|
||||||
|
>
|
||||||
|
PEDW.Casework@gov.wales
|
||||||
|
</a>{" "}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Call:{" "}
|
||||||
|
<a
|
||||||
|
className="govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
|
href="tel:03000 604400"
|
||||||
|
>
|
||||||
|
03000 604400
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We’ll consider your request and get back to you in no later
|
||||||
|
than 5 days.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you cannot view the map on our ‘contact us’ page, please
|
||||||
|
call or email us for directions; Contact Us.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Enforcement procedure</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The Equality and Human Rights Commission (EHRC) is
|
||||||
|
responsible for enforcing the Public Sector Bodies (Websites
|
||||||
|
and Mobile Applications) (No. 2) Accessibility Regulations
|
||||||
|
2018 (the ‘accessibility regulations’). If you’re not happy
|
||||||
|
with how we respond to your complaint, contact the Equality
|
||||||
|
Advisory and Support Service (EASS).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Contacting us by phone or visiting us in person</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We provide a text relay service for people who are D/deaf,
|
||||||
|
hearing impaired or have a speech impediment.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Our offices have audio induction loops, or if you contact us
|
||||||
|
before your visit we can arrange a British Sign Language
|
||||||
|
(BSL) interpreter.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Find out how to{" "}
|
||||||
|
<a
|
||||||
|
className="govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
|
href="https://gov.wales/planning-and-environment-decisions-wales/contact-us"
|
||||||
|
>
|
||||||
|
contact us
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
Technical information about this website’s accessibility
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
PEDW is committed to making its website accessible, in
|
||||||
|
accordance with the Public Sector Bodies (Websites and
|
||||||
|
Mobile Applications) (No. 2) Accessibility Regulations 2018.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Compliance status</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This website is partially compliant with the Web Content
|
||||||
|
Accessibility Guidelines version 2.1 – Level AA standard,
|
||||||
|
due to the non-compliances’/‘the exemptions’ or ‘the
|
||||||
|
non-compliances and exemptions’] listed below.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Non-compliance with the accessibility regulations</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Some images do not have a text alternative, so people using
|
||||||
|
a screen reader cannot access the information. This fails
|
||||||
|
WCAG 2.1 success criterion 1.1.1 (non-text content).
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
We plan to add text alternatives for all images by September
|
||||||
|
2020. When we publish new content we’ll make sure our use of
|
||||||
|
images meets accessibility standards.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Preparation of this accessibility statement</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This statement was prepared on [TBC]. It was last reviewed
|
||||||
|
on [TBC when signed off].
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This website was last tested on [TBC]. The test was carried
|
||||||
|
out by [add name of organisation that carried out test, or
|
||||||
|
indicate that you did your own testing].
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
We used this approach to deciding on a sample of pages to
|
||||||
|
test [add link to explanation of how you decided which pages
|
||||||
|
to test].
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can read the full accessibility test report [add link to
|
||||||
|
report].
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
|
export default function TandCCY() {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
return (
|
||||||
|
<div className="govuk-grid-row govuk-body">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
|
||||||
|
T and c CY
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
|
||||||
|
export default function TandCEN() {
|
||||||
|
let { t } = useTranslation();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { locale } = router;
|
||||||
|
return (
|
||||||
|
<div className="govuk-grid-row govuk-body">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<h2 className="govuk-heading-l govuk-!-margin-bottom-7">
|
||||||
|
T and c
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -24,41 +24,46 @@ const RenderTextfield = ({
|
|||||||
input,
|
input,
|
||||||
hint1,
|
hint1,
|
||||||
hint2,
|
hint2,
|
||||||
|
hint3,
|
||||||
meta: { touched, error },
|
meta: { touched, error },
|
||||||
...custom
|
...custom
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div className="govuk-form-group">
|
||||||
className={
|
|
||||||
touched && error
|
|
||||||
? "govuk-form-group govuk-form-group--error"
|
|
||||||
: "govuk-form-group "
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div id="basicSearch-hint" className="govuk-hint ">
|
<div id="basicSearch-hint" className="govuk-hint ">
|
||||||
<label
|
<label
|
||||||
className="govuk-label "
|
className="govuk-label "
|
||||||
htmlFor={id}
|
htmlFor={id}
|
||||||
id={id + "_label"}
|
id={id + "_label"}
|
||||||
>
|
>
|
||||||
{label}
|
<span className="govuk-body-s">{hint1}</span>
|
||||||
<span className="govuk-body-m">{hint1}</span>
|
|
||||||
</label>
|
</label>
|
||||||
|
<ul className="govuk-body-s govuk-!-margin-top-3">
|
||||||
<br />
|
<li>{hint2} </li>
|
||||||
<span className="govuk-body-s">
|
<li>{hint3}</li>
|
||||||
{hint2} CAS-00009-W8N6W4
|
</ul>
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{touched && error && (
|
<div>
|
||||||
<span id={id + "-error"} className="govuk-error-message">
|
<input
|
||||||
<span className="govuk-visually-hidden">Error:</span>{" "}
|
{...input}
|
||||||
{error}
|
className={className}
|
||||||
</span>
|
name={name}
|
||||||
)}
|
id={id}
|
||||||
<input {...input} className={className} name={name} id={id} />
|
/>
|
||||||
|
{touched && error && (
|
||||||
|
<span
|
||||||
|
id={id + "-error"}
|
||||||
|
className="govuk-error-message govuk-form-group--error"
|
||||||
|
>
|
||||||
|
<span className="govuk-visually-hidden">
|
||||||
|
Error:
|
||||||
|
</span>{" "}
|
||||||
|
{error}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -121,7 +126,10 @@ let CaseSearch = (props) => {
|
|||||||
aria-describedby="basicSearch-hint"
|
aria-describedby="basicSearch-hint"
|
||||||
hint1={t("myportal:searchcases-card-search-hint")}
|
hint1={t("myportal:searchcases-card-search-hint")}
|
||||||
hint2={t(
|
hint2={t(
|
||||||
"myportal:searchcases-card-search-example-label"
|
"myportal:searchcases-card-search-example-label-1"
|
||||||
|
)}
|
||||||
|
hint3={t(
|
||||||
|
"myportal:searchcases-card-search-example-label-2"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -218,16 +218,16 @@ const TopThree = (props) => {
|
|||||||
let noRecordsLabel = "";
|
let noRecordsLabel = "";
|
||||||
switch (topThreeType) {
|
switch (topThreeType) {
|
||||||
case "watchedCases":
|
case "watchedCases":
|
||||||
noRecordsLabel = "You are not watching any cases";
|
noRecordsLabel = t("myportal:norecords-watched-cases");
|
||||||
break;
|
break;
|
||||||
case "myRepresentations":
|
case "myRepresentations":
|
||||||
noRecordsLabel = "You have no representations";
|
noRecordsLabel = t("myportal:norecords-representations");
|
||||||
break;
|
break;
|
||||||
case "myCases":
|
case "myCases":
|
||||||
noRecordsLabel = "You have no cases";
|
noRecordsLabel = t("myportal:norecords-cases");
|
||||||
break;
|
break;
|
||||||
case "awaitingSubmission":
|
case "awaitingSubmission":
|
||||||
noRecordsLabel = "You have no awaiting submissions";
|
noRecordsLabel = t("myportal:norecords-awaiting-submissions");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import PrivacyEN from "./footerDocs/privacy_en";
|
||||||
|
import PrivacyCY from "./footerDocs/privacy_cy";
|
||||||
const PrivacyStatement = (props) => {
|
const PrivacyStatement = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
|
|
||||||
@@ -16,14 +17,7 @@ const PrivacyStatement = (props) => {
|
|||||||
id="main-content"
|
id="main-content"
|
||||||
role="main"
|
role="main"
|
||||||
>
|
>
|
||||||
<div className="govuk-grid-row">
|
{router.locale != "en" ? <PrivacyCY /> : <PrivacyEN />}
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<h1 className="govuk-heading-l govuk-!-margin-bottom-7">
|
|
||||||
Privacy Statement
|
|
||||||
</h1>
|
|
||||||
<p>bkah blah</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
+3
-8
@@ -1,6 +1,8 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import useTranslation from "next-translate/useTranslation";
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import TandCEN from "./footerDocs/tandc_en";
|
||||||
|
import TandCCY from "./footerDocs/tandc_cy";
|
||||||
|
|
||||||
const TermsAndConditionsStatement = (props) => {
|
const TermsAndConditionsStatement = (props) => {
|
||||||
let { t } = useTranslation();
|
let { t } = useTranslation();
|
||||||
@@ -16,14 +18,7 @@ const TermsAndConditionsStatement = (props) => {
|
|||||||
id="main-content"
|
id="main-content"
|
||||||
role="main"
|
role="main"
|
||||||
>
|
>
|
||||||
<div className="govuk-grid-row">
|
{router.locale != "en" ? <TandCCY /> : <TandCEN />}
|
||||||
<div className="govuk-grid-column-full">
|
|
||||||
<h1 className="govuk-heading-l govuk-!-margin-bottom-7">
|
|
||||||
{t("common:footer-terms-conditions-link-label")}
|
|
||||||
</h1>
|
|
||||||
<p>bkah blah</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ module.exports = {
|
|||||||
"/dnsdetails": ["case", "search", "dnsCommon", "dnsApplications"],
|
"/dnsdetails": ["case", "search", "dnsCommon", "dnsApplications"],
|
||||||
"/help/cookies": ["common", "cookies"],
|
"/help/cookies": ["common", "cookies"],
|
||||||
"/account/register": ["common", "account"],
|
"/account/register": ["common", "account"],
|
||||||
|
"/account/personaldetails": ["common", "search"],
|
||||||
"/details-about-cookies": ["common", "cookies"],
|
"/details-about-cookies": ["common", "cookies"],
|
||||||
"/terms-and-conditions": ["common"],
|
"/terms-and-conditions": ["common"],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"register-new-account-heading": "Creu cyfrif newydd",
|
"register-new-account-heading": "Creu cyfrif newydd",
|
||||||
"register-new-account-status-created-label": "Nid yw'ch cyfrif wedi creu",
|
"register-new-account-status-created-label": "Mae eich cyfrif wedi'i greu",
|
||||||
"register-new-account-status-not-created-label": "Mae eich cyfrif wedi'i greu",
|
"register-new-account-status-not-created-label": "Nid yw'ch cyfrif wedi creu",
|
||||||
"register-new-account-checking-label": "Gwirio am gyfrif...",
|
"register-new-account-checking-label": "Gwirio am gyfrif...",
|
||||||
"help-heading": "Help",
|
"help-heading": "Help",
|
||||||
"help-sub-heading-1": "Cwmnïau neu gyflwyniadau gan fwy nag un unigolyn (grwpiau)",
|
"help-sub-heading-1": "Cwmnïau neu gyflwyniadau gan fwy nag un unigolyn (grwpiau)",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"gov-wales-label": "LLYW.CYMRU",
|
"gov-wales-label": "LLYW.CYMRU",
|
||||||
"service-description": "Mae'r gwasanaeth hwn yn cael ei ddatblygu i gefnogi apeliadau a cheisiadau ar-lein.",
|
"service-description": "Mae'r gwasanaeth hwn yn cael ei ddatblygu i gefnogi apeliadau a cheisiadau ar-lein.",
|
||||||
"service-name": "Gwaith Achos",
|
"service-name": "Gwaith Achos",
|
||||||
|
"service-home-url": "https://gwaithcynllunio.gwasanaeth.llyw.cymru",
|
||||||
"service-name-breadcrumb": "Hafan",
|
"service-name-breadcrumb": "Hafan",
|
||||||
"new-service-beta": "Mae hwn yn wasanaeth newydd",
|
"new-service-beta": "Mae hwn yn wasanaeth newydd",
|
||||||
"breadcrumb-back-link": "Yn ôl",
|
"breadcrumb-back-link": "Yn ôl",
|
||||||
|
|||||||
@@ -7,10 +7,11 @@
|
|||||||
"makenewappeal-card-paragraph-two": "Wedi i chi glicio'r botwm 'gwneud apêl newydd' isod, cewch eich arwain drwy broses i'ch helpu i ddewis y math cywir o apêl.",
|
"makenewappeal-card-paragraph-two": "Wedi i chi glicio'r botwm 'gwneud apêl newydd' isod, cewch eich arwain drwy broses i'ch helpu i ddewis y math cywir o apêl.",
|
||||||
"makenewappeal-card-button-label": "Gwneud apêl newydd",
|
"makenewappeal-card-button-label": "Gwneud apêl newydd",
|
||||||
"mycases-card-title": "Fy achosion",
|
"mycases-card-title": "Fy achosion",
|
||||||
"searchcases-card-title": "Chwilio am ddogfennau apêl",
|
"searchcases-card-title": "Chwilio apeliadau a Datblygiadau o Arwyddocâd Cenedlaethol",
|
||||||
"searchcases-card-search-hint": "Chwiliwch drwy roi cyfeirnod 7 digid yr achos",
|
"searchcases-card-search-hint": "Defnyddiwch gyfeimod yr achos neu deitl DAC i chwilio. Bydd cyfeirnod yr achos yn debyg i un o'r canlynol:",
|
||||||
"searchcases-card-search-example-label": "Enghraifft:",
|
"searchcases-card-search-example-label-1": "APP-A12345-A-21-1234567",
|
||||||
"searchcases-card-button": "Cyflwyno Chwiliad",
|
"searchcases-card-search-example-label-2": "CAS-12345-A1B2C3",
|
||||||
|
"searchcases-card-button": "Cyflwyno chwiliad",
|
||||||
"searchcases-card-advanced-link": "Chwiliad uwch",
|
"searchcases-card-advanced-link": "Chwiliad uwch",
|
||||||
"searchcases-validation-required": "Angenrheidiol",
|
"searchcases-validation-required": "Angenrheidiol",
|
||||||
"searchcases-validation-minlength": "Rhaid bod yn 4 nod neu fwy",
|
"searchcases-validation-minlength": "Rhaid bod yn 4 nod neu fwy",
|
||||||
@@ -25,5 +26,9 @@
|
|||||||
"yourdetails-card-link": "Gweld manylion eich cyfrif",
|
"yourdetails-card-link": "Gweld manylion eich cyfrif",
|
||||||
"changepassword-card-title": "Newid eich cyfrinair",
|
"changepassword-card-title": "Newid eich cyfrinair",
|
||||||
"changepassword-card-paragraph-one": "Gallwch chi newid eich cyfrinair",
|
"changepassword-card-paragraph-one": "Gallwch chi newid eich cyfrinair",
|
||||||
"changepassword-card-link": "Diweddarwch eich cyfrinair"
|
"changepassword-card-link": "Diweddarwch eich cyfrinair",
|
||||||
|
"norecords-cases": "Nid oes gennych unrhyw achosion",
|
||||||
|
"norecords-representations": "Nid oes gennych unrhyw sylwadau",
|
||||||
|
"norecords-watched-cases": "Nid ydych yn gwylio unrhyw achosion",
|
||||||
|
"norecords-awaiting-submission": "Nid oes gennych unrhyw gyflwyniadau sy'n aros"
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"register-new-account-heading": "Create a new account",
|
"register-new-account-heading": "Create a new account",
|
||||||
"register-new-account-status-created-label": "Your account has not created",
|
"register-new-account-status-created-label": "Your account has created",
|
||||||
"register-new-account-status-not-created-label": "Your account has been created",
|
"register-new-account-status-not-created-label": "Your account has not been created",
|
||||||
"register-new-account-checking-label": "Checking for account...",
|
"register-new-account-checking-label": "Checking for account...",
|
||||||
"help-heading": "Help",
|
"help-heading": "Help",
|
||||||
"help-sub-heading-1": "Companies or submissions by more than one individual (groups)",
|
"help-sub-heading-1": "Companies or submissions by more than one individual (groups)",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"gov-wales-label": "GOV.WALES",
|
"gov-wales-label": "GOV.WALES",
|
||||||
"service-description": "This service is being developed to support online appeals and applications.",
|
"service-description": "This service is being developed to support online appeals and applications.",
|
||||||
"service-name": "Casework",
|
"service-name": "Casework",
|
||||||
|
"service-home-url": "https://planningcasework.service.gov.wales",
|
||||||
"service-name-breadcrumb": "Home",
|
"service-name-breadcrumb": "Home",
|
||||||
"new-service-beta": "This is a new service",
|
"new-service-beta": "This is a new service",
|
||||||
"breadcrumb-back-link": "Back",
|
"breadcrumb-back-link": "Back",
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
"makenewappeal-card-paragraph-two": "Once you click the 'make a new appeal' button below you will be guided through a process to help you select the correct appeal type",
|
"makenewappeal-card-paragraph-two": "Once you click the 'make a new appeal' button below you will be guided through a process to help you select the correct appeal type",
|
||||||
"makenewappeal-card-button-label": "Make a new appeal",
|
"makenewappeal-card-button-label": "Make a new appeal",
|
||||||
"mycases-card-title": "My cases",
|
"mycases-card-title": "My cases",
|
||||||
"searchcases-card-title": "Appeal documentation search",
|
"searchcases-card-title": "Search appeals and Developments of National Significance",
|
||||||
"searchcases-card-search-hint": "Search by entering the 7 digit case reference number",
|
"searchcases-card-search-hint": "Use the case reference or DNS title to search. Case reference will be similar to one of the following:",
|
||||||
"searchcases-card-search-example-label": "Example",
|
"searchcases-card-search-example-label-1": "APP-A12345-A-21-1234567",
|
||||||
|
"searchcases-card-search-example-label-2": "CAS-12345-A1B2C3",
|
||||||
"searchcases-card-button": "Submit Search",
|
"searchcases-card-button": "Submit Search",
|
||||||
"searchcases-card-advanced-link": "Advanced Search",
|
"searchcases-card-advanced-link": "Advanced Search",
|
||||||
"searchcases-validation-required": "Required",
|
"searchcases-validation-required": "Required",
|
||||||
@@ -25,5 +26,9 @@
|
|||||||
"yourdetails-card-link": "View your account details",
|
"yourdetails-card-link": "View your account details",
|
||||||
"changepassword-card-title": "Change your password",
|
"changepassword-card-title": "Change your password",
|
||||||
"changepassword-card-paragraph-one": "You can change your password",
|
"changepassword-card-paragraph-one": "You can change your password",
|
||||||
"changepassword-card-link": "Update your password"
|
"changepassword-card-link": "Update your password",
|
||||||
|
"norecords-cases": "You have no cases",
|
||||||
|
"norecords-representations": "You have no representations",
|
||||||
|
"norecords-watched-cases": "You are not watching any cases",
|
||||||
|
"norecords-awaiting-submission": "You have no awaiting submissions"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import Head from "next/head";
|
||||||
|
import Header from "../components/header";
|
||||||
|
import Banner from "../components/banner";
|
||||||
|
import CookieBanner from "../components/cookieBanner";
|
||||||
|
import useTranslation from "next-translate/useTranslation";
|
||||||
|
import Footer from "../components/footer";
|
||||||
|
|
||||||
|
function Error({ statusCode }, props) {
|
||||||
|
let { t, lang } = useTranslation();
|
||||||
|
const { footerLinks, pages } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Head>
|
||||||
|
<title>
|
||||||
|
{t("case:page-title")} - {t("common:service-name")}
|
||||||
|
</title>
|
||||||
|
</Head>
|
||||||
|
<div id="page_wrapper">
|
||||||
|
<CookieBanner />
|
||||||
|
<Header courseName={t("common:service-name")} />
|
||||||
|
<div className="govuk-width-container govuk-!-padding-bottom-9">
|
||||||
|
<main className="govuk-main-wrapper govuk-!-padding-top-9 govuk-!-padding-bottom-9">
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-two-thirds ">
|
||||||
|
<h1>{t("common:error-page-title")}</h1>
|
||||||
|
<p className="govuk-body">
|
||||||
|
{statusCode
|
||||||
|
? `An error ${statusCode} occurred on server`
|
||||||
|
: t("common:error-page-message")}
|
||||||
|
</p>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Go back home</a>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
<Footer footerLinks={footerLinks} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Error.getInitialProps = ({ res, err }) => {
|
||||||
|
const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
|
||||||
|
console.log(res, err);
|
||||||
|
return { statusCode };
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Error;
|
||||||
+1
-1
@@ -9,7 +9,7 @@ class MyDocument extends Document {
|
|||||||
|
|
||||||
let useGATracking = false;
|
let useGATracking = false;
|
||||||
|
|
||||||
// remove this block when not need after softlaunch
|
//remove this block when not need after softlaunch
|
||||||
let hasBasicAuth =
|
let hasBasicAuth =
|
||||||
typeof process.env.BASIC_AUTH_CREDENTIALS != "undefined";
|
typeof process.env.BASIC_AUTH_CREDENTIALS != "undefined";
|
||||||
|
|
||||||
|
|||||||
+19
-12
@@ -61,19 +61,26 @@ const Home = (props) => {
|
|||||||
</h1>
|
</h1>
|
||||||
) : (
|
) : (
|
||||||
<h1>
|
<h1>
|
||||||
{props.accountDetails.accCr !=
|
{console.log(
|
||||||
"false"
|
props.accountDetails.accCr
|
||||||
? props.accountDetails
|
)}
|
||||||
.accCr == "exists"
|
|
||||||
? t(
|
{props.accountDetails.accCr ===
|
||||||
"account:register-new-account-status-not-created-label"
|
false
|
||||||
)
|
? t(
|
||||||
: t(
|
|
||||||
"account:register-new-account-status-created-label"
|
|
||||||
)
|
|
||||||
: t(
|
|
||||||
"account:register-new-account-checking-label"
|
"account:register-new-account-checking-label"
|
||||||
)}
|
)
|
||||||
|
: props.accountDetails
|
||||||
|
.accCr === "created"
|
||||||
|
? t(
|
||||||
|
"account:register-new-account-status-created-label"
|
||||||
|
)
|
||||||
|
: props.accountDetails
|
||||||
|
.accCr === "exists"
|
||||||
|
? t(
|
||||||
|
"account:register-new-account-status-not-created-label"
|
||||||
|
)
|
||||||
|
: "wewer"}
|
||||||
</h1>
|
</h1>
|
||||||
)}
|
)}
|
||||||
<RegisterForm
|
<RegisterForm
|
||||||
|
|||||||
@@ -140,6 +140,21 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
(store) =>
|
(store) =>
|
||||||
async ({ query, req, res }) => {
|
async ({ query, req, res }) => {
|
||||||
let token = await getToken();
|
let token = await getToken();
|
||||||
|
|
||||||
|
var tokenIssuedAt = new Date();
|
||||||
|
var tokenExpiryTimeAt = new Date();
|
||||||
|
tokenExpiryTimeAt.setSeconds(
|
||||||
|
tokenExpiryTimeAt.getSeconds() + token.expires_in
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"token issued:",
|
||||||
|
tokenIssuedAt.toUTCString(),
|
||||||
|
"\n",
|
||||||
|
"token expires:",
|
||||||
|
tokenExpiryTimeAt.toUTCString()
|
||||||
|
);
|
||||||
|
console.log(token);
|
||||||
token = token.access_token;
|
token = token.access_token;
|
||||||
|
|
||||||
const [appealTypeData, lpaData] = await Promise.all([
|
const [appealTypeData, lpaData] = await Promise.all([
|
||||||
|
|||||||
@@ -70,28 +70,38 @@ function checkProxyPath(queryPath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var data = JSON.stringify(req.body);
|
var data = req.body; //JSON.stringify(req.body);
|
||||||
var accessToken = await getToken();
|
var accessToken = await getToken();
|
||||||
accessToken = accessToken.access_token;
|
accessToken = accessToken.access_token;
|
||||||
|
|
||||||
const isDocument = req.url.indexOf("/documents/download") > -1;
|
const isDocument = req.url.indexOf("/documents/download") > -1;
|
||||||
|
|
||||||
let hashCheckPath = isDocument
|
let hashCheckPath =
|
||||||
? req.url.split("?hash=")[0]
|
req.url.indexOf("?hash=") > -1
|
||||||
: req.url.split("&hash=")[0];
|
? req.url.split("?hash=")[0]
|
||||||
let hashCheckValue = isDocument
|
: req.url.split("&hash=")[0];
|
||||||
? req.url.split("?hash=")[1]
|
|
||||||
: req.url.split("&hash=")[1];
|
let hashCheckValue =
|
||||||
|
req.url.indexOf("?hash=") > -1
|
||||||
|
? req.url.split("?hash=")[1]
|
||||||
|
: req.url.split("&hash=")[1];
|
||||||
|
|
||||||
let hashFromRequest = checkProxyPath(hashCheckPath);
|
let hashFromRequest = checkProxyPath(hashCheckPath);
|
||||||
|
|
||||||
|
let proxyDestinationURL =
|
||||||
|
PROXY_RELAY_URL +
|
||||||
|
(req.url.indexOf("?hash=") > -1
|
||||||
|
? req.url.split("?hash=")[0]
|
||||||
|
: req.url.split("&hash=")[0]
|
||||||
|
).split("/api/proxy/")[1] +
|
||||||
|
(req.url.indexOf("?hash=") > -1
|
||||||
|
? "?hash=" + req.url.split("?hash=")[1]
|
||||||
|
: "&hash=" + req.url.split("&hash=")[1]);
|
||||||
|
|
||||||
var configNoData = {
|
var configNoData = {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
//url: PROXY_RELAY_URL + updateFormCollection + "(" + incidentId + ")",
|
//url: PROXY_RELAY_URL + updateFormCollection + "(" + incidentId + ")",
|
||||||
url:
|
url: proxyDestinationURL,
|
||||||
PROXY_RELAY_URL +
|
|
||||||
req.url.split("&hash=")[0].split("/api/proxy/")[1] +
|
|
||||||
"&hash=" +
|
|
||||||
req.url.split("&hash=")[1],
|
|
||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
@@ -105,11 +115,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
url:
|
url: proxyDestinationURL,
|
||||||
PROXY_RELAY_URL +
|
|
||||||
req.query.route[0] +
|
|
||||||
"&hash=" +
|
|
||||||
req.url.split("&hash=")[1],
|
|
||||||
headers: {
|
headers: {
|
||||||
"OData-MaxVersion": "4.0",
|
"OData-MaxVersion": "4.0",
|
||||||
"OData-Version": "4.0",
|
"OData-Version": "4.0",
|
||||||
@@ -145,7 +151,9 @@ export default async function ApiProxy(req, res) {
|
|||||||
hashCheckPath.indexOf("/download") > 0 ? true : false;
|
hashCheckPath.indexOf("/download") > 0 ? true : false;
|
||||||
|
|
||||||
axios(
|
axios(
|
||||||
req.method == "GET"
|
req.method == "PATCH"
|
||||||
|
? config
|
||||||
|
: req.method == "GET"
|
||||||
? hasDocument
|
? hasDocument
|
||||||
? configDocument
|
? configDocument
|
||||||
: configNoData
|
: configNoData
|
||||||
@@ -177,6 +185,10 @@ export default async function ApiProxy(req, res) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log(
|
||||||
|
"no matching hash",
|
||||||
|
hashCheckValue + " - " + hashFromRequest
|
||||||
|
);
|
||||||
res.status(405).end();
|
res.status(405).end();
|
||||||
return resolve();
|
return resolve();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,28 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
async ({ query, req, res }) => {
|
async ({ query, req, res }) => {
|
||||||
console.log("query-", query);
|
console.log("query-", query);
|
||||||
|
|
||||||
|
res.setHeader(
|
||||||
|
"Cache-Control",
|
||||||
|
"public, s-maxage=10, stale-while-revalidate=59"
|
||||||
|
);
|
||||||
|
|
||||||
let token = await getToken();
|
let token = await getToken();
|
||||||
|
|
||||||
|
var tokenIssuedAt = new Date();
|
||||||
|
var tokenExpiryTimeAt = new Date();
|
||||||
|
tokenExpiryTimeAt.setSeconds(
|
||||||
|
tokenExpiryTimeAt.getSeconds() + token.expires_in
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"token issued:",
|
||||||
|
tokenIssuedAt.toUTCString(),
|
||||||
|
"\n",
|
||||||
|
"token expires:",
|
||||||
|
tokenExpiryTimeAt.toUTCString()
|
||||||
|
);
|
||||||
|
console.log(token);
|
||||||
|
|
||||||
token = token.access_token;
|
token = token.access_token;
|
||||||
|
|
||||||
let searchResultsObj = await getBasicDNSSearch(token);
|
let searchResultsObj = await getBasicDNSSearch(token);
|
||||||
|
|||||||
@@ -122,6 +122,22 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
console.log("query-", query);
|
console.log("query-", query);
|
||||||
|
|
||||||
let token = await getToken();
|
let token = await getToken();
|
||||||
|
|
||||||
|
var tokenIssuedAt = new Date();
|
||||||
|
var tokenExpiryTimeAt = new Date();
|
||||||
|
tokenExpiryTimeAt.setSeconds(
|
||||||
|
tokenExpiryTimeAt.getSeconds() + token.expires_in
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(
|
||||||
|
"token issued:",
|
||||||
|
tokenIssuedAt.toUTCString(),
|
||||||
|
"\n",
|
||||||
|
"token expires:",
|
||||||
|
tokenExpiryTimeAt.toUTCString()
|
||||||
|
);
|
||||||
|
console.log(token);
|
||||||
|
|
||||||
token = token.access_token;
|
token = token.access_token;
|
||||||
|
|
||||||
let searchResultsObj = await getBasicSearch(token, query.q);
|
let searchResultsObj = await getBasicSearch(token, query.q);
|
||||||
|
|||||||
@@ -717,6 +717,15 @@ textarea,
|
|||||||
// background: #f3f2f1;
|
// background: #f3f2f1;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
.annex {
|
||||||
|
.govuk-summary-list__value {
|
||||||
|
width: 33.333333%;
|
||||||
|
@media screen and (max-width: 900px) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.govuk-summary-list__key,
|
.govuk-summary-list__key,
|
||||||
.govuk-summary-list__value,
|
.govuk-summary-list__value,
|
||||||
.govuk-summary-list__actions {
|
.govuk-summary-list__actions {
|
||||||
|
|||||||
Reference in New Issue
Block a user