All checks were successful
Deploy Development / deploy (push) Successful in 39s
Test Suite / pytest-backend (push) Successful in 42s
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 1m15s
- Updated the skill scoring specification to include club-specific metrics and improved aggregation methods for skill profiles. - Introduced new API endpoints for batch skill profile summaries, allowing for efficient retrieval of compact skill data. - Enhanced frontend components to display skill profiles with club comparisons, improving user interaction and visibility of skill strengths. - Added filtering options for skills in the framework programs, enabling users to refine selections based on training weight relative to club maximums. - Improved CSS styles for skill profile displays, ensuring a cohesive and user-friendly interface across the application.
41 lines
1.5 KiB
JavaScript
41 lines
1.5 KiB
JavaScript
import { request } from './client.js'
|
|
|
|
export async function getFrameworkProgramSkillProfile(frameworkId) {
|
|
return request(`/api/training-framework-programs/${frameworkId}/skill-profile`)
|
|
}
|
|
|
|
export async function getTrainingModuleSkillProfile(moduleId) {
|
|
return request(`/api/training-modules/${moduleId}/skill-profile`)
|
|
}
|
|
|
|
export async function getProgressionGraphSkillProfile(graphId) {
|
|
return request(`/api/exercise-progression-graphs/${graphId}/skill-profile`)
|
|
}
|
|
|
|
/**
|
|
* @param {number[]} skillIds
|
|
* @param {{ types?: string, limit?: number }} opts
|
|
*/
|
|
export async function getSkillDiscoverySuggestions(skillIds, opts = {}) {
|
|
const ids = (skillIds || []).filter((x) => x != null && Number(x) > 0).join(',')
|
|
if (!ids) return { skill_ids: [], suggestions: [] }
|
|
const params = new URLSearchParams({ skill_ids: ids })
|
|
if (opts.types) params.set('types', opts.types)
|
|
if (opts.limit != null) params.set('limit', String(opts.limit))
|
|
return request(`/api/skill-discovery/suggestions?${params.toString()}`)
|
|
}
|
|
|
|
/**
|
|
* Batch-Summaries für Listen (ein Vereins-Corpus-Scan).
|
|
* @param {{ frameworkProgramIds?: number[], trainingModuleIds?: number[] }} payload
|
|
*/
|
|
export async function batchSkillProfileSummaries(payload = {}) {
|
|
return request('/api/skill-profiles/batch-summaries', {
|
|
method: 'POST',
|
|
body: JSON.stringify({
|
|
framework_program_ids: payload.frameworkProgramIds || [],
|
|
training_module_ids: payload.trainingModuleIds || [],
|
|
}),
|
|
})
|
|
}
|