+11
@@ -50,3 +50,14 @@ pages/admin/logchecker.js
|
||||
pages/baracuda.html
|
||||
pages/holding-min.html
|
||||
pages/holding.html
|
||||
|
||||
# Cline / AI-assistant governance artifacts (keep local-only)
|
||||
.clinerules
|
||||
.clinerules/
|
||||
CONTRIBUTING_AI.md
|
||||
GUARDRAILS.md
|
||||
ai-prompts/
|
||||
context/
|
||||
memory-bank/
|
||||
workflows/
|
||||
AI_CONTEXT.md
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Actions Clients
|
||||
|
||||
This folder is reserved for extracted client wrappers from `actions/index.js` as part of the Priority 1 refactor plan.
|
||||
|
||||
Phase 1 delivered core helper extraction and compatibility barrel support.
|
||||
Client-level extraction (`relayClient`, `endpointClient`, `fileClient`, `notifyClient`) is planned for the next increment.
|
||||
@@ -0,0 +1,15 @@
|
||||
const port = parseInt(process.env.PORT, 10) || 3000;
|
||||
|
||||
export const BASE_URL =
|
||||
typeof window !== "undefined"
|
||||
? window.apiRoot
|
||||
: process.env.API_ROOT || `http://localhost:${port}`;
|
||||
|
||||
export const API_PATH = "/api/data/v8.2/";
|
||||
|
||||
export const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
export const ACCESS_TOKEN_ENDPOINT = process.env.ACCESS_TOKEN_ENDPOINT;
|
||||
export const TENANT_ID = process.env.TENANT;
|
||||
@@ -0,0 +1,11 @@
|
||||
export const isNonEmptyString = (value) => {
|
||||
return typeof value === "string" && value.trim().length > 0;
|
||||
};
|
||||
|
||||
export const sanitizeString = (value) => {
|
||||
return typeof value === "string" ? value.trim() : "";
|
||||
};
|
||||
|
||||
export const escapeODataString = (value) => {
|
||||
return sanitizeString(value).replace(/'/g, "''");
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
import CryptoJS from "crypto-js";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
export const hashAPIPath = (queryPath) => {
|
||||
var hashlink = CryptoJS.HmacSHA256(
|
||||
queryPath,
|
||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
||||
);
|
||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||
};
|
||||
|
||||
export const hashString = (stringToHash) => {
|
||||
let hashedStr = CryptoJS.AES.encrypt(stringToHash, "pedw");
|
||||
return hashedStr.toString();
|
||||
};
|
||||
|
||||
export const dehashString = (stringToDeHash) => {
|
||||
let dehashedStr = CryptoJS.AES.decrypt(decodeURI(stringToDeHash), "pedw");
|
||||
return dehashedStr.toString(CryptoJS.enc.Utf8);
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
export 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 azureHeadersNoOdata = (access_token) => {
|
||||
return {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer " + access_token
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export const azureHeadersPaged = (access_token) => {
|
||||
return {
|
||||
headers: {
|
||||
"OData-MaxVersion": "4.0",
|
||||
"OData-Version": "4.0",
|
||||
"Accept": "application/json;odata.metadata=none",
|
||||
"Prefer":
|
||||
'odata.include-annotations="*",return=representation, odata.maxpagesize=10',
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer " + access_token
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
export const azureHeadersPagedCustom = (access_token, showNumberOfRecords) => {
|
||||
return {
|
||||
headers: {
|
||||
"OData-MaxVersion": "4.0",
|
||||
"OData-Version": "4.0",
|
||||
"Accept": "application/json;odata.metadata=none",
|
||||
"Prefer":
|
||||
'odata.include-annotations="*",return=representation, odata.maxpagesize=' +
|
||||
showNumberOfRecords,
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer " + access_token
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,106 @@
|
||||
import _ from "lodash";
|
||||
|
||||
const MASK = "[REDACTED]";
|
||||
|
||||
const redactString = (value) => {
|
||||
if (typeof value !== "string") return value;
|
||||
|
||||
return value
|
||||
.replace(
|
||||
/([a-zA-Z0-9._%+-]{1,})@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/g,
|
||||
`${MASK}@${MASK}`
|
||||
)
|
||||
.replace(/Bearer\s+[A-Za-z0-9._\-]+/gi, `Bearer ${MASK}`)
|
||||
.replace(/("client_secret"\s*:\s*")[^"]+("?)/gi, `$1${MASK}$2`)
|
||||
.replace(/("access_token"\s*:\s*")[^"]+("?)/gi, `$1${MASK}$2`);
|
||||
};
|
||||
|
||||
export const redactSensitive = (value) => {
|
||||
if (value == null) return value;
|
||||
|
||||
if (typeof value === "string") {
|
||||
return redactString(value);
|
||||
}
|
||||
|
||||
try {
|
||||
const json = JSON.stringify(value);
|
||||
return redactString(json);
|
||||
} catch (_error) {
|
||||
return MASK;
|
||||
}
|
||||
};
|
||||
|
||||
export const getIP = (req) => {
|
||||
const forwarded = req.headers["x-forwarded-for"];
|
||||
|
||||
const ip =
|
||||
typeof forwarded === "string"
|
||||
? forwarded.split(/, /)[0]
|
||||
: req.socket.remoteAddress;
|
||||
|
||||
console.info(
|
||||
"\n====================\n Client IP address: " + ip,
|
||||
"\n=====================\n"
|
||||
);
|
||||
};
|
||||
|
||||
export const consoleLogger = (err) => {
|
||||
console.log(
|
||||
"\n\n/////////////////////////////////////////////////\nRaw Error " +
|
||||
redactSensitive(err) +
|
||||
"\n\n/////////////////////////////////////////////////\n"
|
||||
);
|
||||
var errStr =
|
||||
"\n\n/////////////////////////////////////////////////\nServer Error " +
|
||||
"\n" +
|
||||
(_.has(err, "name") ? "Name: " + err.name + "\n" : "") +
|
||||
(_.has(err, "code") ? "Code: " + err.code + "\n" : "") +
|
||||
(_.has(err, "query") ? "Query: " + err.query + "\n" : "") +
|
||||
(_.has(err, "message") ? "Message: " + err.message + "\n" : "") +
|
||||
(_.has(err, "request.url")
|
||||
? "request.url: " + err.request.url + "\n"
|
||||
: "") +
|
||||
(_.has(err, "response.status") ? "Status: " + err.code + "\n" : "") +
|
||||
(_.has(err, "response.statusText")
|
||||
? "\nStatusText: " + err.response.status + "\n"
|
||||
: "") +
|
||||
(_.has(err, "response.request.socket.remoteAddress")
|
||||
? "\nRequest IP: " +
|
||||
err.response.request.socket.remoteAddress +
|
||||
"\n"
|
||||
: "") +
|
||||
(_.has(err, "response.data.error.message")
|
||||
? "\nMessage: " +
|
||||
redactSensitive(err.response.data.error.message) +
|
||||
"\n"
|
||||
: "") +
|
||||
(_.has(err, "response.config.url")
|
||||
? "\nRequest URL: " + redactSensitive(err.config.url) + "\n"
|
||||
: "") +
|
||||
(_.has(err, "response.headers.date")
|
||||
? "\nRequest Time: " + err.response.headers.date + "\n"
|
||||
: "") +
|
||||
(_.has(err, "config.url")
|
||||
? "\nAxios config url: " + redactSensitive(err.config.url) + "\n"
|
||||
: "") +
|
||||
(_.has(err, "config.url")
|
||||
? "\nAxios message url: " + redactSensitive(err.message) + "\n"
|
||||
: "") +
|
||||
(_.has(err, "config.data")
|
||||
? "\nRequest payload: " + redactSensitive(err.config.data) + "\n"
|
||||
: "") +
|
||||
"\n/////////////////////////////////////////////////\n";
|
||||
|
||||
console.log(errStr);
|
||||
};
|
||||
|
||||
export const conLog = (err) => {
|
||||
var errStr =
|
||||
"\n\n/////////////////////////////////////////////////\nResponse: " +
|
||||
"\n" +
|
||||
err +
|
||||
"\n/////////////////////////////////////////////////\n\n";
|
||||
|
||||
console.log(errStr);
|
||||
return errStr;
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
import axios from "axios";
|
||||
import { ACCESS_TOKEN_ENDPOINT, TENANT_ID } from "./env";
|
||||
import { consoleLogger } from "./logger";
|
||||
|
||||
const cache = {};
|
||||
|
||||
const tokenBody =
|
||||
"grant_type=" +
|
||||
process.env.GRANT_TYPE +
|
||||
"&client_id=" +
|
||||
process.env.CLIENT_ID +
|
||||
"&client_secret=" +
|
||||
process.env.CLIENT_SECRET +
|
||||
"&scope=" +
|
||||
"https://" +
|
||||
process.env.RELAYURI +
|
||||
"/.default";
|
||||
|
||||
const tokenConfig = {
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"Cache-Control": "no-cache"
|
||||
}
|
||||
};
|
||||
|
||||
export const getToken = () => {
|
||||
return axios
|
||||
.post(
|
||||
`${ACCESS_TOKEN_ENDPOINT}${TENANT_ID}/oauth2/v2.0/token`,
|
||||
tokenBody,
|
||||
tokenConfig
|
||||
)
|
||||
.then((res) => res.data)
|
||||
.then((data) => {
|
||||
cache.tokenResponse = data;
|
||||
return data;
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
return error;
|
||||
});
|
||||
};
|
||||
+8
-2322
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
getPersonalAccount,
|
||||
getLogin,
|
||||
updatePassword,
|
||||
updateAccount,
|
||||
createAccount,
|
||||
getEmailAccountCheck,
|
||||
getPortalLogin,
|
||||
getPortalLoginProxy,
|
||||
getPreferredLanguage
|
||||
} from "./legacyActionsService";
|
||||
|
||||
export {
|
||||
getPersonalAccount,
|
||||
getLogin,
|
||||
updatePassword,
|
||||
updateAccount,
|
||||
createAccount,
|
||||
getEmailAccountCheck,
|
||||
getPortalLogin,
|
||||
getPortalLoginProxy,
|
||||
getPreferredLanguage
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
import {
|
||||
getNewAppeals,
|
||||
getNewAppealsPage,
|
||||
getNewDocumentsPaged
|
||||
} from "./legacyActionsService";
|
||||
|
||||
export { getNewAppeals, getNewAppealsPage, getNewDocumentsPaged };
|
||||
@@ -0,0 +1,41 @@
|
||||
import {
|
||||
getCaseMessage,
|
||||
getIncidentbyID,
|
||||
getSIPSEvents,
|
||||
getSIPSMedia,
|
||||
getAppealID,
|
||||
createNewCase,
|
||||
createNewCaseBlob,
|
||||
updateCase,
|
||||
updateCaseBlob,
|
||||
patchCase,
|
||||
getCase,
|
||||
getCaseByID,
|
||||
getAppealPDFDocs,
|
||||
getAppealPDFDocument,
|
||||
getPartSavedAppeal,
|
||||
getIsPublishedbyID,
|
||||
getPortalModuleDetails,
|
||||
getPortalModuleDetailsProxy
|
||||
} from "./legacyActionsService";
|
||||
|
||||
export {
|
||||
getCaseMessage,
|
||||
getIncidentbyID,
|
||||
getSIPSEvents,
|
||||
getSIPSMedia,
|
||||
getAppealID,
|
||||
createNewCase,
|
||||
createNewCaseBlob,
|
||||
updateCase,
|
||||
updateCaseBlob,
|
||||
patchCase,
|
||||
getCase,
|
||||
getCaseByID,
|
||||
getAppealPDFDocs,
|
||||
getAppealPDFDocument,
|
||||
getPartSavedAppeal,
|
||||
getIsPublishedbyID,
|
||||
getPortalModuleDetails,
|
||||
getPortalModuleDetailsProxy
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
import {
|
||||
getAwaitingSubmissionFromBlob,
|
||||
getRepsFromBlob,
|
||||
getRepsFromBlobProxy,
|
||||
getAwaitingSubmissionFromBlobProxy,
|
||||
deleteAwaitingSubmissionsFromBlob,
|
||||
deleteMyRepresentationsFromBlob,
|
||||
uploadFiles,
|
||||
uploadSingleFile,
|
||||
uploadRepFiles,
|
||||
generateRepPDF,
|
||||
generateAppealPDF,
|
||||
getFilesFromBlob,
|
||||
getFilesFromBlobproxy,
|
||||
getFilesFromBlobHashed,
|
||||
deleteBlob,
|
||||
deleteRepBlob,
|
||||
downloadBlob,
|
||||
getProgressFromBlob,
|
||||
createContainerProxy
|
||||
} from "./legacyActionsService";
|
||||
|
||||
export {
|
||||
getAwaitingSubmissionFromBlob,
|
||||
getRepsFromBlob,
|
||||
getRepsFromBlobProxy,
|
||||
getAwaitingSubmissionFromBlobProxy,
|
||||
deleteAwaitingSubmissionsFromBlob,
|
||||
deleteMyRepresentationsFromBlob,
|
||||
uploadFiles,
|
||||
uploadSingleFile,
|
||||
uploadRepFiles,
|
||||
generateRepPDF,
|
||||
generateAppealPDF,
|
||||
getFilesFromBlob,
|
||||
getFilesFromBlobproxy,
|
||||
getFilesFromBlobHashed,
|
||||
deleteBlob,
|
||||
deleteRepBlob,
|
||||
downloadBlob,
|
||||
getProgressFromBlob,
|
||||
createContainerProxy
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
export * from "./searchService";
|
||||
export * from "./caseService";
|
||||
export * from "./accountService";
|
||||
export * from "./portalService";
|
||||
export * from "./documentService";
|
||||
export * from "./referenceDataService";
|
||||
export * from "./notifyService";
|
||||
export * from "./adminService";
|
||||
export * from "./integrationService";
|
||||
@@ -0,0 +1,3 @@
|
||||
import { createCRMTask } from "./legacyActionsService";
|
||||
|
||||
export { createCRMTask };
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
import { sendEmail } from "./legacyActionsService";
|
||||
|
||||
export { sendEmail };
|
||||
@@ -0,0 +1,45 @@
|
||||
import {
|
||||
getMyCases,
|
||||
getMyInvolvements,
|
||||
getMyLPACases,
|
||||
getMyRepresentations,
|
||||
getMyRepresentationsProxy,
|
||||
getRepresentations,
|
||||
getRepresentationsProxy,
|
||||
getWatchedCases,
|
||||
getWatchedCasesProxy,
|
||||
getAwaitingSubmission,
|
||||
getAwaitingSubmissionProxy,
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
deleteMyRepresentations,
|
||||
deleteAwaitingSubmissions,
|
||||
sendCaseCompleteMessage,
|
||||
sendCaseCompleteMessageProxy,
|
||||
sendRepCompleteMessage,
|
||||
setRepInvolvment,
|
||||
setCaseInvolvment
|
||||
} from "./legacyActionsService";
|
||||
|
||||
export {
|
||||
getMyCases,
|
||||
getMyInvolvements,
|
||||
getMyLPACases,
|
||||
getMyRepresentations,
|
||||
getMyRepresentationsProxy,
|
||||
getRepresentations,
|
||||
getRepresentationsProxy,
|
||||
getWatchedCases,
|
||||
getWatchedCasesProxy,
|
||||
getAwaitingSubmission,
|
||||
getAwaitingSubmissionProxy,
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
deleteMyRepresentations,
|
||||
deleteAwaitingSubmissions,
|
||||
sendCaseCompleteMessage,
|
||||
sendCaseCompleteMessageProxy,
|
||||
sendRepCompleteMessage,
|
||||
setRepInvolvment,
|
||||
setCaseInvolvment
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
import {
|
||||
getAppealsTypes,
|
||||
getProjectTypes,
|
||||
getAppealsTypesForNewAppeal,
|
||||
getLPA,
|
||||
getFormData,
|
||||
getMandatoryFields,
|
||||
getPickLists,
|
||||
getNotice
|
||||
} from "./legacyActionsService";
|
||||
|
||||
export {
|
||||
getAppealsTypes,
|
||||
getProjectTypes,
|
||||
getAppealsTypesForNewAppeal,
|
||||
getLPA,
|
||||
getFormData,
|
||||
getMandatoryFields,
|
||||
getPickLists,
|
||||
getNotice
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
import {
|
||||
getBasicSearch,
|
||||
getAddressSearch,
|
||||
getAddressSearchPaged,
|
||||
getBasicSearchPaged,
|
||||
getAdvancedSearch,
|
||||
getAdvancedSearchPaged,
|
||||
getBasicDNSURLSearch,
|
||||
getBasicDNSSearch,
|
||||
getBasicDNSSearchPaged,
|
||||
getDNSCoords,
|
||||
getDNSList,
|
||||
getBasicSearchDetails,
|
||||
getBasicSearchDetailsPaged,
|
||||
getBasicPartSavedDetails,
|
||||
getSearchDocumentDetails,
|
||||
getSearchDocumentTypes,
|
||||
getSearchDocumentDetailsPaged,
|
||||
getLinkedCases
|
||||
} from "./legacyActionsService";
|
||||
|
||||
export {
|
||||
getBasicSearch,
|
||||
getAddressSearch,
|
||||
getAddressSearchPaged,
|
||||
getBasicSearchPaged,
|
||||
getAdvancedSearch,
|
||||
getAdvancedSearchPaged,
|
||||
getBasicDNSURLSearch,
|
||||
getBasicDNSSearch,
|
||||
getBasicDNSSearchPaged,
|
||||
getDNSCoords,
|
||||
getDNSList,
|
||||
getBasicSearchDetails,
|
||||
getBasicSearchDetailsPaged,
|
||||
getBasicPartSavedDetails,
|
||||
getSearchDocumentDetails,
|
||||
getSearchDocumentTypes,
|
||||
getSearchDocumentDetailsPaged,
|
||||
getLinkedCases
|
||||
};
|
||||
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
|
||||
import React, { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||
import { updatePassword } from "../../actions";
|
||||
import { updatePassword } from "../../actions/services/accountService";
|
||||
|
||||
const RenderTextfield = ({
|
||||
id,
|
||||
@@ -60,7 +60,7 @@ const ChangePassword = (props) => {
|
||||
handleSubmit,
|
||||
value,
|
||||
setPasswordUpdated,
|
||||
passwordUpdated,
|
||||
passwordUpdated
|
||||
} = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
@@ -158,7 +158,7 @@ const mapStateToProps = (state) => {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -167,7 +167,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentSection: (currentSection) => {
|
||||
dispatch(setCurrentSection(currentSection));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -179,6 +179,6 @@ export default connect(
|
||||
)(
|
||||
reduxForm({
|
||||
form: "changepasswordForm",
|
||||
destroyOnUnmount: false,
|
||||
destroyOnUnmount: false
|
||||
})(ChangePassword)
|
||||
);
|
||||
|
||||
@@ -3,7 +3,7 @@ import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import React, { useEffect } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { updateAccount } from "../../actions";
|
||||
import { updateAccount } from "../../actions/services/accountService";
|
||||
import { setCookie } from "nookies";
|
||||
|
||||
const PersonalDetailsComplete = (props) => {
|
||||
@@ -11,7 +11,7 @@ const PersonalDetailsComplete = (props) => {
|
||||
handleSubmit,
|
||||
value,
|
||||
setRegisterFormComplete,
|
||||
setAccountCreatedComplete,
|
||||
setAccountCreatedComplete
|
||||
} = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
@@ -41,7 +41,7 @@ const PersonalDetailsComplete = (props) => {
|
||||
console.log("=============== pref lang", prefLang);
|
||||
setCookie(null, "pedw_locale", userLang, {
|
||||
path: "/",
|
||||
maxAge: 60 * 60 * 24 * 365,
|
||||
maxAge: 60 * 60 * 24 * 365
|
||||
});
|
||||
|
||||
console.log("Set cookie to:", userLang);
|
||||
@@ -79,7 +79,7 @@ const mapStateToProps = (state) => {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -88,7 +88,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentSection: (currentSection) => {
|
||||
dispatch(setCurrentSection(currentSection));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,10 @@ import { connect } from "react-redux";
|
||||
|
||||
import { setAccCr, setLogout } from "../../store/accountDetails/action";
|
||||
|
||||
import { createAccount, getEmailAccountCheck } from "../../actions";
|
||||
import {
|
||||
createAccount,
|
||||
getEmailAccountCheck
|
||||
} from "../../actions/services/accountService";
|
||||
|
||||
const RegisterComplete = (props) => {
|
||||
const {
|
||||
@@ -18,7 +21,7 @@ const RegisterComplete = (props) => {
|
||||
value,
|
||||
setRegisterFormComplete,
|
||||
setAccountCreatedComplete,
|
||||
setAccCr,
|
||||
setAccCr
|
||||
} = props;
|
||||
let { t, lang } = useTranslation();
|
||||
|
||||
@@ -34,7 +37,7 @@ const RegisterComplete = (props) => {
|
||||
|
||||
// was an appellant "pinswg_typeofinvolvement": 846040001,
|
||||
Object.assign(accountBody, {
|
||||
"pinswg_typeofinvolvement": 846040061,
|
||||
"pinswg_typeofinvolvement": 846040061
|
||||
});
|
||||
|
||||
accountBody = _.omit(accountBody, ["custom_password_check"]);
|
||||
@@ -105,9 +108,9 @@ const RegisterComplete = (props) => {
|
||||
<p className="govuk-body">
|
||||
<a
|
||||
onClick={() => {
|
||||
setRegisterFormComplete(false),
|
||||
(setRegisterFormComplete(false),
|
||||
setAccountCreatedComplete(false),
|
||||
setAccCr(false);
|
||||
setAccCr(false));
|
||||
}}
|
||||
className="govuk-link"
|
||||
>
|
||||
@@ -130,7 +133,7 @@ const mapStateToProps = (state) => {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -142,7 +145,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setLogout: () => {
|
||||
dispatch(setLogout());
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -9,14 +9,15 @@ import { connect } from "react-redux";
|
||||
|
||||
import {
|
||||
setSearchResults,
|
||||
setSearchDetails,
|
||||
setSearchDetails
|
||||
} from "../../../store/searchOutput/action";
|
||||
|
||||
import { getDetailsProxy, getSearchDetailsPaged } from "../../utils";
|
||||
import { getAdvancedSearchPaged, getNewAppealsPage } from "../../../actions";
|
||||
import { getAdvancedSearchPaged } from "../../../actions/services/searchService";
|
||||
import { getNewAppealsPage } from "../../../actions/services/adminService";
|
||||
import {
|
||||
setCurrentPage,
|
||||
setCurrentReference,
|
||||
setCurrentReference
|
||||
} from "../../../store/currentView/action";
|
||||
|
||||
function AppealsTab(props) {
|
||||
@@ -86,7 +87,7 @@ function AppealsTab(props) {
|
||||
searchString,
|
||||
selectedOption,
|
||||
props.setSearchDetails,
|
||||
props.setSearchResults,
|
||||
props.setSearchResults
|
||||
]
|
||||
);
|
||||
|
||||
@@ -105,7 +106,7 @@ function AppealsTab(props) {
|
||||
orderByState,
|
||||
searchLoaded,
|
||||
getSearchPageResults,
|
||||
router.query,
|
||||
router.query
|
||||
]);
|
||||
|
||||
const ResultsView = (resultsArr) => {
|
||||
@@ -225,7 +226,7 @@ function AppealsTab(props) {
|
||||
item.ticketnumber +
|
||||
'")]',
|
||||
json: searchDetailsObj,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
|
||||
detailsObj = detailsObj[0] || {};
|
||||
@@ -246,8 +247,8 @@ function AppealsTab(props) {
|
||||
? "/fymhorth/achos"
|
||||
: "/achos"
|
||||
: myportal == true
|
||||
? "/myportal/case"
|
||||
: "/case") +
|
||||
? "/myportal/case"
|
||||
: "/case") +
|
||||
"/" +
|
||||
item.ticketnumber
|
||||
}
|
||||
@@ -272,10 +273,10 @@ function AppealsTab(props) {
|
||||
)
|
||||
? detailsObj.pinswg_speacialistcaseprocess
|
||||
: detailsObj.hasOwnProperty(
|
||||
"pinswg_specialistcaseprocess"
|
||||
)
|
||||
? detailsObj.pinswg_specialistcaseprocess
|
||||
: "",
|
||||
"pinswg_specialistcaseprocess"
|
||||
)
|
||||
? detailsObj.pinswg_specialistcaseprocess
|
||||
: ""
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -314,12 +315,12 @@ function AppealsTab(props) {
|
||||
) < 0
|
||||
? detailsObj.pinswg_projectlocation
|
||||
: router.locale == "cy"
|
||||
? detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[1]
|
||||
: detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[0]
|
||||
? detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[1]
|
||||
: detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: ""}
|
||||
{_.has(
|
||||
@@ -396,12 +397,12 @@ function AppealsTab(props) {
|
||||
" " +
|
||||
item.pinswg_appellantlastname
|
||||
: _.has(detailsObj, [
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||
])
|
||||
? detailsObj[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? detailsObj[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
]
|
||||
: ""}
|
||||
</dd>
|
||||
<dd className="govuk-summary-list__value govuk-!-font-size-16">
|
||||
<span className="results-visually-hidden">
|
||||
@@ -411,7 +412,7 @@ function AppealsTab(props) {
|
||||
:
|
||||
</span>
|
||||
{_.has(item, [
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
@@ -422,7 +423,7 @@ function AppealsTab(props) {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -445,7 +446,7 @@ function AppealsTab(props) {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -468,7 +469,7 @@ function AppealsTab(props) {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -555,13 +556,13 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
searchResultsObj: state.searchResultsObj
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -15,177 +15,177 @@ import { sendGAEvent } from "@next/third-parties/google";
|
||||
import {
|
||||
getSearchDocumentDetails,
|
||||
getSearchDocumentDetailsPaged,
|
||||
getSearchDocumentTypes,
|
||||
getNewDocumentsPaged,
|
||||
} from "../../../actions";
|
||||
getSearchDocumentTypes
|
||||
} from "../../../actions/services/searchService";
|
||||
import { getNewDocumentsPaged } from "../../../actions/services/adminService";
|
||||
import { setCurrentPage } from "../../../store/currentView/action";
|
||||
|
||||
import { setDocumentDetails } from "../../../store/searchOutput/action";
|
||||
const getDocumentTypes = [
|
||||
{
|
||||
"Value": 846040009,
|
||||
"Label": "Main Party - Pre-Submission Docs",
|
||||
"Label": "Main Party - Pre-Submission Docs"
|
||||
},
|
||||
{
|
||||
"Value": 846040000,
|
||||
"Label": "Main Party - Submission Document",
|
||||
"Label": "Main Party - Submission Document"
|
||||
},
|
||||
{
|
||||
"Value": 846040001,
|
||||
"Label": "Main Party - Questionnaire",
|
||||
"Label": "Main Party - Questionnaire"
|
||||
},
|
||||
{
|
||||
"Value": 846040002,
|
||||
"Label": "Main Party - Statements",
|
||||
"Label": "Main Party - Statements"
|
||||
},
|
||||
{
|
||||
"Value": 846040003,
|
||||
"Label": "Main Party - Comments",
|
||||
"Label": "Main Party - Comments"
|
||||
},
|
||||
{
|
||||
"Value": 846040004,
|
||||
"Label": "Main Party - Written Statements of Evidence",
|
||||
"Label": "Main Party - Written Statements of Evidence"
|
||||
},
|
||||
{
|
||||
"Value": 846040010,
|
||||
"Label": "Main Party - Environmental Statements",
|
||||
"Label": "Main Party - Environmental Statements"
|
||||
},
|
||||
{
|
||||
"Value": 846040005,
|
||||
"Label": "Interested Party Representations",
|
||||
"Label": "Interested Party Representations"
|
||||
},
|
||||
{
|
||||
"Value": 846040006,
|
||||
"Label": "Correspondence",
|
||||
"Label": "Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040008,
|
||||
"Label": "Inspector Notes",
|
||||
"Label": "Inspector Notes"
|
||||
},
|
||||
{
|
||||
"Value": 846040007,
|
||||
"Label": "Final Decision/Report",
|
||||
"Label": "Final Decision/Report"
|
||||
},
|
||||
{
|
||||
"Value": 846040011,
|
||||
"Label": "Post Decision Correspondence",
|
||||
"Label": "Post Decision Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040012,
|
||||
"Label": "High Court Challenge Correspondence",
|
||||
"Label": "High Court Challenge Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040013,
|
||||
"Label": "Event - Correspondence",
|
||||
"Label": "Event - Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040014,
|
||||
"Label": "Event - Documents",
|
||||
"Label": "Event - Documents"
|
||||
},
|
||||
{
|
||||
"Value": 846040015,
|
||||
"Label": "Pre-Application - General",
|
||||
"Label": "Pre-Application - General"
|
||||
},
|
||||
{
|
||||
"Value": 846040016,
|
||||
"Label": "Pre-Application - EIA Screening",
|
||||
"Label": "Pre-Application - EIA Screening"
|
||||
},
|
||||
{
|
||||
"Value": 846040017,
|
||||
"Label": "Pre-Application - EIA Scoping",
|
||||
"Label": "Pre-Application - EIA Scoping"
|
||||
},
|
||||
{
|
||||
"Value": 846040018,
|
||||
"Label": "EIA Screening",
|
||||
"Label": "EIA Screening"
|
||||
},
|
||||
{
|
||||
"Value": 846040019,
|
||||
"Label": "EIA Scoping",
|
||||
"Label": "EIA Scoping"
|
||||
},
|
||||
{
|
||||
"Value": 846040020,
|
||||
"Label": "Pre-Application Services Documents",
|
||||
"Label": "Pre-Application Services Documents"
|
||||
},
|
||||
{
|
||||
"Value": 846040021,
|
||||
"Label": "Notification",
|
||||
"Label": "Notification"
|
||||
},
|
||||
{
|
||||
"Value": 846040022,
|
||||
"Label":
|
||||
"Submission - Environmental Statement - written statement and NTS",
|
||||
"Submission - Environmental Statement - written statement and NTS"
|
||||
},
|
||||
{
|
||||
"Value": 846040023,
|
||||
"Label": "Submission - Environmental Statement - Appendices",
|
||||
"Label": "Submission - Environmental Statement - Appendices"
|
||||
},
|
||||
{
|
||||
"Value": 846040024,
|
||||
"Label": "Submission - Environmental Statement - Figures",
|
||||
"Label": "Submission - Environmental Statement - Figures"
|
||||
},
|
||||
{
|
||||
"Value": 846040025,
|
||||
"Label": "Submission - Draft Infrastructure Consent Orders",
|
||||
"Label": "Submission - Draft Infrastructure Consent Orders"
|
||||
},
|
||||
{
|
||||
"Value": 846040026,
|
||||
"Label": "Submission - Compulsory Acquisition Information",
|
||||
"Label": "Submission - Compulsory Acquisition Information"
|
||||
},
|
||||
{
|
||||
"Value": 846040027,
|
||||
"Label": "Submission - Application Documents",
|
||||
"Label": "Submission - Application Documents"
|
||||
},
|
||||
{
|
||||
"Value": 846040028,
|
||||
"Label": "Examination Notices",
|
||||
"Label": "Examination Notices"
|
||||
},
|
||||
{
|
||||
"Value": 846040029,
|
||||
"Label": "Local/Marine Impact Reports",
|
||||
"Label": "Local/Marine Impact Reports"
|
||||
},
|
||||
{
|
||||
"Value": 846040030,
|
||||
"Label": "Submission - Further Information",
|
||||
"Label": "Submission - Further Information"
|
||||
},
|
||||
{
|
||||
"Value": 846040031,
|
||||
"Label": "Formal Variation requests",
|
||||
"Label": "Formal Variation requests"
|
||||
},
|
||||
{
|
||||
"Value": 846040032,
|
||||
"Label": "Further Information - Interested Party Representations",
|
||||
"Label": "Further Information - Interested Party Representations"
|
||||
},
|
||||
{
|
||||
"Value": 846040033,
|
||||
"Label": "Hearing Statements",
|
||||
"Label": "Hearing Statements"
|
||||
},
|
||||
{
|
||||
"Value": 846040034,
|
||||
"Label": "Events - Recordings",
|
||||
"Label": "Events - Recordings"
|
||||
},
|
||||
{
|
||||
"Value": 846040035,
|
||||
"Label": "Internal Correspondence",
|
||||
"Label": "Internal Correspondence"
|
||||
},
|
||||
{
|
||||
"Value": 846040036,
|
||||
"Label": "Consultation Response",
|
||||
},
|
||||
"Label": "Consultation Response"
|
||||
}
|
||||
];
|
||||
|
||||
const getOrigin = [
|
||||
{
|
||||
"Value": 846040000,
|
||||
"Label": "MDU",
|
||||
"Label": "MDU"
|
||||
},
|
||||
{
|
||||
"Value": 846040001,
|
||||
"Label": "Portal",
|
||||
"Label": "Portal"
|
||||
},
|
||||
{
|
||||
"Value": 846040002,
|
||||
"Label": "Manual",
|
||||
},
|
||||
"Label": "Manual"
|
||||
}
|
||||
];
|
||||
|
||||
const DocumentsTab = (props) => {
|
||||
@@ -200,7 +200,7 @@ const DocumentsTab = (props) => {
|
||||
setDocumentDetails,
|
||||
setCurrentPage,
|
||||
docsOffline,
|
||||
showFilteredDocs,
|
||||
showFilteredDocs
|
||||
} = props;
|
||||
|
||||
const router = useRouter();
|
||||
@@ -236,7 +236,7 @@ const DocumentsTab = (props) => {
|
||||
|
||||
setCheckedItems((prev) => ({
|
||||
...prev,
|
||||
[name]: checked,
|
||||
[name]: checked
|
||||
}));
|
||||
setSelectAll(false);
|
||||
};
|
||||
@@ -246,7 +246,7 @@ const DocumentsTab = (props) => {
|
||||
|
||||
setCheckedOriginItems((prev) => ({
|
||||
...prev,
|
||||
[name]: checked,
|
||||
[name]: checked
|
||||
}));
|
||||
setSelectOriginAll(false);
|
||||
};
|
||||
@@ -404,7 +404,7 @@ const DocumentsTab = (props) => {
|
||||
item.Label +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.Label ||
|
||||
t(
|
||||
@@ -477,7 +477,7 @@ const DocumentsTab = (props) => {
|
||||
item.Label +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.Label ||
|
||||
t(
|
||||
@@ -496,7 +496,7 @@ const DocumentsTab = (props) => {
|
||||
const checkedValues = [
|
||||
...document.querySelectorAll(
|
||||
".govuk-checkboxes__input:checked"
|
||||
),
|
||||
)
|
||||
].map((e) => e.value);
|
||||
|
||||
const origins = checkedValues
|
||||
@@ -697,7 +697,7 @@ const DocumentsTab = (props) => {
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
detailsObj = item;
|
||||
return (
|
||||
@@ -831,7 +831,7 @@ const DocumentsTab = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -946,7 +946,7 @@ const DocumentsTab = (props) => {
|
||||
selectedDocumentType,
|
||||
selectedWeeks,
|
||||
selectedDocumentOrigin,
|
||||
props.setDocumentDetails,
|
||||
props.setDocumentDetails
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1081,7 +1081,7 @@ const DocumentsTab = (props) => {
|
||||
getOrigin,
|
||||
getDocumentResults,
|
||||
lang,
|
||||
selectedWeeks,
|
||||
selectedWeeks
|
||||
]);
|
||||
|
||||
function countFieldValue(obj, field, targetValue) {
|
||||
@@ -1166,7 +1166,7 @@ const DocumentsTab = (props) => {
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
...state
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1177,7 +1177,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ import Link from "next/link";
|
||||
import { bytesToSize } from "../../../components/utils";
|
||||
import {
|
||||
deleteMyRepresentationsFromBlob,
|
||||
deleteAwaitingSubmissionsFromBlob,
|
||||
sendRepCompleteMessage,
|
||||
} from "../../../actions";
|
||||
deleteAwaitingSubmissionsFromBlob
|
||||
} from "../../../actions/services/documentService";
|
||||
import { sendRepCompleteMessage } from "../../../actions/services/portalService";
|
||||
|
||||
import { formatBlobDates } from "../utils/adminHelper";
|
||||
|
||||
@@ -74,9 +74,9 @@ export default function StorageTab({ data, repCompleteCount }) {
|
||||
showRepJson && folder.hasRepJson
|
||||
? { display: "block" }
|
||||
: showTmpFile &&
|
||||
folder.hasTmpFile
|
||||
? { display: "block" }
|
||||
: { display: "none" }
|
||||
folder.hasTmpFile
|
||||
? { display: "block" }
|
||||
: { display: "none" }
|
||||
}
|
||||
>
|
||||
<h4>{folder.folderPath || "Root"}</h4>
|
||||
@@ -150,7 +150,7 @@ export default function StorageTab({ data, repCompleteCount }) {
|
||||
headers:
|
||||
{
|
||||
"Content-Type":
|
||||
"application/json",
|
||||
"application/json"
|
||||
},
|
||||
body: JSON.stringify(
|
||||
{
|
||||
@@ -159,18 +159,18 @@ export default function StorageTab({ data, repCompleteCount }) {
|
||||
blobName:
|
||||
folder
|
||||
.repJsonBlob
|
||||
.name,
|
||||
.name
|
||||
}
|
||||
),
|
||||
)
|
||||
}
|
||||
);
|
||||
const result =
|
||||
await response.json();
|
||||
if (response.ok) {
|
||||
alert(
|
||||
(alert(
|
||||
"repComplete removed!"
|
||||
),
|
||||
window.location.reload();
|
||||
window.location.reload());
|
||||
// Optionally refresh the page or update UI state here
|
||||
} else {
|
||||
alert(
|
||||
|
||||
@@ -67,7 +67,7 @@ export async function fetchAdminStorageData() {
|
||||
const blobWithHash = {
|
||||
...blob,
|
||||
hashedfilepath,
|
||||
isTmpFile,
|
||||
isTmpFile
|
||||
};
|
||||
|
||||
let folderGroup = acc.find(
|
||||
@@ -80,7 +80,7 @@ export async function fetchAdminStorageData() {
|
||||
hasRepJson: false,
|
||||
repJsonBlob: null,
|
||||
repComplete: false,
|
||||
hasTmpFile: false,
|
||||
hasTmpFile: false
|
||||
};
|
||||
acc.push(folderGroup);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ export async function fetchAdminStorageData() {
|
||||
? {
|
||||
id: user.id,
|
||||
email: user.email,
|
||||
containers: containersWithHashes,
|
||||
containers: containersWithHashes
|
||||
}
|
||||
: null;
|
||||
})
|
||||
@@ -150,7 +150,7 @@ export async function fetchAdminStorageData() {
|
||||
.map((user) => ({
|
||||
id: user.id,
|
||||
email: user.email,
|
||||
created: user.emailVerified?.toLocaleString("en-GB") || "",
|
||||
created: user.emailVerified?.toLocaleString("en-GB") || ""
|
||||
}));
|
||||
|
||||
let repCompleteCount = 0;
|
||||
|
||||
@@ -12,8 +12,8 @@ import { sendGAEvent } from "@next/third-parties/google";
|
||||
import {
|
||||
getSearchDocumentDetails,
|
||||
getSearchDocumentDetailsPaged,
|
||||
getSearchDocumentTypes,
|
||||
} from "../../actions";
|
||||
getSearchDocumentTypes
|
||||
} from "../../actions/services/searchService";
|
||||
import { setCurrentPage } from "../../store/currentView/action";
|
||||
|
||||
import { setDocumentDetails } from "../../store/searchOutput/action";
|
||||
@@ -32,7 +32,7 @@ const DocumentDetails = (props) => {
|
||||
setDocumentDetails,
|
||||
setCurrentPage,
|
||||
docsOffline,
|
||||
showFilteredDocs,
|
||||
showFilteredDocs
|
||||
} = props;
|
||||
|
||||
const router = useRouter();
|
||||
@@ -57,7 +57,7 @@ const DocumentDetails = (props) => {
|
||||
|
||||
setCheckedItems((prev) => ({
|
||||
...prev,
|
||||
[name]: checked,
|
||||
[name]: checked
|
||||
}));
|
||||
setSelectAll(false);
|
||||
};
|
||||
@@ -132,7 +132,7 @@ const DocumentDetails = (props) => {
|
||||
? jsonpath({
|
||||
path: '$..[?(@ && @.value=="All")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: "All"}
|
||||
</option>
|
||||
@@ -151,7 +151,7 @@ const DocumentDetails = (props) => {
|
||||
item.pinswg_isharedocumentlocationsLabel +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.pinswg_isharedocumentlocationsLabel ||
|
||||
t(
|
||||
@@ -298,7 +298,7 @@ const DocumentDetails = (props) => {
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
sanbox: {},
|
||||
sanbox: {}
|
||||
});
|
||||
detailsObj = item;
|
||||
return (
|
||||
@@ -330,7 +330,7 @@ const DocumentDetails = (props) => {
|
||||
}
|
||||
key={key}
|
||||
onClick={() => {
|
||||
toggleDownLoadLink(key),
|
||||
(toggleDownLoadLink(key),
|
||||
sendGAEvent(
|
||||
"event",
|
||||
"DownloadedFile",
|
||||
@@ -338,9 +338,9 @@ const DocumentDetails = (props) => {
|
||||
caseReference:
|
||||
props.caseReference,
|
||||
filename:
|
||||
detailsObj.pinswg_name,
|
||||
detailsObj.pinswg_name
|
||||
}
|
||||
);
|
||||
));
|
||||
}}
|
||||
>
|
||||
<span className="results-visually-hidden">
|
||||
@@ -388,7 +388,7 @@ const DocumentDetails = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -554,7 +554,7 @@ const DocumentDetails = (props) => {
|
||||
item.pinswg_isharedocumentlocationsLabel +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item.pinswg_isharedocumentlocationsLabel ||
|
||||
t(
|
||||
@@ -574,7 +574,7 @@ const DocumentDetails = (props) => {
|
||||
const data = [
|
||||
...document.querySelectorAll(
|
||||
".govuk-checkboxes__input:checked"
|
||||
),
|
||||
)
|
||||
].map((e) => e.value);
|
||||
setSelectedDocumentType(data);
|
||||
setCurrentPage(1);
|
||||
@@ -710,7 +710,7 @@ const DocumentDetails = (props) => {
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
detailsObj = item;
|
||||
return (
|
||||
@@ -827,7 +827,7 @@ const DocumentDetails = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -905,7 +905,7 @@ const DocumentDetails = (props) => {
|
||||
props.incidentid,
|
||||
selectedOption,
|
||||
selectedDocumentType,
|
||||
setDocumentDetails,
|
||||
setDocumentDetails
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1029,7 +1029,7 @@ const DocumentDetails = (props) => {
|
||||
orderByState,
|
||||
getDocumentTypes,
|
||||
getDocumentResults,
|
||||
lang,
|
||||
lang
|
||||
]);
|
||||
return (
|
||||
<div className="govuk-grid-row">
|
||||
@@ -1059,7 +1059,7 @@ const DocumentDetails = (props) => {
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
...state
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1070,7 +1070,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,11 @@ import { connect } from "react-redux";
|
||||
import { reduxForm } from "redux-form";
|
||||
|
||||
import { useSession } from "next-auth/react";
|
||||
import { generateRepPDF, sendEmail, uploadRepFiles } from "../../../actions";
|
||||
import {
|
||||
generateRepPDF,
|
||||
uploadRepFiles
|
||||
} from "../../../actions/services/documentService";
|
||||
import { sendEmail } from "../../../actions/services/notifyService";
|
||||
import { formatDates, updateLinks } from "../../../components/utils";
|
||||
import {
|
||||
setRepresentationCapacity,
|
||||
|
||||
@@ -7,10 +7,10 @@ import { connect } from "react-redux";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import {
|
||||
createWatchedCases,
|
||||
sendEmail,
|
||||
sendRepCompleteMessage,
|
||||
setRepInvolvment,
|
||||
} from "../../../actions";
|
||||
setRepInvolvment
|
||||
} from "../../../actions/services/portalService";
|
||||
import { sendEmail } from "../../../actions/services/notifyService";
|
||||
import { setRepresentationReset } from "../../../store/currentView/action";
|
||||
|
||||
const RepComplete = (props) => {
|
||||
@@ -27,7 +27,7 @@ const RepComplete = (props) => {
|
||||
setSubmitBack,
|
||||
setRepresentationSubmitConfirmation,
|
||||
setRepresentationMessageSent,
|
||||
repFormData,
|
||||
repFormData
|
||||
} = props;
|
||||
const { acceptedFiles, getRootProps, getInputProps } = useDropzone();
|
||||
const files = acceptedFiles.map((file) => (
|
||||
@@ -55,10 +55,10 @@ const RepComplete = (props) => {
|
||||
"emailAddress":
|
||||
props.props.props.props.accountDetails.accountDetails
|
||||
.emailaddress1,
|
||||
"linkExpiry": 10 * 60,
|
||||
"linkExpiry": 10 * 60
|
||||
};
|
||||
|
||||
props.props.currentView.representationMessageSent != true &&
|
||||
(props.props.currentView.representationMessageSent != true &&
|
||||
(setRepInvolvment(
|
||||
props.props.currentView.caseReference.incidentid,
|
||||
props.props.props.props.accountDetails.accountDetails.contactid
|
||||
@@ -89,10 +89,10 @@ const RepComplete = (props) => {
|
||||
? props.props.currentView.caseReference.repDetails
|
||||
.representationType
|
||||
: props.props.currentView.caseReference
|
||||
.representationType,
|
||||
.representationType
|
||||
}),
|
||||
setRepresentationMessageSent(true)),
|
||||
window.scrollTo({ top: 0, behavior: "smooth" });
|
||||
window.scrollTo({ top: 0, behavior: "smooth" }));
|
||||
});
|
||||
return (
|
||||
<div id="rep-appellant">
|
||||
@@ -130,7 +130,7 @@ const mapStateToProps = (state) => {
|
||||
currentView: state.currentView,
|
||||
myRepresentations: state.myRepresentations,
|
||||
initialValues: state.currentView.caseReference.repDetails,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
|
||||
import { useState } from "react";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import { connect } from "react-redux";
|
||||
import { generateRepPDF } from "../../../actions";
|
||||
import { generateRepPDF } from "../../../actions/services/documentService";
|
||||
import RepComplete from "./representationComplete";
|
||||
import RepLPAQuestionnaireCheck_enforcement from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_enforcement";
|
||||
import RepLPAQuestionnaireCheck_s78 from "./representationQuestionnairesCheck/representationLPAQuestionnaireCheck_s78";
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
deleteRepBlob,
|
||||
getFilesFromBlobHashed,
|
||||
getFilesFromBlobproxy
|
||||
} from "../../../actions";
|
||||
} from "../../../actions/services/documentService";
|
||||
|
||||
const LoadingMessage = () => <div>Loading the editor...</div>;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useEffect, useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
|
||||
import { getRepresentations } from "../../actions";
|
||||
import { getRepresentations } from "../../actions/services/portalService";
|
||||
import { setRepresentations } from "../../store/searchOutput/action";
|
||||
import { formatDates } from "../utils";
|
||||
|
||||
@@ -63,7 +63,7 @@ const RepresentationList = (props) => {
|
||||
incidentid +
|
||||
"')]",
|
||||
json: item,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
detailsObj = item;
|
||||
|
||||
@@ -97,7 +97,7 @@ const RepresentationList = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
sanbox: {},
|
||||
sanbox: {}
|
||||
})
|
||||
: detailsObj[
|
||||
"pinswg_isharedocumentlocations@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -216,7 +216,7 @@ const RepresentationList = (props) => {
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
...state,
|
||||
...state
|
||||
};
|
||||
};
|
||||
|
||||
@@ -224,7 +224,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setRepresentations: (representationObj) => {
|
||||
dispatch(setRepresentations(representationObj));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ import MediaDetails from "./media";
|
||||
import {
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
getLinkedCases,
|
||||
getPortalModuleDetailsProxy,
|
||||
getWatchedCasesProxy,
|
||||
setCaseInvolvment
|
||||
} from "../../actions";
|
||||
} from "../../actions/services/portalService";
|
||||
import { getLinkedCases } from "../../actions/services/searchService";
|
||||
import { getPortalModuleDetailsProxy } from "../../actions/services/caseService";
|
||||
import {
|
||||
setCurrentLinkedCases,
|
||||
setCurrentReference,
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
getFilesFromBlobHashed,
|
||||
uploadSingleFile,
|
||||
getFilesFromBlobproxy
|
||||
} from "../../actions";
|
||||
} from "../../actions/services/documentService";
|
||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||
import pickListLookup from "../../data/picklistLookups.json";
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { connect } from "react-redux";
|
||||
import {
|
||||
deleteAwaitingSubmissionsFromBlob,
|
||||
getAwaitingSubmissionFromBlobProxy
|
||||
} from "../../actions";
|
||||
} from "../../actions/services/documentService";
|
||||
import { getFormCollectionByID } from "../../components/utils";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import {
|
||||
|
||||
@@ -10,22 +10,22 @@ import {
|
||||
deleteWatchedCases,
|
||||
getAwaitingSubmissionProxy,
|
||||
getPortalModuleDetailsProxy,
|
||||
getWatchedCasesProxy,
|
||||
} from "../../actions";
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import { getFormCollectionByID, getDetailsProxy } from "../../components/utils";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import {
|
||||
setAwaitingSubmission,
|
||||
setAwaitingSubmissionDetails,
|
||||
setAwaitingSubmissionDetails
|
||||
} from "../../store/awaitingSubmission/action";
|
||||
import { setCurrentReference } from "../../store/currentView/action";
|
||||
import {
|
||||
setSearchDetails,
|
||||
setSearchResults,
|
||||
setSearchResults
|
||||
} from "../../store/searchOutput/action";
|
||||
import {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
setWatchedCasesDetails
|
||||
} from "../../store/watchedCases/action";
|
||||
|
||||
import { planningappeals78_pdf } from "../../components/pdftemplates/planningappeals78_pdf";
|
||||
@@ -47,7 +47,7 @@ const TopThree = (props) => {
|
||||
setAwaitingSubmissionDetails,
|
||||
setSearchResults,
|
||||
setSearchDetails,
|
||||
showLoginCheck,
|
||||
showLoginCheck
|
||||
} = props;
|
||||
|
||||
const router = useRouter();
|
||||
@@ -132,19 +132,19 @@ const TopThree = (props) => {
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
"value": required
|
||||
});
|
||||
};
|
||||
|
||||
let filteredWatchedCases = showWatchedCases(data);
|
||||
|
||||
setWatchedCases(filteredWatchedCases),
|
||||
(setWatchedCases(filteredWatchedCases),
|
||||
getDetailsProxy(
|
||||
filteredWatchedCases,
|
||||
"myWatchedCases"
|
||||
).then((data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -156,7 +156,7 @@ const TopThree = (props) => {
|
||||
.then(() => {
|
||||
getAwaitingSubmissionProxy(cookies.pinsUser).then(
|
||||
(data) => {
|
||||
setAwaitingSubmission(data),
|
||||
(setAwaitingSubmission(data),
|
||||
getDetailsProxy(
|
||||
data,
|
||||
"awaitingSubmission"
|
||||
@@ -166,7 +166,7 @@ const TopThree = (props) => {
|
||||
// data
|
||||
// );
|
||||
setAwaitingSubmissionDetails(data);
|
||||
});
|
||||
}));
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -196,7 +196,7 @@ const TopThree = (props) => {
|
||||
const res = await fetch("/api/file/generateappealpdfcopy", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ docProps }),
|
||||
body: JSON.stringify({ docProps })
|
||||
});
|
||||
|
||||
if (!res.ok) throw new Error("PDF generation failed");
|
||||
@@ -287,25 +287,25 @@ const TopThree = (props) => {
|
||||
"&inid=" +
|
||||
showTopThreeArr[key].incidentid
|
||||
: router.locale == "cy"
|
||||
? "/fymhorth/achos/" +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType +
|
||||
"&appealType=" +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
: "/myportal/case/" +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType +
|
||||
"&appealType=" +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
? "/fymhorth/achos/" +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType +
|
||||
"&appealType=" +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
: "/myportal/case/" +
|
||||
showTopThreeArr[key].ticketnumber +
|
||||
"?key=" +
|
||||
topThreeType +
|
||||
"&appealType=" +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
data-id={index}
|
||||
onClick={() => {
|
||||
setSearchResults(
|
||||
(setSearchResults(
|
||||
props.props[topThreeType][topThreeType]
|
||||
),
|
||||
setSearchDetails(
|
||||
@@ -337,8 +337,8 @@ const TopThree = (props) => {
|
||||
|
||||
"appealType":
|
||||
showTopThreeArr[key]
|
||||
.pinswg_appealcasetype,
|
||||
});
|
||||
.pinswg_appealcasetype
|
||||
}));
|
||||
}}
|
||||
>
|
||||
{showTopThreeArr[key].pinswg_title}
|
||||
@@ -423,7 +423,7 @@ const TopThree = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -436,26 +436,32 @@ const TopThree = (props) => {
|
||||
{_.isEmpty(showTopThreeArr[key])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(showTopThreeArr[key])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(showTopThreeArr[key])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(
|
||||
showTopThreeArr[key].pinswg_siteaddressline1
|
||||
)
|
||||
? t("myportal:case-address-not-entered")
|
||||
: showTopThreeArr[key].pinswg_siteaddressline1 +
|
||||
(!_.isEmpty(
|
||||
showTopThreeArr[key].pinswg_siteaddressline2
|
||||
)
|
||||
? ", " +
|
||||
showTopThreeArr[key].pinswg_siteaddressline2
|
||||
: "") +
|
||||
(!_.isEmpty(
|
||||
showTopThreeArr[key].pinswg_siteaddresstown
|
||||
)
|
||||
? ", " +
|
||||
showTopThreeArr[key].pinswg_siteaddresstown
|
||||
: "")}
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(showTopThreeArr[key])
|
||||
? t("myportal:case-address-not-entered")
|
||||
: _.isEmpty(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_siteaddressline1
|
||||
)
|
||||
? t("myportal:case-address-not-entered")
|
||||
: showTopThreeArr[key]
|
||||
.pinswg_siteaddressline1 +
|
||||
(!_.isEmpty(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_siteaddressline2
|
||||
)
|
||||
? ", " +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_siteaddressline2
|
||||
: "") +
|
||||
(!_.isEmpty(
|
||||
showTopThreeArr[key]
|
||||
.pinswg_siteaddresstown
|
||||
)
|
||||
? ", " +
|
||||
showTopThreeArr[key]
|
||||
.pinswg_siteaddresstown
|
||||
: "")}
|
||||
</div>
|
||||
{showTopThreeArr[key].pinswg_appellantagent != null && (
|
||||
<div className="cardModuleReference">
|
||||
@@ -495,7 +501,7 @@ const TopThree = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -591,7 +597,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setSearchDetails: (searchDetails) => {
|
||||
dispatch(setSearchDetails(searchDetails));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -6,30 +6,32 @@ import { parseCookies } from "nookies";
|
||||
import { connect } from "react-redux";
|
||||
import {
|
||||
deleteAwaitingSubmissions,
|
||||
deleteMyRepresentationsFromBlob,
|
||||
deleteWatchedCases,
|
||||
getAwaitingSubmissionProxy,
|
||||
getPortalModuleDetailsProxy,
|
||||
getRepsFromBlobProxy,
|
||||
getWatchedCasesProxy,
|
||||
} from "../../actions";
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import {
|
||||
deleteMyRepresentationsFromBlob,
|
||||
getRepsFromBlobProxy
|
||||
} from "../../actions/services/documentService";
|
||||
import { consoleLogger } from "../../actions/core/logger";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import {
|
||||
setAwaitingSubmission,
|
||||
setAwaitingSubmissionDetails,
|
||||
setAwaitingSubmissionDetails
|
||||
} from "../../store/awaitingSubmission/action";
|
||||
import {
|
||||
setCurrentReference,
|
||||
setCurrentView,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationCapacity
|
||||
} from "../../store/currentView/action";
|
||||
import {
|
||||
setMyRepresentations,
|
||||
setMyRepresentationsDetails,
|
||||
setMyRepresentationsDetails
|
||||
} from "../../store/myRepresentations/action";
|
||||
import {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
setWatchedCasesDetails
|
||||
} from "../../store/watchedCases/action";
|
||||
import { getFormCollectionByID, getDetailsProxy } from "../utils";
|
||||
|
||||
@@ -46,7 +48,7 @@ const TopThree = (props) => {
|
||||
setAwaitingSubmissionDetails,
|
||||
setMyRepresentations,
|
||||
setMyRepresentationsDetails,
|
||||
setRepresentationCapacity,
|
||||
setRepresentationCapacity
|
||||
} = props;
|
||||
|
||||
const router = useRouter();
|
||||
@@ -80,12 +82,12 @@ const TopThree = (props) => {
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
||||
setWatchedCases(data),
|
||||
(setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
}
|
||||
);
|
||||
));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -97,7 +99,7 @@ const TopThree = (props) => {
|
||||
.then(() => {
|
||||
getAwaitingSubmissionProxy(cookies.pinsUser).then(
|
||||
(data) => {
|
||||
setAwaitingSubmission(data),
|
||||
(setAwaitingSubmission(data),
|
||||
getDetailsProxy(
|
||||
data,
|
||||
"awaitingSubmission"
|
||||
@@ -107,7 +109,7 @@ const TopThree = (props) => {
|
||||
// data
|
||||
// );
|
||||
setAwaitingSubmissionDetails(data);
|
||||
});
|
||||
}));
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -136,12 +138,12 @@ const TopThree = (props) => {
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
res.status(400).json(error);
|
||||
return null;
|
||||
})
|
||||
.then(() => {
|
||||
setCurrentView({
|
||||
"viewName": "My Representations",
|
||||
"viewKey": "myRepresentations",
|
||||
"viewKey": "myRepresentations"
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -211,7 +213,7 @@ const TopThree = (props) => {
|
||||
style={{
|
||||
color: "#0360a6",
|
||||
cursor: "pointer",
|
||||
fontWeight: "bold",
|
||||
fontWeight: "bold"
|
||||
}}
|
||||
data-id={index}
|
||||
onClick={() => {
|
||||
@@ -225,7 +227,7 @@ const TopThree = (props) => {
|
||||
showTopThreeArr[key].incidentID,
|
||||
"appealType":
|
||||
showTopThreeArr[key].appealType,
|
||||
"repDetails": showTopThreeArr[key],
|
||||
"repDetails": showTopThreeArr[key]
|
||||
});
|
||||
isLPA && setRepresentationCapacity("LPA");
|
||||
router.push({
|
||||
@@ -239,8 +241,8 @@ const TopThree = (props) => {
|
||||
state: "edit",
|
||||
created:
|
||||
showTopThreeArr[key]
|
||||
.repfile_name,
|
||||
},
|
||||
.repfile_name
|
||||
}
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -294,7 +296,7 @@ const TopThree = (props) => {
|
||||
showTopThreeArr[key].representationType +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key].representationType || ""}
|
||||
</div>
|
||||
@@ -312,27 +314,27 @@ const TopThree = (props) => {
|
||||
.representationCapacity +
|
||||
'" )].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
}).length > 0
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
})
|
||||
: showTopThreeArr[key].representationCapacity}
|
||||
path:
|
||||
'$..[?(@ && @.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
}).length > 0
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value_cy=="' +
|
||||
showTopThreeArr[key]
|
||||
.representationCapacity +
|
||||
'")].value',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key].representationCapacity}
|
||||
</div>
|
||||
<div className="cardModuleReference">
|
||||
<b>{t("myportal:date-raised")}:</b>
|
||||
@@ -352,7 +354,7 @@ const TopThree = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: showTopThreeArr[key][
|
||||
"_pinswg_localplanningauthority_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -400,7 +402,7 @@ const TopThree = (props) => {
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
// currentView: state.currentView,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
// search: state.search,
|
||||
// searchResultsObj: state.searchResultsObj,
|
||||
};
|
||||
@@ -431,7 +433,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setRepresentationCapacity: (representationCapacity) => {
|
||||
dispatch(setRepresentationCapacity(representationCapacity));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useMemo, useState } from "react";
|
||||
import Dropzone from "react-dropzone";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, reduxForm } from "redux-form";
|
||||
import { uploadFiles } from "../../actions";
|
||||
import { uploadFiles } from "../../actions/services/documentService";
|
||||
import { bytesToSize } from "../utils";
|
||||
|
||||
const required = (errorMsg) => (value) =>
|
||||
@@ -79,25 +79,25 @@ const baseStyle = {
|
||||
color: "#bdbdbd",
|
||||
transition: "border .3s ease-in-out",
|
||||
width: "80%",
|
||||
margin: "20px auto 30px",
|
||||
margin: "20px auto 30px"
|
||||
};
|
||||
|
||||
const activeStyle = {
|
||||
borderColor: "#2196f3",
|
||||
borderColor: "#2196f3"
|
||||
};
|
||||
|
||||
const acceptStyle = {
|
||||
borderColor: "#00e676",
|
||||
borderColor: "#00e676"
|
||||
};
|
||||
|
||||
const rejectStyle = {
|
||||
borderColor: "#ff1744",
|
||||
borderColor: "#ff1744"
|
||||
};
|
||||
const RenderFileUpload = (field) => {
|
||||
const files = field.input.value;
|
||||
const style = useMemo(
|
||||
() => ({
|
||||
...baseStyle,
|
||||
...baseStyle
|
||||
// ...(isDragActive ? activeStyle : {}),
|
||||
// ...(isDragAccept ? acceptStyle : {}),
|
||||
// ...(isDragReject ? rejectStyle : {}),
|
||||
@@ -220,7 +220,7 @@ const RenderFileUpload = (field) => {
|
||||
field.documentTypeCode
|
||||
)}_${file.name}`,
|
||||
{
|
||||
type: file.type,
|
||||
type: file.type
|
||||
}
|
||||
)
|
||||
);
|
||||
@@ -323,7 +323,7 @@ let UploadFile = (props) => {
|
||||
t(
|
||||
"myportal:searchcases-validation-minlength"
|
||||
)
|
||||
),
|
||||
)
|
||||
]}
|
||||
className="govuk-input"
|
||||
component={RenderTextfield}
|
||||
@@ -428,11 +428,11 @@ const mapStateToProps = (state) => {
|
||||
"pinswg_developmentdescription": "something to go here",
|
||||
"pinswg_agriculturalholding": 846040000,
|
||||
"_pinswg_planningappeals78ids_value":
|
||||
"50b533aa-43f1-ec11-aade-00224800be9c",
|
||||
"50b533aa-43f1-ec11-aade-00224800be9c"
|
||||
},
|
||||
initialValues: {
|
||||
caseReference: "CAS-00764-L0Q9W2",
|
||||
},
|
||||
caseReference: "CAS-00764-L0Q9W2"
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -447,6 +447,6 @@ export default connect(
|
||||
reduxForm({
|
||||
form: "uploadFileForm",
|
||||
destroyOnUnmount: false,
|
||||
enableReinitialize: true, // this is needed!!
|
||||
enableReinitialize: true // this is needed!!
|
||||
})(UploadFile)
|
||||
);
|
||||
|
||||
@@ -9,13 +9,16 @@ import { connect } from "react-redux";
|
||||
import {
|
||||
deleteAwaitingSubmissionsFromBlob,
|
||||
deleteMyRepresentationsFromBlob,
|
||||
deleteWatchedCases,
|
||||
getAwaitingSubmissionFromBlobProxy,
|
||||
getRepsFromBlobProxy,
|
||||
getWatchedCasesProxy,
|
||||
getRepsFromBlobProxy
|
||||
} from "../../actions/services/documentService";
|
||||
import {
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
getWatchedCases,
|
||||
createWatchedCases
|
||||
} from "../../actions";
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import { consoleLogger } from "../../actions/core/logger";
|
||||
import { getDetailsProxy, getFormCollectionByID } from "../../components/utils";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import { setAwaitingSubmissionFromBlob } from "../../store/awaitingSubmission/action";
|
||||
|
||||
@@ -9,16 +9,17 @@ import xpath from "xpath";
|
||||
import fieldLookup from "../../data/crmfieldlookuptranslations.json";
|
||||
import {
|
||||
setCurrentSection,
|
||||
setFormComplete,
|
||||
setFormComplete
|
||||
} from "../../store/appealType/action";
|
||||
import BuildCheckRow from "./buildcheckrow";
|
||||
|
||||
import { generateAppealPDF, sendCaseCompleteMessage } from "../../actions";
|
||||
import { generateAppealPDF } from "../../actions/services/documentService";
|
||||
import { sendCaseCompleteMessage } from "../../actions/services/portalService";
|
||||
import {
|
||||
bytesToSize,
|
||||
getThumbnailIconByExtension,
|
||||
updateLinks,
|
||||
getDocLink,
|
||||
getDocLink
|
||||
} from "../utils";
|
||||
|
||||
let BuildCheckSection = (props) => {
|
||||
@@ -40,7 +41,7 @@ let BuildCheckSection = (props) => {
|
||||
setCurrentSection,
|
||||
updateCurrentSection,
|
||||
mandatoryFieldsData,
|
||||
docsOffline,
|
||||
docsOffline
|
||||
} = props;
|
||||
|
||||
const parser = new DOMParser();
|
||||
@@ -118,7 +119,7 @@ let BuildCheckSection = (props) => {
|
||||
Object.assign(pdfObj, {
|
||||
"filesList": buildAppealFilesArray,
|
||||
"containerID": props.props.accountDetails.containerID,
|
||||
"casefolderID": props.appealType.caseReference.ticketnumber,
|
||||
"casefolderID": props.appealType.caseReference.ticketnumber
|
||||
});
|
||||
|
||||
const [confirmSections, setConfirmSections] = useState(false);
|
||||
@@ -132,7 +133,7 @@ let BuildCheckSection = (props) => {
|
||||
let formObj = jsonpath({
|
||||
path: "$['" + appealtypes + "']",
|
||||
json: fieldLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
|
||||
let labelTrans =
|
||||
@@ -140,7 +141,7 @@ let BuildCheckSection = (props) => {
|
||||
? jsonpath({
|
||||
path: '$..[?(@ && @.value=="' + label + '")].value_cy',
|
||||
json: formObj,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: label;
|
||||
return labelTrans;
|
||||
@@ -393,7 +394,7 @@ const mapStateToProps = (state) => {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
form: state.form,
|
||||
form: state.form
|
||||
};
|
||||
};
|
||||
|
||||
@@ -405,7 +406,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
updateCurrentSection: (whichSection) => {
|
||||
dispatch(setCurrentSection(whichSection));
|
||||
dispatch(setFormComplete("true"));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -424,6 +425,6 @@ export default connect(
|
||||
reduxForm({
|
||||
form: "appealForm",
|
||||
destroyOnUnmount: false,
|
||||
enableReinitialize: true, // this is needed!!
|
||||
enableReinitialize: true // this is needed!!
|
||||
})(BuildCheckSection)
|
||||
);
|
||||
|
||||
@@ -5,13 +5,14 @@ import { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { formValueSelector, reduxForm } from "redux-form";
|
||||
import xpath from "xpath";
|
||||
import { sendEmail, uploadFiles } from "../../actions";
|
||||
import { uploadFiles } from "../../actions/services/documentService";
|
||||
import { sendEmail } from "../../actions/services/notifyService";
|
||||
import {
|
||||
setCurrentSection,
|
||||
setDocumentsList,
|
||||
setFilesForAppeal,
|
||||
setNewAppealProgress,
|
||||
setFileCount,
|
||||
setFileCount
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID, getProgressObj, updateLinks } from "../utils";
|
||||
import BuildRow from "./buildrow";
|
||||
@@ -48,7 +49,7 @@ let BuildSection = (props) => {
|
||||
setCurrentSection,
|
||||
refno,
|
||||
gotoSection,
|
||||
mandatoryFieldsData,
|
||||
mandatoryFieldsData
|
||||
} = props;
|
||||
|
||||
const documentListObj = props.appealType.documentList;
|
||||
@@ -159,7 +160,7 @@ let BuildSection = (props) => {
|
||||
typeof filesUploadObj[key][j].name != "undefined" &&
|
||||
buildAppealFilesArray.push({
|
||||
"name": filesUploadObj[key][j].name,
|
||||
"size": filesUploadObj[key][j].size,
|
||||
"size": filesUploadObj[key][j].size
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -220,7 +221,7 @@ let BuildSection = (props) => {
|
||||
"/contacts(" + props.props.accountDetails.loggedinUserId + ")",
|
||||
"pinswg_name": props.appealType.caseReference.ticketnumber,
|
||||
[updateBindAppealTypeToIncident + "@odata.bind"]:
|
||||
"/incidents(" + incidentId + ")",
|
||||
"/incidents(" + incidentId + ")"
|
||||
});
|
||||
|
||||
updateBody = JSON.stringify(updateBody);
|
||||
@@ -261,7 +262,7 @@ let BuildSection = (props) => {
|
||||
props.appealType.caseReference.ticketnumber +
|
||||
"&inid=" +
|
||||
props.appealType.caseReference.incidentid,
|
||||
"linkExpiry": 10 * 60,
|
||||
"linkExpiry": 10 * 60
|
||||
};
|
||||
|
||||
// console.log(
|
||||
@@ -316,7 +317,7 @@ let BuildSection = (props) => {
|
||||
for (let j in filesUploadObj[key]) {
|
||||
buildAppealFilesArray.push({
|
||||
"name": filesUploadObj[key][j].name,
|
||||
"size": filesUploadObj[key][j].size,
|
||||
"size": filesUploadObj[key][j].size
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -665,14 +666,14 @@ const mapStateToProps = (state, ownProps) => {
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
initialValues: state.appealType.caseReference.caseDetails,
|
||||
currentView: state.currentView,
|
||||
currentView: state.currentView
|
||||
}
|
||||
: {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
currentView: state.currentView,
|
||||
currentView: state.currentView
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -696,7 +697,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setFileCount: (fileCount) => {
|
||||
dispatch(setFileCount(fileCount));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -758,6 +759,6 @@ export default connect(
|
||||
form: "appealForm",
|
||||
destroyOnUnmount: false,
|
||||
enableReinitialize: true, // this is needed!!
|
||||
validate,
|
||||
validate
|
||||
})(BuildSection)
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useRouter } from "next/router";
|
||||
import { useEffect } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { formValueSelector } from "redux-form";
|
||||
import { sendEmail } from "../../actions";
|
||||
import { sendEmail } from "../../actions/services/notifyService";
|
||||
import { setCurrentSection } from "../../store/appealType/action";
|
||||
import { getFormCollectionByID } from "../utils";
|
||||
|
||||
@@ -28,7 +28,7 @@ let CompleteAppeal = (props) => {
|
||||
"/accounts(" + props.appealType.appealLPA + ")",
|
||||
"pinswg_name": props.appealType.caseReference.ticketnumber,
|
||||
[updateBindAppealTypeToIncident + "@odata.bind"]:
|
||||
"/incidents(" + incidentId + ")",
|
||||
"/incidents(" + incidentId + ")"
|
||||
});
|
||||
|
||||
updateBody = JSON.stringify(updateBody);
|
||||
@@ -53,7 +53,7 @@ let CompleteAppeal = (props) => {
|
||||
const personalisation = {
|
||||
"caseReference": props.appealType.caseReference.ticketnumber,
|
||||
"emailAddress": props.props.accountDetails.loggedinUserEmail,
|
||||
"linkExpiry": 10 * 60,
|
||||
"linkExpiry": 10 * 60
|
||||
};
|
||||
sendEmail(templateId, emailAddress, personalisation, reference);
|
||||
|
||||
@@ -73,7 +73,7 @@ let CompleteAppeal = (props) => {
|
||||
props.props.accountDetails.loggedinUserId,
|
||||
props.appealType.appealTypeID,
|
||||
props.props.accountDetails.loggedinUserEmail,
|
||||
props.props.accountDetails.containerID,
|
||||
props.props.accountDetails.containerID
|
||||
]);
|
||||
|
||||
let { t } = useTranslation();
|
||||
@@ -87,7 +87,7 @@ let CompleteAppeal = (props) => {
|
||||
onSubmit,
|
||||
handleSubmit,
|
||||
formTitle,
|
||||
setCurrentSection,
|
||||
setCurrentSection
|
||||
} = props;
|
||||
|
||||
const currentSection = props.appealType.currentSection;
|
||||
@@ -157,7 +157,7 @@ const mapStateToProps = (state) => {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
appealType: state.appealType
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -166,7 +166,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentSection: (currentSection) => {
|
||||
dispatch(setCurrentSection(currentSection));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -5,12 +5,13 @@ import { useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Field, formValueSelector, reduxForm } from "redux-form";
|
||||
|
||||
import { consoleLogger, createNewCaseBlob } from "../../actions";
|
||||
import { consoleLogger } from "../../actions/core/logger";
|
||||
import { createNewCaseBlob } from "../../actions/services/caseService";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import {
|
||||
setAppealLPA,
|
||||
setAppealTypeID,
|
||||
setAppealTypeTitle,
|
||||
setAppealTypeTitle
|
||||
} from "../../store/appealType/action";
|
||||
import { getFormCollectionByID } from "../utils";
|
||||
import Aboutyou from "./aboutyou";
|
||||
@@ -21,7 +22,7 @@ const RenderLPAList = ({
|
||||
optionsObj,
|
||||
meta: { touched, error },
|
||||
label,
|
||||
errorMsg,
|
||||
errorMsg
|
||||
}) => {
|
||||
let { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
@@ -71,7 +72,7 @@ const RenderLPAList = ({
|
||||
optionsObj[key].name +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].name}
|
||||
</option>
|
||||
@@ -90,7 +91,7 @@ const RenderAppealTypeList = ({
|
||||
optionsObj,
|
||||
meta: { touched, error },
|
||||
label,
|
||||
errorMsg,
|
||||
errorMsg
|
||||
}) => {
|
||||
let { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
@@ -133,31 +134,35 @@ const RenderAppealTypeList = ({
|
||||
_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key].value
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key]
|
||||
.attributevalue
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key]
|
||||
.value
|
||||
)
|
||||
? ""
|
||||
: optionsObj[key]
|
||||
.attributevalue
|
||||
}
|
||||
>
|
||||
{_.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key])
|
||||
? ""
|
||||
: _.isEmpty(optionsObj[key].value)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key].value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
})
|
||||
: optionsObj[key].value}
|
||||
? ""
|
||||
: _.isEmpty(
|
||||
optionsObj[key].value
|
||||
)
|
||||
? ""
|
||||
: router.locale == "cy"
|
||||
? jsonpath({
|
||||
path:
|
||||
'$..[?(@ && @.value=="' +
|
||||
optionsObj[key]
|
||||
.value +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true
|
||||
})
|
||||
: optionsObj[key].value}
|
||||
</option>
|
||||
);
|
||||
})}
|
||||
@@ -255,7 +260,7 @@ const RenderRadio = ({
|
||||
{
|
||||
["documentCheckList_" +
|
||||
id]:
|
||||
custom.requiredDocumentLabel,
|
||||
custom.requiredDocumentLabel
|
||||
}
|
||||
))
|
||||
: delete docListObj[
|
||||
@@ -289,7 +294,7 @@ function Radiofield(props) {
|
||||
form,
|
||||
formProps,
|
||||
parentFieldShowOnValue,
|
||||
validation,
|
||||
validation
|
||||
} = props;
|
||||
let { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
@@ -401,9 +406,9 @@ let CreateCase = (props) => {
|
||||
values.appealTypes == "846040004" && values.confirmHASCAS == "true"
|
||||
? "846040004"
|
||||
: values.appealTypes == "846040004" &&
|
||||
values.confirmHASCAS == "false"
|
||||
? "846040000"
|
||||
: values.appealTypes;
|
||||
values.confirmHASCAS == "false"
|
||||
? "846040000"
|
||||
: values.appealTypes;
|
||||
|
||||
var whichAppealType = whichAppealType;
|
||||
|
||||
@@ -570,7 +575,7 @@ const mapStateToProps = (state) => {
|
||||
search: state.search,
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
formData: state.formData,
|
||||
appealType: state.appealType,
|
||||
appealType: state.appealType
|
||||
//form: state.form,
|
||||
};
|
||||
};
|
||||
@@ -587,7 +592,7 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
onChangeSelectLPA: (lpaId) => {
|
||||
dispatch(setAppealLPA(lpaId));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -599,6 +604,6 @@ export default connect(
|
||||
)(
|
||||
reduxForm({
|
||||
form: "caseForm",
|
||||
destroyOnUnmount: false,
|
||||
destroyOnUnmount: false
|
||||
})(CreateCase)
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions";
|
||||
} from "../../actions/services/portalService";
|
||||
import RepsOnResults from "./repsonresults";
|
||||
|
||||
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
|
||||
@@ -9,7 +9,10 @@ import transLookup from "../../data/lookuptranslations.json";
|
||||
import PaginationControl from "./pagination";
|
||||
import RepsOnResults from "./repsonresults";
|
||||
|
||||
import { getBasicDNSSearchPaged, getDNSCoords } from "../../actions";
|
||||
import {
|
||||
getBasicDNSSearchPaged,
|
||||
getDNSCoords
|
||||
} from "../../actions/services/searchService";
|
||||
|
||||
import GoogleMapReact from "google-map-react";
|
||||
import { parseCookies } from "nookies";
|
||||
@@ -17,19 +20,19 @@ import OSPoint from "ospoint";
|
||||
import {
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
getWatchedCasesProxy,
|
||||
} from "../../actions";
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import {
|
||||
setCurrentPage,
|
||||
setCurrentReference,
|
||||
setCurrentReference
|
||||
} from "../../store/currentView/action";
|
||||
import {
|
||||
setSearchDetails,
|
||||
setSearchResults,
|
||||
setSearchResults
|
||||
} from "../../store/searchOutput/action";
|
||||
import {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
setWatchedCasesDetails
|
||||
} from "../../store/watchedCases/action";
|
||||
import { getDetailsProxy, getSearchDetailsPaged } from "../utils";
|
||||
import { signIn, useSession } from "next-auth/react";
|
||||
@@ -49,7 +52,7 @@ const DNSSearchResults = (props) => {
|
||||
setWatchedCases,
|
||||
setWatchedCasesDetails,
|
||||
showMap,
|
||||
showLoginCheck,
|
||||
showLoginCheck
|
||||
} = props;
|
||||
let { t } = useTranslation();
|
||||
|
||||
@@ -159,17 +162,17 @@ const DNSSearchResults = (props) => {
|
||||
let updateBody = {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
"pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")",
|
||||
"pinswg_appealcasetype": +appealType,
|
||||
"pinswg_appealcasetype": +appealType
|
||||
};
|
||||
|
||||
createWatchedCases(updateBody)
|
||||
.then((data) => data)
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
|
||||
setWatchedCases(data),
|
||||
(setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then((data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -184,7 +187,7 @@ const DNSSearchResults = (props) => {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
"pinswg_Contact@odata.bind": "/contacts(" + loggedInUser + ")",
|
||||
"pinswg_appealcasetype": +appealType,
|
||||
"pinswg_emailnotifications": true,
|
||||
"pinswg_emailnotifications": true
|
||||
};
|
||||
|
||||
console.log("Email signed up");
|
||||
@@ -193,12 +196,12 @@ const DNSSearchResults = (props) => {
|
||||
.then(() => {
|
||||
getWatchedCasesProxy(props.accountDetails.loggedinUserId).then(
|
||||
(data) => {
|
||||
setWatchedCases(data),
|
||||
(setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
}
|
||||
);
|
||||
));
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -211,7 +214,7 @@ const DNSSearchResults = (props) => {
|
||||
whichIncident +
|
||||
"')]",
|
||||
json: watchedCases,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
|
||||
return isWatched;
|
||||
@@ -225,7 +228,7 @@ const DNSSearchResults = (props) => {
|
||||
"' && @.pinswg_emailnotifications==true)]",
|
||||
|
||||
json: watchedCases,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
return isEmail;
|
||||
};
|
||||
@@ -247,7 +250,7 @@ const DNSSearchResults = (props) => {
|
||||
let newObj = {};
|
||||
return Object.assign(newObj, {
|
||||
"@odata.count": required.length,
|
||||
"value": required,
|
||||
"value": required
|
||||
});
|
||||
};
|
||||
|
||||
@@ -258,12 +261,12 @@ const DNSSearchResults = (props) => {
|
||||
var dateB = new Date(b.createdon);
|
||||
return dateB - dateA;
|
||||
});
|
||||
setWatchedCases(data),
|
||||
(setWatchedCases(data),
|
||||
getDetailsProxy(data, "myWatchedCases").then(
|
||||
(data) => {
|
||||
setWatchedCasesDetails(data);
|
||||
}
|
||||
);
|
||||
));
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -385,7 +388,7 @@ const DNSSearchResults = (props) => {
|
||||
item.ticketnumber +
|
||||
'")]',
|
||||
json: searchDetailsObj,
|
||||
eval: true,
|
||||
eval: true
|
||||
});
|
||||
detailsObj = detailsObj[0];
|
||||
|
||||
@@ -399,7 +402,7 @@ const DNSSearchResults = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"pinswg_appealcasetype@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -427,10 +430,10 @@ const DNSSearchResults = (props) => {
|
||||
: "/dns/" +
|
||||
item.ticketnumber
|
||||
: myportal == true
|
||||
? "/myportal/dns/" +
|
||||
item.ticketnumber
|
||||
: "/dns/" +
|
||||
item.ticketnumber
|
||||
? "/myportal/dns/" +
|
||||
item.ticketnumber
|
||||
: "/dns/" +
|
||||
item.ticketnumber
|
||||
}
|
||||
className="govuk-link--no-underline"
|
||||
onClick={() => {
|
||||
@@ -447,7 +450,7 @@ const DNSSearchResults = (props) => {
|
||||
item.pinswg_appealcasetype,
|
||||
"showMap": showMap,
|
||||
"showLoginCheck":
|
||||
props.showLoginCheck,
|
||||
props.showLoginCheck
|
||||
});
|
||||
}}
|
||||
>
|
||||
@@ -484,32 +487,33 @@ const DNSSearchResults = (props) => {
|
||||
) < 0
|
||||
? detailsObj.pinswg_projectlocation
|
||||
: router.locale == "cy"
|
||||
? detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[1]
|
||||
: detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[0]
|
||||
? detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[1]
|
||||
: detailsObj.pinswg_projectlocation.split(
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: hasValidKey(
|
||||
item,
|
||||
"pinswg_caseaddress"
|
||||
)
|
||||
? item.pinswg_caseaddress !=
|
||||
null
|
||||
? item.pinswg_caseaddress.indexOf(
|
||||
";"
|
||||
) < 0
|
||||
? item.pinswg_caseaddress
|
||||
: router.locale == "cy"
|
||||
? item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[1]
|
||||
: item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: ""}
|
||||
item,
|
||||
"pinswg_caseaddress"
|
||||
)
|
||||
? item.pinswg_caseaddress !=
|
||||
null
|
||||
? item.pinswg_caseaddress.indexOf(
|
||||
";"
|
||||
) < 0
|
||||
? item.pinswg_caseaddress
|
||||
: router.locale ==
|
||||
"cy"
|
||||
? item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[1]
|
||||
: item.pinswg_caseaddress.split(
|
||||
";"
|
||||
)[0]
|
||||
: ""
|
||||
: ""}
|
||||
|
||||
{_.has(
|
||||
detailsObj,
|
||||
@@ -574,7 +578,7 @@ const DNSSearchResults = (props) => {
|
||||
:
|
||||
</span>
|
||||
{_.has(detailsObj, [
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue",
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? detailsObj[
|
||||
"_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -589,7 +593,7 @@ const DNSSearchResults = (props) => {
|
||||
:
|
||||
</span>
|
||||
{_.has(detailsObj, [
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue",
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
])
|
||||
? router.locale == "cy"
|
||||
? jsonpath({
|
||||
@@ -600,7 +604,7 @@ const DNSSearchResults = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: detailsObj[
|
||||
"_pinswg_associatedlpa_value@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -623,7 +627,7 @@ const DNSSearchResults = (props) => {
|
||||
] +
|
||||
'")].value_cy',
|
||||
json: transLookup,
|
||||
eval: true,
|
||||
eval: true
|
||||
})
|
||||
: item[
|
||||
"statuscode@OData.Community.Display.V1.FormattedValue"
|
||||
@@ -782,7 +786,7 @@ const DNSSearchResults = (props) => {
|
||||
"&toWatch=" +
|
||||
item.incidentid +
|
||||
"_" +
|
||||
item.pinswg_appealcasetype,
|
||||
item.pinswg_appealcasetype
|
||||
}
|
||||
);
|
||||
}}
|
||||
@@ -886,7 +890,7 @@ const DNSSearchResults = (props) => {
|
||||
fieldSortState,
|
||||
orderByState,
|
||||
searchLoaded,
|
||||
getSearchPageResults,
|
||||
getSearchPageResults
|
||||
]);
|
||||
return (
|
||||
<>
|
||||
@@ -1058,14 +1062,14 @@ const mapDispatchToProps = (dispatch) => {
|
||||
},
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
return {
|
||||
// currentView: state.currentView,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
// search: state.search,
|
||||
// searchResultsObj: state.searchResultsObj,
|
||||
};
|
||||
|
||||
@@ -5,7 +5,10 @@ import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { useCallback, useState } from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { getAdvancedSearchPaged, getBasicSearchPaged } from "../../actions";
|
||||
import {
|
||||
getAdvancedSearchPaged,
|
||||
getBasicSearchPaged
|
||||
} from "../../actions/services/searchService";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import {
|
||||
setCurrentPage,
|
||||
@@ -32,7 +35,7 @@ import {
|
||||
createWatchedCases,
|
||||
deleteWatchedCases,
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions";
|
||||
} from "../../actions/services/portalService";
|
||||
|
||||
import { sendGAEvent } from "@next/third-parties/google";
|
||||
import RepsOnResults from "./repsonresults";
|
||||
|
||||
@@ -3,10 +3,12 @@ import { v4 as uuidv4 } from "uuid";
|
||||
import {
|
||||
getBasicPartSavedDetails,
|
||||
getBasicSearchDetails,
|
||||
getBasicSearchDetailsPaged,
|
||||
getBasicSearchDetailsPaged
|
||||
} from "../../actions/services/searchService";
|
||||
import {
|
||||
getPortalModuleDetailsProxy,
|
||||
getPortalModuleDetails
|
||||
} from "../../actions";
|
||||
} from "../../actions/services/caseService";
|
||||
import data from "../../data/collections.json";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
import { getSession } from "next-auth/react";
|
||||
import {
|
||||
getAppealsTypesForNewAppeal,
|
||||
getMandatoryFields,
|
||||
getPickLists
|
||||
} from "../../actions/services/referenceDataService";
|
||||
import {
|
||||
getAwaitingSubmissionFromBlob,
|
||||
getFilesFromBlob,
|
||||
getIP,
|
||||
getMandatoryFields,
|
||||
getPickLists,
|
||||
getProgressFromBlob,
|
||||
getPersonalAccount,
|
||||
} from "../../actions";
|
||||
getProgressFromBlob
|
||||
} from "../../actions/services/documentService";
|
||||
import { getPersonalAccount } from "../../actions/services/accountService";
|
||||
import { getIP } from "../../actions/core/logger";
|
||||
|
||||
import { readFormXml } from "../forms/readFormXml";
|
||||
import { requireQueryParams } from "../routing/requireQueryParams";
|
||||
@@ -27,7 +29,7 @@ export async function loadMyPortalAppealPage(ctx) {
|
||||
const required = requireQueryParams(query, [
|
||||
"appealtypes",
|
||||
"apt",
|
||||
"casereference",
|
||||
"casereference"
|
||||
]);
|
||||
if (!required.ok) {
|
||||
return { redirect: required.redirect };
|
||||
@@ -38,8 +40,8 @@ export async function loadMyPortalAppealPage(ctx) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/auth/signin",
|
||||
permanent: false,
|
||||
},
|
||||
permanent: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ export async function loadMyPortalAppealPage(ctx) {
|
||||
getAppealsTypesForNewAppeal(),
|
||||
getMandatoryFields(query.appealtypes),
|
||||
getPickLists(query.appealtypes),
|
||||
getFilesFromBlob(loggedInUserIdent, query.casereference),
|
||||
getFilesFromBlob(loggedInUserIdent, query.casereference)
|
||||
]);
|
||||
|
||||
const blobProgress = await getProgressFromBlob(
|
||||
@@ -86,6 +88,6 @@ export async function loadMyPortalAppealPage(ctx) {
|
||||
blobProgress,
|
||||
accountDetails,
|
||||
awaitingSubmissionFromBlob,
|
||||
xmlStr,
|
||||
xmlStr
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
import { getSession } from "next-auth/react";
|
||||
import {
|
||||
getAppealsTypesForNewAppeal,
|
||||
getIP,
|
||||
getMandatoryFields,
|
||||
getPickLists,
|
||||
getProgressFromBlob,
|
||||
getPersonalAccount,
|
||||
} from "../../actions";
|
||||
getPickLists
|
||||
} from "../../actions/services/referenceDataService";
|
||||
import { getProgressFromBlob } from "../../actions/services/documentService";
|
||||
import { getPersonalAccount } from "../../actions/services/accountService";
|
||||
import { getIP } from "../../actions/core/logger";
|
||||
import { readFormXml } from "../forms/readFormXml";
|
||||
import { requireQueryParams } from "../routing/requireQueryParams";
|
||||
|
||||
@@ -32,8 +32,8 @@ export async function loadNewAppealPage(ctx) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: "/auth/signin",
|
||||
permanent: false,
|
||||
},
|
||||
permanent: false
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export async function loadNewAppealPage(ctx) {
|
||||
await Promise.all([
|
||||
getAppealsTypesForNewAppeal(),
|
||||
getMandatoryFields(query.appealtypes),
|
||||
getPickLists(query.appealtypes),
|
||||
getPickLists(query.appealtypes)
|
||||
]);
|
||||
|
||||
const blobProgress = await getProgressFromBlob(loggedInUserIdent, query.id);
|
||||
@@ -64,6 +64,6 @@ export async function loadNewAppealPage(ctx) {
|
||||
pickListData,
|
||||
blobProgress,
|
||||
accountDetails,
|
||||
xmlStr,
|
||||
xmlStr
|
||||
};
|
||||
}
|
||||
|
||||
@@ -23,9 +23,12 @@ import {
|
||||
setAppealTypeTitle,
|
||||
setAppealTypeID,
|
||||
setAppealLPA,
|
||||
getAppealTypeObj,
|
||||
getAppealTypeObj
|
||||
} from "../../store/appealType/action";
|
||||
import { getAppealsTypes, getLPA } from "../../actions";
|
||||
import {
|
||||
getAppealsTypes,
|
||||
getLPA
|
||||
} from "../../actions/services/referenceDataService";
|
||||
import { setLPA } from "../../store/lpa/action";
|
||||
|
||||
import { getSession, useSession } from "next-auth/react";
|
||||
@@ -110,7 +113,7 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { reduxForm, formValueSelector } from "redux-form";
|
||||
|
||||
import PersonalDetails from "../../components/account/personaldetails";
|
||||
import { setAccountDetails } from "../../store/accountDetails/action";
|
||||
import { getPersonalAccount } from "../../actions";
|
||||
import { getPersonalAccount } from "../../actions/services/accountService";
|
||||
import { setCookie } from "nookies";
|
||||
import { getSession, useSession } from "next-auth/react";
|
||||
import NoSessionWarning from "../../components/nosession";
|
||||
@@ -36,8 +36,8 @@ const Home = (props) => {
|
||||
useState(false);
|
||||
const [accountUpdatedComplete, setAccountUpdatedComplete] = useState(false);
|
||||
|
||||
setCookie(null, "pinsUser", props.accountDetails.loggedinUserId),
|
||||
{ path: "/" };
|
||||
(setCookie(null, "pinsUser", props.accountDetails.loggedinUserId),
|
||||
{ path: "/" });
|
||||
|
||||
const { data: session, status } = useSession();
|
||||
|
||||
@@ -133,7 +133,7 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import { reduxForm, formValueSelector } from "redux-form";
|
||||
|
||||
import RegisterForm from "../../components/account/registerform";
|
||||
import { dehashString, hashAPIPath, getIP } from "../../actions";
|
||||
import { dehashString, hashAPIPath } from "../../actions/core/hash";
|
||||
import { getIP } from "../../actions/core/logger";
|
||||
import { getSession, useSession, signIn, signOut } from "next-auth/react";
|
||||
|
||||
const Home = (props) => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { getAddressSearch } from "../actions";
|
||||
import { getAddressSearch } from "../actions/services/searchService";
|
||||
import SearchResults from "../components/addresssearchresults";
|
||||
import Breadcrumbs from "../components/breadcrumbs";
|
||||
import CookieBanner from "../components/cookieBanner";
|
||||
@@ -125,11 +125,11 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
props: {
|
||||
searchResultsObj: {
|
||||
searchResultsObj: searchResultsObj,
|
||||
searchDetailsObj: searchDetailsObj,
|
||||
searchDetailsObj: searchDetailsObj
|
||||
},
|
||||
currentType: "directResultsObj",
|
||||
showLoginCheck: showLoginCheck,
|
||||
},
|
||||
showLoginCheck: showLoginCheck
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -145,7 +145,7 @@ const mapStateToProps = (state) => {
|
||||
myCases: state.myCases,
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
awaitingSubmission: state.awaitingSubmission
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@ import AppealsTab from "../../components/admin/tabs/appeals";
|
||||
import DocumentsTab from "../../components/admin/tabs/documents";
|
||||
|
||||
import { fetchAdminStorageData } from "../../components/admin/utils/serverside";
|
||||
import { getNewAppeals } from "../../actions";
|
||||
import { getNewAppeals } from "../../actions/services/adminService";
|
||||
|
||||
import { getSearchDetails } from "../../components/utils";
|
||||
|
||||
import {
|
||||
setSearchDetails,
|
||||
setSearchResults,
|
||||
setSearchResults
|
||||
} from "../../store/searchOutput/action";
|
||||
import { setCurrentPage } from "../../store/currentView/action";
|
||||
|
||||
@@ -30,7 +30,7 @@ const StoragePage = (props) => {
|
||||
repCompleteCount,
|
||||
searchResultsObj,
|
||||
docsOffline,
|
||||
showFilteredDocs,
|
||||
showFilteredDocs
|
||||
} = props;
|
||||
const [whichTab, setWhichTab] = useState("documents");
|
||||
|
||||
@@ -57,7 +57,7 @@ const StoragePage = (props) => {
|
||||
"documents",
|
||||
"appeals",
|
||||
"storage",
|
||||
"accounts",
|
||||
"accounts"
|
||||
].map((tab) => (
|
||||
<li
|
||||
key={tab}
|
||||
@@ -168,7 +168,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
if (![...ALLOWED_IPS, ...LOCALHOST_IPS].includes(ip)) {
|
||||
return {
|
||||
redirect: { destination: "/403", permanent: false },
|
||||
redirect: { destination: "/403", permanent: false }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -192,8 +192,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
userData,
|
||||
repCompleteCount,
|
||||
docsOffline: process.env.DOCAPI_OFFLINE || false,
|
||||
showFilteredDocs: process.env.SHOWFILTERDOCS || false,
|
||||
},
|
||||
showFilteredDocs: process.env.SHOWFILTERDOCS || false
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -202,14 +202,14 @@ const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setCurrentPage: (currentPage) => {
|
||||
dispatch(setCurrentPage(currentPage));
|
||||
},
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
console.log("===============================\n state:", state);
|
||||
return {
|
||||
searchResultsObj: state.searchResultsObj,
|
||||
searchResultsObj: state.searchResultsObj
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,11 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { getAppealsTypes, getProjectTypes, getLPA } from "../actions";
|
||||
import {
|
||||
getAppealsTypes,
|
||||
getProjectTypes,
|
||||
getLPA
|
||||
} from "../actions/services/referenceDataService";
|
||||
import Breadcrumbs from "../components/breadcrumbs";
|
||||
import CookieBanner from "../components/cookieBanner";
|
||||
import CRMError from "../components/crmError";
|
||||
@@ -126,7 +130,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
let [appealTypeData, projectTypeData, lpaData] = await Promise.all([
|
||||
await getAppealsTypes(),
|
||||
await getProjectTypes(),
|
||||
await getLPA(),
|
||||
await getLPA()
|
||||
]);
|
||||
|
||||
//const lpaData = require("../data/lpa.json");
|
||||
@@ -146,7 +150,7 @@ const mapStateToProps = (state) => {
|
||||
appealType: state.appealType,
|
||||
LPAData: state.LPAData,
|
||||
//form: state.form,
|
||||
accountDetails: state.accountDetails,
|
||||
accountDetails: state.accountDetails
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import useTranslation from "next-translate/useTranslation";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { connect } from "react-redux";
|
||||
import { getAdvancedSearch } from "../actions";
|
||||
import { getAdvancedSearch } from "../actions/services/searchService";
|
||||
import Breadcrumbs from "../components/breadcrumbs";
|
||||
import CookieBanner from "../components/cookieBanner";
|
||||
import Footer from "../components/footer";
|
||||
@@ -13,7 +13,7 @@ import { setShowReps } from "../store/currentView/action";
|
||||
import { setSearch } from "../store/search/action";
|
||||
import {
|
||||
setSearchDetails,
|
||||
setSearchResults,
|
||||
setSearchResults
|
||||
} from "../store/searchOutput/action";
|
||||
import ServiceBanner from "../components/servicebanner";
|
||||
import { wrapper } from "../store/store";
|
||||
@@ -140,8 +140,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
store.dispatch(setSearch(Object.entries(query)));
|
||||
return {
|
||||
props: {
|
||||
showLoginCheck: showLoginCheck,
|
||||
},
|
||||
showLoginCheck: showLoginCheck
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
@@ -157,7 +157,7 @@ const mapStateToProps = (state) => {
|
||||
myCases: state.myCases,
|
||||
watchedCases: state.watchedCases,
|
||||
myRepresentations: state.myRepresentations,
|
||||
awaitingSubmission: state.awaitingSubmission,
|
||||
awaitingSubmission: state.awaitingSubmission
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -18,11 +18,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
azureHeadersPagedCustom,
|
||||
consoleLogger,
|
||||
getToken,
|
||||
} from "../../../actions";
|
||||
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { number } from "prop-types";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
@@ -154,7 +152,7 @@ export default async function ApiProxy(req, res) {
|
||||
let flattened = data.value.map((r) => ({
|
||||
...r,
|
||||
ticketnumber: r.pinswg_DocumentIds?.ticketnumber || null,
|
||||
publishtoweb: r.pinswg_DocumentIds?.pinswg_publishtoweb || null,
|
||||
publishtoweb: r.pinswg_DocumentIds?.pinswg_publishtoweb || null
|
||||
}));
|
||||
|
||||
data.value = flattened;
|
||||
|
||||
@@ -18,11 +18,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
azureHeadersPagedCustom,
|
||||
consoleLogger,
|
||||
getToken,
|
||||
} from "../../../actions";
|
||||
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ import { PrismaAdapter } from "@next-auth/prisma-adapter";
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import NextAuth from "next-auth";
|
||||
import EmailProvider from "next-auth/providers/email";
|
||||
import { consoleLogger, getPreferredLanguage } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getPreferredLanguage } from "../../../actions/services/accountService";
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
@@ -43,7 +44,7 @@ const parseUrl = (url) => {
|
||||
host: _url.host,
|
||||
path,
|
||||
base,
|
||||
toString: () => base,
|
||||
toString: () => base
|
||||
};
|
||||
};
|
||||
|
||||
@@ -127,7 +128,7 @@ const authOptions = (locale, req, res) => {
|
||||
return res
|
||||
.writeHead(200, { "Content-Type": "application/json" })
|
||||
.json({ url: formURL });
|
||||
},
|
||||
}
|
||||
},
|
||||
EmailProvider({
|
||||
maxAge: 2 * 60 * 60, //10 * 60, // Magic links are valid for 10 min only
|
||||
@@ -191,7 +192,7 @@ const authOptions = (locale, req, res) => {
|
||||
// url.split("&token")[1]
|
||||
// : url,
|
||||
|
||||
"linkExpiry": 2 * 60 * 60,
|
||||
"linkExpiry": 2 * 60 * 60
|
||||
};
|
||||
const reference = "PEDW-SIGNIN";
|
||||
|
||||
@@ -208,14 +209,14 @@ const authOptions = (locale, req, res) => {
|
||||
emailAddress,
|
||||
{
|
||||
personalisation: personalisation,
|
||||
reference: reference,
|
||||
reference: reference
|
||||
// emailReplyToId: emailReplyToId,
|
||||
}
|
||||
)
|
||||
//.then((response) => console.log(response))
|
||||
.catch((error) => consoleLogger(error));
|
||||
},
|
||||
}),
|
||||
}
|
||||
})
|
||||
],
|
||||
adapter: PrismaAdapter(prisma),
|
||||
secret: process.env.NEXTAUTH_SECRET,
|
||||
@@ -226,7 +227,7 @@ const authOptions = (locale, req, res) => {
|
||||
theme: "dark",
|
||||
debug: true,
|
||||
maxAge: 30 * 60,
|
||||
updateAge: 5 * 60, // 24 hours
|
||||
updateAge: 5 * 60 // 24 hours
|
||||
},
|
||||
cookies: {
|
||||
callbackUrl: {
|
||||
@@ -234,16 +235,16 @@ const authOptions = (locale, req, res) => {
|
||||
options: {
|
||||
sameSite: "lax",
|
||||
path: "/",
|
||||
secure: true,
|
||||
},
|
||||
},
|
||||
secure: true
|
||||
}
|
||||
}
|
||||
},
|
||||
pages: {
|
||||
signIn: (locale == "cy" ? "/cy" : "") + "/auth/signin",
|
||||
error: (locale == "cy" ? "/cy" : "") + "/auth/error", // Error code passed in query string as ?error=
|
||||
verifyRequest:
|
||||
(locale == "cy" ? "/cy" : "") + "/auth/verify-request", // (used for check email message)
|
||||
newUser: (locale == "cy" ? "/cy" : "") + "/account/register", // New users will be directed here on first sign in (leave the property out if not of interest)
|
||||
newUser: (locale == "cy" ? "/cy" : "") + "/account/register" // New users will be directed here on first sign in (leave the property out if not of interest)
|
||||
},
|
||||
callbacks: {
|
||||
session: async (session, user) => {
|
||||
@@ -275,8 +276,8 @@ const authOptions = (locale, req, res) => {
|
||||
|
||||
console.log("the url:", updatedUrl);
|
||||
return updatedUrl;
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
// import axios from "axios";
|
||||
// import CryptoJS from "crypto-js";
|
||||
// import { getToken, consoleLogger } from "../../../../actions";
|
||||
|
||||
// const WORDKEY = process.env.HASHKEY;
|
||||
// const accessTokenEndpoint = process.env.ACCESS_TOKEN_ENDPOINT;
|
||||
@@ -110,7 +109,8 @@
|
||||
// }
|
||||
|
||||
import axios from "axios";
|
||||
import { getToken, consoleLogger } from "../../../../actions";
|
||||
import { getToken } from "../../../../actions/core/token";
|
||||
import { consoleLogger } from "../../../../actions/core/logger";
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
@@ -149,9 +149,9 @@ const ApiProxy = async (req, res) => {
|
||||
"Prefer":
|
||||
'odata.include-annotations="*",return=representation',
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Authorization": "Bearer " + token.access_token
|
||||
},
|
||||
responseType: "stream",
|
||||
responseType: "stream"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -196,8 +196,8 @@ const ApiProxy = async (req, res) => {
|
||||
|
||||
export const config = {
|
||||
api: {
|
||||
responseLimit: false,
|
||||
},
|
||||
responseLimit: false
|
||||
}
|
||||
};
|
||||
|
||||
export default ApiProxy;
|
||||
|
||||
+22
-26
@@ -1,13 +1,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
getToken,
|
||||
azureHeaders,
|
||||
azureHeadersPaged,
|
||||
consoleLogger,
|
||||
sendEmail,
|
||||
} from "../../../actions";
|
||||
import { azureHeaders, azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { formatDates } from "../../../components/utils";
|
||||
|
||||
var NotifyClient = require("notifications-node-client").NotifyClient;
|
||||
@@ -79,14 +75,14 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
noRef: "No Ref",
|
||||
untitled: "Untitled",
|
||||
noDate: "No Date",
|
||||
link: "Link",
|
||||
link: "Link"
|
||||
},
|
||||
cy: {
|
||||
noRef: "Dim Cyfeirnod",
|
||||
untitled: "Heb Deitl",
|
||||
noDate: "Dim Dyddiad",
|
||||
link: "Dolen",
|
||||
},
|
||||
link: "Dolen"
|
||||
}
|
||||
};
|
||||
|
||||
const t = labels[language] || labels.en;
|
||||
@@ -114,13 +110,13 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
en: {
|
||||
unnamed: "Unnamed Event",
|
||||
noDate: "No Date",
|
||||
on: "on",
|
||||
on: "on"
|
||||
},
|
||||
cy: {
|
||||
unnamed: "Digwyddiad Heb Enw",
|
||||
noDate: "Dim Dyddiad",
|
||||
on: "ar",
|
||||
},
|
||||
on: "ar"
|
||||
}
|
||||
};
|
||||
|
||||
const t = labels[language] || labels.en;
|
||||
@@ -144,14 +140,14 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
open: "Open",
|
||||
to: "to",
|
||||
close: "Close",
|
||||
na: "N/A",
|
||||
na: "N/A"
|
||||
},
|
||||
cy: {
|
||||
open: "Agor",
|
||||
to: "i",
|
||||
close: "Cau",
|
||||
na: "Dim ar gael",
|
||||
},
|
||||
na: "Dim ar gael"
|
||||
}
|
||||
};
|
||||
|
||||
const t = labels[language] || labels.en;
|
||||
@@ -234,7 +230,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
docSection,
|
||||
sipSection,
|
||||
repsSection,
|
||||
caseUnsubscribelink,
|
||||
caseUnsubscribelink
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n")}`;
|
||||
@@ -242,7 +238,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
.join("\n\n"),
|
||||
unsubscribeLink: `Unsubscribe by selecting this link if you no longer want to receive any updates ${
|
||||
process.env.NEXTAUTH_URL + "/unsubscribeall/" + contactId
|
||||
}`,
|
||||
}`
|
||||
};
|
||||
|
||||
const personalisationCY = {
|
||||
@@ -281,7 +277,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
docSection,
|
||||
sipSection,
|
||||
repsSection,
|
||||
caseUnsubscribelink,
|
||||
caseUnsubscribelink
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n")}`;
|
||||
@@ -289,7 +285,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
.join("\n\n"),
|
||||
unsubscribeLink: `Dad-danysgrifiwch drwy ddewis y ddolen hon os nad ydych chi eisiau derbyn unrhyw ddiweddariadau mwyach ${
|
||||
process.env.NEXTAUTH_URL + "/unsubscribeall/" + contactId
|
||||
}`,
|
||||
}`
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -305,7 +301,7 @@ const buildNotifyPayloads = (watchlistByEmail) => {
|
||||
process.env.NEXTAUTH_URL +
|
||||
(prefLanguage == 846040001 ? "en" : "cy") +
|
||||
"/unsubscribeall/" +
|
||||
contactId,
|
||||
contactId
|
||||
};
|
||||
})
|
||||
.filter(Boolean); // Remove any nulls from filtered-out users
|
||||
@@ -348,7 +344,7 @@ export default async function CombinedApiProxy(req, res) {
|
||||
...doc,
|
||||
pinswg_hashlink: encryptDocReference(
|
||||
doc.pinswg_isharedocumentreference
|
||||
),
|
||||
)
|
||||
}));
|
||||
} catch (err) {
|
||||
consoleLogger(
|
||||
@@ -401,7 +397,7 @@ export default async function CombinedApiProxy(req, res) {
|
||||
...entry,
|
||||
repsPeriods,
|
||||
documents,
|
||||
sipEvents,
|
||||
sipEvents
|
||||
};
|
||||
})
|
||||
);
|
||||
@@ -428,7 +424,7 @@ export default async function CombinedApiProxy(req, res) {
|
||||
reference: payload.reference,
|
||||
template_id: payload.template_id,
|
||||
language:
|
||||
payload.pinswg_preferredlanguage == 846040001 ? "en" : "cy",
|
||||
payload.pinswg_preferredlanguage == 846040001 ? "en" : "cy"
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -437,7 +433,7 @@ export default async function CombinedApiProxy(req, res) {
|
||||
payload.email_address,
|
||||
{
|
||||
personalisation: payload.personalisation,
|
||||
reference: payload.reference,
|
||||
reference: payload.reference
|
||||
}
|
||||
);
|
||||
result.status = "success";
|
||||
@@ -455,7 +451,7 @@ export default async function CombinedApiProxy(req, res) {
|
||||
consoleLogger(error);
|
||||
res.status(500).json({
|
||||
error: "An error occurred while retrieving combined data.",
|
||||
details: error.message || error.toString(),
|
||||
details: error.message || error.toString()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
const WEBAPI_URL =
|
||||
@@ -84,7 +86,7 @@ export default async function ApiProxy(req, res) {
|
||||
...doc,
|
||||
pinswg_hashlink: encryptDocReference(
|
||||
doc.pinswg_isharedocumentreference
|
||||
),
|
||||
)
|
||||
}));
|
||||
|
||||
res.status(200).json({ ...data, value: resultsWithLinks });
|
||||
@@ -92,7 +94,7 @@ export default async function ApiProxy(req, res) {
|
||||
consoleLogger(error);
|
||||
res.status(500).json({
|
||||
error: "Failed to fetch document details.",
|
||||
details: error.message || error.toString(),
|
||||
details: error.message || error.toString()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
const WEBAPI_URL =
|
||||
@@ -67,7 +69,7 @@ export default async function ApiProxy(req, res) {
|
||||
consoleLogger(error);
|
||||
res.status(500).json({
|
||||
error: "An error occurred while retrieving data.",
|
||||
details: error.message || error.toString(),
|
||||
details: error.message || error.toString()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -25,10 +25,19 @@
|
||||
* description: Failed
|
||||
*/
|
||||
|
||||
import { consoleLogger, getPreferredLanguage } from "../../../actions";
|
||||
import { consoleLogger, redactSensitive } from "../../../actions/core/logger";
|
||||
import { isNonEmptyString, sanitizeString } from "../../../actions/core/guards";
|
||||
import { getPreferredLanguage } from "../../../actions/services/accountService";
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var data = req.body;
|
||||
const emailAddress = sanitizeString(data?.emailAddress);
|
||||
|
||||
if (!isNonEmptyString(emailAddress)) {
|
||||
return res.status(400).json({ error: "emailAddress is required" });
|
||||
}
|
||||
|
||||
data.emailAddress = emailAddress;
|
||||
|
||||
if (data?.reference === "PEDW-NEW-CASEREF") {
|
||||
try {
|
||||
@@ -49,7 +58,10 @@ export default async function ApiProxy(req, res) {
|
||||
const notifyClient = new NotifyClient(process.env.NOTIFY_API_KEY);
|
||||
//const emailReplyToId = process.env.EMAIL_REPLY_TO_ID;
|
||||
|
||||
console.log("///////////////\n Sending email \ns//////////////", data);
|
||||
console.log(
|
||||
"///////////////\n Sending email \ns//////////////",
|
||||
redactSensitive(data)
|
||||
);
|
||||
|
||||
notifyClient
|
||||
.sendEmail(data.templateId, data.emailAddress, {
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { consoleLogger, getToken } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -46,9 +47,9 @@ export default async function ApiProxy(req, res) {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: data,
|
||||
data: data
|
||||
};
|
||||
|
||||
return axios(config)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken } from "../../../actions";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { getCaseBlob } from "../../../actions/azurestorage";
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -79,7 +79,7 @@ export default async function ApiProxy(req, res) {
|
||||
"servicestage": 1,
|
||||
"customerid_contact@odata.bind": "/contacts(" + contactid + ")",
|
||||
"pinswg_appealcasetype": appealTypeId,
|
||||
"pinswg_AssociatedLPA@odata.bind": "/accounts(" + lpaID + ")",
|
||||
"pinswg_AssociatedLPA@odata.bind": "/accounts(" + lpaID + ")"
|
||||
};
|
||||
var newData = Object.assign(data, createCaseBody);
|
||||
|
||||
@@ -97,9 +97,9 @@ export default async function ApiProxy(req, res) {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: JSON.stringify(newData),
|
||||
data: JSON.stringify(newData)
|
||||
};
|
||||
var apiResponse = _.isEmpty(req.query)
|
||||
? res.status(400).json()
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken } from "../../../actions";
|
||||
import { isNonEmptyString, sanitizeString } from "../../../actions/core/guards";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { getCaseBlob } from "../../../actions/azurestorage";
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -66,6 +68,17 @@ const hashAPIPath = (queryPath) => {
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var createTaskBody = req.body;
|
||||
|
||||
const contactEmail = sanitizeString(createTaskBody?.contactEmail);
|
||||
const contactSubject = sanitizeString(createTaskBody?.contactSubject);
|
||||
const contactBody = sanitizeString(createTaskBody?.contactbody);
|
||||
|
||||
if (!isNonEmptyString(contactEmail) || !isNonEmptyString(contactSubject)) {
|
||||
return res.status(400).json({
|
||||
error: "contactEmail and contactSubject are required"
|
||||
});
|
||||
}
|
||||
|
||||
var queryUrl = "tasks";
|
||||
var token = await getToken();
|
||||
|
||||
@@ -81,19 +94,19 @@ export default async function ApiProxy(req, res) {
|
||||
ceq: "4fddd7e8-7d26-ec11-a97f-00224800e98c", // Inspector Scheduling
|
||||
other: "8ffabad9-7c26-ec11-a97f-00224800e98c", // Casework
|
||||
postdec: "1357e457-7e26-ec11-a97f-00224800e98c", // SLT Team
|
||||
comp: "1357e457-7e26-ec11-a97f-00224800e98c", // SLT Team
|
||||
comp: "1357e457-7e26-ec11-a97f-00224800e98c" // SLT Team
|
||||
};
|
||||
|
||||
let teamId = teamMap[contactValue];
|
||||
|
||||
const payload = {
|
||||
"subject": `Contact Us Enquiry - ${createTaskBody.contactSubject}`,
|
||||
"description": `From: ${createTaskBody.contactEmail}\n\n${createTaskBody.contactbody}`,
|
||||
"subject": `Contact Us Enquiry - ${contactSubject}`,
|
||||
"description": `From: ${contactEmail}\n\n${contactBody}`,
|
||||
"scheduledstart": new Date().toISOString(),
|
||||
"scheduledend": new Date(
|
||||
new Date().getTime() + 60 * 60000 * 24
|
||||
).toISOString(), // 30 mins
|
||||
...(teamId && { "ownerid@odata.bind": `/teams(${teamId})` }),
|
||||
...(teamId && { "ownerid@odata.bind": `/teams(${teamId})` })
|
||||
};
|
||||
|
||||
//console.log("/////Create Task:\n", payload, "\n//////////////");
|
||||
@@ -107,9 +120,9 @@ export default async function ApiProxy(req, res) {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: JSON.stringify(payload),
|
||||
data: JSON.stringify(payload)
|
||||
};
|
||||
|
||||
//console.log("/////Create Task config:\n", config, "\n//////////////");
|
||||
@@ -118,10 +131,7 @@ export default async function ApiProxy(req, res) {
|
||||
const { data } = await axios(config);
|
||||
return res.status(200).json(data);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
"CRM Task Creation Error:",
|
||||
error.response?.data || error
|
||||
);
|
||||
consoleLogger(error);
|
||||
return res
|
||||
.status(400)
|
||||
.json({ error: "Failed to create CRM task", details: error });
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { consoleLogger, getToken } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -70,8 +71,8 @@ const recordExists = async (incidentId, contactId, token) => {
|
||||
const res = await axios.get(url, {
|
||||
headers: {
|
||||
Authorization: "Bearer " + token.access_token,
|
||||
Accept: "application/json",
|
||||
},
|
||||
Accept: "application/json"
|
||||
}
|
||||
});
|
||||
|
||||
if (res.data.value && res.data.value.length > 0) {
|
||||
@@ -113,9 +114,9 @@ export default async function ApiProxy(req, res) {
|
||||
Accept: "application/json",
|
||||
Prefer: 'odata.include-annotations="*",return=representation',
|
||||
Authorization: "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: JSON.stringify(data),
|
||||
data: JSON.stringify(data)
|
||||
};
|
||||
|
||||
return axios(config)
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { consoleLogger, getToken } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -46,8 +47,8 @@ export default async function ApiProxy(req, res) {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
};
|
||||
|
||||
return axios(config)
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { consoleLogger, getToken } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -46,8 +47,8 @@ export default async function ApiProxy(req, res) {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
};
|
||||
|
||||
return axios(config)
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { consoleLogger, getToken } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -48,8 +49,8 @@ export default async function ApiProxy(req, res) {
|
||||
"Accept": "application/json",
|
||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||
"Authorization": "Bearer " + token.access_token,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
};
|
||||
|
||||
return axios(config)
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @swagger
|
||||
* /api/endpoint/getemailaccountcheck_api:
|
||||
* get:
|
||||
* tags: [Login]
|
||||
* description: Returns portal login
|
||||
* summary: Phase 2
|
||||
* parameters:
|
||||
* - name: emailAddress
|
||||
* in: query
|
||||
* required: true
|
||||
* schema:
|
||||
* type: string
|
||||
* responses:
|
||||
* 200:
|
||||
* description: hello world
|
||||
*/
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
const hashAPIPath = (queryPath) => {
|
||||
var hashlink = CryptoJS.HmacSHA256(
|
||||
queryPath,
|
||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
||||
);
|
||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var emailAddress = req.query.emailAddress;
|
||||
var token = await getToken();
|
||||
|
||||
var queryUrl =
|
||||
"contacts?$filter=emailaddress1 eq '" +
|
||||
emailAddress +
|
||||
"'&$count=true&$select=emailaddress1, contactid";
|
||||
|
||||
console.log(queryUrl);
|
||||
// var queryUrl = "contacts/?$count=true&$select=emailaddress1, contactid";
|
||||
|
||||
var apiResponse = _.isEmpty(req.query)
|
||||
? res.status(400).json()
|
||||
: typeof emailAddress != "undefined" && emailAddress.length > 0
|
||||
? axios
|
||||
.get(
|
||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||
azureHeaders(token.access_token)
|
||||
)
|
||||
.then(({ data }) => {
|
||||
res.status(200).json(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
consoleLogger(error);
|
||||
res.status(400).json(error);
|
||||
})
|
||||
: res.status(400).json();
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
@@ -24,7 +24,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -53,10 +53,10 @@ import _ from "lodash";
|
||||
import {
|
||||
azureHeadersPagedCustom,
|
||||
azureHeadersPaged,
|
||||
azureHeaders,
|
||||
consoleLogger,
|
||||
getToken,
|
||||
} from "../../../actions";
|
||||
azureHeaders
|
||||
} from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { consoleLogger, getToken } from "../../../actions";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -43,32 +43,16 @@
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
azureHeadersPagedCustom,
|
||||
getToken,
|
||||
consoleLogger,
|
||||
} from "../../../actions";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { hashAPIPath } from "../../../actions/core/hash";
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
const hashAPIPath = (queryPath) => {
|
||||
var hashlink = CryptoJS.HmacSHA256(
|
||||
queryPath,
|
||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
||||
);
|
||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||
|
||||
//return "&hash=" + hashlink;
|
||||
//console.log(hashlink);
|
||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var pageNumber = req.query.pageNumber;
|
||||
var token = await getToken();
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeadersNoOdata, getToken } from "../../../actions";
|
||||
import { azureHeadersNoOdata } from "../../../actions/core/headers";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { JSONPath as jsonpath } from "jsonpath-plus";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { getSelectQuery } from "../../../actions/selectQueryTypes";
|
||||
import { getNavigationPropertyByPrimaryAttribute } from "../../../components/utils";
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -43,30 +43,16 @@
|
||||
*/
|
||||
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import {
|
||||
azureHeadersPagedCustom,
|
||||
consoleLogger,
|
||||
getToken,
|
||||
} from "../../../actions";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
import { azureHeadersPagedCustom } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { hashAPIPath } from "../../../actions/core/hash";
|
||||
|
||||
const WEBAPI_URL =
|
||||
process.env.RELAY_ROOT ||
|
||||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
|
||||
|
||||
const hashAPIPath = (queryPath) => {
|
||||
var hashlink = CryptoJS.HmacSHA256(
|
||||
queryPath,
|
||||
CryptoJS.enc.Hex.parse(WORDKEY)
|
||||
);
|
||||
hashlink = hashlink.toString(CryptoJS.enc.Hex);
|
||||
|
||||
return (queryPath.indexOf("?") > -1 ? "&hash=" : "?hash=") + hashlink;
|
||||
};
|
||||
|
||||
export default async function ApiProxy(req, res) {
|
||||
var searchString = req.query.searchString;
|
||||
var pageNumber = req.query.pageNumber;
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeadersPaged, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeadersPaged } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import OSPoint from "ospoint";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import axios from "axios";
|
||||
import CryptoJS from "crypto-js";
|
||||
import _ from "lodash";
|
||||
import { azureHeaders, consoleLogger, getToken } from "../../../actions";
|
||||
import { azureHeaders } from "../../../actions/core/headers";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
|
||||
const WORDKEY = process.env.HASHKEY;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user