From 9749072e500f3b3b70f3735f6c781c05c03bea06 Mon Sep 17 00:00:00 2001 From: greg-adams Date: Thu, 3 Oct 2024 10:10:10 -0700 Subject: [PATCH 1/2] linting --- api/setup-jest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/setup-jest.ts b/api/setup-jest.ts index 266bcf98..b7502de6 100644 --- a/api/setup-jest.ts +++ b/api/setup-jest.ts @@ -2,6 +2,6 @@ import initializeDb from './src/lib/db' beforeAll(async () => { // explicit set to avoid conflict in docker container - process.env.NODE_ENV = 'test'; + process.env.NODE_ENV = 'test' await initializeDb() }) From 026514c2a58f0fd52cd502e171f1e68be8f42020 Mon Sep 17 00:00:00 2001 From: greg-adams Date: Thu, 3 Oct 2024 10:10:26 -0700 Subject: [PATCH 2/2] add id column --- .../components/ReportingPeriod/ReportingPeriods/columns.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/components/ReportingPeriod/ReportingPeriods/columns.tsx b/web/src/components/ReportingPeriod/ReportingPeriods/columns.tsx index 9ea0524d..accd1660 100644 --- a/web/src/components/ReportingPeriod/ReportingPeriods/columns.tsx +++ b/web/src/components/ReportingPeriod/ReportingPeriods/columns.tsx @@ -8,6 +8,10 @@ const columnHelper = createColumnHelper() export const columnDefs = ({ certificationDisplay, canEdit, isUSDRAdmin }) => { const columns = [ + columnHelper.accessor('id', { + header: 'ID', + enableSorting: true, + }), columnHelper.accessor('name', { header: 'Name', enableSorting: false, @@ -31,6 +35,7 @@ export const columnDefs = ({ certificationDisplay, canEdit, isUSDRAdmin }) => { if (isUSDRAdmin) { columns.push( columnHelper.accessor('id', { + id: 'actions', cell: (info) => canEdit(info.row.original) ? (