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
+13
-150
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -74,11 +74,13 @@ export function CatalogManagerDialog({
|
|||||||
catalogType = "normal",
|
catalogType = "normal",
|
||||||
canEdit = false,
|
canEdit = false,
|
||||||
totals = null,
|
totals = null,
|
||||||
|
triggerLabel,
|
||||||
}: {
|
}: {
|
||||||
initialRoots?: RootTab[];
|
initialRoots?: RootTab[];
|
||||||
catalogType?: CatalogManagerMode;
|
catalogType?: CatalogManagerMode;
|
||||||
canEdit?: boolean;
|
canEdit?: boolean;
|
||||||
totals?: CatalogStatsTotals | null;
|
totals?: CatalogStatsTotals | null;
|
||||||
|
triggerLabel?: string;
|
||||||
}) {
|
}) {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [mounted, setMounted] = useState(false);
|
const [mounted, setMounted] = useState(false);
|
||||||
@@ -115,7 +117,7 @@ export function CatalogManagerDialog({
|
|||||||
onClick={() => setOpen(true)}
|
onClick={() => setOpen(true)}
|
||||||
>
|
>
|
||||||
<LayoutGrid className="h-4 w-4" />
|
<LayoutGrid className="h-4 w-4" />
|
||||||
{title}
|
{triggerLabel ?? title}
|
||||||
</Button>
|
</Button>
|
||||||
{mounted && open
|
{mounted && open
|
||||||
? createPortal(
|
? createPortal(
|
||||||
|
|||||||
Reference in new issue
Block a user