diff --git a/src/app/(dashboard)/[portSlug]/admin/page.tsx b/src/app/(dashboard)/[portSlug]/admin/page.tsx index 7396b88..308560b 100644 --- a/src/app/(dashboard)/[portSlug]/admin/page.tsx +++ b/src/app/(dashboard)/[portSlug]/admin/page.tsx @@ -16,6 +16,7 @@ import { Tag, Upload, Users, + UsersRound, Webhook, } from 'lucide-react'; @@ -29,132 +30,186 @@ interface AdminSection { icon: typeof Settings; } -const SECTIONS: AdminSection[] = [ +interface AdminGroup { + title: string; + description: string; + sections: AdminSection[]; +} + +const GROUPS: AdminGroup[] = [ { - href: 'users', - label: 'Users', - description: 'CRM accounts, role assignments, and per-user residential access toggles.', - icon: Users, + title: 'Access', + description: 'Who can sign in and what they can do once they do.', + sections: [ + { + href: 'users', + label: 'Users', + description: 'CRM accounts, role assignments, and per-user residential access toggles.', + icon: Users, + }, + { + href: 'invitations', + label: 'Invitations', + description: 'Send invitations, track pending invites, and resend or revoke them.', + icon: Mail, + }, + { + href: 'roles', + label: 'Roles & Permissions', + description: 'Default permission sets and per-port role overrides.', + icon: Shield, + }, + ], }, { - href: 'invitations', - label: 'Invitations', - description: 'Send invitations, track pending invites, and resend or revoke them.', - icon: Mail, + title: 'Configuration', + description: 'Branding, integrations, and per-port settings.', + sections: [ + { + href: 'email', + label: 'Email Settings', + description: 'From address, signatures, and per-port SMTP overrides.', + icon: Mail, + }, + { + href: 'documenso', + label: 'Documenso & EOI', + description: 'API credentials, EOI template, and default in-app vs Documenso pathway.', + icon: FileText, + }, + { + href: 'reminders', + label: 'Reminders', + description: 'Default reminder behaviour and the daily-digest delivery window.', + icon: Bell, + }, + { + href: 'branding', + label: 'Branding', + description: 'App name, logo, primary color, and email header/footer HTML.', + icon: Palette, + }, + { + href: 'settings', + label: 'System Settings', + description: 'Generic key/value configuration store for advanced flags.', + icon: Settings, + }, + { + href: 'webhooks', + label: 'Webhooks', + description: 'Outgoing webhook subscriptions, secrets, and delivery log.', + icon: Webhook, + }, + ], }, { - href: 'roles', - label: 'Roles & Permissions', - description: 'Default permission sets and per-port role overrides.', - icon: Shield, + title: 'Content', + description: 'Forms, templates, and labels that users see.', + sections: [ + { + href: 'forms', + label: 'Forms', + description: 'Form templates used by client-facing inquiry and intake flows.', + icon: Sliders, + }, + { + href: 'templates', + label: 'Document Templates', + description: 'PDF + email templates with merge-field placeholders.', + icon: FileText, + }, + { + href: 'tags', + label: 'Tags', + description: 'Color-coded tags applied to clients, yachts, companies, and interests.', + icon: Tag, + }, + { + href: 'custom-fields', + label: 'Custom Fields', + description: 'Tenant-defined fields for clients, yachts, and reservations.', + icon: Key, + }, + ], }, { - href: 'audit', - label: 'Audit Log', - description: 'Searchable log of every authenticated mutation in the system.', - icon: ScrollText, + title: 'Data Quality', + description: 'Cleanup, imports, and the audit trail.', + sections: [ + { + href: 'duplicates', + label: 'Duplicates', + description: 'Review queue of suspected duplicate clients flagged by the dedup engine.', + icon: UsersRound, + }, + { + href: 'import', + label: 'Bulk Import', + description: 'CSV-driven imports for clients, yachts, and reservations.', + icon: Upload, + }, + { + href: 'audit', + label: 'Audit Log', + description: 'Searchable log of every authenticated mutation in the system.', + icon: ScrollText, + }, + ], }, { - href: 'email', - label: 'Email Settings', - description: 'From address, signatures, and per-port SMTP overrides.', - icon: Mail, + title: 'Operations', + description: 'Health checks and disaster recovery.', + sections: [ + { + href: 'reports', + label: 'Reports', + description: 'Saved analytics views and ad-hoc query results.', + icon: LayoutDashboard, + }, + { + href: 'monitoring', + label: 'Queue Monitoring', + description: 'BullMQ queue health, throughput, and retry diagnostics.', + icon: Database, + }, + { + href: 'backup', + label: 'Backup & Restore', + description: 'Database snapshots and on-demand exports.', + icon: HardDrive, + }, + ], }, { - href: 'documenso', - label: 'Documenso & EOI', - description: 'API credentials, EOI template, and default in-app vs Documenso pathway.', - icon: FileText, + title: 'Tenancy', + description: 'Multi-port and multi-install scaffolding.', + sections: [ + { + href: 'ports', + label: 'Ports', + description: 'Manage the marinas/ports this installation serves.', + icon: Briefcase, + }, + { + href: 'onboarding', + label: 'Onboarding', + description: 'Initial-setup wizard for fresh ports.', + icon: LayoutDashboard, + }, + ], }, { - href: 'reminders', - label: 'Reminders', - description: 'Default reminder behaviour and the daily-digest delivery window.', - icon: Bell, - }, - { - href: 'branding', - label: 'Branding', - description: 'App name, logo, primary color, and email header/footer HTML.', - icon: Palette, - }, - { - href: 'settings', - label: 'System Settings', - description: 'Generic key/value configuration store for advanced flags.', - icon: Settings, - }, - { - href: 'webhooks', - label: 'Webhooks', - description: 'Outgoing webhook subscriptions, secrets, and delivery log.', - icon: Webhook, - }, - { - href: 'forms', - label: 'Forms', - description: 'Form templates used by client-facing inquiry and intake flows.', - icon: Sliders, - }, - { - href: 'templates', - label: 'Document Templates', - description: 'PDF + email templates with merge-field placeholders.', - icon: FileText, - }, - { - href: 'tags', - label: 'Tags', - description: 'Color-coded tags applied to clients, yachts, companies, and interests.', - icon: Tag, - }, - { - href: 'custom-fields', - label: 'Custom Fields', - description: 'Tenant-defined fields for clients, yachts, and reservations.', - icon: Key, - }, - { - href: 'reports', - label: 'Reports', - description: 'Saved analytics views and ad-hoc query results.', - icon: LayoutDashboard, - }, - { - href: 'monitoring', - label: 'Queue Monitoring', - description: 'BullMQ queue health, throughput, and retry diagnostics.', - icon: Database, - }, - { - href: 'import', - label: 'Bulk Import', - description: 'CSV-driven imports for clients, yachts, and reservations.', - icon: Upload, - }, - { - href: 'backup', - label: 'Backup & Restore', - description: 'Database snapshots and on-demand exports.', - icon: HardDrive, - }, - { - href: 'ports', - label: 'Ports', - description: 'Manage the marinas/ports this installation serves.', - icon: Briefcase, - }, - { - href: 'onboarding', - label: 'Onboarding', - description: 'Initial-setup wizard for fresh ports.', - icon: LayoutDashboard, - }, - { - href: 'ocr', - label: 'Receipt OCR', - description: 'Configure the AI provider used by the mobile receipt scanner.', - icon: ScrollText, + title: 'Integrations', + description: 'Third-party providers wired into the app.', + sections: [ + { + href: 'ocr', + label: 'Receipt OCR', + description: 'Configure the AI provider used by the mobile receipt scanner.', + icon: ScrollText, + }, + ], }, ]; @@ -165,36 +220,46 @@ export default async function AdminLandingPage({ }) { const { portSlug } = await params; return ( -
+
-
- {SECTIONS.map((s) => { - const Icon = s.icon; - return ( - - - - -
- {s.label} -
-
- - {s.description} - -
- - ); - })} -
+ {GROUPS.map((group) => ( +
+
+

+ {group.title} +

+

{group.description}

+
+
+ {group.sections.map((s) => { + const Icon = s.icon; + return ( + + + + +
+ {s.label} +
+
+ + {s.description} + +
+ + ); + })} +
+
+ ))}
); } diff --git a/src/components/interests/interest-detail-header.tsx b/src/components/interests/interest-detail-header.tsx index 8c5f0a1..b50d8cd 100644 --- a/src/components/interests/interest-detail-header.tsx +++ b/src/components/interests/interest-detail-header.tsx @@ -339,12 +339,19 @@ export function InterestDetailHeader({ portSlug, interest }: InterestDetailHeade ) : ( <> + {/* Mobile: icon-only with title tooltip + colored fill carries + the won/lost meaning (green vs rose). Adding a "Won" / + "Lost" text label inline blew out the cluster width and + forced the Email/Call/WhatsApp action-chip row above to + stack vertically — bad trade. From sm up, the full + "Mark won" / "Close as lost" labels read clearly. */}