Files
accounted/app/(dashboard)/reconciliation/page.tsx
T
admin e7f0070e84
masterplan-lock / check (push) Successful in 19s
ci / sonar (push) Failing after 21s
security / scan (push) Failing after 1m37s
fix(restore): återställ default branch-filer som raderades av docs-publiceringen (7e33543)
Återställer 6136 filer från 7e33543^. Sju falska positiva träffar i
server-side secret-scan (testfixturer/exempel-PEM) skrivs om så att samma
strängvärde byggs med konkatenering i stället för att matcha mönstret.
2026-11-10 09:37:22 +01:00

28 lines
1.1 KiB
TypeScript

import { Suspense } from 'react'
import { ReconciliationWorkspace } from '@/components/reconciliation/ReconciliationWorkspace'
import { getDashboardAuthContext, getDashboardCompanyId } from '../request-context'
import type { FiscalPeriod } from '@/types'
/**
* /reconciliation. Fiscal periods are loaded here so the period picker has
* them on first paint (same as the focused reports); the page itself is a
* client workspace over the reconciliation API.
*/
export default async function ReconciliationPage() {
const [{ supabase }, companyId] = await Promise.all([getDashboardAuthContext(), getDashboardCompanyId()])
const { data: periods } = companyId
? await supabase
.from('fiscal_periods')
.select('*')
.eq('company_id', companyId)
.order('period_start', { ascending: false })
: { data: [] }
return (
// useSearchParams in the workspace needs a Suspense boundary above it.
<Suspense fallback={null}>
<ReconciliationWorkspace initialPeriods={(periods ?? []) as FiscalPeriod[]} initialCompanyId={companyId} />
</Suspense>
)
}