feat(audit) : filtres Employé et Utilisateur en champ texte (recherche libre)
Employé = recherche partielle sur nom/prénom (nouveau filtre back 'employee', LIKE via join) ; Utilisateur = recherche partielle sur username. Remplace les selects par des champs texte. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { AuditLog } from './dto/audit-log'
|
||||
|
||||
export type AuditLogFilters = {
|
||||
employeeId?: number
|
||||
employee?: string
|
||||
from?: string
|
||||
to?: string
|
||||
entityType?: string[]
|
||||
@@ -24,7 +24,7 @@ export const fetchAuditLogs = async (filters: AuditLogFilters = {}): Promise<Aud
|
||||
const api = useApi()
|
||||
const params: Record<string, string | string[]> = {}
|
||||
|
||||
if (filters.employeeId) params.employeeId = String(filters.employeeId)
|
||||
if (filters.employee && filters.employee.trim() !== '') params.employee = filters.employee.trim()
|
||||
if (filters.from) params.from = filters.from
|
||||
if (filters.to) params.to = filters.to
|
||||
if (filters.entityType && filters.entityType.length > 0) params['entityType[]'] = filters.entityType
|
||||
|
||||
Reference in New Issue
Block a user