feat(#36): Inscription Parent - Étape 1 (Parent 1)
Backend: - Retrait des champs non-CDC: profession, situation_familiale, date_naissance - Nettoyage des DTOs RegisterParentCompletDto et RegisterParentDto - Mise à jour de la logique dans auth.service.ts (inscrireParentComplet et legacy) Frontend Step1: - Suppression des champs mot de passe et confirmation - Correction de l'indicateur d'étape: 1/5 → 1/6 - Améliorations visuelles: * Taille des labels: 18 → 22px * Taille de police des champs: 18 → 20px * Espacement entre champs: 20 → 32px * Meilleure répartition verticale avec spaceEvenly Note: Le champ password est conservé dans le modèle ParentData pour compatibilité avec Step2
This commit is contained in:
@@ -200,16 +200,10 @@ export class AuthService {
|
||||
adresse: dto.adresse,
|
||||
code_postal: dto.code_postal,
|
||||
ville: dto.ville,
|
||||
profession: dto.profession,
|
||||
situation_familiale: dto.situation_familiale,
|
||||
token_creation_mdp: tokenCreationMdp,
|
||||
token_creation_mdp_expire_le: tokenExpiration,
|
||||
});
|
||||
|
||||
if (dto.date_naissance) {
|
||||
parent1.date_naissance = new Date(dto.date_naissance);
|
||||
}
|
||||
|
||||
const savedParent1 = await manager.save(Users, parent1);
|
||||
|
||||
// Créer Parent 2 si renseigné
|
||||
@@ -327,16 +321,10 @@ export class AuthService {
|
||||
adresse: dto.adresse,
|
||||
code_postal: dto.code_postal,
|
||||
ville: dto.ville,
|
||||
profession: dto.profession,
|
||||
situation_familiale: dto.situation_familiale,
|
||||
token_creation_mdp: tokenCreationMdp,
|
||||
token_creation_mdp_expire_le: dateExpiration,
|
||||
});
|
||||
|
||||
if (dto.date_naissance) {
|
||||
parent1.date_naissance = new Date(dto.date_naissance);
|
||||
}
|
||||
|
||||
const parent1Enregistre = await manager.save(Users, parent1);
|
||||
|
||||
let parent2Enregistre: Users | null = null;
|
||||
|
||||
@@ -66,22 +66,6 @@ export class RegisterParentCompletDto {
|
||||
@MaxLength(150)
|
||||
ville?: string;
|
||||
|
||||
@ApiProperty({ example: 'Infirmière', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(150)
|
||||
profession?: string;
|
||||
|
||||
@ApiProperty({ enum: SituationFamilialeType, example: SituationFamilialeType.MARIE, required: false })
|
||||
@IsOptional()
|
||||
@IsEnum(SituationFamilialeType)
|
||||
situation_familiale?: SituationFamilialeType;
|
||||
|
||||
@ApiProperty({ example: '1990-04-03', required: false })
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
date_naissance?: string;
|
||||
|
||||
// ============================================
|
||||
// ÉTAPE 2 : PARENT 2 / CO-PARENT (Optionnel)
|
||||
// ============================================
|
||||
|
||||
@@ -59,22 +59,6 @@ export class RegisterParentDto {
|
||||
@MaxLength(150)
|
||||
ville?: string;
|
||||
|
||||
@ApiProperty({ example: 'Infirmière', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(150)
|
||||
profession?: string;
|
||||
|
||||
@ApiProperty({ enum: SituationFamilialeType, example: SituationFamilialeType.MARIE, required: false })
|
||||
@IsOptional()
|
||||
@IsEnum(SituationFamilialeType)
|
||||
situation_familiale?: SituationFamilialeType;
|
||||
|
||||
@ApiProperty({ example: '1990-04-03', required: false })
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
date_naissance?: string;
|
||||
|
||||
// === Informations co-parent (optionnel) ===
|
||||
@ApiProperty({ example: 'thomas.martin@ptits-pas.fr', required: false })
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user