feat(#156): création dossier AM staff — API + wizard dashboard.
Squash depuis develop : POST /assistantes-maternelles/dossier (actif + mail MDP), AmDossierWizard create/review, validations inscription. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:p_tits_pas/models/dossier_unifie.dart';
|
||||
import 'package:p_tits_pas/models/user.dart';
|
||||
import 'package:p_tits_pas/utils/name_format_utils.dart';
|
||||
import 'package:p_tits_pas/utils/phone_utils.dart';
|
||||
import 'package:p_tits_pas/widgets/admin/common/validation_detail_section.dart';
|
||||
|
||||
@@ -67,7 +68,9 @@ class IdentityValues {
|
||||
|
||||
/// Bloc identité : Nom/Prénom, Tél/Email, Adresse, CP/Ville.
|
||||
/// Grille partagée (création de compte, validation AM/famille, fiches admin, etc.).
|
||||
class IdentityBlock extends StatelessWidget { final String? title;
|
||||
class IdentityBlock extends StatelessWidget {
|
||||
final String? title;
|
||||
final bool expandVertically;
|
||||
|
||||
final String? _nom;
|
||||
final String? _prenom;
|
||||
@@ -91,6 +94,7 @@ class IdentityBlock extends StatelessWidget { final String? title;
|
||||
const IdentityBlock.readOnly({
|
||||
super.key,
|
||||
this.title,
|
||||
this.expandVertically = false,
|
||||
required String nom,
|
||||
required String prenom,
|
||||
required String telephone,
|
||||
@@ -116,6 +120,7 @@ class IdentityBlock extends StatelessWidget { final String? title;
|
||||
const IdentityBlock.editable({
|
||||
super.key,
|
||||
this.title,
|
||||
this.expandVertically = false,
|
||||
required TextEditingController nomController,
|
||||
required TextEditingController prenomController,
|
||||
required TextEditingController telephoneController,
|
||||
@@ -142,11 +147,13 @@ class IdentityBlock extends StatelessWidget { final String? title;
|
||||
factory IdentityBlock.readOnlyValues({
|
||||
Key? key,
|
||||
String? title,
|
||||
bool expandVertically = false,
|
||||
required IdentityValues values,
|
||||
}) {
|
||||
return IdentityBlock.readOnly(
|
||||
key: key,
|
||||
title: title,
|
||||
expandVertically: expandVertically,
|
||||
nom: values.nom,
|
||||
prenom: values.prenom,
|
||||
telephone: values.telephone,
|
||||
@@ -163,10 +170,12 @@ class IdentityBlock extends StatelessWidget { final String? title;
|
||||
Key? key,
|
||||
String? title,
|
||||
String emptyLabel = 'Non défini',
|
||||
bool expandVertically = false,
|
||||
}) {
|
||||
return IdentityBlock.readOnlyValues(
|
||||
key: key,
|
||||
title: title,
|
||||
expandVertically: expandVertically,
|
||||
values: IdentityValues.fromUser(user, emptyLabel: emptyLabel),
|
||||
);
|
||||
}
|
||||
@@ -196,29 +205,29 @@ class IdentityBlock extends StatelessWidget { final String? title;
|
||||
title: title,
|
||||
rowLayout: rowLayout,
|
||||
rowFlex: rowFlex,
|
||||
expandVertically: expandVertically,
|
||||
fields: [
|
||||
ValidationLabeledField(
|
||||
label: 'Nom',
|
||||
field: ValidationEditableField(controller: _nomCtrl!),
|
||||
field: ValidationEditableField(
|
||||
controller: _nomCtrl!,
|
||||
inputFormatters: const [PersonNameInputFormatter()],
|
||||
),
|
||||
),
|
||||
ValidationLabeledField(
|
||||
label: 'Prénom',
|
||||
field: ValidationEditableField(controller: _prenomCtrl!),
|
||||
field: ValidationEditableField(
|
||||
controller: _prenomCtrl!,
|
||||
inputFormatters: const [PersonNameInputFormatter()],
|
||||
),
|
||||
),
|
||||
ValidationLabeledField(
|
||||
label: 'Téléphone',
|
||||
field: ValidationEditableField(
|
||||
controller: _telCtrl!,
|
||||
keyboardType: TextInputType.phone,
|
||||
inputFormatters: frenchPhoneInputFormatters,
|
||||
),
|
||||
field: ValidationPhoneField(controller: _telCtrl!),
|
||||
),
|
||||
ValidationLabeledField(
|
||||
label: 'Email',
|
||||
field: ValidationEditableField(
|
||||
controller: _emailCtrl!,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
),
|
||||
field: ValidationEmailField(controller: _emailCtrl!),
|
||||
),
|
||||
ValidationLabeledField(
|
||||
label: 'Adresse (N° et Rue)',
|
||||
@@ -226,14 +235,14 @@ class IdentityBlock extends StatelessWidget { final String? title;
|
||||
),
|
||||
ValidationLabeledField(
|
||||
label: 'Code postal',
|
||||
field: ValidationEditableField(
|
||||
controller: _cpCtrl!,
|
||||
keyboardType: TextInputType.number,
|
||||
),
|
||||
field: ValidationPostalCodeField(controller: _cpCtrl!),
|
||||
),
|
||||
ValidationLabeledField(
|
||||
label: 'Ville',
|
||||
field: ValidationEditableField(controller: _villeCtrl!),
|
||||
field: ValidationEditableField(
|
||||
controller: _villeCtrl!,
|
||||
inputFormatters: const [PersonNameInputFormatter()],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -243,6 +252,7 @@ class IdentityBlock extends StatelessWidget { final String? title;
|
||||
title: title,
|
||||
rowLayout: rowLayout,
|
||||
rowFlex: rowFlex,
|
||||
expandVertically: expandVertically,
|
||||
fields: [
|
||||
ValidationLabeledField(
|
||||
label: 'Nom',
|
||||
|
||||
Reference in New Issue
Block a user