Merged PR 2395: helpers for dashboard domain layer
Related work items: #23754
This commit is contained in:
+5
-14
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user