89ce523019
- 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
42 lines
1.1 KiB
TypeScript
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
|
|
}
|