Cezarxil commited on
Commit
22be17d
·
verified ·
1 Parent(s): 7b627e0

Modify it that there are no clients put, and I can delete the existing ones - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +459 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Awesome App
3
- emoji: 💻
4
- colorFrom: yellow
5
- colorTo: red
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: awesome-app
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,459 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Epiliz Estetique - Client Management</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ /* Custom scrollbar */
11
+ ::-webkit-scrollbar {
12
+ width: 8px;
13
+ }
14
+ ::-webkit-scrollbar-track {
15
+ background: #f1f1f1;
16
+ }
17
+ ::-webkit-scrollbar-thumb {
18
+ background: #d1d5db;
19
+ border-radius: 4px;
20
+ }
21
+ ::-webkit-scrollbar-thumb:hover {
22
+ background: #9ca3af;
23
+ }
24
+
25
+ /* Animation for notifications */
26
+ @keyframes fadeIn {
27
+ from { opacity: 0; transform: translateY(10px); }
28
+ to { opacity: 1; transform: translateY(0); }
29
+ }
30
+
31
+ .fade-in {
32
+ animation: fadeIn 0.3s ease-out forwards;
33
+ }
34
+
35
+ /* Custom datepicker styling */
36
+ .flatpickr-calendar {
37
+ font-family: 'Inter', sans-serif !important;
38
+ box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
39
+ border-radius: 12px !important;
40
+ }
41
+ </style>
42
+ </head>
43
+ <body class="bg-gray-50 font-sans">
44
+ <div class="min-h-screen flex flex-col">
45
+ <!-- Header -->
46
+ <header class="bg-purple-700 text-white shadow-md">
47
+ <div class="container mx-auto px-4 py-4 flex justify-between items-center">
48
+ <div class="flex items-center space-x-2">
49
+ <i class="fas fa-spa text-2xl"></i>
50
+ <h1 class="text-xl font-bold">Epiliz Estetique</h1>
51
+ </div>
52
+ <div class="flex items-center space-x-4">
53
+ <button id="theme-toggle" class="p-2 rounded-full hover:bg-purple-600 transition">
54
+ <i class="fas fa-moon"></i>
55
+ </button>
56
+ <div class="relative">
57
+ <button id="notif-btn" class="p-2 rounded-full hover:bg-purple-600 transition relative">
58
+ <i class="fas fa-bell"></i>
59
+ <span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
60
+ </button>
61
+ <div id="notif-dropdown" class="hidden absolute right-0 mt-2 w-64 bg-white rounded-md shadow-lg py-1 z-50 border border-gray-200">
62
+ <div class="px-4 py-2 text-sm text-gray-700 border-b">New client added</div>
63
+ <div class="px-4 py-2 text-sm text-gray-700 border-b">Reminder sent to 3 clients</div>
64
+ <div class="px-4 py-2 text-sm text-gray-700">Tomorrow: 5 appointments</div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </header>
70
+
71
+ <!-- Main Content -->
72
+ <main class="flex-grow container mx-auto px-4 py-6">
73
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
74
+ <!-- Client List Section -->
75
+ <div class="lg:col-span-2 bg-white rounded-xl shadow-sm p-6">
76
+ <div class="flex justify-between items-center mb-6">
77
+ <h2 class="text-xl font-semibold text-gray-800">Client List</h2>
78
+ <button id="add-client-btn" class="bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded-lg flex items-center space-x-2 transition">
79
+ <i class="fas fa-plus"></i>
80
+ <span>Add Client</span>
81
+ </button>
82
+ </div>
83
+
84
+ <!-- Search and Filter -->
85
+ <div class="mb-6 flex flex-col sm:flex-row gap-3">
86
+ <div class="relative flex-grow">
87
+ <input type="text" placeholder="Search clients..." class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
88
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
89
+ </div>
90
+ <select class="border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
91
+ <option>All Clients</option>
92
+ <option>New Clients</option>
93
+ <option>Regular Clients</option>
94
+ </select>
95
+ </div>
96
+
97
+ <!-- Client Table -->
98
+ <div class="overflow-x-auto">
99
+ <table class="min-w-full divide-y divide-gray-200">
100
+ <thead class="bg-gray-50">
101
+ <tr>
102
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
103
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Phone</th>
104
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Last Visit</th>
105
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Next Appointment</th>
106
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
107
+ </tr>
108
+ </thead>
109
+ <tbody class="bg-white divide-y divide-gray-200" id="client-table-body">
110
+ <!-- Client rows will be added here dynamically -->
111
+ </tbody>
112
+ </table>
113
+ </div>
114
+
115
+ <!-- Pagination -->
116
+ <div class="mt-6 flex justify-between items-center">
117
+ <div class="text-sm text-gray-600">
118
+ Showing <span class="font-medium">0</span> to <span class="font-medium">0</span> of <span class="font-medium">0</span> clients
119
+ </div>
120
+ <div class="flex space-x-1">
121
+ <button class="px-3 py-1 border rounded-md text-gray-700 bg-gray-50 hover:bg-gray-100 transition">Previous</button>
122
+ <button class="px-3 py-1 border rounded-md bg-purple-600 text-white">1</button>
123
+ <button class="px-3 py-1 border rounded-md text-gray-700 bg-gray-50 hover:bg-gray-100 transition">2</button>
124
+ <button class="px-3 py-1 border rounded-md text-gray-700 bg-gray-50 hover:bg-gray-100 transition">3</button>
125
+ <button class="px-3 py-1 border rounded-md text-gray-700 bg-gray-50 hover:bg-gray-100 transition">Next</button>
126
+ </div>
127
+ </div>
128
+ </div>
129
+
130
+ <!-- Appointment & Reminder Section -->
131
+ <div class="space-y-6">
132
+ <!-- Calendar Section -->
133
+ <div class="bg-white rounded-xl shadow-sm p-6">
134
+ <h2 class="text-xl font-semibold text-gray-800 mb-4">Schedule Appointment</h2>
135
+
136
+ <div class="mb-4">
137
+ <label class="block text-sm font-medium text-gray-700 mb-1">Select Client</label>
138
+ <select id="client-select" class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
139
+ <option value="">Select a client</option>
140
+ <option value="1">Sarah Johnson</option>
141
+ <option value="2">Michael Brown</option>
142
+ <option value="3">Emily Davis</option>
143
+ </select>
144
+ </div>
145
+
146
+ <div class="mb-4">
147
+ <label class="block text-sm font-medium text-gray-700 mb-1">Select Service</label>
148
+ <select class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
149
+ <option>Full Leg Waxing</option>
150
+ <option>Underarm Waxing</option>
151
+ <option>Bikini Waxing</option>
152
+ <option>Facial Waxing</option>
153
+ <option>Laser Hair Removal</option>
154
+ </select>
155
+ </div>
156
+
157
+ <div class="mb-4">
158
+ <label class="block text-sm font-medium text-gray-700 mb-1">Date & Time</label>
159
+ <div class="relative">
160
+ <input type="text" id="datetime-input" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition" placeholder="Select date and time">
161
+ <i class="fas fa-calendar-alt absolute left-3 top-3 text-gray-400"></i>
162
+ </div>
163
+ </div>
164
+
165
+ <button id="schedule-btn" class="w-full bg-purple-600 hover:bg-purple-700 text-white px-4 py-2 rounded-lg transition">
166
+ Schedule Appointment
167
+ </button>
168
+ </div>
169
+
170
+ <!-- Reminder Section -->
171
+ <div class="bg-white rounded-xl shadow-sm p-6">
172
+ <h2 class="text-xl font-semibold text-gray-800 mb-4">Send Reminders</h2>
173
+
174
+ <div class="mb-4">
175
+ <label class="block text-sm font-medium text-gray-700 mb-1">Clients with appointments tomorrow</label>
176
+ <div class="border border-gray-200 rounded-lg p-3 max-h-48 overflow-y-auto">
177
+ <div class="flex items-center justify-between py-2 border-b">
178
+ <div>
179
+ <p class="font-medium">Sarah Johnson</p>
180
+ <p class="text-sm text-gray-500">10:30 AM - Full Leg Waxing</p>
181
+ </div>
182
+ <label class="inline-flex items-center">
183
+ <input type="checkbox" class="rounded text-purple-600 focus:ring-purple-500" checked>
184
+ </label>
185
+ </div>
186
+ <div class="flex items-center justify-between py-2 border-b">
187
+ <div>
188
+ <p class="font-medium">Michael Brown</p>
189
+ <p class="text-sm text-gray-500">2:15 PM - Underarm Waxing</p>
190
+ </div>
191
+ <label class="inline-flex items-center">
192
+ <input type="checkbox" class="rounded text-purple-600 focus:ring-purple-500" checked>
193
+ </label>
194
+ </div>
195
+ <div class="flex items-center justify-between py-2">
196
+ <div>
197
+ <p class="font-medium">Emily Davis</p>
198
+ <p class="text-sm text-gray-500">4:45 PM - Facial Waxing</p>
199
+ </div>
200
+ <label class="inline-flex items-center">
201
+ <input type="checkbox" class="rounded text-purple-600 focus:ring-purple-500" checked>
202
+ </label>
203
+ </div>
204
+ </div>
205
+ </div>
206
+
207
+ <div class="mb-4">
208
+ <label class="block text-sm font-medium text-gray-700 mb-1">Reminder Message</label>
209
+ <textarea class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition" rows="3">Hi [Name], this is a reminder for your appointment at Epiliz Estetique tomorrow at [Time]. Please arrive 10 minutes early. See you soon!</textarea>
210
+ </div>
211
+
212
+ <button id="send-reminders-btn" class="w-full bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-lg transition flex items-center justify-center space-x-2">
213
+ <i class="fas fa-paper-plane"></i>
214
+ <span>Send Reminders</span>
215
+ </button>
216
+ </div>
217
+ </div>
218
+ </div>
219
+ </main>
220
+
221
+ <!-- Footer -->
222
+ <footer class="bg-gray-100 border-t border-gray-200 py-4">
223
+ <div class="container mx-auto px-4 text-center text-gray-600 text-sm">
224
+ <p>© 2023 Epiliz Estetique. All rights reserved.</p>
225
+ <div class="mt-2 flex justify-center space-x-4">
226
+ <a href="#" class="hover:text-purple-600 transition">Privacy Policy</a>
227
+ <a href="#" class="hover:text-purple-600 transition">Terms of Service</a>
228
+ <a href="#" class="hover:text-purple-600 transition">Contact Us</a>
229
+ </div>
230
+ </div>
231
+ </footer>
232
+ </div>
233
+
234
+ <!-- Add Client Modal -->
235
+ <div id="add-client-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
236
+ <div class="bg-white rounded-xl shadow-lg w-full max-w-md mx-4">
237
+ <div class="p-6">
238
+ <div class="flex justify-between items-center mb-4">
239
+ <h3 class="text-lg font-semibold text-gray-800">Add New Client</h3>
240
+ <button id="close-modal-btn" class="text-gray-500 hover:text-gray-700">
241
+ <i class="fas fa-times"></i>
242
+ </button>
243
+ </div>
244
+
245
+ <form id="add-client-form">
246
+ <div class="mb-4">
247
+ <label class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
248
+ <input type="text" required class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
249
+ </div>
250
+
251
+ <div class="mb-4">
252
+ <label class="block text-sm font-medium text-gray-700 mb-1">Phone Number</label>
253
+ <input type="tel" required class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
254
+ </div>
255
+
256
+ <div class="mb-4">
257
+ <label class="block text-sm font-medium text-gray-700 mb-1">Email (Optional)</label>
258
+ <input type="email" class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition">
259
+ </div>
260
+
261
+ <div class="mb-4">
262
+ <label class="block text-sm font-medium text-gray-700 mb-1">Notes</label>
263
+ <textarea class="w-full border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-purple-500 focus:border-purple-500 outline-none transition" rows="2"></textarea>
264
+ </div>
265
+
266
+ <div class="flex justify-end space-x-3">
267
+ <button type="button" id="cancel-add-btn" class="px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition">Cancel</button>
268
+ <button type="submit" class="px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition">Save Client</button>
269
+ </div>
270
+ </form>
271
+ </div>
272
+ </div>
273
+ </div>
274
+
275
+ <!-- Notification Toast -->
276
+ <div id="toast-notification" class="fixed bottom-4 right-4 bg-green-600 text-white px-6 py-3 rounded-lg shadow-lg hidden items-center space-x-3 fade-in">
277
+ <i class="fas fa-check-circle text-xl"></i>
278
+ <span id="toast-message">Reminders sent successfully!</span>
279
+ </div>
280
+
281
+ <!-- Scripts -->
282
+ <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
283
+ <script>
284
+ // Client data - starts empty
285
+ const clients = [];
286
+
287
+ // Initialize datepicker
288
+ flatpickr("#datetime-input", {
289
+ enableTime: true,
290
+ dateFormat: "Y-m-d H:i",
291
+ minDate: "today",
292
+ time_24hr: false,
293
+ minuteIncrement: 15,
294
+ defaultHour: 10,
295
+ defaultMinute: 0
296
+ });
297
+
298
+ // Populate client table
299
+ function populateClientTable() {
300
+ const tableBody = document.getElementById('client-table-body');
301
+ tableBody.innerHTML = '';
302
+
303
+ clients.forEach(client => {
304
+ const row = document.createElement('tr');
305
+ row.className = 'hover:bg-gray-50';
306
+ row.innerHTML = `
307
+ <td class="px-6 py-4 whitespace-nowrap">
308
+ <div class="flex items-center">
309
+ <div class="flex-shrink-0 h-10 w-10 rounded-full bg-purple-100 flex items-center justify-center">
310
+ <span class="text-purple-600 font-medium">${client.name.charAt(0)}</span>
311
+ </div>
312
+ <div class="ml-4">
313
+ <div class="text-sm font-medium text-gray-900">${client.name}</div>
314
+ </div>
315
+ </div>
316
+ </td>
317
+ <td class="px-6 py-4 whitespace-nowrap">
318
+ <div class="text-sm text-gray-900">${client.phone}</div>
319
+ </td>
320
+ <td class="px-6 py-4 whitespace-nowrap">
321
+ <div class="text-sm text-gray-900">${formatDate(client.lastVisit)}</div>
322
+ </td>
323
+ <td class="px-6 py-4 whitespace-nowrap">
324
+ <div class="text-sm text-gray-900">${formatDateTime(client.nextAppointment)}</div>
325
+ </td>
326
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
327
+ <button class="text-purple-600 hover:text-purple-900 mr-3"><i class="fas fa-edit"></i></button>
328
+ <button class="text-red-600 hover:text-red-900" onclick="deleteClient(${client.id})"><i class="fas fa-trash-alt"></i></button>
329
+ </td>
330
+ `;
331
+ tableBody.appendChild(row);
332
+ });
333
+ }
334
+
335
+ // Format date for display
336
+ function formatDate(dateString) {
337
+ const options = { year: 'numeric', month: 'short', day: 'numeric' };
338
+ return new Date(dateString).toLocaleDateString(undefined, options);
339
+ }
340
+
341
+ // Format datetime for display
342
+ function formatDateTime(datetimeString) {
343
+ const date = new Date(datetimeString);
344
+ return `${date.toLocaleDateString()} at ${date.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}`;
345
+ }
346
+
347
+ // Toggle notification dropdown
348
+ document.getElementById('notif-btn').addEventListener('click', function() {
349
+ document.getElementById('notif-dropdown').classList.toggle('hidden');
350
+ });
351
+
352
+ // Close notification dropdown when clicking outside
353
+ document.addEventListener('click', function(event) {
354
+ if (!event.target.closest('#notif-btn') && !event.target.closest('#notif-dropdown')) {
355
+ document.getElementById('notif-dropdown').classList.add('hidden');
356
+ }
357
+ });
358
+
359
+ // Show add client modal
360
+ document.getElementById('add-client-btn').addEventListener('click', function() {
361
+ document.getElementById('add-client-modal').classList.remove('hidden');
362
+ });
363
+
364
+ // Close add client modal
365
+ document.getElementById('close-modal-btn').addEventListener('click', function() {
366
+ document.getElementById('add-client-modal').classList.add('hidden');
367
+ });
368
+
369
+ document.getElementById('cancel-add-btn').addEventListener('click', function() {
370
+ document.getElementById('add-client-modal').classList.add('hidden');
371
+ });
372
+
373
+ // Schedule appointment button
374
+ document.getElementById('schedule-btn').addEventListener('click', function() {
375
+ const clientSelect = document.getElementById('client-select');
376
+ const datetimeInput = document.getElementById('datetime-input');
377
+
378
+ if (!clientSelect.value) {
379
+ alert('Please select a client');
380
+ return;
381
+ }
382
+
383
+ if (!datetimeInput.value) {
384
+ alert('Please select a date and time');
385
+ return;
386
+ }
387
+
388
+ // In a real app, you would save this to your database
389
+ showToast('Appointment scheduled successfully!');
390
+ });
391
+
392
+ // Send reminders button
393
+ document.getElementById('send-reminders-btn').addEventListener('click', function() {
394
+ // In a real app, you would send SMS/email reminders here
395
+ showToast('Reminders sent to 3 clients');
396
+ });
397
+
398
+ // Show toast notification
399
+ function showToast(message) {
400
+ const toast = document.getElementById('toast-notification');
401
+ document.getElementById('toast-message').textContent = message;
402
+ toast.classList.remove('hidden');
403
+
404
+ setTimeout(() => {
405
+ toast.classList.add('hidden');
406
+ }, 3000);
407
+ }
408
+
409
+ // Theme toggle (light/dark mode)
410
+ document.getElementById('theme-toggle').addEventListener('click', function() {
411
+ const icon = this.querySelector('i');
412
+
413
+ if (document.documentElement.classList.contains('dark')) {
414
+ document.documentElement.classList.remove('dark');
415
+ icon.classList.remove('fa-sun');
416
+ icon.classList.add('fa-moon');
417
+ } else {
418
+ document.documentElement.classList.add('dark');
419
+ icon.classList.remove('fa-moon');
420
+ icon.classList.add('fa-sun');
421
+ }
422
+ });
423
+
424
+ // Delete client function
425
+ function deleteClient(clientId) {
426
+ const index = clients.findIndex(client => client.id === clientId);
427
+ if (index !== -1) {
428
+ clients.splice(index, 1);
429
+ populateClientTable();
430
+ showToast('Client deleted successfully');
431
+ }
432
+ }
433
+
434
+ // Initialize the app
435
+ document.addEventListener('DOMContentLoaded', function() {
436
+ populateClientTable();
437
+
438
+ // For PWA functionality (installable on Android/iOS)
439
+ if ('serviceWorker' in navigator) {
440
+ window.addEventListener('load', () => {
441
+ navigator.serviceWorker.register('/sw.js').then(registration => {
442
+ console.log('ServiceWorker registration successful');
443
+ }).catch(err => {
444
+ console.log('ServiceWorker registration failed: ', err);
445
+ });
446
+ });
447
+ }
448
+
449
+ // Show install prompt for PWA
450
+ let deferredPrompt;
451
+ window.addEventListener('beforeinstallprompt', (e) => {
452
+ e.preventDefault();
453
+ deferredPrompt = e;
454
+ // You can show a custom "Install App" button here
455
+ });
456
+ });
457
+ </script>
458
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Cezarxil/awesome-app" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
459
+ </html>