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:
@@ -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),
|
||||
|
||||
@@ -38,11 +38,10 @@ class _MesStatistiquesCotisationsPageState extends State<MesStatistiquesCotisati
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: ColorTokens.background,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
appBar: UFAppBar(
|
||||
title: 'Mes statistiques cotisations',
|
||||
backgroundColor: ColorTokens.surface,
|
||||
foregroundColor: ColorTokens.onSurface,
|
||||
title: 'Statistiques Cotisations',
|
||||
moduleGradient: ModuleColors.cotisationsGradient,
|
||||
),
|
||||
body: BlocListener<ContributionsBloc, ContributionsState>(
|
||||
listener: (context, state) {
|
||||
@@ -158,7 +157,7 @@ class _MesStatistiquesCotisationsPageState extends State<MesStatistiquesCotisati
|
||||
'Payé cette année',
|
||||
_currencyFormat.format(totalPayeAnnee),
|
||||
icon: Icons.check_circle_outline,
|
||||
color: AppColors.primaryGreen,
|
||||
color: AppColors.primary,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -272,7 +271,7 @@ class _MesStatistiquesCotisationsPageState extends State<MesStatistiquesCotisati
|
||||
Text('0 %', style: AppTypography.bodyTextSmall.copyWith(color: ColorTokens.onSurfaceVariant)),
|
||||
Text(
|
||||
'${taux.toStringAsFixed(0)} %',
|
||||
style: AppTypography.headerSmall.copyWith(color: AppColors.primaryGreen, fontWeight: FontWeight.w700),
|
||||
style: AppTypography.headerSmall.copyWith(color: AppColors.primary, fontWeight: FontWeight.w700),
|
||||
),
|
||||
Text('100 %', style: AppTypography.bodyTextSmall.copyWith(color: ColorTokens.onSurfaceVariant)),
|
||||
],
|
||||
@@ -294,7 +293,7 @@ class _MesStatistiquesCotisationsPageState extends State<MesStatistiquesCotisati
|
||||
final sections = <PieChartSectionData>[];
|
||||
if (paye > 0) {
|
||||
sections.add(PieChartSectionData(
|
||||
color: AppColors.primaryGreen,
|
||||
color: AppColors.primary,
|
||||
value: paye,
|
||||
title: 'Payé',
|
||||
radius: 60,
|
||||
@@ -345,7 +344,7 @@ class _MesStatistiquesCotisationsPageState extends State<MesStatistiquesCotisati
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
_legendItem(AppColors.primaryGreen, 'Payé', _currencyFormat.format(paye)),
|
||||
_legendItem(AppColors.primary, 'Payé', _currencyFormat.format(paye)),
|
||||
_legendItem(UnionFlowColors.terracotta, 'Dû', _currencyFormat.format(du)),
|
||||
],
|
||||
),
|
||||
@@ -454,11 +453,11 @@ class _MesStatistiquesCotisationsPageState extends State<MesStatistiquesCotisati
|
||||
LineChartBarData(
|
||||
spots: spots,
|
||||
isCurved: true,
|
||||
color: AppColors.primaryGreen,
|
||||
color: AppColors.primary,
|
||||
barWidth: 2,
|
||||
isStrokeCapRound: true,
|
||||
dotData: const FlDotData(show: true),
|
||||
belowBarData: BarAreaData(show: true, color: AppColors.primaryGreen.withOpacity(0.15)),
|
||||
belowBarData: BarAreaData(show: true, color: AppColors.primary.withOpacity(0.15)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user