3f255ea201
Extract shared vision/document analysis logic into lib/ai (vision-client, document-analyzer, image preprocessing, validation helpers), simplifying invoice-analyzer, receipt-analyzer, and document classifier. Add migration 046 for journal entry reversal/correction link columns (reversed_by_id, reverses_id, correction_of_id) required by storno service. Update extension components and shared UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
950 B
TypeScript
34 lines
950 B
TypeScript
'use client'
|
|
|
|
import type { ExtensionDefinition } from '@/lib/extensions/types'
|
|
import { getWorkspaceComponent } from '@/lib/extensions/workspace-registry'
|
|
import ExtensionWorkspaceShell from './ExtensionWorkspaceShell'
|
|
import EmptyExtensionState from './shared/EmptyExtensionState'
|
|
|
|
export default function ExtensionWorkspaceLoader({
|
|
sector,
|
|
slug,
|
|
definition,
|
|
userId,
|
|
}: {
|
|
sector: string
|
|
slug: string
|
|
definition: ExtensionDefinition
|
|
userId: string
|
|
}) {
|
|
const WorkspaceComponent = getWorkspaceComponent(sector, slug)
|
|
|
|
return (
|
|
<ExtensionWorkspaceShell definition={definition}>
|
|
{WorkspaceComponent ? (
|
|
<WorkspaceComponent userId={userId} />
|
|
) : (
|
|
<EmptyExtensionState
|
|
title="Bakgrundstjänst"
|
|
description={`${definition.name} körs i bakgrunden och har ingen egen vy. Du kan hantera inställningar under Inställningar.`}
|
|
/>
|
|
)}
|
|
</ExtensionWorkspaceShell>
|
|
)
|
|
}
|