Merged PR 2395: helpers for dashboard domain layer
Related work items: #23754
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
getPortalModuleDetailsProxy,
|
||||
getWatchedCasesProxy
|
||||
} from "../../actions/services/portalService";
|
||||
import { splitWatchedCasesBySubmissionState } from "../../lib/domain/dashboard-policy";
|
||||
import { getFormCollectionByID, getDetailsProxy } from "../../components/utils";
|
||||
import transLookup from "../../data/lookuptranslations.json";
|
||||
import {
|
||||
@@ -122,21 +123,10 @@ const TopThree = (props) => {
|
||||
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);
|
||||
let filteredWatchedCases =
|
||||
splitWatchedCasesBySubmissionState(
|
||||
data.value
|
||||
).watchedCases;
|
||||
|
||||
(setWatchedCases(filteredWatchedCases),
|
||||
getDetailsProxy(
|
||||
|
||||
Reference in New Issue
Block a user