From e6a9b33e44cb2aa91d4c03a68adf3b4e3f188910 Mon Sep 17 00:00:00 2001 From: AKILIMAILI CIZUNGU Innocent <51681130+Innocent-Akim@users.noreply.github.com> Date: Thu, 26 Dec 2024 12:28:51 +0200 Subject: [PATCH] [Feat]: Improve entry selection logic (#3484) * feat(timesheet): Improve entry selection logic * refactor(timesheet): Improve search and filtering functionality * fix:coderabbitai --- .../[memberId]/components/AddTaskModal.tsx | 1 - .../[memberId]/components/EditTaskModal.tsx | 2 +- .../components/RejectSelectedModal.tsx | 16 +++- .../[locale]/timesheet/[memberId]/page.tsx | 22 +---- .../hooks/features/useTimelogFilterOptions.ts | 28 ++++-- apps/web/app/hooks/features/useTimesheet.ts | 88 ++++++++++++++++--- .../calendar/table-time-sheet.tsx | 20 ++++- 7 files changed, 130 insertions(+), 47 deletions(-) diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/AddTaskModal.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/AddTaskModal.tsx index 089f36e6d..cfdc306ad 100644 --- a/apps/web/app/[locale]/timesheet/[memberId]/components/AddTaskModal.tsx +++ b/apps/web/app/[locale]/timesheet/[memberId]/components/AddTaskModal.tsx @@ -188,7 +188,6 @@ export function AddTaskModal({ closeModal, isOpen }: IAddTaskModalProps) { className='w-full font-medium dark:text-white' options={activeTeam?.members || []} onChange={(value) => { - console.log(value) updateFormState('employeeId', value) }} renderOption={(option) => ( diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx index 1cd5ddd81..66a19e4de 100644 --- a/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx +++ b/apps/web/app/[locale]/timesheet/[memberId]/components/EditTaskModal.tsx @@ -171,7 +171,7 @@ export function EditTaskModal({ isOpen, closeModal, dataTimesheet }: IEditTaskMo closeModal={closeModal} isOpen={isOpen} showCloseIcon - title={'Edit Task'} + title={t('common.EDIT_TASK')} className="bg-light--theme-light dark:bg-dark--theme-light p-5 rounded-xl w-full md:w-40 md:min-w-[32rem] justify-start h-[auto]" titleClass="font-bold flex justify-start w-full">