forked from baron/baron-sso
feat(admin): improve tenant bulk import reporting with detailed results
- Backend: Enhanced 'ImportTenantsCSV' to return row-by-row details including action, status, and modified fields. - Backend: Refactored 'upsertTenantCSVRecord' to detect and return specific modified fields (Name, Type, ParentID, Slug, Description, Config, Domains). - Frontend: Added 'TenantImportDetail' and updated 'TenantImportResult' types. - Frontend: Implemented a detailed results modal in 'TenantListPage' showing processing summary and row-level feedback for better transparency.
This commit is contained in:
@@ -70,11 +70,22 @@ export type TenantUpdateRequest = {
|
||||
config?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
export type TenantImportDetail = {
|
||||
row: number;
|
||||
slug: string;
|
||||
name: string;
|
||||
success: boolean;
|
||||
action: "created" | "updated" | "failed" | "skipped";
|
||||
message: string;
|
||||
modifiedFields?: string[];
|
||||
};
|
||||
|
||||
export type TenantImportResult = {
|
||||
created: number;
|
||||
updated: number;
|
||||
failed: number;
|
||||
errors: string[];
|
||||
details: TenantImportDetail[];
|
||||
};
|
||||
|
||||
export type ApiKeySummary = {
|
||||
|
||||
Reference in New Issue
Block a user