updated watch case filter on dashboard
This commit is contained in:
@@ -168,6 +168,7 @@ const MyPortal = (props) => {
|
||||
watchedCases={props.watchedCases}
|
||||
isLPA={isLPA}
|
||||
myReps={false}
|
||||
accountDetails={props.accountDetails}
|
||||
/>
|
||||
)}
|
||||
{props.myRepresentations.hasOwnProperty(
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ const WatchedCases = (props) => {
|
||||
currentView={props.currentView}
|
||||
myReps={props.myReps}
|
||||
props={props}
|
||||
accountDetails={props.accountDetails}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user