console log tidying
This commit is contained in:
+40
-40
@@ -130,7 +130,7 @@ export const createContainer = async (containerName) => {
|
|||||||
|
|
||||||
//containerName = containerName.toLowerCase();
|
//containerName = containerName.toLowerCase();
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "container name:",
|
// "container name:",
|
||||||
// containerName,
|
// containerName,
|
||||||
// STORAGE_PATH + "/" + containerName
|
// STORAGE_PATH + "/" + containerName
|
||||||
@@ -145,11 +145,11 @@ export const createContainer = async (containerName) => {
|
|||||||
|
|
||||||
const createContainerResponse = await containerClient.createIfNotExists();
|
const createContainerResponse = await containerClient.createIfNotExists();
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
"\n//////////////////\n container name :",
|
// "\n//////////////////\n container name :",
|
||||||
containerName,
|
// containerName,
|
||||||
"\n//////////////////\n"
|
// "\n//////////////////\n"
|
||||||
);
|
// );
|
||||||
|
|
||||||
return containerName;
|
return containerName;
|
||||||
};
|
};
|
||||||
@@ -158,7 +158,7 @@ export const getContainers = async () => {
|
|||||||
const creds = new DefaultAzureCredential();
|
const creds = new DefaultAzureCredential();
|
||||||
const blobServiceClient = new BlobServiceClient(`${STORAGE_PATH}`, creds);
|
const blobServiceClient = new BlobServiceClient(`${STORAGE_PATH}`, creds);
|
||||||
|
|
||||||
console.log("Containers:");
|
//console.log("Containers:");
|
||||||
for await (const container of blobServiceClient.listContainers()) {
|
for await (const container of blobServiceClient.listContainers()) {
|
||||||
console.log(`- ${container.name}`);
|
console.log(`- ${container.name}`);
|
||||||
}
|
}
|
||||||
@@ -486,7 +486,7 @@ export const deleteBlobCase = async (containerName, blobName) => {
|
|||||||
containerClient.deleteBlob(blob.name);
|
containerClient.deleteBlob(blob.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// containerClient.deleteBlob(blobName);
|
//containerClient.deleteBlob(blobName);
|
||||||
console.log(`deleted blob ${blobName}`);
|
console.log(`deleted blob ${blobName}`);
|
||||||
for await (const blob of containerClient.listBlobsFlat()) {
|
for await (const blob of containerClient.listBlobsFlat()) {
|
||||||
console.log(" ------ :", blob.name);
|
console.log(" ------ :", blob.name);
|
||||||
@@ -521,8 +521,8 @@ export const deleteBlobRep = async (containerName, blobName) => {
|
|||||||
//containerClient.deleteBlob(blob.name);
|
//containerClient.deleteBlob(blob.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// containerClient.deleteBlob(blobName);
|
//containerClient.deleteBlob(blobName);
|
||||||
// console.log(`deleted blob ${blobName}`);
|
//console.log(`deleted blob ${blobName}`);
|
||||||
// for await (const blob of containerClient.listBlobsFlat()) {
|
// for await (const blob of containerClient.listBlobsFlat()) {
|
||||||
// console.log(" ------ :", blob.name);
|
// console.log(" ------ :", blob.name);
|
||||||
// }
|
// }
|
||||||
@@ -669,7 +669,7 @@ export const uploadPDFRepFiles = async (
|
|||||||
foldername
|
foldername
|
||||||
);
|
);
|
||||||
|
|
||||||
// console.log(`files[${prop}] = ${files[prop][0].size}`);
|
//console.log(`files[${prop}] = ${files[prop][0].size}`);
|
||||||
console.log(foldername + "/files/" + formContent.split("tmp/")[1]);
|
console.log(foldername + "/files/" + formContent.split("tmp/")[1]);
|
||||||
|
|
||||||
const blobName = foldername + "/" + formContent.split("tmp/")[1];
|
const blobName = foldername + "/" + formContent.split("tmp/")[1];
|
||||||
@@ -707,14 +707,14 @@ export const uploadPDFAppealFiles = async (
|
|||||||
|
|
||||||
const files = formContent;
|
const files = formContent;
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "///////////////////////////// \n",
|
// "///////////////////////////// \n",
|
||||||
// formContent,
|
// formContent,
|
||||||
// containerName,
|
// containerName,
|
||||||
// foldername,
|
// foldername,
|
||||||
// "\n///////////////////////////// \n"
|
// "\n///////////////////////////// \n"
|
||||||
// );
|
// );
|
||||||
// console.log(
|
//console.log(
|
||||||
// "///////////////////////////// \n",
|
// "///////////////////////////// \n",
|
||||||
// "appeal pdf files...",
|
// "appeal pdf files...",
|
||||||
// files,
|
// files,
|
||||||
@@ -723,7 +723,7 @@ export const uploadPDFAppealFiles = async (
|
|||||||
// "\n///////////////////////////// \n"
|
// "\n///////////////////////////// \n"
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// console.log(`files[${prop}] = ${files[prop][0].size}`);
|
//console.log(`files[${prop}] = ${files[prop][0].size}`);
|
||||||
console.log(foldername + "/files/" + formContent.split("tmp/")[1]);
|
console.log(foldername + "/files/" + formContent.split("tmp/")[1]);
|
||||||
|
|
||||||
const blobName = foldername + "/files/" + formContent.split("tmp/")[1];
|
const blobName = foldername + "/files/" + formContent.split("tmp/")[1];
|
||||||
@@ -823,7 +823,7 @@ export const downloadAllProgressFiles = async (
|
|||||||
containerName,
|
containerName,
|
||||||
progressBlobObj
|
progressBlobObj
|
||||||
) => {
|
) => {
|
||||||
// console.log(
|
//console.log(
|
||||||
// "/////////////////////////\n downloading files: " +
|
// "/////////////////////////\n downloading files: " +
|
||||||
// JSON.stringify(progressBlobObj) +
|
// JSON.stringify(progressBlobObj) +
|
||||||
// "\n/////////////////////////\n"
|
// "\n/////////////////////////\n"
|
||||||
@@ -899,11 +899,11 @@ export const downloadRepFile = async (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
|
export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
|
||||||
console.log(
|
//console.log(
|
||||||
"/////////////////////////\n downloading files: " +
|
// "/////////////////////////\n downloading files: " +
|
||||||
JSON.stringify(repsBlobObj) +
|
// JSON.stringify(repsBlobObj) +
|
||||||
"\n/////////////////////////\n"
|
// "\n/////////////////////////\n"
|
||||||
);
|
// );
|
||||||
|
|
||||||
const containerToken = await createContainerSas(containerName);
|
const containerToken = await createContainerSas(containerName);
|
||||||
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
const sasUrl = `${STORAGE_PATH}/${containerName}?${containerToken}`;
|
||||||
@@ -922,7 +922,7 @@ export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
|
|||||||
console.log("is empt and an array");
|
console.log("is empt and an array");
|
||||||
|
|
||||||
for (const prop in repsBlobObj) {
|
for (const prop in repsBlobObj) {
|
||||||
console.log(`Progress - ${prop}: ${repsBlobObj[prop].path}`);
|
//console.log(`Progress - ${prop}: ${repsBlobObj[prop].path}`);
|
||||||
blobClient = containerClient.getBlobClient(repsBlobObj[prop].path);
|
blobClient = containerClient.getBlobClient(repsBlobObj[prop].path);
|
||||||
downloadedBlob = await blobClient.download(0);
|
downloadedBlob = await blobClient.download(0);
|
||||||
let repBlobObj = await streamToBuffer(
|
let repBlobObj = await streamToBuffer(
|
||||||
@@ -940,7 +940,7 @@ export const downloadAllRepsFiles = async (containerName, repsBlobObj) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//downloaded = downloaded.substring(0, downloaded.length - 1);
|
//downloaded = downloaded.substring(0, downloaded.length - 1);
|
||||||
// console.log(
|
//console.log(
|
||||||
// "/////////////////////////\n downloaded : " +
|
// "/////////////////////////\n downloaded : " +
|
||||||
// JSON.stringify(
|
// JSON.stringify(
|
||||||
// '{ "@odata.count": ' +
|
// '{ "@odata.count": ' +
|
||||||
@@ -1029,11 +1029,11 @@ export const getProgressBlobs = async (containerName, caseReference) => {
|
|||||||
blobCount++;
|
blobCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
"this is the casefolder and blobcount:",
|
// "this is the casefolder and blobcount:",
|
||||||
caseReference,
|
// caseReference,
|
||||||
blobCount
|
// blobCount
|
||||||
);
|
// );
|
||||||
|
|
||||||
let blobObj = [];
|
let blobObj = [];
|
||||||
for await (const blob of containerClient.listBlobsFlat({
|
for await (const blob of containerClient.listBlobsFlat({
|
||||||
@@ -1114,12 +1114,12 @@ export const getAllProgressBlobs = async (containerName) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
"\n////////////////////////////\n",
|
// "\n////////////////////////////\n",
|
||||||
"blobObj:",
|
// "blobObj:",
|
||||||
blobObj,
|
// blobObj,
|
||||||
"\n////////////////////////////"
|
// "\n////////////////////////////"
|
||||||
);
|
// );
|
||||||
|
|
||||||
return blobObj;
|
return blobObj;
|
||||||
};
|
};
|
||||||
@@ -1135,15 +1135,15 @@ export const getRepsBlobs = async (containerName) => {
|
|||||||
for await (const blob of containerClient.findBlobsByTags(
|
for await (const blob of containerClient.findBlobsByTags(
|
||||||
"blobType='Representation'"
|
"blobType='Representation'"
|
||||||
)) {
|
)) {
|
||||||
console.log(`-----Get Rep Blob ${blobCount++}: ${blob.name}`);
|
//console.log(`-----Get Rep Blob ${blobCount++}: ${blob.name}`);
|
||||||
blobCount++;
|
blobCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
"this is the casefolder and blobcount:",
|
// "this is the casefolder and blobcount:",
|
||||||
//caseReference,
|
// //caseReference,
|
||||||
blobCount
|
// blobCount
|
||||||
);
|
// );
|
||||||
|
|
||||||
const listOptions = {
|
const listOptions = {
|
||||||
includeMetadata: true,
|
includeMetadata: true,
|
||||||
@@ -1158,7 +1158,7 @@ export const getRepsBlobs = async (containerName) => {
|
|||||||
listOptions
|
listOptions
|
||||||
)) {
|
)) {
|
||||||
const blobClient = containerClient.getBlobClient(blob.name);
|
const blobClient = containerClient.getBlobClient(blob.name);
|
||||||
console.log("getreps blob:", blob);
|
//console.log("getreps blob:", blob);
|
||||||
blob.name.split("/")[2].indexOf("_rep.json") > 0 &&
|
blob.name.split("/")[2].indexOf("_rep.json") > 0 &&
|
||||||
blob.name.split("/")[2].indexOf("undefined") < 0 &&
|
blob.name.split("/")[2].indexOf("undefined") < 0 &&
|
||||||
blobObj.push({
|
blobObj.push({
|
||||||
|
|||||||
@@ -1,147 +0,0 @@
|
|||||||
import axios from "axios";
|
|
||||||
import { hashAPIPath, consoleLogger } from "./";
|
|
||||||
|
|
||||||
const configEndpoint = process.env.GG_PROVIDER_CONFIG_ENDPOINT;
|
|
||||||
const ggClientID = process.env.GG_CLIENT_ID;
|
|
||||||
const ggClientSecret = process.env.GG_CLIENT_SECRET;
|
|
||||||
const WEBAPI_URL =
|
|
||||||
process.env.RELAY_ROOT ||
|
|
||||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
|
||||||
|
|
||||||
const azureHeaders = (access_token) => {
|
|
||||||
return {
|
|
||||||
headers: {
|
|
||||||
"OData-MaxVersion": "4.0",
|
|
||||||
"OData-Version": "4.0",
|
|
||||||
"Accept": "application/json;odata.metadata=none",
|
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
"Authorization": "Bearer " + access_token,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getProviderConfig = () => {
|
|
||||||
return axios
|
|
||||||
.get(configEndpoint)
|
|
||||||
.then((res) => res.data)
|
|
||||||
.catch((error) => {
|
|
||||||
console.log("error :", error.response);
|
|
||||||
// return error;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getUserInfo = (userInfoURL, authToken) => {
|
|
||||||
const tokenConfig = {
|
|
||||||
headers: {
|
|
||||||
"Authorization": "Bearer " + authToken,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
return axios
|
|
||||||
.get(userInfoURL, tokenConfig)
|
|
||||||
.then((res) => res)
|
|
||||||
.catch((error) => {
|
|
||||||
//console.log(`Error: ${err?.response?.data}`);
|
|
||||||
//return error;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var Base64 = {
|
|
||||||
_keyStr:
|
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
||||||
encode: function (e) {
|
|
||||||
var t = "";
|
|
||||||
var n, r, i, s, o, u, a;
|
|
||||||
var f = 0;
|
|
||||||
e = Base64._utf8_encode(e);
|
|
||||||
while (f < e.length) {
|
|
||||||
n = e.charCodeAt(f++);
|
|
||||||
r = e.charCodeAt(f++);
|
|
||||||
i = e.charCodeAt(f++);
|
|
||||||
s = n >> 2;
|
|
||||||
o = ((n & 3) << 4) | (r >> 4);
|
|
||||||
u = ((r & 15) << 2) | (i >> 6);
|
|
||||||
a = i & 63;
|
|
||||||
if (isNaN(r)) {
|
|
||||||
u = a = 64;
|
|
||||||
} else if (isNaN(i)) {
|
|
||||||
a = 64;
|
|
||||||
}
|
|
||||||
t =
|
|
||||||
t +
|
|
||||||
this._keyStr.charAt(s) +
|
|
||||||
this._keyStr.charAt(o) +
|
|
||||||
this._keyStr.charAt(u) +
|
|
||||||
this._keyStr.charAt(a);
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
decode: function (e) {
|
|
||||||
var t = "";
|
|
||||||
var n, r, i;
|
|
||||||
var s, o, u, a;
|
|
||||||
var f = 0;
|
|
||||||
//e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
|
||||||
while (f < e.length) {
|
|
||||||
s = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
o = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
u = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
a = this._keyStr.indexOf(e.charAt(f++));
|
|
||||||
n = (s << 2) | (o >> 4);
|
|
||||||
r = ((o & 15) << 4) | (u >> 2);
|
|
||||||
i = ((u & 3) << 6) | a;
|
|
||||||
t = t + String.fromCharCode(n);
|
|
||||||
if (u != 64) {
|
|
||||||
t = t + String.fromCharCode(r);
|
|
||||||
}
|
|
||||||
if (a != 64) {
|
|
||||||
t = t + String.fromCharCode(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
t = Base64._utf8_decode(t);
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
_utf8_encode: function (e) {
|
|
||||||
e = e.replace(/\r\n/g, "\n");
|
|
||||||
var t = "";
|
|
||||||
for (var n = 0; n < e.length; n++) {
|
|
||||||
var r = e.charCodeAt(n);
|
|
||||||
if (r < 128) {
|
|
||||||
t += String.fromCharCode(r);
|
|
||||||
} else if (r > 127 && r < 2048) {
|
|
||||||
t += String.fromCharCode((r >> 6) | 192);
|
|
||||||
t += String.fromCharCode((r & 63) | 128);
|
|
||||||
} else {
|
|
||||||
t += String.fromCharCode((r >> 12) | 224);
|
|
||||||
t += String.fromCharCode(((r >> 6) & 63) | 128);
|
|
||||||
t += String.fromCharCode((r & 63) | 128);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
_utf8_decode: function (e) {
|
|
||||||
var t = "";
|
|
||||||
var n = 0;
|
|
||||||
var r = (c1 = c2 = 0);
|
|
||||||
while (n < e.length) {
|
|
||||||
r = e.charCodeAt(n);
|
|
||||||
if (r < 128) {
|
|
||||||
t += String.fromCharCode(r);
|
|
||||||
n++;
|
|
||||||
} else if (r > 191 && r < 224) {
|
|
||||||
c2 = e.charCodeAt(n + 1);
|
|
||||||
t += String.fromCharCode(((r & 31) << 6) | (c2 & 63));
|
|
||||||
n += 2;
|
|
||||||
} else {
|
|
||||||
c2 = e.charCodeAt(n + 1);
|
|
||||||
c3 = e.charCodeAt(n + 2);
|
|
||||||
t += String.fromCharCode(
|
|
||||||
((r & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)
|
|
||||||
);
|
|
||||||
n += 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
+110
-110
@@ -32,7 +32,7 @@ export const getIP = (req) => {
|
|||||||
? forwarded.split(/, /)[0]
|
? forwarded.split(/, /)[0]
|
||||||
: req.socket.remoteAddress;
|
: req.socket.remoteAddress;
|
||||||
|
|
||||||
console.log(
|
console.info(
|
||||||
"\n====================\n Client IP address: " + ip,
|
"\n====================\n Client IP address: " + ip,
|
||||||
"\n=====================\n"
|
"\n=====================\n"
|
||||||
);
|
);
|
||||||
@@ -462,7 +462,7 @@ export const getBasicSearchDetails = (
|
|||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this error", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -472,7 +472,7 @@ export const getBasicPartSavedDetails = (
|
|||||||
primaryIdAttribute,
|
primaryIdAttribute,
|
||||||
incidentID
|
incidentID
|
||||||
) => {
|
) => {
|
||||||
// console.log(
|
//console.log(
|
||||||
// "///////api call: ",
|
// "///////api call: ",
|
||||||
// BASE_URL +
|
// BASE_URL +
|
||||||
// "/api/endpoint/getbasicpartsaveddetails_api?appealTypeName=" +
|
// "/api/endpoint/getbasicpartsaveddetails_api?appealTypeName=" +
|
||||||
@@ -517,7 +517,7 @@ export const getBasicSearchDetailsPaged = (
|
|||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this error", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -674,7 +674,6 @@ export const getPickLists = (whichForm) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getPersonalAccount = (contactid) => {
|
export const getPersonalAccount = (contactid) => {
|
||||||
console.log(contactid);
|
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
BASE_URL +
|
||||||
@@ -702,7 +701,7 @@ export const getAppealID = (
|
|||||||
updateFormCollection,
|
updateFormCollection,
|
||||||
primaryAttribute
|
primaryAttribute
|
||||||
) => {
|
) => {
|
||||||
// console.log(
|
//console.log(
|
||||||
// "is this the collection?:",
|
// "is this the collection?:",
|
||||||
// getFormCollection(updateFormCollection)
|
// getFormCollection(updateFormCollection)
|
||||||
// )
|
// )
|
||||||
@@ -722,12 +721,12 @@ export const getAppealID = (
|
|||||||
const result = Object.entries(res.data.value[0]).filter(
|
const result = Object.entries(res.data.value[0]).filter(
|
||||||
([key]) => !key.startsWith("_")
|
([key]) => !key.startsWith("_")
|
||||||
)[0][1];
|
)[0][1];
|
||||||
console.log("result:", res.data);
|
// console.log("result:", res.data);
|
||||||
var appealID = result;
|
var appealID = result;
|
||||||
return appealID;
|
return appealID;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("API call error", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -780,7 +779,7 @@ export const getMyRepresentations = (loggedInUserId) => {
|
|||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -793,7 +792,7 @@ export const getMyRepresentationsProxy = (loggedInUserId) => {
|
|||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -802,7 +801,7 @@ export const getRepresentations = (incidentID) => {
|
|||||||
.get("/api/endpoint/getrepresentations_api?incidentID=" + incidentID)
|
.get("/api/endpoint/getrepresentations_api?incidentID=" + incidentID)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -815,7 +814,7 @@ export const getRepresentationsProxy = (incidentID) => {
|
|||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -828,7 +827,7 @@ export const getWatchedCases = (loggedInUserId) => {
|
|||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -840,7 +839,7 @@ export const getWatchedCasesProxy = (loggedInUserId) => {
|
|||||||
)
|
)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -873,18 +872,18 @@ export const getAwaitingSubmission = (loggedInUserId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getAwaitingSubmissionFromBlob = (containerName) => {
|
export const getAwaitingSubmissionFromBlob = (containerName) => {
|
||||||
console.log(
|
//console.log(
|
||||||
"///////////////////////\ngetAwaitingSubmissionFromBlob: " +
|
// "///////////////////////\ngetAwaitingSubmissionFromBlob: " +
|
||||||
containerName,
|
// containerName,
|
||||||
BASE_URL +
|
// BASE_URL +
|
||||||
"/api/file/getawaitingsubmissionfromblob?container=" +
|
// "/api/file/getawaitingsubmissionfromblob?container=" +
|
||||||
containerName +
|
// containerName +
|
||||||
hashAPIPath(
|
// hashAPIPath(
|
||||||
"/api/file/getawaitingsubmissionfromblob?container=" +
|
// "/api/file/getawaitingsubmissionfromblob?container=" +
|
||||||
containerName
|
// containerName
|
||||||
),
|
// ),
|
||||||
"\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
);
|
// );
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
BASE_URL +
|
||||||
@@ -904,15 +903,15 @@ export const getAwaitingSubmissionFromBlob = (containerName) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getRepsFromBlob = (containerName) => {
|
export const getRepsFromBlob = (containerName) => {
|
||||||
console.log(
|
//console.log(
|
||||||
"///////////////////////\ngetRepsFromBlob function: " +
|
// "///////////////////////\ngetRepsFromBlob function: " +
|
||||||
containerName +
|
// containerName +
|
||||||
"\n///////////////////////\n",
|
// "\n///////////////////////\n",
|
||||||
BASE_URL +
|
// BASE_URL +
|
||||||
"/api/file/getrepsblob?container=" +
|
// "/api/file/getrepsblob?container=" +
|
||||||
containerName +
|
// containerName +
|
||||||
hashAPIPath("/api/file/getrepsblob?container=" + containerName)
|
// hashAPIPath("/api/file/getrepsblob?container=" + containerName)
|
||||||
);
|
// );
|
||||||
|
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
@@ -925,22 +924,23 @@ export const getRepsFromBlob = (containerName) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log(
|
//console.log(
|
||||||
"///////////////////////\ngetRepsFromBlob error response: " +
|
// "///////////////////////\ngetRepsFromBlob error response: " +
|
||||||
error +
|
// error +
|
||||||
"\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
);
|
// );
|
||||||
console.log("API call error", error);
|
console.log(consoleLogger(error));
|
||||||
|
//console.log("API call error", error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getRepsFromBlobProxy = (containerName) => {
|
export const getRepsFromBlobProxy = (containerName) => {
|
||||||
console.log(
|
//console.log(
|
||||||
"///////////////////////getRepsFromBlobProxy: " + containerName,
|
// "///////////////////////getRepsFromBlobProxy: " + containerName,
|
||||||
"/api/file/getawaitingsubmissionfromblobproxy?container=" +
|
// "/api/file/getawaitingsubmissionfromblobproxy?container=" +
|
||||||
containerName,
|
// containerName,
|
||||||
"\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
);
|
// );
|
||||||
|
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
@@ -1052,7 +1052,7 @@ export const updatePassword = (contactId, newpassword) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1089,7 +1089,7 @@ export const createWatchedCases = (formValues) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1125,7 +1125,7 @@ export const createNewCase = (
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1171,14 +1171,14 @@ export const createNewCaseBlob = (
|
|||||||
data: data,
|
data: data,
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("the query url for crearte csase:", queryUrl);
|
//console.log("the query url for crearte csase:", queryUrl);
|
||||||
|
|
||||||
return axios(config)
|
return axios(config)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1275,7 +1275,7 @@ export const patchCase = async (incidentid) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getCase = (incidentID) => {
|
export const getCase = (incidentID) => {
|
||||||
// console.log(
|
//console.log(
|
||||||
// "////////////// ------" +
|
// "////////////// ------" +
|
||||||
// BASE_URL +
|
// BASE_URL +
|
||||||
// "/api/endpoint/getcase_api?incidentID=" +
|
// "/api/endpoint/getcase_api?incidentID=" +
|
||||||
@@ -1288,7 +1288,7 @@ export const getCase = (incidentID) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1315,7 +1315,7 @@ export const deleteMyRepresentations = (myRepresentationsID) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1334,7 +1334,7 @@ export const deleteAwaitingSubmissions = (incidentID) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1359,7 +1359,7 @@ export const deleteAwaitingSubmissionsFromBlob = (
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1387,7 +1387,7 @@ export const deleteMyRepresentationsFromBlob = (
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1405,7 +1405,7 @@ export const deleteWatchedCases = (watchedCaseID) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1424,7 +1424,7 @@ export const createAccount = (formValues) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1446,7 +1446,7 @@ export const uploadFiles = async (
|
|||||||
|
|
||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
for (let j = 0; j < files[i].length; j++) {
|
for (let j = 0; j < files[i].length; j++) {
|
||||||
console.log("upload files:", files[i][j].name);
|
//console.log("upload files:", files[i][j].name);
|
||||||
formData.append(files[i][j].name, files[i][j]);
|
formData.append(files[i][j].name, files[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1467,7 +1467,7 @@ export const uploadFiles = async (
|
|||||||
const res = await axios(config);
|
const res = await axios(config);
|
||||||
return res.data;
|
return res.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1490,7 +1490,7 @@ export const uploadRepFiles = async (
|
|||||||
|
|
||||||
for (let i = 0; i < files.length; i++) {
|
for (let i = 0; i < files.length; i++) {
|
||||||
for (let j = 0; j < files[i].length; j++) {
|
for (let j = 0; j < files[i].length; j++) {
|
||||||
console.log("upload rep files:", files[i][j].name);
|
//console.log("upload rep files:", files[i][j].name);
|
||||||
formData.append(files[i][j].name, files[i][j]);
|
formData.append(files[i][j].name, files[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1511,7 +1511,7 @@ export const uploadRepFiles = async (
|
|||||||
const res = await axios(config);
|
const res = await axios(config);
|
||||||
return res.data;
|
return res.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1543,7 +1543,7 @@ export const generateRepPDF = async (formValues, containerID, casefolderID) => {
|
|||||||
const res = await axios(config);
|
const res = await axios(config);
|
||||||
return res.data;
|
return res.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1580,25 +1580,25 @@ export const generateAppealPDF = async (
|
|||||||
const res = await axios(config);
|
const res = await axios(config);
|
||||||
return res.data;
|
return res.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getFilesFromBlob = (containerName, casefolderID) => {
|
export const getFilesFromBlob = (containerName, casefolderID) => {
|
||||||
console.log(
|
//console.log(
|
||||||
" get files from blob",
|
// " get files from blob",
|
||||||
BASE_URL +
|
// BASE_URL +
|
||||||
"/api/file/getbloblist?container=" +
|
// "/api/file/getbloblist?container=" +
|
||||||
containerName +
|
// containerName +
|
||||||
"&casefolderID=" +
|
// "&casefolderID=" +
|
||||||
casefolderID +
|
// casefolderID +
|
||||||
hashAPIPath(
|
// hashAPIPath(
|
||||||
"/api/file/getbloblist?container=" +
|
// "/api/file/getbloblist?container=" +
|
||||||
containerName +
|
// containerName +
|
||||||
"&casefolderID=" +
|
// "&casefolderID=" +
|
||||||
casefolderID
|
// casefolderID
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
return axios
|
return axios
|
||||||
.get(
|
.get(
|
||||||
BASE_URL +
|
BASE_URL +
|
||||||
@@ -1618,7 +1618,7 @@ export const getFilesFromBlob = (containerName, casefolderID) => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1640,7 +1640,7 @@ export const getFilesFromBlobHashed = (
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1662,7 +1662,7 @@ export const deleteBlob = async (
|
|||||||
);
|
);
|
||||||
return res.data;
|
return res.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1683,30 +1683,30 @@ export const downloadBlob = (containerName, blobName) => {
|
|||||||
"content-disposition",
|
"content-disposition",
|
||||||
"attachment; filename=" + blobName
|
"attachment; filename=" + blobName
|
||||||
);
|
);
|
||||||
console.log("has downloaded");
|
//console.log("has downloaded");
|
||||||
|
|
||||||
return res.status(200).send(response.data);
|
return res.status(200).send(response.data);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getProgressFromBlob = async (containerName, casereference) => {
|
export const getProgressFromBlob = async (containerName, casereference) => {
|
||||||
console.log(
|
//console.log(
|
||||||
/////////////////\ngetProgressFromBlob",
|
// /////////////////\ngetProgressFromBlob",
|
||||||
BASE_URL +
|
// BASE_URL +
|
||||||
"/api/file/getprogressobjblob?container=" +
|
// "/api/file/getprogressobjblob?container=" +
|
||||||
containerName +
|
// containerName +
|
||||||
"&casefolderID=" +
|
// "&casefolderID=" +
|
||||||
casereference +
|
// casereference +
|
||||||
hashAPIPath(
|
// hashAPIPath(
|
||||||
"/api/file/getprogressobjblob?container=" +
|
// "/api/file/getprogressobjblob?container=" +
|
||||||
containerName +
|
// containerName +
|
||||||
"&casefolderID=" +
|
// "&casefolderID=" +
|
||||||
casereference
|
// casereference
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
try {
|
try {
|
||||||
const res = await axios.get(
|
const res = await axios.get(
|
||||||
BASE_URL +
|
BASE_URL +
|
||||||
@@ -1723,7 +1723,7 @@ export const getProgressFromBlob = async (containerName, casereference) => {
|
|||||||
);
|
);
|
||||||
return res.data;
|
return res.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1740,7 +1740,7 @@ export const sendEmail = async (
|
|||||||
"personalisation": personalisation,
|
"personalisation": personalisation,
|
||||||
};
|
};
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "hwewwew: ",
|
// "hwewwew: ",
|
||||||
// templateId,
|
// templateId,
|
||||||
// emailAddress,
|
// emailAddress,
|
||||||
@@ -1761,7 +1761,7 @@ export const sendEmail = async (
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1773,7 +1773,7 @@ export const getNotice = () => {
|
|||||||
return res.data;
|
return res.data;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log("this serror", error);
|
consoleLogger(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1786,7 +1786,7 @@ export const getPortalLogin = async (emailAddress) => {
|
|||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log(consoleLogger(error));
|
console.log(consoleLogger(error));
|
||||||
console.log("thiserror", error);
|
|
||||||
return JSON.stringify(error);
|
return JSON.stringify(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -1801,8 +1801,8 @@ export const createContainerProxy = (containerName) => {
|
|||||||
.get(BASE_URL + queryUrl)
|
.get(BASE_URL + queryUrl)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
//console.log(consoleLogger(error));
|
console.log(consoleLogger(error));
|
||||||
console.log("thiserror", error);
|
|
||||||
return JSON.stringify(error);
|
return JSON.stringify(error);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -1890,10 +1890,10 @@ export const getAddressSearch = async (searchString) => {
|
|||||||
const params = new URLSearchParams(searchString);
|
const params = new URLSearchParams(searchString);
|
||||||
const str = params.toString();
|
const str = params.toString();
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
"the url",
|
// "the url",
|
||||||
BASE_URL + "/api/endpoint/getbasicsearch_by_address_api?" + str
|
// BASE_URL + "/api/endpoint/getbasicsearch_by_address_api?" + str
|
||||||
);
|
// );
|
||||||
try {
|
try {
|
||||||
const res = await axios.get(
|
const res = await axios.get(
|
||||||
BASE_URL + "/api/endpoint/getbasicsearch_by_address_api?" + str
|
BASE_URL + "/api/endpoint/getbasicsearch_by_address_api?" + str
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export const getSelectQuery = (appealTypeName) => {
|
|||||||
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent";
|
return "&$select=modifiedon,_pinswg_appellant_value,pinswg_name,pinswg_siteaddressline1,pinswg_siteaddressline2,pinswg_sitepostcode,pinswg_siteaddresstown,_pinswg_associatedlpa_value,pinswg_casedecisiondate,pinswg_dateeventrequested,pinswg_decision,pinswg_finalcommentsduedate,pinswg_otherpartiesstatement,pinswg_procedure,pinswg_questionnaireduedate,pinswg_startdate,pinswg_statementduedate,statuscode,pinswg_starttimeofevent,pinswg_typeofevent";
|
||||||
break;
|
break;
|
||||||
case "pinswg_planningappeals78s":
|
case "pinswg_planningappeals78s":
|
||||||
// console.log(
|
//console.log(
|
||||||
// "///////////////\n path:",
|
// "///////////////\n path:",
|
||||||
// process.env.RELAYPATH == "test-pedw-hc"
|
// process.env.RELAYPATH == "test-pedw-hc"
|
||||||
// );
|
// );
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ const CaseSummary = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getDetails = (resultsObj, detailsType) => {
|
const getDetails = (resultsObj, detailsType) => {
|
||||||
console.log(resultsObj);
|
//console.log(resultsObj);
|
||||||
let detailsArr = [];
|
let detailsArr = [];
|
||||||
resultsObj = resultsObj.value;
|
resultsObj = resultsObj.value;
|
||||||
const detailsObj = resultsObj.map((searchDetail, index) => {
|
const detailsObj = resultsObj.map((searchDetail, index) => {
|
||||||
@@ -1098,7 +1098,7 @@ const CaseSummary = (props) => {
|
|||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
// console.log(item.incidentid, item.title);
|
//console.log(item.incidentid, item.title);
|
||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const CookieManagementMain = (props) => {
|
|||||||
const [usageState, setUsageState] = useState(
|
const [usageState, setUsageState] = useState(
|
||||||
typeof cookieCheck.CookiePolicy == "undefined" ? null : cookieObj.usage
|
typeof cookieCheck.CookiePolicy == "undefined" ? null : cookieObj.usage
|
||||||
);
|
);
|
||||||
// const [communicationsState, setCommunicationsState] = useState(
|
//const [communicationsState, setCommunicationsState] = useState(
|
||||||
// typeof cookieCheck.CookiePolicy == "undefined"
|
// typeof cookieCheck.CookiePolicy == "undefined"
|
||||||
// ? null
|
// ? null
|
||||||
// : cookieObj.communications
|
// : cookieObj.communications
|
||||||
@@ -431,12 +431,11 @@ const CookieManagementMain = (props) => {
|
|||||||
href={t(
|
href={t(
|
||||||
"cookies:cookie-settings-essential-link"
|
"cookies:cookie-settings-essential-link"
|
||||||
)}
|
)}
|
||||||
className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold">
|
className="govuk-link govuk-link--no-underline govuk-!-font-weight-bold"
|
||||||
|
>
|
||||||
{t(
|
{t(
|
||||||
"cookies:cookie-settings-essential-link-label"
|
"cookies:cookie-settings-essential-link-label"
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
</legend>
|
</legend>
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
let thisSession = await getSession(ctx);
|
let thisSession = await getSession(ctx);
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "auth sess for register :",
|
// "auth sess for register :",
|
||||||
// thisSession,
|
// thisSession,
|
||||||
// thisSession.user.email
|
// thisSession.user.email
|
||||||
|
|||||||
@@ -126,8 +126,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
await getLPA(),
|
await getLPA(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// const lpaData = require("../data/lpa.json");
|
//const lpaData = require("../data/lpa.json");
|
||||||
// const appealTypeData = require("../data/appealtypes.json");
|
//const appealTypeData = require("../data/appealtypes.json");
|
||||||
|
|
||||||
store.dispatch(setAppealType(appealTypeData));
|
store.dispatch(setAppealType(appealTypeData));
|
||||||
store.dispatch(setLPA(lpaData));
|
store.dispatch(setLPA(lpaData));
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
item.NavigationProperty.toLowerCase() +
|
item.NavigationProperty.toLowerCase() +
|
||||||
"_value";
|
"_value";
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "\n==========================================\n",
|
// "\n==========================================\n",
|
||||||
// "basic search: " + queryUrl,
|
// "basic search: " + queryUrl,
|
||||||
// "\n\n",
|
// "\n\n",
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
item.NavigationProperty.toLowerCase() +
|
item.NavigationProperty.toLowerCase() +
|
||||||
"_value";
|
"_value";
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "\n==========================================\n",
|
// "\n==========================================\n",
|
||||||
// "basic search: " + queryUrl,
|
// "basic search: " + queryUrl,
|
||||||
// "\n\n",
|
// "\n\n",
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ export default async function ApiProxy(req, res) {
|
|||||||
|
|
||||||
const lpaGUID = jsonpath('$..[?(@.name=="' + lpaid + '")]', lpaList);
|
const lpaGUID = jsonpath('$..[?(@.name=="' + lpaid + '")]', lpaList);
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
'$..[?(@.name="' + lpaid + '")]',
|
// '$..[?(@.name="' + lpaid + '")]',
|
||||||
lpaList,
|
// lpaList,
|
||||||
lpaid,
|
// lpaid,
|
||||||
"LPAGUID=",
|
// "LPAGUID=",
|
||||||
lpaGUID
|
// lpaGUID
|
||||||
);
|
// );
|
||||||
|
|
||||||
var queryUrl =
|
var queryUrl =
|
||||||
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_pinswg_associatedlpa_value eq " +
|
"incidents?$select=modifiedon,description,numberofchildincidents,_accountid_value,_customerid_value,_pinswg_associatedlpa_value,_ownerid_value,pinswg_appealcasetype,statuscode,ticketnumber,title, _primarycontactid_value,pinswg_lpareference,pinswg_appellantlastname,pinswg_appellantfirstname,pinswg_appellantagent,pinswg_agentfirstname,pinswg_agentlastname,pinswg_agentcompanyname&$expand=primarycontactid($select=fullname)&$filter=_pinswg_associatedlpa_value eq " +
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
contactid +
|
contactid +
|
||||||
")?$select=firstname, lastname, emailaddress1, telephone1, company, address1_line1,address1_line2,address1_city, address1_county,address1_postalcode,pinswg_typeofinvolvement,pinswg_contact_associatedlpa,pinswg_preferredlanguage&$count=true";
|
")?$select=firstname, lastname, emailaddress1, telephone1, company, address1_line1,address1_line2,address1_city, address1_county,address1_postalcode,pinswg_typeofinvolvement,pinswg_contact_associatedlpa,pinswg_preferredlanguage&$count=true";
|
||||||
|
|
||||||
// console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
|
//console.log(WEBAPI_URL + queryUrl + hashAPIPath(queryUrl));
|
||||||
|
|
||||||
var apiResponse =
|
var apiResponse =
|
||||||
contactid.length > 0
|
contactid.length > 0
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
|
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
var checkquerypath =
|
var checkquerypath =
|
||||||
"/api/file/createappealcompletemessage_api?container=" +
|
"/api/file/createappealcompletemessage_api?container=" +
|
||||||
containerName +
|
containerName +
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
|
console.log("/////Create Case Message:\n", tempCaseRef, "\n//////////////");
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
var token = await getToken();
|
var token = await getToken();
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
var tempCaseRef = req.query.tempcaseref;
|
var tempCaseRef = req.query.tempcaseref;
|
||||||
var filename = req.query.repid;
|
var filename = req.query.repid;
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await createRepCompleteMessage(containerName, tempCaseRef, filename).then(
|
await createRepCompleteMessage(containerName, tempCaseRef, filename).then(
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
"&blobname=" +
|
"&blobname=" +
|
||||||
blobName;
|
blobName;
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await deleteBlob(
|
await deleteBlob(
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
"&blobname=" +
|
"&blobname=" +
|
||||||
blobName;
|
blobName;
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await deleteBlob(
|
await deleteBlob(
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
"&casefolderID=" +
|
"&casefolderID=" +
|
||||||
casefolderID;
|
casefolderID;
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await deleteBlobCase(containerName, casefolderID).then((data) => {
|
await deleteBlobCase(containerName, casefolderID).then((data) => {
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
casefolderID = casefolderID + "/" + repfile;
|
casefolderID = casefolderID + "/" + repfile;
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await deleteBlobRep(containerName, casefolderID).then((data) => {
|
await deleteBlobRep(containerName, casefolderID).then((data) => {
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
|||||||
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
|
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
|
||||||
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
||||||
|
|
||||||
// const ApiProxy = nextConnect();
|
//const ApiProxy = nextConnect();
|
||||||
// ApiProxy.use(middleware);
|
// ApiProxy.use(middleware);
|
||||||
|
|
||||||
// ApiProxy.post(async (req, res) => {
|
// ApiProxy.post(async (req, res) => {
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ import { statement_pdf } from "../../../components/pdftemplates/statement_pdf";
|
|||||||
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
|
import { writtenStatement_pdf } from "../../../components/pdftemplates/writtenStatement_pdf";
|
||||||
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
import { other_pdf } from "../../../components/pdftemplates/other_pdf";
|
||||||
import { consoleLogger } from "../../../actions";
|
import { consoleLogger } from "../../../actions";
|
||||||
// const ApiProxy = nextConnect();
|
//const ApiProxy = nextConnect();
|
||||||
// ApiProxy.use(middleware);
|
// ApiProxy.use(middleware);
|
||||||
|
|
||||||
// ApiProxy.post(async (req, res) => {
|
// ApiProxy.post(async (req, res) => {
|
||||||
@@ -131,7 +131,7 @@ export default async function handler(req, res) {
|
|||||||
var checkquerypath = "/api/file/generatepdf";
|
var checkquerypath = "/api/file/generatepdf";
|
||||||
|
|
||||||
//console.log("-------", checkHash);
|
//console.log("-------", checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
|
||||||
//console.log(casefolderID, caseRef);
|
//console.log(casefolderID, caseRef);
|
||||||
// Create Document Component
|
// Create Document Component
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ export default async function handler(req, res) {
|
|||||||
// code block
|
// code block
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "///////////////////////////////////\n file created: \n" +
|
// "///////////////////////////////////\n file created: \n" +
|
||||||
// process.cwd() +
|
// process.cwd() +
|
||||||
// `tmp/${reqBodyobj.repfile_name}.pdf` +
|
// `tmp/${reqBodyobj.repfile_name}.pdf` +
|
||||||
|
|||||||
@@ -17,12 +17,12 @@ ApiProxy.get(async (req, res) => {
|
|||||||
var checkquerypath =
|
var checkquerypath =
|
||||||
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
|
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
|
||||||
|
|
||||||
console.log(
|
// console.log(
|
||||||
"///////////////////////\ngetawaitingsubmissionblob url :",
|
// "///////////////////////\ngetawaitingsubmissionblob url :",
|
||||||
req.url,
|
// req.url,
|
||||||
"\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
);
|
// );
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
"&casefolderID=" +
|
"&casefolderID=" +
|
||||||
casefolderID;
|
casefolderID;
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await getBlobs(containerName, casefolderID).then((data) => {
|
await getBlobs(containerName, casefolderID).then((data) => {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ ApiProxy.get(async (req, res) => {
|
|||||||
casefolderID;
|
casefolderID;
|
||||||
|
|
||||||
//console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
const blobObj = await getProgressBlobs(containerName, casefolderID)
|
const blobObj = await getProgressBlobs(containerName, casefolderID)
|
||||||
|
|||||||
@@ -48,24 +48,24 @@ ApiProxy.get(async (req, res) => {
|
|||||||
var checkHash = req.query.hash;
|
var checkHash = req.query.hash;
|
||||||
var checkquerypath = "/api/file/getrepsblob?container=" + containerName;
|
var checkquerypath = "/api/file/getrepsblob?container=" + containerName;
|
||||||
|
|
||||||
// console.log("-----", casefolderID);
|
//console.log("-----", casefolderID);
|
||||||
// console.log("-----", req.query);
|
//console.log("-----", req.query);
|
||||||
// console.log("-----", checkquerypath);
|
//console.log("-----", checkquerypath);
|
||||||
// console.log("-----", hashAPIPath(checkquerypath));
|
//console.log("-----", hashAPIPath(checkquerypath));
|
||||||
// console.log("-----", checkHash);
|
//console.log("-----", checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
const blobObj = await getRepsBlobs(containerName, casefolderID)
|
const blobObj = await getRepsBlobs(containerName, casefolderID)
|
||||||
.then(async (data) => {
|
.then(async (data) => {
|
||||||
console.log(
|
//console.log(
|
||||||
"\n////////////////////////////\n getRepsBlobs:",
|
// "\n////////////////////////////\n getRepsBlobs:",
|
||||||
data
|
// data
|
||||||
);
|
// );
|
||||||
return data;
|
return data;
|
||||||
})
|
})
|
||||||
.then(async (data) => {
|
.then(async (data) => {
|
||||||
console.log("\n////////////////////////////\n now here:", data);
|
//console.log("\n////////////////////////////\n now here:", data);
|
||||||
|
|
||||||
let result = await downloadAllRepsFiles(containerName, data);
|
let result = await downloadAllRepsFiles(containerName, data);
|
||||||
|
|
||||||
@@ -75,11 +75,11 @@ ApiProxy.get(async (req, res) => {
|
|||||||
.json(result);
|
.json(result);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log(
|
//console.log(
|
||||||
"///////////////////////\ngetRepsFromBlob api in api route response: " +
|
// "///////////////////////\ngetRepsFromBlob api in api route response: " +
|
||||||
error +
|
// error +
|
||||||
"\n///////////////////////\n"
|
// "\n///////////////////////\n"
|
||||||
);
|
// );
|
||||||
//console.log("API call error", error);
|
//console.log("API call error", error);
|
||||||
|
|
||||||
console.log(consoleLogger(error));
|
console.log(consoleLogger(error));
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
var checkHash = req.query.hash;
|
var checkHash = req.query.hash;
|
||||||
var checkquerypath = "/api/file/setupcontainer?ident=" + containerName;
|
var checkquerypath = "/api/file/setupcontainer?ident=" + containerName;
|
||||||
|
|
||||||
// console.log(checkquerypath, hashAPIPath(checkquerypath), checkHash);
|
//console.log(checkquerypath, hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||||
|
|
||||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||||
await createContainer(containerName)
|
await createContainer(containerName)
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ ApiProxy.use(middleware);
|
|||||||
|
|
||||||
ApiProxy.post(async (req, res) => {
|
ApiProxy.post(async (req, res) => {
|
||||||
var checkHash = req.query.hash;
|
var checkHash = req.query.hash;
|
||||||
// console.log(JSON.stringify(req.body));
|
//console.log(JSON.stringify(req.body));
|
||||||
// console.log(JSON.stringify(req.body.appealData));
|
//console.log(JSON.stringify(req.body.appealData));
|
||||||
// console.log(req.files);
|
//console.log(req.files);
|
||||||
|
|
||||||
const appealData = req.body.appealData;
|
const appealData = req.body.appealData;
|
||||||
const containerID = req.body.containerID[0];
|
const containerID = req.body.containerID[0];
|
||||||
@@ -25,8 +25,8 @@ ApiProxy.post(async (req, res) => {
|
|||||||
|
|
||||||
// var checkquerypath = "/api/file/upload";
|
// var checkquerypath = "/api/file/upload";
|
||||||
|
|
||||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
//console.log(hashAPIPath(checkquerypath), checkHash);
|
||||||
// console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
|
//console.log(hashAPIPath(checkquerypath) == "?hash=" + checkHash);
|
||||||
|
|
||||||
// if (hashAPIPath(checkquerypath) == "?hash=" + checkHash) {
|
// if (hashAPIPath(checkquerypath) == "?hash=" + checkHash) {
|
||||||
//createContainer(containerID).then((containerName) => {
|
//createContainer(containerID).then((containerName) => {
|
||||||
|
|||||||
@@ -143,16 +143,16 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
const searchResultsObj = await getBasicSearch(developmentQuery);
|
const searchResultsObj = await getBasicSearch(developmentQuery);
|
||||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
"\n======================================\n",
|
// "\n======================================\n",
|
||||||
searchResultsObj,
|
// searchResultsObj,
|
||||||
"\n======================================\n"
|
// "\n======================================\n"
|
||||||
);
|
// );
|
||||||
console.log(
|
//console.log(
|
||||||
"\n======================================\n",
|
// "\n======================================\n",
|
||||||
searchDetailsObj[0],
|
// searchDetailsObj[0],
|
||||||
"\n======================================\n"
|
// "\n======================================\n"
|
||||||
);
|
// );
|
||||||
|
|
||||||
store.dispatch(setSearch(developmentQuery));
|
store.dispatch(setSearch(developmentQuery));
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(searchResultsObj);
|
//console.log(searchResultsObj);
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
// searchResultsObj: {
|
// searchResultsObj: {
|
||||||
|
|||||||
@@ -136,12 +136,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
const searchResultsObj = await getIncidentbyID(query.incident);
|
const searchResultsObj = await getIncidentbyID(query.incident);
|
||||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "\n======================================\n",
|
// "\n======================================\n",
|
||||||
// searchResultsObj,
|
// searchResultsObj,
|
||||||
// "\n======================================\n"
|
// "\n======================================\n"
|
||||||
// );
|
// );
|
||||||
// console.log(
|
//console.log(
|
||||||
// "\n======================================\n",
|
// "\n======================================\n",
|
||||||
// searchDetailsObj[0],
|
// searchDetailsObj[0],
|
||||||
// "\n======================================\n"
|
// "\n======================================\n"
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
store.dispatch(setSearch(developmentQuery));
|
store.dispatch(setSearch(developmentQuery));
|
||||||
|
|
||||||
// console.log({
|
//console.log({
|
||||||
// "currentReference": searchResultsObj.value[0].title,
|
// "currentReference": searchResultsObj.value[0].title,
|
||||||
// "currentType": "searchResultsObj",
|
// "currentType": "searchResultsObj",
|
||||||
// "incidentid": searchResultsObj.value[0].incidentid,
|
// "incidentid": searchResultsObj.value[0].incidentid,
|
||||||
@@ -187,7 +187,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(searchResultsObj);
|
//console.log(searchResultsObj);
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
searchResultsObj: {
|
searchResultsObj: {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
(store) =>
|
(store) =>
|
||||||
async ({ query, req, res }) => {
|
async ({ query, req, res }) => {
|
||||||
console.log("query-", query);
|
console.log("query-", query);
|
||||||
// const searchResultsObj = (await getBasicSearch(query.q)) || null;
|
//const searchResultsObj = (await getBasicSearch(query.q)) || null;
|
||||||
// store.dispatch(setSearchResults(searchResultsObj));
|
// store.dispatch(setSearchResults(searchResultsObj));
|
||||||
//store.dispatch(setSearch(query.q));
|
//store.dispatch(setSearch(query.q));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
(store) =>
|
(store) =>
|
||||||
async ({ query, req, res }) => {
|
async ({ query, req, res }) => {
|
||||||
console.log("query-", query);
|
console.log("query-", query);
|
||||||
// const searchResultsObj = (await getBasicSearch(query.q)) || null;
|
//const searchResultsObj = (await getBasicSearch(query.q)) || null;
|
||||||
// store.dispatch(setSearchResults(searchResultsObj));
|
// store.dispatch(setSearchResults(searchResultsObj));
|
||||||
//store.dispatch(setSearch(query.q));
|
//store.dispatch(setSearch(query.q));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ let Home = (props) => {
|
|||||||
|
|
||||||
//let optionsTitleObj = [];
|
//let optionsTitleObj = [];
|
||||||
|
|
||||||
// const optionsTitleObj = selectedObj.reduce(
|
//const optionsTitleObj = selectedObj.reduce(
|
||||||
// (obj, arrValue) => (
|
// (obj, arrValue) => (
|
||||||
// (obj[arrValue] = arrValue
|
// (obj[arrValue] = arrValue
|
||||||
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
// const lpaData = require("../../data/lpa.json");
|
//const lpaData = require("../../data/lpa.json");
|
||||||
// const appealTypeData = require("../../data/appealtypes.json");
|
//const appealTypeData = require("../../data/appealtypes.json");
|
||||||
|
|
||||||
store.dispatch(setAccountDetails(accountDetails));
|
store.dispatch(setAccountDetails(accountDetails));
|
||||||
store.dispatch(setAppealType(appealTypeData));
|
store.dispatch(setAppealType(appealTypeData));
|
||||||
|
|||||||
@@ -160,16 +160,16 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
const searchResultsObj = await getBasicSearch(developmentQuery);
|
const searchResultsObj = await getBasicSearch(developmentQuery);
|
||||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||||
|
|
||||||
console.log(
|
//console.log(
|
||||||
"\n======================================\n",
|
// "\n======================================\n",
|
||||||
searchResultsObj,
|
// searchResultsObj,
|
||||||
"\n======================================\n"
|
// "\n======================================\n"
|
||||||
);
|
// );
|
||||||
console.log(
|
//console.log(
|
||||||
"\n======================================\n",
|
// "\n======================================\n",
|
||||||
searchDetailsObj[0],
|
// searchDetailsObj[0],
|
||||||
"\n======================================\n"
|
// "\n======================================\n"
|
||||||
);
|
// );
|
||||||
|
|
||||||
store.dispatch(setSearch(developmentQuery));
|
store.dispatch(setSearch(developmentQuery));
|
||||||
|
|
||||||
@@ -324,9 +324,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(searchResultsObj);
|
//console.log(searchResultsObj);
|
||||||
|
|
||||||
console.log(loggedInUser);
|
//console.log(loggedInUser);
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
// searchResultsObj: {
|
// searchResultsObj: {
|
||||||
@@ -341,7 +341,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
const getDetails = (resultsObj, detailsType) => {
|
const getDetails = (resultsObj, detailsType) => {
|
||||||
let detailsArr = [];
|
let detailsArr = [];
|
||||||
// console.log(
|
//console.log(
|
||||||
// "//////////////////////////////////\n",
|
// "//////////////////////////////////\n",
|
||||||
// resultsObj,
|
// resultsObj,
|
||||||
// //"\n",
|
// //"\n",
|
||||||
@@ -352,7 +352,7 @@ const getDetails = (resultsObj, detailsType) => {
|
|||||||
resultsObj =
|
resultsObj =
|
||||||
detailsType == "mySubmittedReps" ? resultsObj : resultsObj.value;
|
detailsType == "mySubmittedReps" ? resultsObj : resultsObj.value;
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "////////////////////////////////// resultsobj\n",
|
// "////////////////////////////////// resultsobj\n",
|
||||||
// detailsType,
|
// detailsType,
|
||||||
// "\n",
|
// "\n",
|
||||||
|
|||||||
@@ -133,12 +133,12 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
const searchResultsObj = await getIncidentbyID(query.incident);
|
const searchResultsObj = await getIncidentbyID(query.incident);
|
||||||
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
const searchDetailsObj = await getSearchDetails(searchResultsObj);
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "\n======================================\n",
|
// "\n======================================\n",
|
||||||
// searchResultsObj,
|
// searchResultsObj,
|
||||||
// "\n======================================\n"
|
// "\n======================================\n"
|
||||||
// );
|
// );
|
||||||
// console.log(
|
//console.log(
|
||||||
// "\n======================================\n",
|
// "\n======================================\n",
|
||||||
// searchDetailsObj[0],
|
// searchDetailsObj[0],
|
||||||
// "\n======================================\n"
|
// "\n======================================\n"
|
||||||
@@ -175,7 +175,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(searchResultsObj);
|
//console.log(searchResultsObj);
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
searchResultsObj: {
|
searchResultsObj: {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
await getAwaitingSubmissionFromBlob(thisSession.user.id),
|
await getAwaitingSubmissionFromBlob(thisSession.user.id),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "/////////////////////////\n ",
|
// "/////////////////////////\n ",
|
||||||
// awaitingSubmissionFromBlob.value,
|
// awaitingSubmissionFromBlob.value,
|
||||||
// awaitingSubmissionFromBlob.case
|
// awaitingSubmissionFromBlob.case
|
||||||
@@ -346,7 +346,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
|
|
||||||
const getDetails = (resultsObj, detailsType) => {
|
const getDetails = (resultsObj, detailsType) => {
|
||||||
let detailsArr = [];
|
let detailsArr = [];
|
||||||
// console.log(
|
//console.log(
|
||||||
// "//////////////////////////////////\n",
|
// "//////////////////////////////////\n",
|
||||||
// resultsObj,
|
// resultsObj,
|
||||||
// //"\n",
|
// //"\n",
|
||||||
@@ -357,7 +357,7 @@ const getDetails = (resultsObj, detailsType) => {
|
|||||||
resultsObj =
|
resultsObj =
|
||||||
detailsType == "mySubmittedReps" ? resultsObj : resultsObj.value;
|
detailsType == "mySubmittedReps" ? resultsObj : resultsObj.value;
|
||||||
|
|
||||||
// console.log(
|
//console.log(
|
||||||
// "////////////////////////////////// resultsobj\n",
|
// "////////////////////////////////// resultsobj\n",
|
||||||
// detailsType,
|
// detailsType,
|
||||||
// "\n",
|
// "\n",
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ let Home = (props) => {
|
|||||||
|
|
||||||
//let optionsTitleObj = [];
|
//let optionsTitleObj = [];
|
||||||
|
|
||||||
// const optionsTitleObj = selectedObj.reduce(
|
//const optionsTitleObj = selectedObj.reduce(
|
||||||
// (obj, arrValue) => (
|
// (obj, arrValue) => (
|
||||||
// (obj[arrValue] = arrValue
|
// (obj[arrValue] = arrValue
|
||||||
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
// .replace(/(\band|[\s\-\+\(\)\,\&])/g, "")
|
||||||
|
|||||||
@@ -183,8 +183,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
"\n////////////////////////////\n"
|
"\n////////////////////////////\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
// const lpaData = require("../../data/lpa.json");
|
//const lpaData = require("../../data/lpa.json");
|
||||||
// const appealTypeData = require("../../data/appealtypes.json");
|
//const appealTypeData = require("../../data/appealtypes.json");
|
||||||
|
|
||||||
store.dispatch(setAppealType(appealTypeData));
|
store.dispatch(setAppealType(appealTypeData));
|
||||||
store.dispatch(setLPA(lpaData));
|
store.dispatch(setLPA(lpaData));
|
||||||
|
|||||||
+5
-5
@@ -13,7 +13,7 @@ import { getIP } from "../actions";
|
|||||||
|
|
||||||
const ShowStorage = (props) => {
|
const ShowStorage = (props) => {
|
||||||
const { container } = props;
|
const { container } = props;
|
||||||
// console.log("Containers:");
|
//console.log("Containers:");
|
||||||
// // for await (const container of blobServiceClient.listContainers()) {
|
// // for await (const container of blobServiceClient.listContainers()) {
|
||||||
// // console.log(`- ${container.name}`);
|
// // console.log(`- ${container.name}`);
|
||||||
// // }
|
// // }
|
||||||
@@ -49,8 +49,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
creds
|
creds
|
||||||
);
|
);
|
||||||
|
|
||||||
// const createContainerResponse = await containerClient.create();
|
//const createContainerResponse = await containerClient.create();
|
||||||
// console.log(
|
//console.log(
|
||||||
// `Created container ${containerName} successfully`,
|
// `Created container ${containerName} successfully`,
|
||||||
// createContainerResponse.requestId
|
// createContainerResponse.requestId
|
||||||
// );
|
// );
|
||||||
@@ -72,7 +72,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
// const blockBlobClient =
|
// const blockBlobClient =
|
||||||
// containerClient.getBlockBlobClient(blobName);
|
// containerClient.getBlockBlobClient(blobName);
|
||||||
|
|
||||||
// // const uploadBlobResponse = await blockBlobClient.upload(
|
// //const uploadBlobResponse = await blockBlobClient.upload(
|
||||||
// // content,
|
// // content,
|
||||||
// // Buffer.byteLength(content),
|
// // Buffer.byteLength(content),
|
||||||
// // uploadOptions
|
// // uploadOptions
|
||||||
@@ -90,7 +90,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
|||||||
// //console.log(tags);
|
// //console.log(tags);
|
||||||
// //await blockBlobClient.setTags(tags);
|
// //await blockBlobClient.setTags(tags);
|
||||||
|
|
||||||
// // console.log(
|
// //console.log(
|
||||||
// // `Uploaded block blob ${blobName} successfully`,
|
// // `Uploaded block blob ${blobName} successfully`,
|
||||||
// // uploadBlobResponse.requestId
|
// // uploadBlobResponse.requestId
|
||||||
// // );
|
// // );
|
||||||
|
|||||||
+9
-10
@@ -1,22 +1,21 @@
|
|||||||
// Node only has partial ES6 support, import/export is not
|
// Node only has partial ES6 support, import/export is not
|
||||||
// yet officially supported so we have to use require instead.
|
// yet officially supported so we have to use require instead.
|
||||||
const express = require('express');
|
const express = require("express");
|
||||||
const next = require('next');
|
const next = require("next");
|
||||||
const compression = require('compression');
|
const compression = require("compression");
|
||||||
// const cookieParser = require('cookie-parser');
|
//const cookieParser = require('cookie-parser');
|
||||||
const port = parseInt(process.env.PORT, 10) || 3000;
|
const port = parseInt(process.env.PORT, 10) || 3000;
|
||||||
const app = next({ dev: process.env.NODE_ENV !== 'production' });
|
const app = next({ dev: process.env.NODE_ENV !== "production" });
|
||||||
const handle = app.getRequestHandler();
|
const handle = app.getRequestHandler();
|
||||||
|
|
||||||
|
|
||||||
// Having trouble with X-origin client side, setup a proxy here
|
// Having trouble with X-origin client side, setup a proxy here
|
||||||
// const proxy = require('http-proxy-middleware');
|
//const proxy = require('http-proxy-middleware');
|
||||||
// const EXTERNAL_API = 'http://example.com/api';
|
//const EXTERNAL_API = 'http://example.com/api';
|
||||||
|
|
||||||
app.prepare().then(() => {
|
app.prepare().then(() => {
|
||||||
const server = express();
|
const server = express();
|
||||||
|
|
||||||
// const api_proxy = proxy(EXTERNAL_API, { changeOrigin: true });
|
//const api_proxy = proxy(EXTERNAL_API, { changeOrigin: true });
|
||||||
// Enable compression locally, helps page load times because... why not.
|
// Enable compression locally, helps page load times because... why not.
|
||||||
server.use(compression());
|
server.use(compression());
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ app.prepare().then(() => {
|
|||||||
// Enable your new proxy below
|
// Enable your new proxy below
|
||||||
// server.use(api_proxy);
|
// server.use(api_proxy);
|
||||||
|
|
||||||
server.get('*', (req, res) => {
|
server.get("*", (req, res) => {
|
||||||
return handle(req, res);
|
return handle(req, res);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
export const govGatweayActionTypes = {
|
|
||||||
GETPROVIDERCONFIG: "GETPROVIDERCONFIG",
|
|
||||||
};
|
|
||||||
|
|
||||||
export const getGovGatewayConfig = (config) => (dispatch) => {
|
|
||||||
return dispatch({
|
|
||||||
type: govGatweayActionTypes.GETPROVIDERCONFIG,
|
|
||||||
config: config,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
import { govGatweayActionTypes } from "./action";
|
|
||||||
|
|
||||||
const govGatewayConfigInitialState = {
|
|
||||||
config: {},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function reducer(state = govGatewayConfigInitialState, action) {
|
|
||||||
switch (action.type) {
|
|
||||||
case govGatweayActionTypes.GETPROVIDERCONFIG:
|
|
||||||
return {
|
|
||||||
...state,
|
|
||||||
config: action.config,
|
|
||||||
};
|
|
||||||
default:
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -340,7 +340,7 @@ $top-border: solid 2px govuk-colour("mid-grey");
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// contents of the steps, such as paragraphs and links
|
//contents of the steps, such as paragraphs and links
|
||||||
|
|
||||||
.app-step-nav__paragraph {
|
.app-step-nav__paragraph {
|
||||||
padding-bottom: govuk-spacing(3);
|
padding-bottom: govuk-spacing(3);
|
||||||
|
|||||||
Reference in New Issue
Block a user