Merged PR 2395: helpers for dashboard domain layer

Related work items: #23754
This commit is contained in:
Robert Bond
2026-06-17 16:06:09 +00:00
parent 0b66a0e1d4
commit 475aa965b4
11 changed files with 1375 additions and 77 deletions
+5 -15
View File
@@ -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(