import { useState } from 'react' import { FaCaretDown } from 'react-icons/fa6' const TICKET_TYPES = [ 'Home Office', 'Holidays', 'Trip', 'Supportrequest', 'Change Request', 'Maintenance', 'Project', 'Controlling', 'Development', 'Documentation', 'Meeting/Conference', 'IT Management', 'IT Security', 'Procurement', 'Rollout', 'Emergency Call', 'Other Services' ] const SYSTEMS = [ 'Account View', 'Client', 'Cofano', 'Credentials', 'Diamant', 'Docuware', 'EDI', 'eMail', 'Employee', 'Invoice', 'LBase', 'Medical Office', 'Network', 'O365', 'PDF Viewer', 'Printer', 'Reports', 'Server', 'Time Tracking', 'TK', 'TOS', 'Vivendi NG', 'VGM', '(W)LAN', '(W)WAN', 'WOMS', 'n/a' ] const STATUSES = [ 'Open', 'Occupied', 'Assigned', 'Awaiting', 'Added Info', 'In Test', 'Halted', 'Aborted', 'Cancelled', 'Closed' ] const PRIORITIES = [ { value: 0, label: 'None' }, { value: 1, label: 'Low' }, { value: 2, label: 'Medium' }, { value: 3, label: 'High' }, { value: 4, label: 'Critical' } ] export default function TicketFilters({ filters, onChange, onApply }) { const [localFilters, setLocalFilters] = useState(filters) const handleCheckboxChange = (category, value) => { const current = localFilters[category] || [] const updated = current.includes(value) ? current.filter(v => v !== value) : [...current, value] setLocalFilters({ ...localFilters, [category]: updated }) } const handleInputChange = (field, value) => { setLocalFilters({ ...localFilters, [field]: value }) } const handleApply = () => { onChange(localFilters) onApply() } return ( handleInputChange('woid', e.target.value)} /> handleInputChange('createdDate', e.target.value)} />
{TICKET_TYPES.map(type => ( ))}
{SYSTEMS.map(system => ( ))}
handleInputChange('customer', e.target.value)} /> handleInputChange('userTopic', e.target.value)} />
{STATUSES.map(status => ( ))}
{PRIORITIES.map(p => ( ))}
Approval ) }