feat(#47): Ajout de la modale de changement de mot de passe obligatoire
Implémentation complète du ticket #47 : - Mise à jour de l'URL API vers app.ptits-pas.fr - Ajout du champ changement_mdp_obligatoire au modèle AppUser - Ajout des endpoints /auth/me et /auth/change-password-required - Implémentation de la vraie logique de connexion dans AuthService - Création de la modale ChangePasswordDialog non-dismissible - Connexion du bouton de connexion avec gestion de la modale - Ajout des routes admin-dashboard et parent-dashboard La modale s'affiche automatiquement après connexion si changement_mdp_obligatoire = true et bloque l'utilisateur jusqu'au changement de mot de passe.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import '../screens/auth/login_screen.dart';
|
||||
import '../screens/auth/register_choice_screen.dart';
|
||||
import '../screens/auth/parent_register_step1_screen.dart';
|
||||
@@ -8,6 +7,8 @@ import '../screens/auth/parent_register_step3_screen.dart';
|
||||
import '../screens/auth/parent_register_step4_screen.dart';
|
||||
import '../screens/auth/parent_register_step5_screen.dart';
|
||||
import '../screens/home/home_screen.dart';
|
||||
import '../screens/administrateurs/admin_dashboardScreen.dart';
|
||||
import '../screens/home/parent_screen/ParentDashboardScreen.dart';
|
||||
import '../models/user_registration_data.dart';
|
||||
|
||||
class AppRouter {
|
||||
@@ -19,6 +20,9 @@ class AppRouter {
|
||||
static const String parentRegisterStep4 = '/parent-register/step4';
|
||||
static const String parentRegisterStep5 = '/parent-register/step5';
|
||||
static const String home = '/home';
|
||||
static const String adminDashboard = '/admin-dashboard';
|
||||
static const String parentDashboard = '/parent-dashboard';
|
||||
static const String amDashboard = '/am-dashboard';
|
||||
|
||||
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||||
Widget screen;
|
||||
@@ -77,6 +81,16 @@ class AppRouter {
|
||||
case home:
|
||||
screen = const HomeScreen();
|
||||
break;
|
||||
case adminDashboard:
|
||||
screen = const AdminDashboardScreen();
|
||||
break;
|
||||
case parentDashboard:
|
||||
screen = const ParentDashboardScreen();
|
||||
break;
|
||||
case amDashboard:
|
||||
// TODO: Créer l'écran dashboard pour les assistantes maternelles
|
||||
screen = const HomeScreen();
|
||||
break;
|
||||
default:
|
||||
screen = Scaffold(
|
||||
body: Center(
|
||||
|
||||
Reference in New Issue
Block a user