Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
403
lib/features/members/presentation/widgets/add_member_dialog.dart
Normal file
403
lib/features/members/presentation/widgets/add_member_dialog.dart
Normal file
@@ -0,0 +1,403 @@
|
||||
/// Dialogue d'ajout de membre
|
||||
/// Formulaire complet pour créer un nouveau membre
|
||||
library add_member_dialog;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../../bloc/membres_bloc.dart';
|
||||
import '../../bloc/membres_event.dart';
|
||||
import '../../data/models/membre_complete_model.dart';
|
||||
|
||||
/// Dialogue d'ajout de membre
|
||||
class AddMemberDialog extends StatefulWidget {
|
||||
const AddMemberDialog({super.key});
|
||||
|
||||
@override
|
||||
State<AddMemberDialog> createState() => _AddMemberDialogState();
|
||||
}
|
||||
|
||||
class _AddMemberDialogState extends State<AddMemberDialog> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
|
||||
// Contrôleurs de texte
|
||||
final _nomController = TextEditingController();
|
||||
final _prenomController = TextEditingController();
|
||||
final _emailController = TextEditingController();
|
||||
final _telephoneController = TextEditingController();
|
||||
final _adresseController = TextEditingController();
|
||||
final _villeController = TextEditingController();
|
||||
final _codePostalController = TextEditingController();
|
||||
final _regionController = TextEditingController();
|
||||
final _paysController = TextEditingController();
|
||||
final _professionController = TextEditingController();
|
||||
final _nationaliteController = TextEditingController();
|
||||
|
||||
// Valeurs sélectionnées
|
||||
Genre? _selectedGenre;
|
||||
DateTime? _dateNaissance;
|
||||
final StatutMembre _selectedStatut = StatutMembre.actif;
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_nomController.dispose();
|
||||
_prenomController.dispose();
|
||||
_emailController.dispose();
|
||||
_telephoneController.dispose();
|
||||
_adresseController.dispose();
|
||||
_villeController.dispose();
|
||||
_codePostalController.dispose();
|
||||
_regionController.dispose();
|
||||
_paysController.dispose();
|
||||
_professionController.dispose();
|
||||
_nationaliteController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
constraints: const BoxConstraints(maxHeight: 600),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// En-tête
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFF6C5CE7),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(4),
|
||||
topRight: Radius.circular(4),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.person_add, color: Colors.white),
|
||||
const SizedBox(width: 12),
|
||||
const Text(
|
||||
'Ajouter un membre',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close, color: Colors.white),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Formulaire
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Informations personnelles
|
||||
_buildSectionTitle('Informations personnelles'),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _nomController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Nom *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.person),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Le nom est obligatoire';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _prenomController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Prénom *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.person_outline),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Le prénom est obligatoire';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _emailController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Email *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.email),
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'L\'email est obligatoire';
|
||||
}
|
||||
if (!value.contains('@')) {
|
||||
return 'Email invalide';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _telephoneController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Téléphone',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.phone),
|
||||
),
|
||||
keyboardType: TextInputType.phone,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Genre
|
||||
DropdownButtonFormField<Genre>(
|
||||
value: _selectedGenre,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Genre',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.wc),
|
||||
),
|
||||
items: Genre.values.map((genre) {
|
||||
return DropdownMenuItem(
|
||||
value: genre,
|
||||
child: Text(_getGenreLabel(genre)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedGenre = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Date de naissance
|
||||
InkWell(
|
||||
onTap: () => _selectDate(context),
|
||||
child: InputDecorator(
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Date de naissance',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.calendar_today),
|
||||
),
|
||||
child: Text(
|
||||
_dateNaissance != null
|
||||
? DateFormat('dd/MM/yyyy').format(_dateNaissance!)
|
||||
: 'Sélectionner une date',
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Adresse
|
||||
_buildSectionTitle('Adresse'),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _adresseController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Adresse',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.home),
|
||||
),
|
||||
maxLines: 2,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _villeController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Ville',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _codePostalController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Code postal',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _regionController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Région',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _paysController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Pays',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Informations professionnelles
|
||||
_buildSectionTitle('Informations professionnelles'),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _professionController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Profession',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.work),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _nationaliteController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Nationalité',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.flag),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Boutons d'action
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[100],
|
||||
border: Border(top: BorderSide(color: Colors.grey[300]!)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text('Annuler'),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
ElevatedButton(
|
||||
onPressed: _submitForm,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF6C5CE7),
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Créer le membre'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSectionTitle(String title) {
|
||||
return Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF6C5CE7),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _getGenreLabel(Genre genre) {
|
||||
switch (genre) {
|
||||
case Genre.homme:
|
||||
return 'Homme';
|
||||
case Genre.femme:
|
||||
return 'Femme';
|
||||
case Genre.autre:
|
||||
return 'Autre';
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _selectDate(BuildContext context) async {
|
||||
final DateTime? picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: _dateNaissance ?? DateTime.now().subtract(const Duration(days: 365 * 25)),
|
||||
firstDate: DateTime(1900),
|
||||
lastDate: DateTime.now(),
|
||||
);
|
||||
if (picked != null && picked != _dateNaissance) {
|
||||
setState(() {
|
||||
_dateNaissance = picked;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void _submitForm() {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
// Créer le modèle de membre
|
||||
final membre = MembreCompletModel(
|
||||
nom: _nomController.text,
|
||||
prenom: _prenomController.text,
|
||||
email: _emailController.text,
|
||||
telephone: _telephoneController.text.isNotEmpty ? _telephoneController.text : null,
|
||||
dateNaissance: _dateNaissance,
|
||||
genre: _selectedGenre,
|
||||
adresse: _adresseController.text.isNotEmpty ? _adresseController.text : null,
|
||||
ville: _villeController.text.isNotEmpty ? _villeController.text : null,
|
||||
codePostal: _codePostalController.text.isNotEmpty ? _codePostalController.text : null,
|
||||
region: _regionController.text.isNotEmpty ? _regionController.text : null,
|
||||
pays: _paysController.text.isNotEmpty ? _paysController.text : null,
|
||||
profession: _professionController.text.isNotEmpty ? _professionController.text : null,
|
||||
nationalite: _nationaliteController.text.isNotEmpty ? _nationaliteController.text : null,
|
||||
statut: _selectedStatut,
|
||||
);
|
||||
|
||||
// Envoyer l'événement au BLoC
|
||||
context.read<MembresBloc>().add(CreateMembre(membre));
|
||||
|
||||
// Fermer le dialogue
|
||||
Navigator.pop(context);
|
||||
|
||||
// Afficher un message de succès
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Membre créé avec succès'),
|
||||
backgroundColor: Colors.green,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,441 @@
|
||||
/// Dialogue de modification de membre
|
||||
/// Formulaire complet pour modifier un membre existant
|
||||
library edit_member_dialog;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../../bloc/membres_bloc.dart';
|
||||
import '../../bloc/membres_event.dart';
|
||||
import '../../data/models/membre_complete_model.dart';
|
||||
|
||||
/// Dialogue de modification de membre
|
||||
class EditMemberDialog extends StatefulWidget {
|
||||
final MembreCompletModel membre;
|
||||
|
||||
const EditMemberDialog({
|
||||
super.key,
|
||||
required this.membre,
|
||||
});
|
||||
|
||||
@override
|
||||
State<EditMemberDialog> createState() => _EditMemberDialogState();
|
||||
}
|
||||
|
||||
class _EditMemberDialogState extends State<EditMemberDialog> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
|
||||
// Contrôleurs de texte
|
||||
late final TextEditingController _nomController;
|
||||
late final TextEditingController _prenomController;
|
||||
late final TextEditingController _emailController;
|
||||
late final TextEditingController _telephoneController;
|
||||
late final TextEditingController _adresseController;
|
||||
late final TextEditingController _villeController;
|
||||
late final TextEditingController _codePostalController;
|
||||
late final TextEditingController _regionController;
|
||||
late final TextEditingController _paysController;
|
||||
late final TextEditingController _professionController;
|
||||
late final TextEditingController _nationaliteController;
|
||||
|
||||
// Valeurs sélectionnées
|
||||
Genre? _selectedGenre;
|
||||
DateTime? _dateNaissance;
|
||||
StatutMembre? _selectedStatut;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
// Initialiser les contrôleurs avec les valeurs existantes
|
||||
_nomController = TextEditingController(text: widget.membre.nom);
|
||||
_prenomController = TextEditingController(text: widget.membre.prenom);
|
||||
_emailController = TextEditingController(text: widget.membre.email);
|
||||
_telephoneController = TextEditingController(text: widget.membre.telephone ?? '');
|
||||
_adresseController = TextEditingController(text: widget.membre.adresse ?? '');
|
||||
_villeController = TextEditingController(text: widget.membre.ville ?? '');
|
||||
_codePostalController = TextEditingController(text: widget.membre.codePostal ?? '');
|
||||
_regionController = TextEditingController(text: widget.membre.region ?? '');
|
||||
_paysController = TextEditingController(text: widget.membre.pays ?? '');
|
||||
_professionController = TextEditingController(text: widget.membre.profession ?? '');
|
||||
_nationaliteController = TextEditingController(text: widget.membre.nationalite ?? '');
|
||||
|
||||
_selectedGenre = widget.membre.genre;
|
||||
_dateNaissance = widget.membre.dateNaissance;
|
||||
_selectedStatut = widget.membre.statut;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_nomController.dispose();
|
||||
_prenomController.dispose();
|
||||
_emailController.dispose();
|
||||
_telephoneController.dispose();
|
||||
_adresseController.dispose();
|
||||
_villeController.dispose();
|
||||
_codePostalController.dispose();
|
||||
_regionController.dispose();
|
||||
_paysController.dispose();
|
||||
_professionController.dispose();
|
||||
_nationaliteController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
constraints: const BoxConstraints(maxHeight: 600),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// En-tête
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFF6C5CE7),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(4),
|
||||
topRight: Radius.circular(4),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.edit, color: Colors.white),
|
||||
const SizedBox(width: 12),
|
||||
const Text(
|
||||
'Modifier le membre',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close, color: Colors.white),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Formulaire
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Informations personnelles
|
||||
_buildSectionTitle('Informations personnelles'),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _nomController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Nom *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.person),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Le nom est obligatoire';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _prenomController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Prénom *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.person_outline),
|
||||
),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Le prénom est obligatoire';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _emailController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Email *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.email),
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'L\'email est obligatoire';
|
||||
}
|
||||
if (!value.contains('@')) {
|
||||
return 'Email invalide';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _telephoneController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Téléphone',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.phone),
|
||||
),
|
||||
keyboardType: TextInputType.phone,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Genre
|
||||
DropdownButtonFormField<Genre>(
|
||||
value: _selectedGenre,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Genre',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.wc),
|
||||
),
|
||||
items: Genre.values.map((genre) {
|
||||
return DropdownMenuItem(
|
||||
value: genre,
|
||||
child: Text(_getGenreLabel(genre)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedGenre = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Statut
|
||||
DropdownButtonFormField<StatutMembre>(
|
||||
value: _selectedStatut,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Statut *',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.info),
|
||||
),
|
||||
items: StatutMembre.values.map((statut) {
|
||||
return DropdownMenuItem(
|
||||
value: statut,
|
||||
child: Text(_getStatutLabel(statut)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedStatut = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
// Date de naissance
|
||||
InkWell(
|
||||
onTap: () => _selectDate(context),
|
||||
child: InputDecorator(
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Date de naissance',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.calendar_today),
|
||||
),
|
||||
child: Text(
|
||||
_dateNaissance != null
|
||||
? DateFormat('dd/MM/yyyy').format(_dateNaissance!)
|
||||
: 'Sélectionner une date',
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Adresse
|
||||
_buildSectionTitle('Adresse'),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _adresseController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Adresse',
|
||||
border: OutlineInputBorder(),
|
||||
prefixIcon: Icon(Icons.home),
|
||||
),
|
||||
maxLines: 2,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _villeController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Ville',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _codePostalController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Code postal',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _regionController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Région',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
TextFormField(
|
||||
controller: _paysController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Pays',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Boutons d'action
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[100],
|
||||
border: Border(top: BorderSide(color: Colors.grey[300]!)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text('Annuler'),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
ElevatedButton(
|
||||
onPressed: _submitForm,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF6C5CE7),
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Enregistrer'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSectionTitle(String title) {
|
||||
return Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF6C5CE7),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _getGenreLabel(Genre genre) {
|
||||
switch (genre) {
|
||||
case Genre.homme:
|
||||
return 'Homme';
|
||||
case Genre.femme:
|
||||
return 'Femme';
|
||||
case Genre.autre:
|
||||
return 'Autre';
|
||||
}
|
||||
}
|
||||
|
||||
String _getStatutLabel(StatutMembre statut) {
|
||||
switch (statut) {
|
||||
case StatutMembre.actif:
|
||||
return 'Actif';
|
||||
case StatutMembre.inactif:
|
||||
return 'Inactif';
|
||||
case StatutMembre.suspendu:
|
||||
return 'Suspendu';
|
||||
case StatutMembre.enAttente:
|
||||
return 'En attente';
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _selectDate(BuildContext context) async {
|
||||
final DateTime? picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: _dateNaissance ?? DateTime.now().subtract(const Duration(days: 365 * 25)),
|
||||
firstDate: DateTime(1900),
|
||||
lastDate: DateTime.now(),
|
||||
);
|
||||
if (picked != null && picked != _dateNaissance) {
|
||||
setState(() {
|
||||
_dateNaissance = picked;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void _submitForm() {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
// Créer le modèle de membre mis à jour
|
||||
final membreUpdated = widget.membre.copyWith(
|
||||
nom: _nomController.text,
|
||||
prenom: _prenomController.text,
|
||||
email: _emailController.text,
|
||||
telephone: _telephoneController.text.isNotEmpty ? _telephoneController.text : null,
|
||||
dateNaissance: _dateNaissance,
|
||||
genre: _selectedGenre,
|
||||
adresse: _adresseController.text.isNotEmpty ? _adresseController.text : null,
|
||||
ville: _villeController.text.isNotEmpty ? _villeController.text : null,
|
||||
codePostal: _codePostalController.text.isNotEmpty ? _codePostalController.text : null,
|
||||
region: _regionController.text.isNotEmpty ? _regionController.text : null,
|
||||
pays: _paysController.text.isNotEmpty ? _paysController.text : null,
|
||||
profession: _professionController.text.isNotEmpty ? _professionController.text : null,
|
||||
nationalite: _nationaliteController.text.isNotEmpty ? _nationaliteController.text : null,
|
||||
statut: _selectedStatut!,
|
||||
);
|
||||
|
||||
// Envoyer l'événement au BLoC
|
||||
context.read<MembresBloc>().add(UpdateMembre(widget.membre.id!, membreUpdated));
|
||||
|
||||
// Fermer le dialogue
|
||||
Navigator.pop(context);
|
||||
|
||||
// Afficher un message de succès
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Membre modifié avec succès'),
|
||||
backgroundColor: Colors.green,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,433 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../shared/models/membre_search_criteria.dart';
|
||||
|
||||
/// Formulaire de recherche de membres
|
||||
/// Widget réutilisable pour la saisie des critères de recherche
|
||||
class MembreSearchForm extends StatefulWidget {
|
||||
final MembreSearchCriteria initialCriteria;
|
||||
final Function(MembreSearchCriteria) onCriteriaChanged;
|
||||
final VoidCallback? onSearch;
|
||||
final VoidCallback? onClear;
|
||||
final bool isCompact;
|
||||
|
||||
const MembreSearchForm({
|
||||
super.key,
|
||||
this.initialCriteria = MembreSearchCriteria.empty,
|
||||
required this.onCriteriaChanged,
|
||||
this.onSearch,
|
||||
this.onClear,
|
||||
this.isCompact = false,
|
||||
});
|
||||
|
||||
@override
|
||||
State<MembreSearchForm> createState() => _MembreSearchFormState();
|
||||
}
|
||||
|
||||
class _MembreSearchFormState extends State<MembreSearchForm> {
|
||||
late TextEditingController _queryController;
|
||||
late TextEditingController _nomController;
|
||||
late TextEditingController _prenomController;
|
||||
late TextEditingController _emailController;
|
||||
late TextEditingController _telephoneController;
|
||||
|
||||
String? _selectedStatut;
|
||||
List<String> _selectedRoles = [];
|
||||
RangeValues _ageRange = const RangeValues(18, 65);
|
||||
bool _includeInactifs = false;
|
||||
bool _membreBureau = false;
|
||||
bool _responsable = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_initializeControllers();
|
||||
_loadInitialCriteria();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_queryController.dispose();
|
||||
_nomController.dispose();
|
||||
_prenomController.dispose();
|
||||
_emailController.dispose();
|
||||
_telephoneController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _initializeControllers() {
|
||||
_queryController = TextEditingController();
|
||||
_nomController = TextEditingController();
|
||||
_prenomController = TextEditingController();
|
||||
_emailController = TextEditingController();
|
||||
_telephoneController = TextEditingController();
|
||||
|
||||
// Écouter les changements pour mettre à jour les critères
|
||||
_queryController.addListener(_updateCriteria);
|
||||
_nomController.addListener(_updateCriteria);
|
||||
_prenomController.addListener(_updateCriteria);
|
||||
_emailController.addListener(_updateCriteria);
|
||||
_telephoneController.addListener(_updateCriteria);
|
||||
}
|
||||
|
||||
void _loadInitialCriteria() {
|
||||
final criteria = widget.initialCriteria;
|
||||
_queryController.text = criteria.query ?? '';
|
||||
_nomController.text = criteria.nom ?? '';
|
||||
_prenomController.text = criteria.prenom ?? '';
|
||||
_emailController.text = criteria.email ?? '';
|
||||
_telephoneController.text = criteria.telephone ?? '';
|
||||
_selectedStatut = criteria.statut;
|
||||
_selectedRoles = criteria.roles ?? [];
|
||||
_ageRange = RangeValues(
|
||||
criteria.ageMin?.toDouble() ?? 18,
|
||||
criteria.ageMax?.toDouble() ?? 65,
|
||||
);
|
||||
_includeInactifs = criteria.includeInactifs;
|
||||
_membreBureau = criteria.membreBureau ?? false;
|
||||
_responsable = criteria.responsable ?? false;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.isCompact) {
|
||||
return _buildCompactForm();
|
||||
}
|
||||
return _buildFullForm();
|
||||
}
|
||||
|
||||
/// Formulaire compact pour recherche rapide
|
||||
Widget _buildCompactForm() {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
TextField(
|
||||
controller: _queryController,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Rechercher un membre',
|
||||
hintText: 'Nom, prénom ou email...',
|
||||
prefixIcon: const Icon(Icons.search),
|
||||
suffixIcon: _queryController.text.isNotEmpty
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.clear),
|
||||
onPressed: () {
|
||||
_queryController.clear();
|
||||
_updateCriteria();
|
||||
},
|
||||
)
|
||||
: null,
|
||||
border: const OutlineInputBorder(),
|
||||
),
|
||||
onSubmitted: (_) => widget.onSearch?.call(),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: DropdownButtonFormField<String>(
|
||||
value: _selectedStatut,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Statut',
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
),
|
||||
items: const [
|
||||
DropdownMenuItem(value: null, child: Text('Tous')),
|
||||
DropdownMenuItem(value: 'ACTIF', child: Text('Actif')),
|
||||
DropdownMenuItem(value: 'INACTIF', child: Text('Inactif')),
|
||||
],
|
||||
onChanged: (value) {
|
||||
setState(() => _selectedStatut = value);
|
||||
_updateCriteria();
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
if (widget.onSearch != null)
|
||||
ElevatedButton.icon(
|
||||
onPressed: widget.onSearch,
|
||||
icon: const Icon(Icons.search),
|
||||
label: const Text('Rechercher'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Formulaire complet avec tous les critères
|
||||
Widget _buildFullForm() {
|
||||
return Column(
|
||||
children: [
|
||||
// Recherche générale
|
||||
_buildGeneralSearchSection(),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Critères détaillés
|
||||
_buildDetailedCriteriaSection(),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Filtres avancés
|
||||
_buildAdvancedFiltersSection(),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Boutons d'action
|
||||
_buildActionButtons(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
/// Section de recherche générale
|
||||
Widget _buildGeneralSearchSection() {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Recherche Générale',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
TextField(
|
||||
controller: _queryController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Terme de recherche',
|
||||
hintText: 'Nom, prénom, email...',
|
||||
prefixIcon: Icon(Icons.search),
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Section des critères détaillés
|
||||
Widget _buildDetailedCriteriaSection() {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Critères Détaillés',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _nomController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Nom',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _prenomController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Prénom',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
TextField(
|
||||
controller: _emailController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Email',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: _telephoneController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Téléphone',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: DropdownButtonFormField<String>(
|
||||
value: _selectedStatut,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Statut',
|
||||
border: OutlineInputBorder(),
|
||||
),
|
||||
items: const [
|
||||
DropdownMenuItem(value: null, child: Text('Tous')),
|
||||
DropdownMenuItem(value: 'ACTIF', child: Text('Actif')),
|
||||
DropdownMenuItem(value: 'INACTIF', child: Text('Inactif')),
|
||||
DropdownMenuItem(value: 'SUSPENDU', child: Text('Suspendu')),
|
||||
DropdownMenuItem(value: 'RADIE', child: Text('Radié')),
|
||||
],
|
||||
onChanged: (value) {
|
||||
setState(() => _selectedStatut = value);
|
||||
_updateCriteria();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Section des filtres avancés
|
||||
Widget _buildAdvancedFiltersSection() {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Filtres Avancés',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Tranche d'âge
|
||||
Text('Tranche d\'âge: ${_ageRange.start.round()}-${_ageRange.end.round()} ans'),
|
||||
RangeSlider(
|
||||
values: _ageRange,
|
||||
min: 18,
|
||||
max: 80,
|
||||
divisions: 62,
|
||||
labels: RangeLabels(
|
||||
'${_ageRange.start.round()}',
|
||||
'${_ageRange.end.round()}',
|
||||
),
|
||||
onChanged: (values) {
|
||||
setState(() => _ageRange = values);
|
||||
_updateCriteria();
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Options booléennes
|
||||
CheckboxListTile(
|
||||
title: const Text('Inclure les membres inactifs'),
|
||||
value: _includeInactifs,
|
||||
onChanged: (value) {
|
||||
setState(() => _includeInactifs = value ?? false);
|
||||
_updateCriteria();
|
||||
},
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: const Text('Membres du bureau uniquement'),
|
||||
value: _membreBureau,
|
||||
onChanged: (value) {
|
||||
setState(() => _membreBureau = value ?? false);
|
||||
_updateCriteria();
|
||||
},
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: const Text('Responsables uniquement'),
|
||||
value: _responsable,
|
||||
onChanged: (value) {
|
||||
setState(() => _responsable = value ?? false);
|
||||
_updateCriteria();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Boutons d'action
|
||||
Widget _buildActionButtons() {
|
||||
return Row(
|
||||
children: [
|
||||
if (widget.onClear != null)
|
||||
Expanded(
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: () {
|
||||
_clearForm();
|
||||
widget.onClear?.call();
|
||||
},
|
||||
icon: const Icon(Icons.clear),
|
||||
label: const Text('Effacer'),
|
||||
),
|
||||
),
|
||||
if (widget.onClear != null && widget.onSearch != null)
|
||||
const SizedBox(width: 16),
|
||||
if (widget.onSearch != null)
|
||||
Expanded(
|
||||
flex: widget.onClear != null ? 2 : 1,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: widget.onSearch,
|
||||
icon: const Icon(Icons.search),
|
||||
label: const Text('Rechercher'),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
/// Met à jour les critères de recherche
|
||||
void _updateCriteria() {
|
||||
final criteria = MembreSearchCriteria(
|
||||
query: _queryController.text.trim().isEmpty ? null : _queryController.text.trim(),
|
||||
nom: _nomController.text.trim().isEmpty ? null : _nomController.text.trim(),
|
||||
prenom: _prenomController.text.trim().isEmpty ? null : _prenomController.text.trim(),
|
||||
email: _emailController.text.trim().isEmpty ? null : _emailController.text.trim(),
|
||||
telephone: _telephoneController.text.trim().isEmpty ? null : _telephoneController.text.trim(),
|
||||
statut: _selectedStatut,
|
||||
roles: _selectedRoles.isEmpty ? null : _selectedRoles,
|
||||
ageMin: _ageRange.start.round(),
|
||||
ageMax: _ageRange.end.round(),
|
||||
membreBureau: _membreBureau ? true : null,
|
||||
responsable: _responsable ? true : null,
|
||||
includeInactifs: _includeInactifs,
|
||||
);
|
||||
|
||||
widget.onCriteriaChanged(criteria);
|
||||
}
|
||||
|
||||
/// Efface le formulaire
|
||||
void _clearForm() {
|
||||
setState(() {
|
||||
_queryController.clear();
|
||||
_nomController.clear();
|
||||
_prenomController.clear();
|
||||
_emailController.clear();
|
||||
_telephoneController.clear();
|
||||
_selectedStatut = null;
|
||||
_selectedRoles.clear();
|
||||
_ageRange = const RangeValues(18, 65);
|
||||
_includeInactifs = false;
|
||||
_membreBureau = false;
|
||||
_responsable = false;
|
||||
});
|
||||
_updateCriteria();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,380 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../shared/models/membre_search_result.dart' as search_model;
|
||||
import '../../data/models/membre_complete_model.dart';
|
||||
|
||||
/// Widget d'affichage des résultats de recherche de membres
|
||||
/// Gère la pagination, le tri et l'affichage des membres trouvés
|
||||
class MembreSearchResults extends StatefulWidget {
|
||||
final search_model.MembreSearchResult result;
|
||||
final Function(MembreCompletModel)? onMembreSelected;
|
||||
final Function(int page)? onPageChanged;
|
||||
final bool showPagination;
|
||||
|
||||
const MembreSearchResults({
|
||||
super.key,
|
||||
required this.result,
|
||||
this.onMembreSelected,
|
||||
this.onPageChanged,
|
||||
this.showPagination = true,
|
||||
});
|
||||
|
||||
@override
|
||||
State<MembreSearchResults> createState() => _MembreSearchResultsState();
|
||||
}
|
||||
|
||||
class _MembreSearchResultsState extends State<MembreSearchResults> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.result.isEmpty) {
|
||||
return _buildEmptyState();
|
||||
}
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
// En-tête avec informations sur les résultats
|
||||
_buildResultsHeader(),
|
||||
|
||||
// Liste des membres
|
||||
Expanded(
|
||||
child: _buildMembersList(),
|
||||
),
|
||||
|
||||
// Pagination si activée
|
||||
if (widget.showPagination && widget.result.totalPages > 1)
|
||||
_buildPagination(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
/// État vide quand aucun résultat
|
||||
Widget _buildEmptyState() {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.search_off,
|
||||
size: 64,
|
||||
color: Colors.grey[400],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
'Aucun membre trouvé',
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Essayez de modifier vos critères de recherche',
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
ElevatedButton.icon(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
icon: const Icon(Icons.tune),
|
||||
label: const Text('Modifier les critères'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// En-tête avec informations sur les résultats
|
||||
Widget _buildResultsHeader() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.search,
|
||||
color: Theme.of(context).primaryColor,
|
||||
size: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.result.resultDescription,
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
Chip(
|
||||
label: Text('${widget.result.executionTimeMs}ms'),
|
||||
backgroundColor: Colors.green.withOpacity(0.1),
|
||||
labelStyle: const TextStyle(
|
||||
color: Colors.green,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (widget.result.criteria.description.isNotEmpty) ...[
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'Critères: ${widget.result.criteria.description}',
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Liste des membres trouvés
|
||||
Widget _buildMembersList() {
|
||||
return ListView.builder(
|
||||
itemCount: widget.result.membres.length,
|
||||
itemBuilder: (context, index) {
|
||||
final membre = widget.result.membres[index];
|
||||
return _buildMembreCard(membre, index);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// Carte d'affichage d'un membre
|
||||
Widget _buildMembreCard(MembreCompletModel membre, int index) {
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
|
||||
child: ListTile(
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: _getStatusColor(membre.statut),
|
||||
child: Text(
|
||||
_getInitials(membre.nom, membre.prenom),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
'${membre.prenom} ${membre.nom}',
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (membre.email.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.email, size: 14, color: Colors.grey),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: Text(
|
||||
membre.email,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (membre.telephone?.isNotEmpty == true)
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.phone, size: 14, color: Colors.grey),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
membre.telephone!,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (membre.organisationNom?.isNotEmpty == true)
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.business, size: 14, color: Colors.grey),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: Text(
|
||||
membre.organisationNom!,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
trailing: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_buildStatusChip(membre.statut),
|
||||
if (membre.role?.isNotEmpty == true) ...[
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
_formatRoles(membre.role!),
|
||||
style: const TextStyle(
|
||||
fontSize: 10,
|
||||
color: Colors.grey,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
onTap: widget.onMembreSelected != null
|
||||
? () => widget.onMembreSelected!(membre)
|
||||
: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Pagination
|
||||
Widget _buildPagination() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).cardColor,
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// Bouton page précédente
|
||||
ElevatedButton.icon(
|
||||
onPressed: widget.result.hasPrevious ? _goToPreviousPage : null,
|
||||
icon: const Icon(Icons.chevron_left),
|
||||
label: const Text('Précédent'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.grey[100],
|
||||
foregroundColor: Colors.grey[700],
|
||||
),
|
||||
),
|
||||
|
||||
// Indicateur de page
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: Text(
|
||||
'Page ${widget.result.currentPage + 1} / ${widget.result.totalPages}',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Bouton page suivante
|
||||
ElevatedButton.icon(
|
||||
onPressed: widget.result.hasNext ? _goToNextPage : null,
|
||||
icon: const Icon(Icons.chevron_right),
|
||||
label: const Text('Suivant'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Chip de statut
|
||||
Widget _buildStatusChip(StatutMembre statut) {
|
||||
final color = _getStatusColor(statut);
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: color, width: 1),
|
||||
),
|
||||
child: Text(
|
||||
_getStatusLabel(statut),
|
||||
style: TextStyle(
|
||||
color: color,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Obtient la couleur du statut
|
||||
Color _getStatusColor(StatutMembre statut) {
|
||||
switch (statut) {
|
||||
case StatutMembre.actif:
|
||||
return Colors.green;
|
||||
case StatutMembre.inactif:
|
||||
return Colors.orange;
|
||||
case StatutMembre.suspendu:
|
||||
return Colors.red;
|
||||
case StatutMembre.enAttente:
|
||||
return Colors.grey;
|
||||
default:
|
||||
return Colors.grey;
|
||||
}
|
||||
}
|
||||
|
||||
/// Obtient le libellé du statut
|
||||
String _getStatusLabel(StatutMembre statut) {
|
||||
switch (statut) {
|
||||
case StatutMembre.actif:
|
||||
return 'Actif';
|
||||
case StatutMembre.inactif:
|
||||
return 'Inactif';
|
||||
case StatutMembre.suspendu:
|
||||
return 'Suspendu';
|
||||
case StatutMembre.enAttente:
|
||||
return 'En attente';
|
||||
}
|
||||
}
|
||||
|
||||
/// Obtient les initiales d'un membre
|
||||
String _getInitials(String nom, String prenom) {
|
||||
final nomInitial = nom.isNotEmpty ? nom[0].toUpperCase() : '';
|
||||
final prenomInitial = prenom.isNotEmpty ? prenom[0].toUpperCase() : '';
|
||||
return '$prenomInitial$nomInitial';
|
||||
}
|
||||
|
||||
/// Formate les rôles pour l'affichage
|
||||
String _formatRoles(String roles) {
|
||||
final rolesList = roles.split(',').map((r) => r.trim()).toList();
|
||||
if (rolesList.length <= 2) {
|
||||
return rolesList.join(', ');
|
||||
}
|
||||
return '${rolesList.take(2).join(', ')}...';
|
||||
}
|
||||
|
||||
/// Navigation vers la page précédente
|
||||
void _goToPreviousPage() {
|
||||
if (widget.result.hasPrevious && widget.onPageChanged != null) {
|
||||
widget.onPageChanged!(widget.result.currentPage - 1);
|
||||
}
|
||||
}
|
||||
|
||||
/// Navigation vers la page suivante
|
||||
void _goToNextPage() {
|
||||
if (widget.result.hasNext && widget.onPageChanged != null) {
|
||||
widget.onPageChanged!(widget.result.currentPage + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,416 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
|
||||
import '../../../../shared/models/membre_search_result.dart';
|
||||
|
||||
/// Widget d'affichage des statistiques de recherche
|
||||
/// Présente les métriques et graphiques des résultats de recherche
|
||||
class SearchStatisticsCard extends StatelessWidget {
|
||||
final SearchStatistics statistics;
|
||||
|
||||
const SearchStatisticsCard({
|
||||
super.key,
|
||||
required this.statistics,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Titre
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.analytics,
|
||||
color: Theme.of(context).primaryColor,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Statistiques de Recherche',
|
||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Métriques principales
|
||||
_buildMainMetrics(context),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Graphique de répartition actifs/inactifs
|
||||
_buildStatusChart(context),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Métriques détaillées
|
||||
_buildDetailedMetrics(context),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Informations complémentaires
|
||||
_buildAdditionalInfo(context),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Métriques principales
|
||||
Widget _buildMainMetrics(BuildContext context) {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Vue d\'ensemble',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildMetricCard(
|
||||
context,
|
||||
'Total Membres',
|
||||
statistics.totalMembres.toString(),
|
||||
Icons.people,
|
||||
Colors.blue,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: _buildMetricCard(
|
||||
context,
|
||||
'Membres Actifs',
|
||||
statistics.membresActifs.toString(),
|
||||
Icons.person,
|
||||
Colors.green,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildMetricCard(
|
||||
context,
|
||||
'Âge Moyen',
|
||||
'${statistics.ageMoyen.toStringAsFixed(1)} ans',
|
||||
Icons.cake,
|
||||
Colors.orange,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: _buildMetricCard(
|
||||
context,
|
||||
'Ancienneté',
|
||||
'${statistics.ancienneteMoyenne.toStringAsFixed(1)} ans',
|
||||
Icons.schedule,
|
||||
Colors.purple,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Carte de métrique individuelle
|
||||
Widget _buildMetricCard(
|
||||
BuildContext context,
|
||||
String title,
|
||||
String value,
|
||||
IconData icon,
|
||||
Color color,
|
||||
) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: color.withOpacity(0.3)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(icon, color: color, size: 24),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
value,
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Graphique de répartition des statuts
|
||||
Widget _buildStatusChart(BuildContext context) {
|
||||
if (statistics.totalMembres == 0) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Répartition par Statut',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
SizedBox(
|
||||
height: 200,
|
||||
child: Row(
|
||||
children: [
|
||||
// Graphique en secteurs
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: PieChart(
|
||||
PieChartData(
|
||||
sections: [
|
||||
PieChartSectionData(
|
||||
value: statistics.membresActifs.toDouble(),
|
||||
title: '${statistics.pourcentageActifs.toStringAsFixed(1)}%',
|
||||
color: Colors.green,
|
||||
radius: 60,
|
||||
titleStyle: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
if (statistics.membresInactifs > 0)
|
||||
PieChartSectionData(
|
||||
value: statistics.membresInactifs.toDouble(),
|
||||
title: '${statistics.pourcentageInactifs.toStringAsFixed(1)}%',
|
||||
color: Colors.orange,
|
||||
radius: 60,
|
||||
titleStyle: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
sectionsSpace: 2,
|
||||
centerSpaceRadius: 40,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Légende
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildLegendItem(
|
||||
'Actifs',
|
||||
statistics.membresActifs,
|
||||
Colors.green,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
if (statistics.membresInactifs > 0)
|
||||
_buildLegendItem(
|
||||
'Inactifs',
|
||||
statistics.membresInactifs,
|
||||
Colors.orange,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Item de légende
|
||||
Widget _buildLegendItem(String label, int count, Color color) {
|
||||
return Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 12,
|
||||
height: 12,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'$label ($count)',
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
/// Métriques détaillées
|
||||
Widget _buildDetailedMetrics(BuildContext context) {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Détails Démographiques',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_buildDetailRow(
|
||||
context,
|
||||
'Tranche d\'âge',
|
||||
statistics.trancheAge,
|
||||
Icons.calendar_today,
|
||||
),
|
||||
_buildDetailRow(
|
||||
context,
|
||||
'Organisations',
|
||||
'${statistics.nombreOrganisations} représentées',
|
||||
Icons.business,
|
||||
),
|
||||
_buildDetailRow(
|
||||
context,
|
||||
'Régions',
|
||||
'${statistics.nombreRegions} représentées',
|
||||
Icons.location_on,
|
||||
),
|
||||
_buildDetailRow(
|
||||
context,
|
||||
'Taux d\'activité',
|
||||
'${statistics.pourcentageActifs.toStringAsFixed(1)}%',
|
||||
Icons.trending_up,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Ligne de détail
|
||||
Widget _buildDetailRow(
|
||||
BuildContext context,
|
||||
String label,
|
||||
String value,
|
||||
IconData icon,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 20,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
label,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Informations complémentaires
|
||||
Widget _buildAdditionalInfo(BuildContext context) {
|
||||
return Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Informations Complémentaires',
|
||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
statistics.description,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: Colors.blue.withOpacity(0.3)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.lightbulb, color: Colors.blue),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Ces statistiques sont calculées en temps réel sur les résultats de votre recherche.',
|
||||
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
||||
color: Colors.blue[700],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user