lpa dashboard tweaks

This commit is contained in:
2023-10-24 10:41:24 +01:00
parent c4fcb6fa56
commit fdf5be3415
4 changed files with 22 additions and 12 deletions
+7 -2
View File
@@ -19,7 +19,12 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders, consoleLogger } from "../../../actions";
import {
getToken,
azureHeaders,
consoleLogger,
getLPA,
} from "../../../actions";
import jsonpath from "jsonpath";
const WORDKEY = process.env.HASHKEY;
@@ -43,7 +48,7 @@ export default async function ApiProxy(req, res) {
const lpaList = await getLPA();
const lpaGUID = jsonpath.query(lpaList, '$..[?(@.name="' + lpaid + '")]');
const lpaGUID = jsonpath.query(lpaList, '$..[?(@.name=="' + lpaid + '")]');
console.log(
'$..[?(@.name="' + lpaid + '")]',
+2 -2
View File
@@ -192,7 +192,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
const lpaid =
accountDetails[
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
"pinswg_contact_associatedlpa@OData.Community.Display.V1.FormattedValue"
];
const [
@@ -202,7 +202,7 @@ export const getServerSideProps = wrapper.getServerSideProps(
awaitingSubmission,
awaitingSubmissionFromBlob,
] = await Promise.all([
accountDetails.pinswg_typeofinvolvment == 846040012
accountDetails.pinswg_typeofinvolvement == 846040012
? await getMyLPACases(lpaid)
: await getMyCases(loggedInUser),