AI Implementation feature(903): Admin Area Challenges: List, Import/Export and Add/Edit Modal 1.03 (#44)

This commit was merged in pull request #44.
This commit is contained in:
2026-07-22 22:18:10 +00:00
parent fff0a600df
commit dcda3dfd4d
11 changed files with 583 additions and 112 deletions
@@ -25,6 +25,7 @@ import {
categoryIconSrc,
deriveEmptyState,
difficultyClass,
importErrorMessage,
summarizeImportPreview,
summarizeImportResult,
} from './challenges.pure';
@@ -459,11 +460,11 @@ export class AdminChallengesComponent implements OnInit, OnDestroy {
this.importError.set(null);
try {
const result = await this.admin.confirmChallengeImport(doc);
this.importResult.set(result);
this.statusMessage.set(summarizeImportResult(result));
await this.load();
this.closeImport();
} catch (e: any) {
this.importError.set(e?.error?.message ?? e?.message ?? 'Failed to import challenges');
this.importError.set(importErrorMessage(e, 'Failed to import challenges'));
} finally {
this.importing.set(false);
}