-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
225 lines (207 loc) · 11.4 KB
/
Copy pathadmin.html
File metadata and controls
225 lines (207 loc) · 11.4 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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dashboard admin | StudyAlready</title>
<meta name="robots" content="noindex,nofollow" />
<link rel="icon" type="image/svg+xml" href="assets/img/logo-icon.svg" />
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = { theme: { extend: {
colors: { brand: { dark: '#0a2540', blue: '#1e3a8a', gold: '#f5b800', cream: '#fff8e7' } },
fontFamily: { sans: ['Inter', 'system-ui', 'sans-serif'], display: ['Poppins', 'sans-serif'] }
} } }
</script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap" rel="stylesheet" />
</head>
<body class="font-sans text-slate-800 bg-slate-100 antialiased min-h-screen flex flex-col">
<header class="bg-brand-dark text-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 py-4 flex items-center justify-between gap-4">
<div class="flex items-center gap-3">
<a href="index.html" class="font-display font-bold text-lg sm:text-xl">StudyAlready</a>
<span class="hidden sm:inline text-xs uppercase tracking-widest text-brand-gold">Admin</span>
</div>
<div class="flex items-center gap-4 text-sm">
<span id="adminWho" class="hidden sm:inline text-slate-300"></span>
<button id="logoutBtn" class="bg-white/10 hover:bg-white/20 rounded-lg px-3 py-1.5 transition">Déconnexion</button>
</div>
</div>
</header>
<div id="adminGate" class="flex-1 flex items-center justify-center px-4 py-12 text-slate-600">
Vérification de votre session…
</div>
<main id="adminApp" class="hidden flex-1">
<div class="max-w-7xl mx-auto px-4 sm:px-6 py-6 space-y-6">
<!-- Stats compactes -->
<section class="grid grid-cols-2 sm:grid-cols-4 gap-3">
<div class="bg-white rounded-xl border border-slate-200 p-4">
<p class="text-xs uppercase text-slate-500">Demandes (total)</p>
<p id="statTotalSubs" class="text-2xl font-display font-bold text-brand-dark mt-1">—</p>
</div>
<div class="bg-white rounded-xl border border-slate-200 p-4">
<p class="text-xs uppercase text-slate-500">Nouvelles à traiter</p>
<p id="statNewSubs" class="text-2xl font-display font-bold text-amber-600 mt-1">—</p>
</div>
<div class="bg-white rounded-xl border border-slate-200 p-4">
<p class="text-xs uppercase text-slate-500">Profils en attente</p>
<p id="statPendingProfiles" class="text-2xl font-display font-bold text-blue-600 mt-1">—</p>
</div>
<div class="bg-white rounded-xl border border-slate-200 p-4">
<p class="text-xs uppercase text-slate-500">Profils publiés</p>
<p id="statPublishedProfiles" class="text-2xl font-display font-bold text-emerald-600 mt-1">—</p>
</div>
</section>
<!-- Onglets -->
<nav class="flex flex-wrap gap-2 border-b border-slate-200">
<button data-tab="subs" class="admin-tab px-4 py-2 font-semibold text-sm border-b-2 border-brand-blue text-brand-dark">
Demandes
</button>
<button data-tab="profiles" class="admin-tab px-4 py-2 font-semibold text-sm border-b-2 border-transparent text-slate-500 hover:text-brand-dark">
Annuaire (profils)
</button>
<button data-tab="students" class="admin-tab px-4 py-2 font-semibold text-sm border-b-2 border-transparent text-slate-500 hover:text-brand-dark">
Étudiants (comptes)
</button>
</nav>
<!-- ========== TAB : Demandes (form_submissions) ========== -->
<section id="tabSubs" class="space-y-4">
<div class="bg-white rounded-xl border border-slate-200 p-4 flex flex-wrap gap-3 items-end">
<div>
<label class="block text-xs font-semibold text-slate-600 mb-1" for="filterFormType">Type de formulaire</label>
<select id="filterFormType" class="rounded-lg border border-slate-300 px-3 py-2 text-sm">
<option value="">Tous les types</option>
<option value="contact">Contact</option>
<option value="prequalification">Pré-qualification</option>
<option value="rejoindre-reseau">Réseau</option>
<option value="mise-en-relation">Mise en relation</option>
<option value="rapport-admission">Rapport admission</option>
<option value="chasseur-billet">Chasseur de billets</option>
<option value="departs-groupes">Départs groupés</option>
</select>
</div>
<div>
<label class="block text-xs font-semibold text-slate-600 mb-1" for="filterStatus">Statut</label>
<select id="filterStatus" class="rounded-lg border border-slate-300 px-3 py-2 text-sm">
<option value="">Tous les statuts</option>
<option value="new">À traiter</option>
<option value="in_progress">En cours</option>
<option value="processed">Traité</option>
<option value="archived">Archivé</option>
</select>
</div>
<div class="flex-1 min-w-[180px]">
<label class="block text-xs font-semibold text-slate-600 mb-1" for="filterSearch">Recherche (nom, email)</label>
<input id="filterSearch" type="search" placeholder="Ex. Mballa, gmail…"
class="w-full rounded-lg border border-slate-300 px-3 py-2 text-sm" />
</div>
<button id="refreshSubs" class="bg-brand-dark hover:bg-brand-blue text-white text-sm font-semibold rounded-lg px-4 py-2 transition">
Actualiser
</button>
</div>
<div class="bg-white rounded-xl border border-slate-200 overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full text-sm">
<thead class="bg-slate-50 text-slate-500 uppercase text-xs">
<tr>
<th class="px-3 py-2 text-left">Reçu</th>
<th class="px-3 py-2 text-left">Type</th>
<th class="px-3 py-2 text-left">Nom</th>
<th class="px-3 py-2 text-left">Email</th>
<th class="px-3 py-2 text-left">WhatsApp</th>
<th class="px-3 py-2 text-left">Statut</th>
<th class="px-3 py-2 text-right">Action</th>
</tr>
</thead>
<tbody id="subsTbody">
<tr><td colspan="7" class="px-3 py-6 text-center text-slate-500">Chargement…</td></tr>
</tbody>
</table>
</div>
</div>
</section>
<!-- ========== TAB : Étudiants (comptes) ========== -->
<section id="tabStudents" class="hidden space-y-4">
<div class="bg-white rounded-xl border border-slate-200 p-4 flex flex-wrap gap-3 items-end">
<div class="flex-1 min-w-[180px]">
<label class="block text-xs font-semibold text-slate-600 mb-1" for="filterStudentSearch">Recherche (nom, email)</label>
<input id="filterStudentSearch" type="search" placeholder="Ex. marie@gmail.com…"
class="w-full rounded-lg border border-slate-300 px-3 py-2 text-sm" />
</div>
<button id="refreshStudents" class="bg-brand-dark hover:bg-brand-blue text-white text-sm font-semibold rounded-lg px-4 py-2 transition">
Actualiser
</button>
</div>
<div class="bg-white rounded-xl border border-slate-200 overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full text-sm">
<thead class="bg-slate-50 text-slate-500 uppercase text-xs">
<tr>
<th class="px-3 py-2 text-left">Inscrit</th>
<th class="px-3 py-2 text-left">Nom</th>
<th class="px-3 py-2 text-left">Email</th>
<th class="px-3 py-2 text-left">Dossier</th>
<th class="px-3 py-2 text-left">Progression</th>
<th class="px-3 py-2 text-right">Action</th>
</tr>
</thead>
<tbody id="studentsTbody">
<tr><td colspan="6" class="px-3 py-6 text-center text-slate-500">Chargement…</td></tr>
</tbody>
</table>
</div>
</div>
</section>
<!-- ========== TAB : Profils annuaire ========== -->
<section id="tabProfiles" class="hidden space-y-4">
<div class="bg-white rounded-xl border border-slate-200 p-4 flex flex-wrap gap-3 items-end">
<div>
<label class="block text-xs font-semibold text-slate-600 mb-1" for="filterProfileStatus">Statut</label>
<select id="filterProfileStatus" class="rounded-lg border border-slate-300 px-3 py-2 text-sm">
<option value="">Tous</option>
<option value="pending" selected>En attente de validation</option>
<option value="published">Publiés</option>
<option value="rejected">Rejetés</option>
</select>
</div>
<div class="flex-1 min-w-[180px]">
<label class="block text-xs font-semibold text-slate-600 mb-1" for="filterProfileSearch">Recherche (nom, université, ville)</label>
<input id="filterProfileSearch" type="search" placeholder="Ex. ULB, Mons, Mballa…"
class="w-full rounded-lg border border-slate-300 px-3 py-2 text-sm" />
</div>
<button id="refreshProfiles" class="bg-brand-dark hover:bg-brand-blue text-white text-sm font-semibold rounded-lg px-4 py-2 transition">
Actualiser
</button>
</div>
<div id="profilesGrid" class="grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
<p class="col-span-full text-center text-slate-500 py-6">Chargement…</p>
</div>
</section>
</div>
</main>
<!-- Modal détail demande -->
<div id="subModal" class="hidden fixed inset-0 z-50 bg-black/50 flex items-center justify-center px-4 py-6">
<div class="bg-white rounded-2xl shadow-2xl max-w-2xl w-full max-h-[90vh] overflow-auto">
<div class="flex items-center justify-between border-b border-slate-200 px-5 py-3">
<h3 class="font-display font-bold text-brand-dark">Détail de la demande</h3>
<button id="subModalClose" class="text-slate-400 hover:text-slate-700 text-xl">×</button>
</div>
<div id="subModalBody" class="p-5 space-y-3 text-sm"></div>
<div id="subModalActions" class="border-t border-slate-200 px-5 py-3 flex flex-wrap gap-2 justify-end"></div>
</div>
</div>
<!-- Modal gestion étudiant -->
<div id="studentModal" class="hidden fixed inset-0 z-50 bg-black/50 flex items-center justify-center px-4 py-6">
<div class="bg-white rounded-2xl shadow-2xl max-w-3xl w-full max-h-[92vh] overflow-auto">
<div class="flex items-center justify-between border-b border-slate-200 px-5 py-3 sticky top-0 bg-white">
<h3 class="font-display font-bold text-brand-dark" id="studentModalTitle">Dossier étudiant</h3>
<button id="studentModalClose" class="text-slate-400 hover:text-slate-700 text-xl">×</button>
</div>
<div id="studentModalBody" class="p-5 space-y-5 text-sm"></div>
</div>
</div>
<script src="assets/js/config.js?v=20260515b"></script>
<script src="/assets/js/vendor/supabase-umd-2.49.4.min.js"></script>
<script src="assets/js/admin.js?v=20260515b"></script>
</body>
</html>