KI-AGENT: Statusanzeige für Tenant-Import ergänzen
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 45s
Build and Push Docker Images / build-frontend (push) Successful in 1m21s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 21s

This commit is contained in:
2026-08-27 08:50:17 +02:00
parent afb9adb444
commit 6b5d4f7f36
6 changed files with 234 additions and 19 deletions

View File

@@ -63,6 +63,24 @@ export type TenantImportResult = {
error?: string | null
}
export type TenantImportJob = {
importId: string
tenantId?: number | null
operation?: "import" | string
status: "queued" | "running" | "completed" | "failed" | string
statusMessage?: string | null
filename: string
fileSize?: number | null
filesDone?: number
filesTotal?: number
error?: string | null
result?: TenantImportResult | null
statusUrl?: string
createdAt?: string
updatedAt?: string | null
completedAt?: string | null
}
export type TenantExportJob = {
exportId: string
importId?: string
@@ -215,13 +233,17 @@ export const useAdmin = () => {
})
}
const importTenant = async (body: Record<string, any> | FormData): Promise<TenantImportResult> => {
const importTenant = async (body: Record<string, any> | FormData): Promise<TenantImportJob> => {
return await $api("/api/admin/tenant-imports", {
method: "POST",
body,
})
}
const getTenantImport = async (importId: string): Promise<TenantImportJob> => {
return await $api(`/api/admin/tenant-imports/${importId}`)
}
const getSystemStatus = async (): Promise<SystemStatus> => {
return await $api("/api/admin/system-status")
}
@@ -262,5 +284,6 @@ export const useAdmin = () => {
getTenantExport,
downloadTenantExport,
importTenant,
getTenantImport,
}
}