Files
Lesstime/frontend/services/dto/user-data.ts
T
Matthieu 89ce523019
Pull Request — Quality gate / Backend (PHP CS + PHPUnit) (pull_request) Successful in 1m18s
Pull Request — Quality gate / Frontend (build) (pull_request) Successful in 1m29s
feat(user) : UI archivage/désarchivage des utilisateurs côté admin
- badge « Archivé » et libellé barré dans la liste admin
- popup de confirmation avant archivage (rappelle que c'est réversible)
- bouton de restauration (PATCH archived:false) pour les archivés
- case « Afficher les utilisateurs archivés » (filtre ?archived=true)
- masque l'action d'archivage sur son propre compte (évite le 403)
- service users : getArchived/restore, toast remove -> users.archived
- i18n FR : clés archived/restored/badge/confirmation
2026-06-26 17:08:20 +02:00

42 lines
1.1 KiB
TypeScript

export type ContractType = 'CDI' | 'CDD' | 'STAGE' | 'ALTERNANCE' | 'AUTRE'
export type UserData = {
id: number
'@id'?: string
username: string
firstName?: string | null
lastName?: string | null
roles: string[]
effectivePermissions?: string[]
avatarUrl?: string | null
apiToken?: string | null
// Soft-delete flag: an archived user keeps its data but cannot log in
archived?: boolean
// HR / absence management
isEmployee?: boolean
hireDate?: string | null
endDate?: string | null
contractType?: ContractType | null
workTimeRatio?: number
annualLeaveDays?: number
referencePeriodStart?: string
initialLeaveBalance?: number
}
export type UserWrite = {
username: string
firstName?: string | null
lastName?: string | null
plainPassword?: string
roles: string[]
// HR / absence management
isEmployee?: boolean
hireDate?: string | null
endDate?: string | null
contractType?: ContractType | null
workTimeRatio?: number
annualLeaveDays?: number
referencePeriodStart?: string
initialLeaveBalance?: number
}