Squash merge de develop vers master. Livrables principaux (ticket #101 et mise au point associée) : - Branchement du formulaire d'inscription parent sur POST /api/v1/auth/register/parent - Payload DTO (parents, enfants, photos base64, CGU) et services Auth - Parcours gestionnaire : cartes dossiers, wizard validation famille, images authentifiées - Scripts d'inscription test (Martin, Durand/Rousseau, Lecomte) ; .gitignore .cursor/ Inclut également les ajustements develop fusionnés dans ce lot (inscription AM, champs relais, etc.). Closes #101 Made-with: Cursor
61 lines
2.0 KiB
Dart
61 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
import '../../models/am_registration_data.dart';
|
|
import '../../models/card_assets.dart';
|
|
import '../../widgets/professional_info_form_screen.dart';
|
|
|
|
class AmRegisterStep2Screen extends StatefulWidget {
|
|
const AmRegisterStep2Screen({super.key});
|
|
|
|
@override
|
|
State<AmRegisterStep2Screen> createState() => _AmRegisterStep2ScreenState();
|
|
}
|
|
|
|
class _AmRegisterStep2ScreenState extends State<AmRegisterStep2Screen> {
|
|
String? _photoPathFramework;
|
|
|
|
Future<void> _pickPhoto() async {
|
|
// TODO: brancher ImagePicker ; ne pas préremplir de chemin factice
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final registrationData = Provider.of<AmRegistrationData>(context, listen: false);
|
|
|
|
// Préparer les données initiales
|
|
ProfessionalInfoData initialData = ProfessionalInfoData(
|
|
photoPath: registrationData.photoPath,
|
|
photoConsent: registrationData.photoConsent,
|
|
dateOfBirth: registrationData.dateOfBirth,
|
|
birthCity: registrationData.birthCity,
|
|
birthCountry: registrationData.birthCountry,
|
|
nir: registrationData.nir,
|
|
agrementNumber: registrationData.agrementNumber,
|
|
capacity: registrationData.capacity,
|
|
);
|
|
|
|
return ProfessionalInfoFormScreen(
|
|
stepText: 'Étape 2/4',
|
|
title: 'Vos informations professionnelles',
|
|
cardColor: CardColorHorizontal.green,
|
|
initialData: initialData,
|
|
previousRoute: '/am-register-step1',
|
|
onPickPhoto: _pickPhoto,
|
|
onSubmit: (data) {
|
|
registrationData.updateProfessionalInfo(
|
|
photoPath: _photoPathFramework ?? data.photoPath,
|
|
photoConsent: data.photoConsent,
|
|
dateOfBirth: data.dateOfBirth,
|
|
birthCity: data.birthCity,
|
|
birthCountry: data.birthCountry,
|
|
nir: data.nir,
|
|
agrementNumber: data.agrementNumber,
|
|
capacity: data.capacity,
|
|
);
|
|
context.go('/am-register-step3');
|
|
},
|
|
);
|
|
}
|
|
} |