feat(features): refontes adhesions/admin/auth/backup/contributions/dashboard/epargne/events

- adhesions : bloc complet avec events/states/model, dialogs paiement/rejet
- admin : users bloc, user management list/detail pages
- authentication : bloc + keycloak auth service + webview
- backup : bloc complet, repository, models
- contributions : bloc + widgets + export
- dashboard : widgets connectés (activities, events, notifications, search)
  + charts + monitoring + shortcuts
- epargne : repository, transactions, dialogs
- events : bloc complet, pages (detail, connected, wrapper), models
This commit is contained in:
dahoud
2026-04-15 20:26:48 +00:00
parent 45dcd2171e
commit 120434aba0
36 changed files with 903 additions and 1411 deletions

View File

@@ -5,6 +5,8 @@ library payment_dialog;
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../../../shared/design_system/tokens/color_tokens.dart';
import '../../../../shared/design_system/tokens/app_colors.dart';
import 'package:intl/intl.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:unionflow_mobile_apps/core/di/injection.dart';
@@ -65,8 +67,8 @@ class _PaymentDialogState extends State<PaymentDialog> {
// En-tête
Container(
padding: const EdgeInsets.all(16),
decoration: const BoxDecoration(
color: Color(0xFF10B981),
decoration: BoxDecoration(
color: ColorTokens.successLight,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(4),
topRight: Radius.circular(4),
@@ -96,15 +98,16 @@ class _PaymentDialogState extends State<PaymentDialog> {
// Informations de la cotisation
Container(
padding: const EdgeInsets.all(16),
color: Colors.grey[100],
color: Theme.of(context).colorScheme.surfaceContainerHighest,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.cotisation.membreNomComplet,
style: const TextStyle(
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.onSurface,
),
),
const SizedBox(height: 4),
@@ -112,7 +115,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
widget.cotisation.libellePeriode,
style: TextStyle(
fontSize: 14,
color: Colors.grey[600],
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
const SizedBox(height: 8),
@@ -121,11 +124,14 @@ class _PaymentDialogState extends State<PaymentDialog> {
children: [
Text(
'Montant total:',
style: TextStyle(color: Colors.grey[600]),
style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant),
),
Text(
'${NumberFormat('#,###').format(widget.cotisation.montant)} ${widget.cotisation.devise}',
style: const TextStyle(fontWeight: FontWeight.bold),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).colorScheme.onSurface,
),
),
],
),
@@ -134,11 +140,11 @@ class _PaymentDialogState extends State<PaymentDialog> {
children: [
Text(
'Déjà payé:',
style: TextStyle(color: Colors.grey[600]),
style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant),
),
Text(
'${NumberFormat('#,###').format(widget.cotisation.montantPaye ?? 0)} ${widget.cotisation.devise}',
style: const TextStyle(color: Colors.green),
style: TextStyle(color: ColorTokens.success),
),
],
),
@@ -147,13 +153,13 @@ class _PaymentDialogState extends State<PaymentDialog> {
children: [
Text(
'Restant:',
style: TextStyle(color: Colors.grey[600]),
style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant),
),
Text(
'${NumberFormat('#,###').format(widget.cotisation.montantRestant)} ${widget.cotisation.devise}',
style: const TextStyle(
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.red,
color: ColorTokens.error,
),
),
],
@@ -297,8 +303,8 @@ class _PaymentDialogState extends State<PaymentDialog> {
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.grey[100],
border: Border(top: BorderSide(color: Colors.grey[300]!)),
color: Theme.of(context).colorScheme.surfaceContainerHighest,
border: Border(top: BorderSide(color: Theme.of(context).colorScheme.outline)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
@@ -311,7 +317,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
ElevatedButton(
onPressed: _waveLoading ? null : _submitForm,
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF10B981),
backgroundColor: ColorTokens.successLight,
foregroundColor: Colors.white,
),
child: _waveLoading
@@ -415,7 +421,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Paiement enregistré avec succès'),
backgroundColor: Colors.green,
backgroundColor: ColorTokens.success,
),
);
}
@@ -426,7 +432,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
final phone = _wavePhoneController.text.replaceAll(RegExp(r'\D'), '');
if (phone.length < 9) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Indiquez votre numéro Wave (9 chiffres)'), backgroundColor: Colors.orange),
const SnackBar(content: Text('Indiquez votre numéro Wave (9 chiffres)'), backgroundColor: AppColors.warning),
);
return;
}
@@ -453,7 +459,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(result.message),
backgroundColor: Colors.green,
backgroundColor: AppColors.success,
),
);
context.read<ContributionsBloc>().add(const LoadContributions());
@@ -462,7 +468,7 @@ class _PaymentDialogState extends State<PaymentDialog> {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text('Wave: ${e.toString().replaceFirst('Exception: ', '')}'),
backgroundColor: Colors.red,
backgroundColor: AppColors.error,
),
);
} finally {