feat(studio): surface the Visual Catalog Manager in the Studio nav
The catalog manager (with auto-category wizard) now lives inside the Studio navigation for teams that manage furniture inline. The button is gated on CATALOG_EDIT; only users with that permission see the launcher. - Split server/client Studio layout to derive permissions server-side - Add optional triggerLabel prop to CatalogManagerDialog for custom labels - Wire the Catalog manager button in the Studio nav right cluster - Keep existing /admin/catalog entry points unchanged
This commit is contained in:
1 parent
f832479e52
commit
f5c2c05f6e
3 files changed
+184
-151
No files matched your search
@@ -74,11 +74,13 @@ export function CatalogManagerDialog({
|
||||
catalogType = "normal",
|
||||
canEdit = false,
|
||||
totals = null,
|
||||
triggerLabel,
|
||||
}: {
|
||||
initialRoots?: RootTab[];
|
||||
catalogType?: CatalogManagerMode;
|
||||
canEdit?: boolean;
|
||||
totals?: CatalogStatsTotals | null;
|
||||
triggerLabel?: string;
|
||||
}) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [mounted, setMounted] = useState(false);
|
||||
@@ -115,7 +117,7 @@ export function CatalogManagerDialog({
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
<LayoutGrid className="h-4 w-4" />
|
||||
{title}
|
||||
{triggerLabel ?? title}
|
||||
</Button>
|
||||
{mounted && open
|
||||
? createPortal(
|
||||
|
||||
Reference in new issue
Block a user