-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmembres.html
More file actions
383 lines (348 loc) · 21.3 KB
/
Copy pathmembres.html
File metadata and controls
383 lines (348 loc) · 21.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Membres - Amicale Universitaire</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Source+Sans+Pro:wght@300;400;600&display=swap" rel="stylesheet">
<style>
body { font-family: 'Source Sans Pro', sans-serif; }
h1, h2, h3, h4, h5, h6 { font-family: 'Inter', sans-serif; }
.card-shadow { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); }
.member-card { transition: transform 0.3s ease; }
.member-card:hover { transform: translateY(-2px); }
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<!-- Navigation -->
<nav class="bg-white shadow-lg">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<img src="resources/logo-amicale.png" alt="Logo Amicale" class="h-8 w-auto">
<span class="ml-3 text-xl font-bold text-blue-900">Amicale Universitaire</span>
</div>
</div>
<div class="flex items-center space-x-8">
<a href="index.html" class="text-gray-600 hover:text-blue-900 transition-colors">Tableau de Bord</a>
<a href="transactions.html" class="text-gray-600 hover:text-blue-900 transition-colors">Transactions</a>
<a href="membres.html" class="text-blue-900 font-semibold border-b-2 border-blue-900 pb-1">Membres</a>
<a href="demandes.html" class="text-gray-600 hover:text-blue-900 transition-colors">Demandes</a>
<a href="rapports.html" class="text-gray-600 hover:text-blue-900 transition-colors">Rapports</a>
<a href="administration.html" class="text-gray-600 hover:text-blue-900 transition-colors">Administration</a>
<a href="parametres.html" class="text-gray-600 hover:text-blue-900 transition-colors">Paramètres</a>
</div>
</div>
</div>
</nav>
<!-- Header -->
<div class="bg-white border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="flex justify-between items-center">
<div>
<h1 class="text-3xl font-bold text-gray-900">Gestion des Membres</h1>
<p class="mt-2 text-gray-600">Gérez la base de données des membres et suivez leurs cotisations</p>
</div>
<button onclick="ouvrirModalAjoutMembre()" class="bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition-colors">
<svg class="w-5 h-5 inline-block mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
</svg>
Nouveau Membre
</button>
</div>
</div>
</div>
<!-- Statistiques -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
<div class="grid grid-cols-1 md:grid-cols-4 gap-6">
<div class="bg-white rounded-lg card-shadow p-6">
<div class="flex items-center">
<div class="flex-shrink-0">
<div class="w-8 h-8 bg-blue-100 rounded-md flex items-center justify-center">
<svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
</svg>
</div>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Total Membres</dt>
<dd class="text-2xl font-bold text-gray-900" id="totalMembres">0</dd>
</dl>
</div>
</div>
</div>
<div class="bg-white rounded-lg card-shadow p-6">
<div class="flex items-center">
<div class="flex-shrink-0">
<div class="w-8 h-8 bg-green-100 rounded-md flex items-center justify-center">
<svg class="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
</div>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Membres Actifs</dt>
<dd class="text-2xl font-bold text-gray-900" id="membresActifsStat">0</dd>
</dl>
</div>
</div>
</div>
<div class="bg-white rounded-lg card-shadow p-6">
<div class="flex items-center">
<div class="flex-shrink-0">
<div class="w-8 h-8 bg-red-100 rounded-md flex items-center justify-center">
<svg class="w-5 h-5 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path>
</svg>
</div>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Retards de Cotisation</dt>
<dd class="text-2xl font-bold text-gray-900" id="retardsCotisationStat">0</dd>
</dl>
</div>
</div>
</div>
<div class="bg-white rounded-lg card-shadow p-6">
<div class="flex items-center">
<div class="flex-shrink-0">
<div class="w-8 h-8 bg-purple-100 rounded-md flex items-center justify-center">
<svg class="w-5 h-5 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1"></path>
</svg>
</div>
</div>
<div class="ml-5 w-0 flex-1">
<dl>
<dt class="text-sm font-medium text-gray-500 truncate">Cotisations Mensuelles</dt>
<dd class="text-2xl font-bold text-gray-900" id="cotisationsMensuelles">€0.00</dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<!-- Tableau des membres -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-12">
<div class="bg-white rounded-lg card-shadow">
<div class="px-6 py-4 border-b border-gray-200">
<h3 class="text-lg font-semibold text-gray-900">Liste des Membres</h3>
<p class="text-sm text-gray-500">Tous les membres de l'association</p>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200" id="tableauMembres">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Téléphone</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date d'inscription</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Statut</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Dernière cotisation</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<!-- Les données seront injectées par JavaScript -->
</tbody>
</table>
</div>
</div>
</div>
<!-- Modal Détails Membre -->
<div id="modalMembre" class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full hidden">
<div class="relative top-20 mx-auto p-5 border w-11/12 md:w-3/4 lg:w-1/2 shadow-lg rounded-md bg-white">
<div class="mt-3">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-900" id="modalMembreNom">Détails du Membre</h3>
<button onclick="gestionFinanciere.fermerModalMembre()" class="text-gray-400 hover:text-gray-600">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<div class="space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700">Email</label>
<p class="mt-1 text-sm text-gray-900" id="modalMembreEmail">-</p>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Téléphone</label>
<p class="mt-1 text-sm text-gray-900" id="modalMembreTelephone">-</p>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700">Date d'inscription</label>
<p class="mt-1 text-sm text-gray-900" id="modalMembreInscription">-</p>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Statut</label>
<p class="mt-1">
<span class="inline-flex px-2 py-1 text-xs font-semibold rounded-full" id="modalMembreStatutBadge">
<span id="modalMembreStatut">-</span>
</span>
</p>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Dernière cotisation</label>
<p class="mt-1 text-sm text-gray-900" id="modalMembreCotisation">-</p>
</div>
<div class="border-t pt-4">
<h4 class="text-sm font-medium text-gray-700 mb-2">Actions</h4>
<div class="flex space-x-3">
<button onclick="envoyerRappel()" class="text-blue-600 hover:text-blue-800 text-sm font-medium transition-colors">
Envoyer un rappel
</button>
<button onclick="modifierMembre()" class="text-green-600 hover:text-green-800 text-sm font-medium transition-colors">
Modifier les informations
</button>
<button onclick="supprimerMembre()" class="text-red-600 hover:text-red-800 text-sm font-medium transition-colors">
Supprimer le membre
</button>
</div>
</div>
</div>
<div class="flex justify-end pt-4">
<button onclick="gestionFinanciere.fermerModalMembre()" class="px-4 py-2 text-gray-600 bg-gray-100 hover:bg-gray-200 rounded-md transition-colors">
Fermer
</button>
</div>
</div>
</div>
</div>
<!-- Modal Ajout Membre -->
<div id="modalAjoutMembre" class="fixed inset-0 bg-gray-600 bg-opacity-50 overflow-y-auto h-full w-full hidden">
<div class="relative top-20 mx-auto p-5 border w-11/12 md:w-3/4 lg:w-1/2 shadow-lg rounded-md bg-white">
<div class="mt-3">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-900">Nouveau Membre</h3>
<button onclick="fermerModalAjoutMembre()" class="text-gray-400 hover:text-gray-600">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>
<form id="formAjoutMembre" class="space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label for="nouveauNom" class="block text-sm font-medium text-gray-700 mb-2">Nom</label>
<input type="text" id="nouveauNom" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label for="nouveauPrenom" class="block text-sm font-medium text-gray-700 mb-2">Prénom</label>
<input type="text" id="nouveauPrenom" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
</div>
<div>
<label for="nouvelEmail" class="block text-sm font-medium text-gray-700 mb-2">Email</label>
<input type="email" id="nouvelEmail" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label for="nouveauTelephone" class="block text-sm font-medium text-gray-700 mb-2">Téléphone</label>
<input type="tel" id="nouveauTelephone" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div>
<label for="nouvelleDateInscription" class="block text-sm font-medium text-gray-700 mb-2">Date d'inscription</label>
<input type="date" id="nouvelleDateInscription" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500" required>
</div>
<div class="flex justify-end space-x-3 pt-4">
<button type="button" onclick="fermerModalAjoutMembre()" class="px-4 py-2 text-gray-600 bg-gray-100 hover:bg-gray-200 rounded-md transition-colors">
Annuler
</button>
<button type="submit" class="px-4 py-2 text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors">
Ajouter le membre
</button>
</div>
</form>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-white border-t border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="text-center">
<p class="text-gray-500 text-sm">© 2024 Amicale Universitaire. Tous droits réservés.</p>
<p class="text-gray-400 text-xs mt-2">Système de gestion financière développé pour les associations étudiantes</p>
</div>
</div>
</footer>
<script src="main.js"></script>
<script>
let membreCourant = null;
// Calculer les statistiques des membres
function calculerStatistiquesMembres() {
const membres = gestionFinanciere.mockData.membres;
const totalMembres = membres.length;
const membresActifs = membres.filter(m => m.statut === 'actif').length;
const retardsCotisation = membres.filter(m => m.statut === 'retard').length;
const cotisationsMensuelles = membres.filter(m => m.statut === 'actif').length * 25;
document.getElementById('totalMembres').textContent = totalMembres;
document.getElementById('membresActifsStat').textContent = membresActifs;
document.getElementById('retardsCotisationStat').textContent = retardsCotisation;
document.getElementById('cotisationsMensuelles').textContent = gestionFinanciere.formatMontant(cotisationsMensuelles);
}
// Gestion des modaux
function ouvrirModalAjoutMembre() {
document.getElementById('modalAjoutMembre').classList.remove('hidden');
// Définir la date du jour par défaut
document.getElementById('nouvelleDateInscription').value = new Date().toISOString().split('T')[0];
}
function fermerModalAjoutMembre() {
document.getElementById('modalAjoutMembre').classList.add('hidden');
document.getElementById('formAjoutMembre').reset();
}
// Actions sur les membres
function envoyerRappel() {
alert('Rappel envoyé avec succès !');
}
function modifierMembre() {
alert('Fonctionnalité de modification en cours de développement.');
}
function supprimerMembre() {
if (confirm('Êtes-vous sûr de vouloir supprimer ce membre ?')) {
alert('Membre supprimé avec succès !');
gestionFinanciere.fermerModalMembre();
}
}
// Gestion de l'ajout de membre
document.getElementById('formAjoutMembre').addEventListener('submit', function(e) {
e.preventDefault();
const nouveauMembre = {
id: gestionFinanciere.mockData.membres.length + 1,
nom: document.getElementById('nouveauNom').value,
prenom: document.getElementById('nouveauPrenom').value,
email: document.getElementById('nouvelEmail').value,
telephone: document.getElementById('nouveauTelephone').value,
dateInscription: document.getElementById('nouvelleDateInscription').value,
cotisation: 25,
derniereCotisation: document.getElementById('nouvelleDateInscription').value,
statut: 'actif'
};
// Ajouter à la base de données
gestionFinanciere.mockData.membres.push(nouveauMembre);
// Recharger l'affichage
gestionFinanciere.afficherMembres(gestionFinanciere.mockData.membres, 'tableauMembres');
calculerStatistiquesMembres();
// Fermer le modal
fermerModalAjoutMembre();
// Afficher un message de succès
alert('Membre ajouté avec succès !');
});
// Initialisation
document.addEventListener('DOMContentLoaded', function() {
calculerStatistiquesMembres();
// Afficher tous les membres initialement
gestionFinanciere.afficherMembres(gestionFinanciere.mockData.membres, 'tableauMembres');
});
</script>
</body>
</html>