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:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user