diff --git a/services/common/type/initialWaiverWithdraw.js b/services/common/type/initialWaiverWithdraw.js index aba4e75ff..518418896 100644 --- a/services/common/type/initialWaiverWithdraw.js +++ b/services/common/type/initialWaiverWithdraw.js @@ -23,4 +23,9 @@ export const initialWaiverWithdraw = { "Pending - Approval", "RAI Issued", ], + secondClockStatuses: [ + "Pending", + "Pending - Concurrence", + "Pending - Approval", + ], }; diff --git a/services/common/type/medicaidSPA.js b/services/common/type/medicaidSPA.js index 2c31303a9..599d0c324 100644 --- a/services/common/type/medicaidSPA.js +++ b/services/common/type/medicaidSPA.js @@ -31,4 +31,9 @@ export const medicaidSPA = { "submitterName", "submitterEmail", ], + secondClockStatuses: [ + "Pending", + "Pending - Concurrence", + "Pending - Approval", + ], }; diff --git a/services/common/type/waiverAmendment.js b/services/common/type/waiverAmendment.js index e5de5f238..115e7e481 100644 --- a/services/common/type/waiverAmendment.js +++ b/services/common/type/waiverAmendment.js @@ -36,6 +36,11 @@ export const waiverAmendment = { "parentId", "parentType", ], + secondClockStatuses: [ + "Pending", + "Pending - Concurrence", + "Pending - Approval", + ], }; export const waiverAmendmentB4 = { diff --git a/services/common/type/waiverAppendixK.js b/services/common/type/waiverAppendixK.js index 50aa9d3e5..cd275691d 100644 --- a/services/common/type/waiverAppendixK.js +++ b/services/common/type/waiverAppendixK.js @@ -22,4 +22,9 @@ export const waiverAppendixK = { "waiverAuthority", "title", ], + secondClockStatuses: [ + "Pending", + "Pending - Concurrence", + "Pending - Approval", + ], }; diff --git a/services/common/type/waiverRenewal.js b/services/common/type/waiverRenewal.js index 88e3b48b5..d40b772b9 100644 --- a/services/common/type/waiverRenewal.js +++ b/services/common/type/waiverRenewal.js @@ -38,6 +38,11 @@ export const waiverRenewal = { "parentId", "parentType", ], + secondClockStatuses: [ + "Pending", + "Pending - Concurrence", + "Pending - Approval", + ], }; export const waiverRenewalB4 = { diff --git a/services/ui-src/src/components/SearchAndFilter.tsx b/services/ui-src/src/components/SearchAndFilter.tsx index e3eef6fc8..2a38bec5d 100644 --- a/services/ui-src/src/components/SearchAndFilter.tsx +++ b/services/ui-src/src/components/SearchAndFilter.tsx @@ -309,7 +309,13 @@ function DateFilter({ inThePast, }: FilterProps & { inThePast?: boolean }) { const onChangeSelection = useCallback( - (value) => setFilter(value ?? []), + (value) => { + value !== null && value.length + ? /* Filters come in an array with 2 dates, the earlier always at + * index 0, the later date at index 1. */ + setFilter([startOfDay(value[0]), endOfDay(value[1])]) + : setFilter([]); + }, [setFilter] ); const ranges: { label: string; value: [Date, Date] }[] = useMemo( diff --git a/services/ui-src/src/libs/detailLib.ts b/services/ui-src/src/libs/detailLib.ts index 977aab68c..7900c8d8d 100644 --- a/services/ui-src/src/libs/detailLib.ts +++ b/services/ui-src/src/libs/detailLib.ts @@ -19,6 +19,7 @@ export type OneMACDetail = { showReviewTeam: boolean; allowWaiverExtension: boolean; attachmentsHeading: string; + secondClockStatuses?: string[]; } & Partial; export const blankBox: AttributeDetail = { heading: "", diff --git a/services/ui-src/src/page/section/DetailSection.tsx b/services/ui-src/src/page/section/DetailSection.tsx index d227e24ba..6c101900f 100644 --- a/services/ui-src/src/page/section/DetailSection.tsx +++ b/services/ui-src/src/page/section/DetailSection.tsx @@ -148,11 +148,6 @@ export const DetailSection = ({ setAlertCode: (code: string) => void; }) => { const { userProfile } = useAppContext() ?? {}; - const secondClockStatuses = [ - "Pending", - "Pending - Concurrence", - "Pending - Approval", - ]; const downloadInfoText = "Documents available on this page may not reflect the actual documents that were approved by CMS. Please refer to your CMS Point of Contact for the approved documents."; @@ -176,7 +171,8 @@ export const DetailSection = ({ {/* Displays 2nd Clock subtitle under status if status is pending (sans Pending - RAI) and latestRaiResponseTimestamp is present */} - {secondClockStatuses.includes(detail.currentStatus) && + {pageConfig.secondClockStatuses && + pageConfig.secondClockStatuses.includes(detail.currentStatus) && detail?.latestRaiResponseTimestamp && 2nd Clock} {pageConfig.show90thDayInfo && ninetyDayText !== "N/A" && (