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:
2026-06-24 12:05:07 +02:00
parent 06e462ef31
commit 608eeaa450
10 changed files with 40 additions and 56 deletions
+2 -2
View File
@@ -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