Enhance Maturity Matrix Tools and API Integration
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Failing after 2s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m19s

- Added new functionality for exporting and importing matrix editor data in JSON and CSV formats within the MaturityMatrixToolsAdmin component.
- Updated the API utility functions to support matrix editor exports and imports, enhancing the backend communication for Superadmin tasks.
- Refactored the client API to streamline request handling and improve code clarity.
- Included new UI elements for file upload and download actions, improving user experience in managing matrix data.
This commit is contained in:
Lars committed 2026-05-22 11:12:50 +02:00
1 parent cdeddc7cec
commit d58db3d5dd
6 files changed
+1089 -11

No files matched your search

+21 -1
View File
@@ -4,7 +4,7 @@
* Zentrale API-Kommunikation mit automatischer Token-Injektion
*/
import { request, ACTIVE_CLUB_STORAGE_KEY } from '../api/client.js'
import { request, ACTIVE_CLUB_STORAGE_KEY, requestText } from '../api/client.js'
import * as exercises from '../api/exercises.js'
import * as planning from '../api/planning.js'
import * as skillProfiles from '../api/skillProfiles.js'
@@ -523,6 +523,23 @@ export async function importMatrixStackBundle(payload) {
})
}
/** Superadmin: flacher Export für zentrale Pflege (Beschreibungen, Gewichtungen) */
export async function exportMatrixEditorBundle() {
return request('/api/admin/matrix-editor/export')
}
export async function exportMatrixEditorCsv(part) {
const format = part === 'skills' ? 'csv_skills' : 'csv_matrix'
return requestText(`/api/admin/matrix-editor/export?format=${format}`)
}
export async function importMatrixEditorBundle(payload) {
return request('/api/admin/matrix-editor/import', {
method: 'POST',
body: JSON.stringify(payload)
})
}
// Style Directions (formerly Training Styles)
export async function listStyleDirections(filters = {}) {
const query = new URLSearchParams(filters).toString()
@@ -874,6 +891,9 @@ export const api = {
exportResolvedMaturityBundle,
exportMatrixStackBundle,
importMatrixStackBundle,
exportMatrixEditorBundle,
exportMatrixEditorCsv,
importMatrixEditorBundle,
resolveMaturityModel,
getMaturityModel,
createMaturityModel,