diff --git a/src/app/(dashboard)/[portSlug]/admin/brochures/page.tsx b/src/app/(dashboard)/[portSlug]/admin/brochures/page.tsx new file mode 100644 index 0000000..03ef6f5 --- /dev/null +++ b/src/app/(dashboard)/[portSlug]/admin/brochures/page.tsx @@ -0,0 +1,21 @@ +import { PageHeader } from '@/components/shared/page-header'; +import { BrochuresAdminPanel } from '@/components/admin/brochures-admin-panel'; + +/** + * Per-port admin page for managing brochures (Phase 7 §5.8). + * + * Lists brochures, lets per-port admins upload new versions via direct-to- + * storage presigned URLs (so the 20MB+ file never traverses Next.js's + * body-size limit — see §11.1), and toggle the default flag. + */ +export default function BrochuresAdminPage() { + return ( +
{brochure.description}
+ )} + {brochure.currentVersion && ( ++ Latest: {brochure.currentVersion.fileName} ( + {(brochure.currentVersion.fileSizeBytes / 1024 / 1024).toFixed(2)} MB,{' '} + {new Date(brochure.currentVersion.uploadedAt).toLocaleDateString()}) +
+ )} +{'{{client.fullName}}'} are expanded server-side.
+ The file is large enough that we're sending it as a download link rather than an attachment:
+Download ${attachment.fileName} (link expires in 24 hours)
`; + return { deliveredAsAttachment: false, bodySuffixHtml: html }; +} + +async function performSend(args: { + portId: string; + recipientEmail: string; + subject: string; + bodyHtml: string; + attachment: ResolvedAttachment; + recordSeed: Omit