feat(frontend): update admin components

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-18 16:26:58 +01:00
co-authored by Sisyphus
parent 165d3d6c38
commit b23a8b89c4
16 changed files with 370 additions and 121 deletions
@@ -1,6 +1,7 @@
<script lang="ts">
import { authStore } from '$lib/stores/auth.svelte';
import { toast } from 'svelte-sonner';
import { sanitizeText } from '$lib/utils/toast-safe';
import { Button } from '$lib/components/ui/button';
import * as Card from '$lib/components/ui/card';
import { Input } from '$lib/components/ui/input';
@@ -154,7 +155,7 @@
await fetchServices();
} else {
const err = await response.text();
toast.error(`Failed: ${err}`);
toast.error('Failed: ' + sanitizeText(err));
}
} catch {
toast.error('Network error');
@@ -177,7 +178,8 @@
} else if (response.status === 409) {
toast.error('A service with this name already exists');
} else {
toast.error(`Failed: ${await response.text()}`);
const errText = await response.text();
toast.error('Failed: ' + sanitizeText(errText));
}
} catch {
toast.error('Network error');
@@ -197,7 +199,8 @@
} else if (response.status === 409) {
toast.error('Cannot delete: used in bookings. Promote first.');
} else {
toast.error(`Failed: ${await response.text()}`);
const errText = await response.text();
toast.error('Failed: ' + sanitizeText(errText));
}
} catch {
toast.error('Network error');