| 1 | import type { Metadata } from 'next' |
| 2 | import { projectsService } |
| 3 | import { createMetadata } |
| 4 | import { requirePermission, resolveOrgContext |
| 5 | import { SettingsPageClient } |
| 6 | |
| 7 | export const metadata: |
| 8 | title: 'Workspace Settings', |
| 9 | description: 'Configure workspace defaults, billing, and preferences.', |
| 10 | openGraph: { |
| 11 | images: ['/api/og?page=Settings'], |
| 12 | }, |
| 13 | twitter: { |
| 14 | images: ['/api/og?page=Settings'], |
| 15 | }, |
| 16 | }) |
| 17 | |
| 18 | export default async function |
| 19 | params, |
| 20 | }: PageProps< |
| 21 | const { org |
| 22 | const { organization, |
| 23 | |
| 24 | requirePermission( |
| 25 | role, |
| 26 | { organization: ['update' |
| 27 | 'You do not have permission to view settings' |
| 28 | ) |
| 29 | |
| 30 | const canDelete = |
| 31 | |
| 32 | const settings = |
| 33 | |
| 34 | return ( |
| 35 | <SettingsPageClient |
| 36 | canDelete={canDelete} |
| 37 | clientInvolvement={settings.clientInvolvement |
| 38 | defaultCurrency={settings.currency |
| 39 | defaultMemberRate={settings.memberRate |
| 40 | defaultTimesheetDuration={settings.timesheetDuration |
| 41 | invoiceNumberTemplate={settings.invoiceNumberTemplate |
| 42 | organization={organization} |
| 43 | orgSlug={org} |
| 44 | /> |
| 45 | ) |
| 46 | } |