This commit is contained in:
phaichayon
2026-06-23 22:13:08 +07:00
parent 99a4087099
commit c1ecd5ea50
32 changed files with 3503 additions and 150 deletions

View File

@@ -5,7 +5,6 @@ import Link from 'next/link';
import { parseAsString, useQueryStates } from 'nuqs';
import { Icons } from '@/components/icons';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import {
Select,
SelectContent,
@@ -13,6 +12,7 @@ import {
SelectTrigger,
SelectValue
} from '@/components/ui/select';
import { CrmDateInput } from '@/features/crm/components/crm-form-controls';
import type { CrmReportFilterMetadata } from '../api/types';
type FilterKey =
@@ -92,17 +92,15 @@ export function ReportFilterBar({
<div className='grid gap-3 md:grid-cols-2 xl:grid-cols-6'>
{filterKeys.includes('dateFrom') ? (
<Input
type='date'
<CrmDateInput
value={params.dateFrom ?? ''}
onChange={(event) => void setParams({ dateFrom: event.target.value || null })}
onChange={(value) => void setParams({ dateFrom: value || null })}
/>
) : null}
{filterKeys.includes('dateTo') ? (
<Input
type='date'
<CrmDateInput
value={params.dateTo ?? ''}
onChange={(event) => void setParams({ dateTo: event.target.value || null })}
onChange={(value) => void setParams({ dateTo: value || null })}
/>
) : null}
{(