refactor: scope dashboard records by organization

Attach clients, rooms, services, bookings, contacts, addresses, invoices, and contracts to organizations.

Filter dashboard loads and related option lists by the active organization from the session.

Ensure create, update, and archive actions only affect records in the active organization.
This commit is contained in:
2026-06-06 14:14:12 +01:00
parent b5ba84b19f
commit cbd2fb2921
23 changed files with 369 additions and 122 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
import { Separator } from '$lib/components/ui/separator/index.js';
import * as Sidebar from '$lib/components/ui/sidebar/index.js';
const { children } = $props();
const { data, children } = $props();
type BreadcrumbItem = {
label: string;
@@ -79,7 +79,7 @@
</script>
<Sidebar.Provider>
<AppSidebar />
<AppSidebar organizations={data.organizations} activeOrganization={data.activeOrganization} />
<Sidebar.Inset>
<header class="flex h-16 shrink-0 items-center gap-2 border-b px-4">
<Sidebar.Trigger class="-ms-1" />