fix(#131): aligner PATCH fiche AM back sur le payload front
Étend UpdateAmFicheAdminDto (nir, date/lieu naissance, agreement_date) et persiste ces champs dans updateFicheAdmin avec validation NIR. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import {
|
||||
IsBoolean,
|
||||
IsDateString,
|
||||
IsEmail,
|
||||
IsEnum,
|
||||
IsInt,
|
||||
@@ -59,12 +60,40 @@ export class UpdateAmFicheAdminDto {
|
||||
@IsEnum(StatutUtilisateurType)
|
||||
statut?: StatutUtilisateurType;
|
||||
|
||||
@ApiPropertyOptional({ example: '123456789012345' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(15)
|
||||
nir?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '1985-03-12' })
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
date_naissance?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Lyon' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(100)
|
||||
lieu_naissance_ville?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'France' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(100)
|
||||
lieu_naissance_pays?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'AGR-2024-12345' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(50)
|
||||
approval_number?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '2020-01-15' })
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
agreement_date?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'Lyon' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
Reference in New Issue
Block a user