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:
@@ -2,6 +2,9 @@
|
||||
library inscription_event_dialog;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../../shared/design_system/tokens/module_colors.dart';
|
||||
import '../../../../shared/design_system/tokens/color_tokens.dart';
|
||||
import '../../../../shared/design_system/tokens/app_colors.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../bloc/evenements_bloc.dart';
|
||||
import '../../bloc/evenements_event.dart';
|
||||
@@ -46,7 +49,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
if (state is EvenementsError) {
|
||||
setState(() => _actionSent = false);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(state.message), backgroundColor: Colors.red),
|
||||
SnackBar(content: Text(state.message), backgroundColor: ColorTokens.error),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -61,7 +64,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
: 'Désinscription réussie',
|
||||
),
|
||||
backgroundColor:
|
||||
state is EvenementInscrit ? Colors.green : Colors.orange,
|
||||
state is EvenementInscrit ? ColorTokens.success : ColorTokens.warning,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -108,7 +111,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: widget.isInscrit ? Colors.red : const Color(0xFF3B82F6),
|
||||
color: widget.isInscrit ? ColorTokens.error : ModuleColors.evenements,
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(4),
|
||||
topRight: Radius.circular(4),
|
||||
@@ -144,8 +147,8 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue[50],
|
||||
border: Border.all(color: Colors.blue[200]!),
|
||||
color: ColorTokens.infoContainer,
|
||||
border: Border.all(color: ColorTokens.infoLight),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: Column(
|
||||
@@ -153,7 +156,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.event, color: Color(0xFF3B82F6)),
|
||||
const Icon(Icons.event, color: ModuleColors.evenements),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
@@ -169,7 +172,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.calendar_today, size: 16, color: Colors.grey),
|
||||
const Icon(Icons.calendar_today, size: 16, color: AppColors.textTertiary),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
_formatDate(widget.evenement.dateDebut),
|
||||
@@ -181,7 +184,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.location_on, size: 16, color: Colors.grey),
|
||||
const Icon(Icons.location_on, size: 16, color: AppColors.textTertiary),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
@@ -205,9 +208,9 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: isComplet ? Colors.red[50] : Colors.green[50],
|
||||
color: isComplet ? ColorTokens.errorContainer : ColorTokens.successContainer,
|
||||
border: Border.all(
|
||||
color: isComplet ? Colors.red[200]! : Colors.green[200]!,
|
||||
color: isComplet ? ColorTokens.errorLight : ColorTokens.successLight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
@@ -215,7 +218,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
children: [
|
||||
Icon(
|
||||
isComplet ? Icons.warning : Icons.check_circle,
|
||||
color: isComplet ? Colors.red : Colors.green,
|
||||
color: isComplet ? ColorTokens.error : ColorTokens.success,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
@@ -226,7 +229,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
isComplet ? 'Événement complet' : 'Places disponibles',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: isComplet ? Colors.red[900] : Colors.green[900],
|
||||
color: isComplet ? ColorTokens.errorDark : ColorTokens.successDark,
|
||||
),
|
||||
),
|
||||
if (widget.evenement.maxParticipants != null)
|
||||
@@ -264,13 +267,13 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.orange[50],
|
||||
border: Border.all(color: Colors.orange[200]!),
|
||||
color: ColorTokens.warningContainer,
|
||||
border: Border.all(color: ColorTokens.warningLight),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
child: const Row(
|
||||
children: [
|
||||
Icon(Icons.warning, color: Colors.orange),
|
||||
Icon(Icons.warning, color: ColorTokens.warning),
|
||||
SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
@@ -291,8 +294,8 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
return 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,
|
||||
@@ -305,7 +308,7 @@ class _InscriptionEventDialogState extends State<InscriptionEventDialog> {
|
||||
ElevatedButton(
|
||||
onPressed: (widget.isInscrit || !isComplet) ? _submitForm : null,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: widget.isInscrit ? Colors.red : const Color(0xFF3B82F6),
|
||||
backgroundColor: widget.isInscrit ? ColorTokens.error : ModuleColors.evenements,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: Text(widget.isInscrit ? 'Se désinscrire' : 'S\'inscrire'),
|
||||
|
||||
Reference in New Issue
Block a user