-
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.
Merge pull request #3214 from ever-co/develop
Release
- Loading branch information
Showing
19 changed files
with
897 additions
and
504 deletions.
There are no files selected for viewing
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
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
68 changes: 38 additions & 30 deletions
68
apps/web/app/[locale]/timesheet/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,39 +1,47 @@ | ||
import React from 'react' | ||
import { FilterWithStatus } from './FilterWithStatus' | ||
import { FrequencySelect } from '.'; | ||
import { FilterWithStatus } from './FilterWithStatus'; | ||
import { FilterTaskActionMenu, FrequencySelect } from '.'; | ||
import { Button } from 'lib/components'; | ||
import { SettingFilterIcon } from 'assets/svg'; | ||
import { TimeSheetFilterPopover } from './time-sheet-filter-popover'; | ||
import { Cross2Icon } from '@radix-ui/react-icons'; | ||
|
||
export function TimesheetFilter() { | ||
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 /> | ||
<button | ||
onClick={() => null} | ||
className='flex items-center justify-center h-10 rounded-lg bg-white dark:bg-dark--theme-light border dark:border-gray-700 hover:bg-white p-3 gap-2' > | ||
<SettingFilterIcon className="text-gray-700 dark:text-white w-3.5" strokeWidth="1.8" /> | ||
<span className="text-gray-700 dark:text-white">Filter</span> | ||
</button> | ||
<Button | ||
onClick={() => null} | ||
variant='outline' | ||
className='bg-primary/5 dark:bg-primary-light h-10 w-[2.5rem] font-medium'> | ||
Add Time | ||
</Button> | ||
<> | ||
|
||
<div className="flex flex-col md:flex-row w-full gap-4"> | ||
<div className="flex-1"> | ||
<FilterWithStatus | ||
activeStatus="All Tasks" | ||
onToggle={(label) => { | ||
// TODO: Implement filter toggle handler | ||
}} | ||
/> | ||
</div> | ||
<div className="flex-1 flex justify-end"> | ||
<div className='flex gap-2'> | ||
<FrequencySelect /> | ||
<div className='flex items-center border border-gray-100 rounded-md h-10 '> | ||
<FilterTaskActionMenu /> | ||
<button | ||
aria-label="Clear filters" | ||
onClick={() => { | ||
// TODO: Implement clear filters logic | ||
}} | ||
className='border-l h-10 w-10 font-normal flex items-center justify-center text-gray-400 hover:bg-gray-50'> | ||
<Cross2Icon /> | ||
</button> | ||
</div> | ||
<TimeSheetFilterPopover /> | ||
<Button | ||
onClick={() => null} | ||
variant='outline' | ||
className='bg-primary/5 dark:bg-primary-light h-10 w-[2.5rem] 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
Oops, something went wrong.