Branche le flux front : chargement du dossier, session reprise, wizards parent/AM préremplis et resoumission via reprise-resoumettre. Co-authored-by: Cursor <cursoragent@cursor.com>
54 lines
1.5 KiB
Dart
54 lines
1.5 KiB
Dart
/// Réponse GET /auth/reprise-dossier. Ticket #111, #112.
|
|
class RepriseDossier {
|
|
final String id;
|
|
final String email;
|
|
final String? prenom;
|
|
final String? nom;
|
|
final String? telephone;
|
|
final String? adresse;
|
|
final String? ville;
|
|
final String? codePostal;
|
|
final String? numeroDossier;
|
|
final String role;
|
|
final String? photoUrl;
|
|
final String? genre;
|
|
final String? situationFamiliale;
|
|
|
|
const RepriseDossier({
|
|
required this.id,
|
|
required this.email,
|
|
this.prenom,
|
|
this.nom,
|
|
this.telephone,
|
|
this.adresse,
|
|
this.ville,
|
|
this.codePostal,
|
|
this.numeroDossier,
|
|
required this.role,
|
|
this.photoUrl,
|
|
this.genre,
|
|
this.situationFamiliale,
|
|
});
|
|
|
|
bool get isParent => role == 'parent';
|
|
bool get isAm => role == 'assistante_maternelle';
|
|
|
|
factory RepriseDossier.fromJson(Map<String, dynamic> json) {
|
|
return RepriseDossier(
|
|
id: json['id']?.toString() ?? '',
|
|
email: json['email']?.toString() ?? '',
|
|
prenom: json['prenom']?.toString(),
|
|
nom: json['nom']?.toString(),
|
|
telephone: json['telephone']?.toString(),
|
|
adresse: json['adresse']?.toString(),
|
|
ville: json['ville']?.toString(),
|
|
codePostal: json['code_postal']?.toString(),
|
|
numeroDossier: json['numero_dossier']?.toString(),
|
|
role: json['role']?.toString() ?? '',
|
|
photoUrl: json['photo_url']?.toString(),
|
|
genre: json['genre']?.toString(),
|
|
situationFamiliale: json['situation_familiale']?.toString(),
|
|
);
|
|
}
|
|
}
|