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

@@ -60,9 +60,10 @@ class _ContributionsPageState extends State<ContributionsPage>
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorTokens.background,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: UFAppBar(
title: 'Cotisations',
moduleGradient: ModuleColors.cotisationsGradient,
actions: [
IconButton(
icon: const Icon(Icons.bar_chart, size: 20),
@@ -76,15 +77,17 @@ class _ContributionsPageState extends State<ContributionsPage>
bottom: TabBar(
controller: _tabController,
onTap: (_) => _loadContributions(),
labelColor: ColorTokens.onPrimary,
unselectedLabelColor: ColorTokens.onPrimary.withOpacity(0.7),
indicatorColor: ColorTokens.onPrimary,
labelStyle: AppTypography.badgeText.copyWith(fontWeight: FontWeight.bold),
isScrollable: true,
labelColor: Colors.white,
unselectedLabelColor: Colors.white70,
indicatorColor: Colors.white,
indicatorSize: TabBarIndicatorSize.label,
labelStyle: AppTypography.actionText.copyWith(fontSize: 10, fontWeight: FontWeight.bold),
tabs: const [
Tab(text: 'Toutes'),
Tab(text: 'Payées'),
Tab(text: 'Dues'),
Tab(text: 'Retard'),
Tab(child: Text('TOUTES')),
Tab(child: Text('PAYÉES')),
Tab(child: Text('DUES')),
Tab(child: Text('RETARD')),
],
),
),
@@ -257,18 +260,19 @@ class _ContributionsPageState extends State<ContributionsPage>
}
Widget _buildStatutBadge(ContributionStatus statut, bool enRetard) {
final scheme = Theme.of(context).colorScheme;
if (enRetard && statut != ContributionStatus.payee) {
return const InfoBadge(text: 'RETARD', backgroundColor: Color(0xFFFFEBEB), textColor: ColorTokens.error);
return InfoBadge(text: 'RETARD', backgroundColor: scheme.errorContainer, textColor: ColorTokens.error);
}
switch (statut) {
case ContributionStatus.payee:
return const InfoBadge(text: 'PAYÉE', backgroundColor: Color(0xFFE3F9E5), textColor: ColorTokens.success);
return InfoBadge(text: 'PAYÉE', backgroundColor: ColorTokens.successContainer, textColor: ColorTokens.success);
case ContributionStatus.nonPayee:
case ContributionStatus.enAttente:
return const InfoBadge(text: 'DUE', backgroundColor: Color(0xFFFFF4E5), textColor: ColorTokens.warning);
return InfoBadge(text: 'DUE', backgroundColor: ColorTokens.warningContainer, textColor: ColorTokens.warning);
case ContributionStatus.partielle:
return const InfoBadge(text: 'PARTIELLE', backgroundColor: Color(0xFFE5F1FF), textColor: ColorTokens.info);
return InfoBadge(text: 'PARTIELLE', backgroundColor: ColorTokens.infoContainer, textColor: ColorTokens.info);
case ContributionStatus.annulee:
return InfoBadge.neutral('ANNULÉE');
default:
@@ -279,7 +283,7 @@ class _ContributionsPageState extends State<ContributionsPage>
void _showContributionDetails(ContributionModel contribution) {
showModalBottomSheet(
context: context,
backgroundColor: ColorTokens.surface,
backgroundColor: Theme.of(context).colorScheme.surface,
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(RadiusTokens.lg))),
builder: (context) => Padding(
padding: const EdgeInsets.all(SpacingTokens.xl),