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 -14
View File
@@ -25,6 +25,7 @@ import {
getMyLPACases,
getWatchedCases
} from "../../actions/services/portalService";
import { splitWatchedCasesBySubmissionState } from "../../lib/domain/dashboard-policy";
import Breadcrumbs from "../../components/breadcrumbs";
import CookieBanner from "../../components/cookieBanner";
@@ -306,20 +307,10 @@ export const getServerSideProps = wrapper.getServerSideProps(
const showReps = Boolean(process.env.SHOWREPRESENTATIONS);
store.dispatch(setShowReps(showReps, showLoginCheck));
// watched cases that are NOT submitted
const filteredWatchedCases = {
"@odata.count": watchedCases.value.filter(
(c) => c.pinswg_representationsubmitted == null
).length,
value: watchedCases.value.filter(
(c) => c.pinswg_representationsubmitted == null
)
};
// submitted reps derived from watched cases
const mySubmittedReps = watchedCases.value.filter(
(el) => el.pinswg_representationsubmitted != null
);
const {
watchedCases: filteredWatchedCases,
submittedRepresentations: mySubmittedReps
} = splitWatchedCasesBySubmissionState(watchedCases.value);
// Newer getDetails implementation (bounded concurrency, fewer edge-case bugs)
const getDetails = async (resultsObj, detailsType) => {