feat: add core domain types for Photo Gallery SDK including media items, albums, and annotations

This commit is contained in:
2026-07-23 07:39:01 +05:30
parent 7bcd1a2a2d
commit 2613c767a6
107 changed files with 20699 additions and 7 deletions
+10 -1
View File
@@ -34,6 +34,7 @@ export const NAV_GROUPS: NavGroup[] = [
items: [
{ key: "messenger", label: "Messenger", icon: "send", subtitle: "Chat with your team and clients" },
{ key: "inbox", label: "Inbox", icon: "bell", subtitle: "Mentions, messages, alerts and mail — all in one" },
{ key: "gallery", label: "Smart Gallery", icon: "gallery", subtitle: "Every photo and video for your jobs — searchable, editable and shareable" },
],
},
{
@@ -79,7 +80,15 @@ export const NAV_ITEMS: NavItem[] = NAV_GROUPS.flatMap((g) => g.items);
// brand-new user with no membership); every other item requires membership, and the
// items mapped here additionally require the given permission. Unmapped items are
// shown to any member. This is UX only — be-crm still enforces every action.
const ALWAYS_VISIBLE = new Set(["dashboard", "profile", "messenger", "inbox"]);
//
// `gallery` DECISION: it stays in ALWAYS_VISIBLE (nav row always shown to members) rather than
// being gated here by `media.view`. The real access gate lives INSIDE the view (SmartGallery reads
// `useGalleryFeatures().canView`), which uses the permissive "member with zero media.* perms → all
// enabled" fallback. Gating the nav row here would use the stricter sidebar rule (member without the
// perm → hidden) and so would hide the gallery from freshly-seeded members before an admin has
// configured any Media perms — regressing the demo and the common member. So: always-visible row,
// real gating in-view. (be-crm enforces data access regardless of what the nav shows.)
const ALWAYS_VISIBLE = new Set(["dashboard", "profile", "messenger", "inbox", "gallery"]);
const NAV_PERMISSION: Record<string, string | undefined> = {
team: "team.manage",
people: "team.manage",