+
+
+
+ }
+ />
+
+
+
+ {
+ clearFilters();
+ Object.entries(savedFilters).forEach(([key, val]) => setFilter(key, val));
+ }}
+ />
+
+
+ {isLoading ? (
+
+ ) : !data.length ? (
+ setCreateOpen(true) }}
+ />
+ ) : (
+ {
+ setPage(p);
+ setPageSize(ps);
+ }}
+ sort={sort}
+ onSortChange={setSort}
+ isLoading={isFetching && !isLoading}
+ getRowId={(row) => row.id}
+ emptyState={
+ setCreateOpen(true) }}
+ />
+ }
+ />
+ )}
+
+
+
+ {editCompany && (
+ !open && setEditCompany(null)}
+ company={{
+ id: editCompany.id,
+ name: editCompany.name,
+ legalName: editCompany.legalName,
+ taxId: editCompany.taxId,
+ registrationNumber: editCompany.registrationNumber,
+ incorporationCountry: editCompany.incorporationCountry,
+ incorporationDate: editCompany.incorporationDate,
+ status: editCompany.status,
+ billingEmail: editCompany.billingEmail,
+ notes: editCompany.notes,
+ }}
+ />
+ )}
+
+ !open && setArchiveCompany(null)}
+ entityName={archiveCompany?.name ?? ''}
+ entityType="Company"
+ isArchived={false}
+ onConfirm={() => archiveCompany && archiveMutation.mutate(archiveCompany.id)}
+ isLoading={archiveMutation.isPending}
+ />
+
+ );
+}
diff --git a/src/components/layout/sidebar.tsx b/src/components/layout/sidebar.tsx
index 92a56d5..2802179 100644
--- a/src/components/layout/sidebar.tsx
+++ b/src/components/layout/sidebar.tsx
@@ -9,6 +9,7 @@ import {
Bookmark,
Anchor,
Ship,
+ Building2,
Receipt,
FileText,
FolderOpen,
@@ -62,6 +63,7 @@ function buildNavSections(portSlug: string | undefined): NavSection[] {
{ href: `${base}/dashboard`, label: 'Dashboard', icon: LayoutDashboard },
{ href: `${base}/clients`, label: 'Clients', icon: Users },
{ href: `${base}/yachts`, label: 'Yachts', icon: Ship },
+ { href: `${base}/companies`, label: 'Companies', icon: Building2 },
{ href: `${base}/interests`, label: 'Interests', icon: Bookmark },
{ href: `${base}/berths`, label: 'Berths', icon: Anchor },
],