added in oauth fo dev
This commit is contained in:
@@ -7,6 +7,7 @@ import { useDispatch, useSelector, shallowEqual, connect } from "react-redux";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import PaginationControl from "./pagination";
|
||||
import LoadingOverlay from "react-loading-overlay";
|
||||
import CryptoJS from "crypto-js";
|
||||
|
||||
import {
|
||||
getBasicSearch,
|
||||
@@ -15,7 +16,7 @@ import {
|
||||
getSearchDocumentHistory1,
|
||||
getSearchDocumentHistory1Paged,
|
||||
getSearchDocumentDetails1Paged,
|
||||
getSASToken,
|
||||
getToken,
|
||||
} from "../../actions";
|
||||
|
||||
import {
|
||||
@@ -106,7 +107,9 @@ const DocumentDetails = (props) => {
|
||||
<a
|
||||
href={
|
||||
"/api/proxy/documents/download/" +
|
||||
detailsObj.pinswg_isharedocumentreference
|
||||
encryptDocReference(
|
||||
detailsObj.pinswg_isharedocumentreference
|
||||
)
|
||||
}
|
||||
>
|
||||
<span className="results-visually-hidden">
|
||||
@@ -191,6 +194,17 @@ const DocumentDetails = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
const encryptDocReference = (documentRef) => {
|
||||
var encrypted = encodeURIComponent(
|
||||
CryptoJS.AES.encrypt(
|
||||
documentRef,
|
||||
process.env.NEXT_PUBLIC_ISHARESECRETPHRASE
|
||||
)
|
||||
);
|
||||
|
||||
return encrypted;
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const docDetailsObj = async () => {
|
||||
let docObj = await getSearchDocumentDetails1(incidentid)
|
||||
|
||||
@@ -129,7 +129,7 @@ let Login = (props) => {
|
||||
let now = new Date();
|
||||
let expDate = new Date(now);
|
||||
|
||||
expDate.setDate(now.getDate() + 0.41);
|
||||
expDate.setDate(now.getDate() + 1);
|
||||
|
||||
getLogin(values.loginUserID, values.loginUserPassword).then((data) => {
|
||||
data.value.length != 0
|
||||
|
||||
@@ -6,7 +6,7 @@ import { setCurrentReference } from "../../store/currentView/action";
|
||||
import { connect } from "react-redux";
|
||||
import { parseCookies } from "nookies";
|
||||
import {
|
||||
getSASToken,
|
||||
getToken,
|
||||
getWatchedCasesProxy,
|
||||
getPortalModuleDetailsProxy,
|
||||
deleteWatchedCases,
|
||||
@@ -37,7 +37,7 @@ const TopThree = (props) => {
|
||||
let showTopThreeArr = showTopThree.value;
|
||||
|
||||
const deleteItem = (caseID, topThreeType) => {
|
||||
let token = getSASToken();
|
||||
let token = getToken();
|
||||
let cookies = parseCookies();
|
||||
topThreeType == "watchedCases" &&
|
||||
deleteWatchedCases(caseID)
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
|
||||
import {
|
||||
createWatchedCases,
|
||||
getSASToken,
|
||||
getToken,
|
||||
getWatchedCasesProxy,
|
||||
getPortalModuleDetailsProxy,
|
||||
deleteWatchedCases,
|
||||
@@ -77,7 +77,7 @@ const SearchResults = (props) => {
|
||||
const cookies = parseCookies();
|
||||
|
||||
const selectWatchedCase = (loggedInUser, incidentID, appealType) => {
|
||||
let token = getSASToken();
|
||||
let token = getToken();
|
||||
|
||||
let updateBody = {
|
||||
"pinswg_WatchedCase@odata.bind": "/incidents(" + incidentID + ")",
|
||||
@@ -109,7 +109,7 @@ const SearchResults = (props) => {
|
||||
};
|
||||
|
||||
const deleteItem = (caseID, topThreeType) => {
|
||||
let token = getSASToken();
|
||||
let token = getToken();
|
||||
let cookies = parseCookies();
|
||||
topThreeType == "watchedCases" &&
|
||||
deleteWatchedCases(caseID)
|
||||
|
||||
Reference in New Issue
Block a user