refactor phase 3 targeted actions imports
This commit is contained in:
@@ -13,11 +13,11 @@ import MediaDetails from "./media";
|
|||||||
import {
|
import {
|
||||||
createWatchedCases,
|
createWatchedCases,
|
||||||
deleteWatchedCases,
|
deleteWatchedCases,
|
||||||
getLinkedCases,
|
|
||||||
getPortalModuleDetailsProxy,
|
|
||||||
getWatchedCasesProxy,
|
getWatchedCasesProxy,
|
||||||
setCaseInvolvment
|
setCaseInvolvment
|
||||||
} from "../../actions";
|
} from "../../actions/services/portalService";
|
||||||
|
import { getLinkedCases } from "../../actions/services/searchService";
|
||||||
|
import { getPortalModuleDetailsProxy } from "../../actions/services/caseService";
|
||||||
import {
|
import {
|
||||||
setCurrentLinkedCases,
|
setCurrentLinkedCases,
|
||||||
setCurrentReference,
|
setCurrentReference,
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
* description: Failed
|
* description: Failed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { consoleLogger, getPreferredLanguage } from "../../../actions";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
|
import { getPreferredLanguage } from "../../../actions/services/accountService";
|
||||||
|
|
||||||
export default async function ApiProxy(req, res) {
|
export default async function ApiProxy(req, res) {
|
||||||
var data = req.body;
|
var data = req.body;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { getToken } from "../../../actions";
|
import { getToken } from "../../../actions/core/token";
|
||||||
import { getCaseBlob } from "../../../actions/azurestorage";
|
import { getCaseBlob } from "../../../actions/azurestorage";
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
ceq: "4fddd7e8-7d26-ec11-a97f-00224800e98c", // Inspector Scheduling
|
ceq: "4fddd7e8-7d26-ec11-a97f-00224800e98c", // Inspector Scheduling
|
||||||
other: "8ffabad9-7c26-ec11-a97f-00224800e98c", // Casework
|
other: "8ffabad9-7c26-ec11-a97f-00224800e98c", // Casework
|
||||||
postdec: "1357e457-7e26-ec11-a97f-00224800e98c", // SLT Team
|
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];
|
let teamId = teamMap[contactValue];
|
||||||
@@ -93,7 +93,7 @@ export default async function ApiProxy(req, res) {
|
|||||||
"scheduledend": new Date(
|
"scheduledend": new Date(
|
||||||
new Date().getTime() + 60 * 60000 * 24
|
new Date().getTime() + 60 * 60000 * 24
|
||||||
).toISOString(), // 30 mins
|
).toISOString(), // 30 mins
|
||||||
...(teamId && { "ownerid@odata.bind": `/teams(${teamId})` }),
|
...(teamId && { "ownerid@odata.bind": `/teams(${teamId})` })
|
||||||
};
|
};
|
||||||
|
|
||||||
//console.log("/////Create Task:\n", payload, "\n//////////////");
|
//console.log("/////Create Task:\n", payload, "\n//////////////");
|
||||||
@@ -107,9 +107,9 @@ export default async function ApiProxy(req, res) {
|
|||||||
"Accept": "application/json",
|
"Accept": "application/json",
|
||||||
"Prefer": 'odata.include-annotations="*",return=representation',
|
"Prefer": 'odata.include-annotations="*",return=representation',
|
||||||
"Authorization": "Bearer " + token.access_token,
|
"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//////////////");
|
//console.log("/////Create Task config:\n", config, "\n//////////////");
|
||||||
|
|||||||
@@ -53,10 +53,10 @@ import _ from "lodash";
|
|||||||
import {
|
import {
|
||||||
azureHeadersPagedCustom,
|
azureHeadersPagedCustom,
|
||||||
azureHeadersPaged,
|
azureHeadersPaged,
|
||||||
azureHeaders,
|
azureHeaders
|
||||||
consoleLogger,
|
} from "../../../actions/core/headers";
|
||||||
getToken,
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
} from "../../../actions";
|
import { getToken } from "../../../actions/core/token";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,9 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import CryptoJS from "crypto-js";
|
import CryptoJS from "crypto-js";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import {
|
import { azureHeaders } from "../../../actions/core/headers";
|
||||||
azureHeaders,
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
consoleLogger,
|
import { getToken } from "../../../actions/core/token";
|
||||||
getToken,
|
|
||||||
getPreferredLanguage,
|
|
||||||
} from "../../../actions";
|
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
@@ -55,19 +52,19 @@ export default async function ApiProxy(req, res) {
|
|||||||
var apiResponse = _.isEmpty(req.query)
|
var apiResponse = _.isEmpty(req.query)
|
||||||
? res.status(400).json()
|
? res.status(400).json()
|
||||||
: typeof emailAddress != "undefined" && emailAddress.length > 0
|
: typeof emailAddress != "undefined" && emailAddress.length > 0
|
||||||
? axios
|
? axios
|
||||||
.get(
|
.get(
|
||||||
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
WEBAPI_URL + queryUrl + hashAPIPath(queryUrl),
|
||||||
azureHeaders(token.access_token)
|
azureHeaders(token.access_token)
|
||||||
)
|
)
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
res.status(200).json(data);
|
res.status(200).json(data);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
consoleLogger(error);
|
consoleLogger(error);
|
||||||
res.status(400).json(error);
|
res.status(400).json(error);
|
||||||
})
|
})
|
||||||
: res.status(400).json();
|
: res.status(400).json();
|
||||||
|
|
||||||
return apiResponse;
|
return apiResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import CryptoJS from "crypto-js";
|
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;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user