From 0fdda8aa2cd9eea4305c1e870dd43ac5fd66ab46 Mon Sep 17 00:00:00 2001 From: AKILIMAILI CIZUNGU Innocent <51681130+Innocent-Akim@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:18:55 +0200 Subject: [PATCH] [Feat]: Display Timesheet Data and Refactor Code (#3342) * feat: display timesheet data and refactor code * fix: codeRabbit * Update apps/web/lib/features/task/task-card.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Ruslan Konviser Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../[memberId]/components/TimesheetAction.tsx | 28 +-- .../components/TimesheetFilterDate.tsx | 2 +- apps/web/app/hooks/features/useTimesheet.ts | 58 +++++- apps/web/app/interfaces/ITask.ts | 8 + apps/web/app/interfaces/timer/ITimerLog.ts | 110 ++++++---- .../services/client/api/timer/timer-log.ts | 8 +- .../app/services/server/requests/timesheet.ts | 6 +- apps/web/app/stores/time-logs.ts | 4 +- apps/web/lib/components/types.ts | 30 ++- .../calendar/table-time-sheet.tsx | 196 ++++++++++-------- apps/web/lib/features/task/task-card.tsx | 54 ++--- apps/web/lib/features/task/task-issue.tsx | 18 +- 12 files changed, 316 insertions(+), 206 deletions(-) diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/TimesheetAction.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/TimesheetAction.tsx index 213b9ccc0..5e1de381d 100644 --- a/apps/web/app/[locale]/timesheet/[memberId]/components/TimesheetAction.tsx +++ b/apps/web/app/[locale]/timesheet/[memberId]/components/TimesheetAction.tsx @@ -8,12 +8,15 @@ type ITimesheetButton = { title?: string, onClick?: () => void, className?: string, - icon?: ReactNode + icon?: ReactNode, + disabled?: boolean } -export const TimesheetButton = ({ className, icon, onClick, title }: ITimesheetButton) => { +export const TimesheetButton = ({ className, icon, onClick, title, disabled }: ITimesheetButton) => { return ( -