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

@@ -59,7 +59,7 @@ class _AdvancedDashboardPageState extends State<AdvancedDashboardPage>
return BlocProvider(
create: (context) => _dashboardBloc,
child: Scaffold(
backgroundColor: AppColors.lightBackground,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: const UFAppBar(
title: 'DASHBOARD AVANCÉ',
),
@@ -92,7 +92,7 @@ class _AdvancedDashboardPageState extends State<AdvancedDashboardPage>
background: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [AppColors.primaryGreen, AppColors.brandGreen],
colors: [AppColors.primary, AppColors.primaryDark],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
@@ -258,13 +258,13 @@ class _AdvancedDashboardPageState extends State<AdvancedDashboardPage>
return Container(
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
border: Border(bottom: BorderSide(color: AppColors.lightBorder, width: 1)),
border: Border(bottom: BorderSide(color: AppColors.border, width: 1)),
),
child: TabBar(
controller: _tabController,
labelColor: AppColors.primaryGreen,
unselectedLabelColor: AppColors.textSecondaryLight,
indicatorColor: AppColors.primaryGreen,
labelColor: AppColors.primary,
unselectedLabelColor: AppColors.textSecondary,
indicatorColor: AppColors.primary,
indicatorWeight: 3,
labelStyle: AppTypography.actionText.copyWith(fontSize: 10, fontWeight: FontWeight.bold, letterSpacing: 1),
tabs: const [
@@ -279,7 +279,7 @@ class _AdvancedDashboardPageState extends State<AdvancedDashboardPage>
Widget _buildOverviewTab() {
return RefreshIndicator(
onRefresh: () async => _refreshDashboardData(),
color: AppColors.primaryGreen,
color: AppColors.primary,
child: SingleChildScrollView(
padding: const EdgeInsets.all(12),
child: Column(
@@ -367,7 +367,7 @@ class _AdvancedDashboardPageState extends State<AdvancedDashboardPage>
'Rapport Mensuel',
'Synthèse complète des activités du mois',
Icons.calendar_month_outlined,
AppColors.primaryGreen,
AppColors.primary,
),
const SizedBox(height: 12),
_buildReportCard(
@@ -458,7 +458,7 @@ class _AdvancedDashboardPageState extends State<AdvancedDashboardPage>
],
),
),
const Icon(Icons.download_outlined, color: AppColors.textSecondaryLight, size: 18),
const Icon(Icons.download_outlined, color: AppColors.textSecondary, size: 18),
],
),
);
@@ -469,7 +469,7 @@ class _AdvancedDashboardPageState extends State<AdvancedDashboardPage>
onPressed: () {
// Actions rapides
},
backgroundColor: AppColors.primaryGreen,
backgroundColor: AppColors.primary,
child: const Icon(Icons.add, color: Colors.white),
);
}

View File

@@ -17,8 +17,8 @@ class ActiveMemberDashboard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
appBar: _buildAppBar(),
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: _buildAppBar(context),
drawer: DashboardDrawer(
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
),
@@ -229,10 +229,12 @@ class ActiveMemberDashboard extends StatelessWidget {
);
}
PreferredSizeWidget _buildAppBar() {
PreferredSizeWidget _buildAppBar(BuildContext context) {
return AppBar(
backgroundColor: UnionFlowColors.surface,
backgroundColor: Theme.of(context).colorScheme.surface,
elevation: 0,
scrolledUnderElevation: 1,
shadowColor: Theme.of(context).colorScheme.outline.withOpacity(0.2),
title: Row(
children: [
Container(
@@ -246,16 +248,16 @@ class ActiveMemberDashboard extends StatelessWidget {
child: const Text('U', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w900, fontSize: 18)),
),
const SizedBox(width: 12),
const Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: UnionFlowColors.textPrimary)),
Text('Membre Actif', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: UnionFlowColors.textSecondary)),
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Theme.of(context).colorScheme.onSurface)),
Text('Membre Actif', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: Theme.of(context).colorScheme.onSurfaceVariant)),
],
),
],
),
iconTheme: const IconThemeData(color: UnionFlowColors.textPrimary),
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
);
}

View File

@@ -17,7 +17,7 @@ class ConsultantDashboard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: _buildAppBar(context),
drawer: DashboardDrawer(
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
@@ -205,8 +205,10 @@ class ConsultantDashboard extends StatelessWidget {
PreferredSizeWidget _buildAppBar(BuildContext context) {
return AppBar(
backgroundColor: UnionFlowColors.surface,
backgroundColor: Theme.of(context).colorScheme.surface,
elevation: 0,
scrolledUnderElevation: 1,
shadowColor: Theme.of(context).colorScheme.outline.withOpacity(0.2),
title: Row(
children: [
Container(
@@ -224,16 +226,16 @@ class ConsultantDashboard extends StatelessWidget {
child: const Text('C', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w900, fontSize: 18)),
),
const SizedBox(width: 12),
const Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: UnionFlowColors.textPrimary)),
Text('Consultant', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: UnionFlowColors.textSecondary)),
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Theme.of(context).colorScheme.onSurface)),
Text('Consultant', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: Theme.of(context).colorScheme.onSurfaceVariant)),
],
),
],
),
iconTheme: const IconThemeData(color: UnionFlowColors.textPrimary),
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
actions: [
UnionExportButton(
onExport: (_) => Navigator.of(context).push(

View File

@@ -17,7 +17,7 @@ class HRManagerDashboard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: _buildAppBar(context),
drawer: DashboardDrawer(
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
@@ -250,8 +250,10 @@ class HRManagerDashboard extends StatelessWidget {
PreferredSizeWidget _buildAppBar(BuildContext context) {
return AppBar(
backgroundColor: UnionFlowColors.surface,
backgroundColor: Theme.of(context).colorScheme.surface,
elevation: 0,
scrolledUnderElevation: 1,
shadowColor: Theme.of(context).colorScheme.outline.withOpacity(0.2),
title: Row(
children: [
Container(
@@ -269,16 +271,16 @@ class HRManagerDashboard extends StatelessWidget {
child: const Text('H', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w900, fontSize: 18)),
),
const SizedBox(width: 12),
const Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: UnionFlowColors.textPrimary)),
Text('RH Manager', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: UnionFlowColors.textSecondary)),
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Theme.of(context).colorScheme.onSurface)),
Text('RH Manager', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: Theme.of(context).colorScheme.onSurfaceVariant)),
],
),
],
),
iconTheme: const IconThemeData(color: UnionFlowColors.textPrimary),
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
actions: [
UnionExportButton(
onExport: (_) => Navigator.of(context).push(

View File

@@ -20,8 +20,8 @@ class ModeratorDashboard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
appBar: _buildAppBar(),
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: _buildAppBar(context),
drawer: DashboardDrawer(
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
),
@@ -359,10 +359,12 @@ class ModeratorDashboard extends StatelessWidget {
);
}
PreferredSizeWidget _buildAppBar() {
PreferredSizeWidget _buildAppBar(BuildContext context) {
return AppBar(
backgroundColor: UnionFlowColors.surface,
backgroundColor: Theme.of(context).colorScheme.surface,
elevation: 0,
scrolledUnderElevation: 1,
shadowColor: Theme.of(context).colorScheme.outline.withOpacity(0.2),
title: Row(
children: [
Container(
@@ -376,16 +378,16 @@ class ModeratorDashboard extends StatelessWidget {
child: const Text('U', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w900, fontSize: 18)),
),
const SizedBox(width: 12),
const Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: UnionFlowColors.textPrimary)),
Text('Modérateur', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: UnionFlowColors.textSecondary)),
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Theme.of(context).colorScheme.onSurface)),
Text('Modérateur', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: Theme.of(context).colorScheme.onSurfaceVariant)),
],
),
],
),
iconTheme: const IconThemeData(color: UnionFlowColors.textPrimary),
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
);
}

View File

@@ -24,7 +24,7 @@ class OrgAdminDashboardLoader extends StatelessWidget {
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: const Center(
child: CircularProgressIndicator(color: UnionFlowColors.gold),
),
@@ -32,7 +32,7 @@ class OrgAdminDashboardLoader extends StatelessWidget {
}
if (snapshot.hasError) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: Center(
child: Padding(
padding: const EdgeInsets.all(24),
@@ -69,7 +69,7 @@ class OrgAdminDashboardLoader extends StatelessWidget {
final orgsWithId = orgs.where((o) => o.id != null && o.id!.isNotEmpty).toList();
if (orgsWithId.isEmpty) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
body: Center(
child: Padding(
padding: const EdgeInsets.all(24),

View File

@@ -16,8 +16,8 @@ class SimpleMemberDashboard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: UnionFlowColors.background,
appBar: _buildAppBar(),
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: _buildAppBar(context),
drawer: DashboardDrawer(
onLogout: () => context.read<AuthBloc>().add(const AuthLogoutRequested()),
),
@@ -189,10 +189,12 @@ class SimpleMemberDashboard extends StatelessWidget {
);
}
PreferredSizeWidget _buildAppBar() {
PreferredSizeWidget _buildAppBar(BuildContext context) {
return AppBar(
backgroundColor: UnionFlowColors.surface,
backgroundColor: Theme.of(context).colorScheme.surface,
elevation: 0,
scrolledUnderElevation: 1,
shadowColor: Theme.of(context).colorScheme.outline.withOpacity(0.2),
title: Row(
children: [
Container(
@@ -206,16 +208,16 @@ class SimpleMemberDashboard extends StatelessWidget {
child: const Text('U', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w900, fontSize: 18)),
),
const SizedBox(width: 12),
const Column(
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: UnionFlowColors.textPrimary)),
Text('Membre Simple', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: UnionFlowColors.textSecondary)),
Text('UnionFlow', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: Theme.of(context).colorScheme.onSurface)),
Text('Membre Simple', style: TextStyle(fontSize: 11, fontWeight: FontWeight.w400, color: Theme.of(context).colorScheme.onSurfaceVariant)),
],
),
],
),
iconTheme: const IconThemeData(color: UnionFlowColors.textPrimary),
iconTheme: IconThemeData(color: Theme.of(context).colorScheme.onSurface),
);
}