hooks fixes and ordering of events

This commit is contained in:
2024-11-16 07:45:38 +00:00
parent aaf9b3e574
commit 4bf10d97db
6 changed files with 234 additions and 152 deletions
+13
View File
@@ -21,6 +21,7 @@ import {
import {
setCurrentReference,
setCurrentView,
setRepresentationCapacity,
} from "../../store/currentView/action";
import {
setMyRepresentations,
@@ -45,6 +46,7 @@ const TopThree = (props) => {
setAwaitingSubmissionDetails,
setMyRepresentations,
setMyRepresentationsDetails,
setRepresentationCapacity,
} = props;
const router = useRouter();
@@ -107,6 +109,13 @@ const TopThree = (props) => {
});
};
const isLPA =
props.accountDetails.accountDetails[
"pinswg_typeofinvolvement@OData.Community.Display.V1.FormattedValue"
] == "LPA"
? true
: false;
const deleteRepItem = (containerID, caseID, repfile) => {
let cookies = parseCookies();
//console.log("sssss", containerID, caseID, repfile);
@@ -205,6 +214,7 @@ const TopThree = (props) => {
showTopThreeArr[key].appealType,
"repDetails": showTopThreeArr[key],
});
isLPA && setRepresentationCapacity("lpa");
}}
>
{showTopThreeArr[key].pinswg_name}
@@ -343,6 +353,9 @@ const mapDispatchToProps = (dispatch) => {
setMyRepresentationsDetails: (myRepresentationsDetails) => {
dispatch(setMyRepresentationsDetails(myRepresentationsDetails));
},
setRepresentationCapacity: (representationCapacity) => {
dispatch(setRepresentationCapacity(representationCapacity));
},
};
};