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:
@@ -3,6 +3,8 @@
|
||||
library edit_event_dialog;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../../../shared/design_system/tokens/module_colors.dart';
|
||||
import '../../../../shared/design_system/tokens/color_tokens.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../../bloc/evenements_bloc.dart';
|
||||
@@ -83,7 +85,7 @@ class _EditEventDialogState extends State<EditEventDialog> {
|
||||
if (state is EvenementsError) {
|
||||
setState(() => _updateSent = false);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(state.message), backgroundColor: Colors.red),
|
||||
SnackBar(content: Text(state.message), backgroundColor: ColorTokens.error),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -93,7 +95,7 @@ class _EditEventDialogState extends State<EditEventDialog> {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Événement modifié avec succès'),
|
||||
backgroundColor: Colors.green,
|
||||
backgroundColor: ColorTokens.success,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -109,7 +111,7 @@ class _EditEventDialogState extends State<EditEventDialog> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFF3B82F6),
|
||||
color: ModuleColors.evenements,
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(4),
|
||||
topRight: Radius.circular(4),
|
||||
@@ -180,53 +182,63 @@ class _EditEventDialogState extends State<EditEventDialog> {
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Type et statut
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: DropdownButtonFormField<TypeEvenement>(
|
||||
value: _selectedType,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Type *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.category),
|
||||
Builder(builder: (context) {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: DropdownButtonFormField<TypeEvenement>(
|
||||
value: _selectedType,
|
||||
isExpanded: true,
|
||||
menuMaxHeight: 220,
|
||||
dropdownColor: scheme.surface,
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(color: scheme.onSurface),
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Type *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.category),
|
||||
),
|
||||
items: TypeEvenement.values.map((type) {
|
||||
return DropdownMenuItem(
|
||||
value: type,
|
||||
child: Text(_getTypeLabel(type), overflow: TextOverflow.ellipsis, style: TextStyle(color: scheme.onSurface)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedType = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
items: TypeEvenement.values.map((type) {
|
||||
return DropdownMenuItem(
|
||||
value: type,
|
||||
child: Text(_getTypeLabel(type)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedType = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: DropdownButtonFormField<StatutEvenement>(
|
||||
value: _selectedStatut,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Statut *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.flag),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: DropdownButtonFormField<StatutEvenement>(
|
||||
value: _selectedStatut,
|
||||
isExpanded: true,
|
||||
dropdownColor: scheme.surface,
|
||||
style: Theme.of(context).textTheme.bodyLarge?.copyWith(color: scheme.onSurface),
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Statut *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.flag),
|
||||
),
|
||||
items: StatutEvenement.values.map((statut) {
|
||||
return DropdownMenuItem(
|
||||
value: statut,
|
||||
child: Text(_getStatutLabel(statut), overflow: TextOverflow.ellipsis, style: TextStyle(color: scheme.onSurface)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatut = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
items: StatutEvenement.values.map((statut) {
|
||||
return DropdownMenuItem(
|
||||
value: statut,
|
||||
child: Text(_getStatutLabel(statut)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatut = value!;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Dates
|
||||
@@ -355,8 +367,8 @@ class _EditEventDialogState extends State<EditEventDialog> {
|
||||
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,
|
||||
@@ -369,7 +381,7 @@ class _EditEventDialogState extends State<EditEventDialog> {
|
||||
ElevatedButton(
|
||||
onPressed: _submitForm,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF3B82F6),
|
||||
backgroundColor: ModuleColors.evenements,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Enregistrer'),
|
||||
@@ -390,7 +402,7 @@ class _EditEventDialogState extends State<EditEventDialog> {
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF3B82F6),
|
||||
color: ModuleColors.evenements,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user