From a38f1ac2c29e8cd4a97a008f1f1348eb7eae0050 Mon Sep 17 00:00:00 2001 From: Kaio Magalhaes Date: Mon, 4 Nov 2024 11:17:58 -0300 Subject: [PATCH] do not show anything in the timesheets table if the type is user --- .../_presenters/components/TableCell/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/timesheets/_presenters/components/TimesheetsTable/_presenters/components/TableCell/index.tsx b/src/app/timesheets/_presenters/components/TimesheetsTable/_presenters/components/TableCell/index.tsx index 6bc81f0..7ae5d17 100644 --- a/src/app/timesheets/_presenters/components/TimesheetsTable/_presenters/components/TableCell/index.tsx +++ b/src/app/timesheets/_presenters/components/TimesheetsTable/_presenters/components/TableCell/index.tsx @@ -26,6 +26,9 @@ const TableCell = ({ onChange: onChangeCell, assignments, }: Props) => { + if (!userId) { + return null; + } const formattedDate = dayjs(date).format("YYYY-MM-DD"); const timeEntry = timeEntries.find( (entry) => @@ -49,6 +52,7 @@ const TableCell = ({ return startDate <= compareDate && endDate >= compareDate; }); + return (