+
+
+
+ }
+ />
+
+
+
+ {
+ 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) }}
+ />
+ }
+ />
+ )}
+
+
+
+ {editYacht && (
+ !open && setEditYacht(null)}
+ yacht={{
+ id: editYacht.id,
+ name: editYacht.name,
+ hullNumber: editYacht.hullNumber,
+ registration: editYacht.registration,
+ lengthFt: editYacht.lengthFt,
+ widthFt: editYacht.widthFt,
+ draftFt: editYacht.draftFt,
+ lengthM: editYacht.lengthM,
+ widthM: editYacht.widthM,
+ currentOwnerType: editYacht.currentOwnerType,
+ currentOwnerId: editYacht.currentOwnerId,
+ status: editYacht.status,
+ }}
+ />
+ )}
+
+ !open && setArchiveYacht(null)}
+ entityName={archiveYacht?.name ?? ''}
+ entityType="Yacht"
+ isArchived={false}
+ onConfirm={() => archiveYacht && archiveMutation.mutate(archiveYacht.id)}
+ isLoading={archiveMutation.isPending}
+ />
+
+ );
+}