diff --git a/frontend/src/routes/admin/+page.svelte b/frontend/src/routes/admin/+page.svelte index 3d0fc25..8f82bc5 100644 --- a/frontend/src/routes/admin/+page.svelte +++ b/frontend/src/routes/admin/+page.svelte @@ -44,6 +44,7 @@ fd.append('file', file); try { + // Note: API call is mocked here, replace with your actual endpoint // Mock success/fail await new Promise((r) => setTimeout(r, 500)); // Simulate network delay if (file.name.toLowerCase().includes('fail')) { @@ -142,7 +143,6 @@ let editingException = $state(null); let editingExceptionIndex = $state(null); let showExceptionModal = $state(false); - let showUploadModal = $state(false); // Kept in case you want to toggle visibility const dayNames = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']; @@ -463,34 +463,34 @@ + Working Hours - - View default hours for each weekday, and manage exceptions. - + View and manage your standard weekly schedule.
-

Default Hours

+

Weekly Schedule

-
+
- + + - {#each defaultHours as row, i} + {#each defaultHours as row} - + - - {/each}
DayStatus StartStatusStart End
{weekdayLabel(row.weekday)}{weekdayLabel(row.weekday)} - + + {row.is_open ? row.start_time : '—'} - + + {row.is_open ? row.end_time : '—'}
- + + + + + + Exception Groups + + Manage temporary schedules for holidays, closures, and special events. + + + +
-
-

Exception Groups

-

Temporary schedules such as 'Christmas' or 'Holiday'

-
@@ -572,66 +569,67 @@ - Users & Bookings - - Search users or bookings. Click an item to view details and history. - + Users + Search and manage user details. - -
-
- -
- { - if ((e as KeyboardEvent).key === 'Enter') searchUsers(); - }} - /> - -
- -
- {#each users as u} -
-
-
{u.fn || `${u.n_first_name} ${u.n_last_name}`}
-
{u.email} • {u.phone}
-
- -
- {/each} -
+
+
+ { + if ((e as KeyboardEvent).key === 'Enter') searchUsers(); + }} + /> +
-
- -
- { - if ((e as KeyboardEvent).key === 'Enter') searchBookings(); - }} - /> - -
- -
- {#each bookings as b} -
-
-
{new Date(b.start_time).toLocaleString()}
-
- {b.status} • {b.services?.map((s) => s.name).join(', ')} -
-
- +
+ {#each users as u} +
+
+
{u.fn || `${u.n_first_name} ${u.n_last_name}`}
+
{u.email} • {u.phone}
- {/each} -
+ +
+ {/each} +
+
+ + + + + + Bookings + Search and manage booking history. + + +
+
+ { + if ((e as KeyboardEvent).key === 'Enter') searchBookings(); + }} + /> + +
+ +
+ {#each bookings as b} +
+
+
{new Date(b.start_time).toLocaleString()}
+
+ {b.status} • {b.services?.map((s) => s.name).join(', ')} +
+
+ +
+ {/each}
@@ -639,7 +637,7 @@
- + Edit Default Working Hours @@ -648,7 +646,7 @@
-
+
@@ -661,7 +659,7 @@ {#each defaultHoursDraft as row} - + @@ -709,15 +707,15 @@ - - + + {editingExceptionIndex === null ? 'New Exception Group' : 'Edit Exception Group'} {#if editingException} -
+
@@ -727,16 +725,17 @@
{weekdayLabel(row.weekday)}{weekdayLabel(row.weekday)} @@ -682,7 +680,7 @@ type="time" bind:value={row.end_time} disabled={!row.is_open} - class="max-w-24" + class="max-w-[70px] text-sm" />