From 2e8ca2a2d129408a69f633069a5704261b91e768 Mon Sep 17 00:00:00 2001 From: Quan Nguyen <86090707+qu8n@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:03:20 -0400 Subject: [PATCH] Add a Delivery Date field to Cohorts table (#115) --- frontend/src/pages/cohorts/CohortsPage.tsx | 1 - frontend/src/shared/helpers.tsx | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/cohorts/CohortsPage.tsx b/frontend/src/pages/cohorts/CohortsPage.tsx index 2edd754c..ecefbd29 100644 --- a/frontend/src/pages/cohorts/CohortsPage.tsx +++ b/frontend/src/pages/cohorts/CohortsPage.tsx @@ -123,7 +123,6 @@ export default function CohortsPage() { { hasCohortCompleteCohortCompletesOptions2: { sort: [{ date: SortDirection.Desc }], - limit: 1, }, } as CohortCompleteOptions } diff --git a/frontend/src/shared/helpers.tsx b/frontend/src/shared/helpers.tsx index 2825d4ac..9bc8711c 100644 --- a/frontend/src/shared/helpers.tsx +++ b/frontend/src/shared/helpers.tsx @@ -517,7 +517,13 @@ export const CohortsListColumns: ColDef[] = [ sortable: false, }, { - headerName: "Cohort Complete Date", + headerName: "Delivery Date", + valueGetter: ({ data }) => + data["hasCohortCompleteCohortCompletes"]?.slice(-1)[0]?.date, + sortable: false, + }, + { + headerName: "Complete Date", valueGetter: ({ data }) => data["hasCohortCompleteCohortCompletes"][0]?.date, sortable: false,