diff --git a/src/app/portfolio/[slug]/(portfolio)/your-projects/live/docStatus.ts b/src/app/portfolio/[slug]/(portfolio)/your-projects/live/docStatus.ts index d158ee72..4efae42b 100644 --- a/src/app/portfolio/[slug]/(portfolio)/your-projects/live/docStatus.ts +++ b/src/app/portfolio/[slug]/(portfolio)/your-projects/live/docStatus.ts @@ -123,12 +123,12 @@ export function computeDocStatusMap( for (const [dealId, docs] of docsByDealId) { const surveyDocs = docs.filter((d) => SURVEY_ALL_DOC_TYPES.has(d.fileType)); - // Design documents are their own category — they are neither survey nor - // install docs. Without this carve-out a Retrofit Design Document (absent - // from the survey set) would be mis-bucketed as an install document. - const installDocs = docs.filter( - (d) => !SURVEY_ALL_DOC_TYPES.has(d.fileType) && !DESIGN_DOC_TYPES.has(d.fileType), - ); + // Survey, coordination and design docs each get their own drawer section, + // so none count as install docs. `isInstallDocType` is the shared predicate + // that keeps this in sync with the drawer's own split — re-implementing it + // inline once dropped the coordination carve-out and mis-bucketed + // coordination-only docs as install documents. + const installDocs = docs.filter((d) => isInstallDocType(d.fileType)); const surveyTypeSet = new Set(surveyDocs.map((d) => d.fileType)); const measures = measuresByDealId.get(dealId) ?? [];