diff --git a/components/myportal.js b/components/myportal.js
index 128492dc..bd523734 100644
--- a/components/myportal.js
+++ b/components/myportal.js
@@ -104,7 +104,7 @@ const MyPortal = (props) => {
- {isLPA == true ? (
+ {isLPA && (
{
@@ -115,13 +115,11 @@ const MyPortal = (props) => {
LPA Portal
- ) : (
- ""
)}
- {isLPA ? "" : }
+ {!isLPA && }
{/* {props.awaitingSubmission.awaitingSubmission[
"@odata.count"
@@ -147,12 +145,16 @@ const MyPortal = (props) => {
/>
)}
{props.myCases.myCases["@odata.count"] > 0 && (
-
+
)}
{props.watchedCases.watchedCases["@odata.count"] >
0 && (
)}
{props.myRepresentations.myRepresentations[
@@ -160,12 +162,12 @@ const MyPortal = (props) => {
] > 0 && (
)}
- {isLPA ? "" : }
+ {!isLPA && }
{/* */}
- {showFileUpload == "true" && }
diff --git a/components/myportal/mycases.js b/components/myportal/mycases.js
index c0aaaf9b..ed428b21 100644
--- a/components/myportal/mycases.js
+++ b/components/myportal/mycases.js
@@ -44,7 +44,10 @@ const MyCases = (props) => {
});
}}
>
- {t("myportal:viewall-link")}
+ {t("myportal:viewall-link")}{" "}
+ {props.isLPA &&
+ props.myCases.myCases["@odata.count"] +
+ " appeals"}
diff --git a/pages/api/endpoint/getmylpacases_api.js b/pages/api/endpoint/getmylpacases_api.js
index f90c3114..a461c978 100644
--- a/pages/api/endpoint/getmylpacases_api.js
+++ b/pages/api/endpoint/getmylpacases_api.js
@@ -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 + '")]',
diff --git a/pages/myportal/index.js b/pages/myportal/index.js
index 628dec9c..a30baf5a 100644
--- a/pages/myportal/index.js
+++ b/pages/myportal/index.js
@@ -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),