updated watch case filter on dashboard

This commit is contained in:
2025-08-14 10:54:59 +01:00
parent 0e91dfe8a2
commit fcba17c81f
3 changed files with 28 additions and 7 deletions
+1
View File
@@ -168,6 +168,7 @@ const MyPortal = (props) => {
watchedCases={props.watchedCases}
isLPA={isLPA}
myReps={false}
accountDetails={props.accountDetails}
/>
)}
{props.myRepresentations.hasOwnProperty(
+26 -7
View File
@@ -114,13 +114,32 @@ const TopThree = (props) => {
deleteWatchedCases(caseID)
.then((data) => data)
.then(() => {
getWatchedCasesProxy(cookies.pinsUser).then((data) => {
setWatchedCases(data),
getDetailsProxy(data, "myWatchedCases").then(
(data) => {
setWatchedCasesDetails(data);
}
);
getWatchedCasesProxy(
props.accountDetails.loggedinUserId
).then((data) => {
let showWatchedCases = (submittedArr) => {
const required = submittedArr.value.filter((el) => {
return (
el.pinswg_representationsubmitted == null
);
});
let newObj = {};
return Object.assign(newObj, {
"@odata.count": required.length,
"value": required,
});
};
let filteredWatchedCases = showWatchedCases(data);
setWatchedCases(filteredWatchedCases),
getDetailsProxy(
filteredWatchedCases,
"myWatchedCases"
).then((data) => {
setWatchedCasesDetails(data);
});
});
});
+1
View File
@@ -31,6 +31,7 @@ const WatchedCases = (props) => {
currentView={props.currentView}
myReps={props.myReps}
props={props}
accountDetails={props.accountDetails}
/>
</div>