Refactor Training Framework Programs List Page with Enhanced Styling and New Utility Functions
Test Suite / playwright-tests (push) Waiting to run
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Has been cancelled
Test Suite / playwright-tests (push) Waiting to run
Deploy Development / deploy (push) Successful in 40s
Test Suite / pytest-backend (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Has been cancelled
- Updated the TrainingFrameworkProgramsListPage to utilize new CSS classes for improved layout and styling. - Removed deprecated components and functions, streamlining the codebase for better maintainability. - Introduced utility functions for splitting aggregated strings, enhancing data handling for framework program attributes. - Enhanced the user interface with loading and empty state indicators, improving overall user experience.
This commit is contained in:
1 parent
9d122d4808
commit
a4548f5587
6 files changed
+617
-219
No files matched your search
@@ -6,6 +6,35 @@ export function frameworkSessionDurationLabel(row) {
|
||||
})
|
||||
}
|
||||
|
||||
/** Komma-getrennte Aggregat-Strings aus der Listen-API in Einträge zerlegen. */
|
||||
export function splitFrameworkCommaAgg(value) {
|
||||
const s = (value ?? '').toString().trim()
|
||||
if (!s) return []
|
||||
return s
|
||||
.split(',')
|
||||
.map((x) => x.trim())
|
||||
.filter(Boolean)
|
||||
}
|
||||
|
||||
/** Entwicklungsziele aus goal_titles_agg (Trenner „|“). */
|
||||
export function splitFrameworkGoalsAgg(value) {
|
||||
const s = (value ?? '').toString().trim()
|
||||
if (!s) return []
|
||||
return s
|
||||
.split('|')
|
||||
.map((x) => x.trim())
|
||||
.filter(Boolean)
|
||||
}
|
||||
|
||||
export function frameworkProgramHasCatalogMeta(row) {
|
||||
return (
|
||||
splitFrameworkCommaAgg(row?.focus_area_names_agg).length > 0 ||
|
||||
splitFrameworkCommaAgg(row?.style_direction_names_agg).length > 0 ||
|
||||
splitFrameworkCommaAgg(row?.training_type_names_agg).length > 0 ||
|
||||
splitFrameworkCommaAgg(row?.target_group_names_agg).length > 0
|
||||
)
|
||||
}
|
||||
|
||||
function parseIdList(raw) {
|
||||
if (Array.isArray(raw)) {
|
||||
return raw.map((x) => String(x)).filter(Boolean)
|
||||
|
||||
Reference in new issue
Block a user