-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat]: Add a formatDate function to format dates in the Timesheet (#…
…3227) * feat: Add a formatDate function to format dates in the Timesheet * fix: sug coderabbitai
- Loading branch information
1 parent
448fb96
commit 6b0786d
Showing
4 changed files
with
118 additions
and
78 deletions.
There are no files selected for viewing
63 changes: 38 additions & 25 deletions
63
apps/web/app/[locale]/timesheet/[memberId]/components/TimesheetFilter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,46 @@ | ||
import { FilterWithStatus } from './FilterWithStatus'; | ||
import { FrequencySelect, TimeSheetFilterPopover, TimesheetFilterDate } from '.'; | ||
import { Button } from 'lib/components'; | ||
|
||
export function TimesheetFilter() { | ||
import { AddManualTimeModal } from '@/lib/features/manual-time/add-manual-time-modal'; | ||
interface ITimesheetFilter { | ||
isOpen: boolean, | ||
openModal: () => void, | ||
closeModal: () => void | ||
} | ||
export function TimesheetFilter({ closeModal, isOpen, openModal }: ITimesheetFilter) { | ||
return ( | ||
<div className="grid grid-cols-3 w-full"> | ||
<div className="col-span-1"> | ||
<FilterWithStatus | ||
activeStatus="Rejected" | ||
onToggle={(label) => { | ||
console.log(label) | ||
}} | ||
/> | ||
</div> | ||
<div className="col-span-1"></div> | ||
<div className="col-span-1"> | ||
<div className='flex gap-2'> | ||
<FrequencySelect /> | ||
<TimesheetFilterDate /> | ||
<TimeSheetFilterPopover /> | ||
<Button | ||
onClick={() => null} | ||
variant='outline' | ||
className='bg-primary/5 dark:bg-primary-light h-10 font-medium'> | ||
Add Time | ||
</Button> | ||
<> | ||
{ | ||
isOpen && <AddManualTimeModal | ||
closeModal={closeModal} | ||
isOpen={isOpen} | ||
params="AddManuelTime" | ||
timeSheetStatus="ManagerTimesheet" | ||
/>} | ||
<div className="grid grid-cols-3 w-full"> | ||
<div className="col-span-1"> | ||
<FilterWithStatus | ||
activeStatus="Rejected" | ||
onToggle={(label) => { | ||
console.log(label) | ||
}} | ||
/> | ||
</div> | ||
<div className="col-span-1"></div> | ||
<div className="col-span-1"> | ||
<div className='flex gap-2'> | ||
<FrequencySelect /> | ||
<TimesheetFilterDate /> | ||
<TimeSheetFilterPopover /> | ||
<Button | ||
onClick={openModal} | ||
variant='outline' | ||
className='bg-primary/5 dark:bg-primary-light h-10 font-medium'> | ||
Add Time | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters