feat: dynamic schema dropdowns for goal type admin UI
Admin can now easily create custom goal types: - New endpoint /api/goals/schema-info with table/column metadata - 9 tables documented (weight, caliper, activity, nutrition, sleep, vitals, BP, rest_days, circumference) - Table dropdown with descriptions (e.g., 'activity_log - Trainingseinheiten') - Column dropdown dependent on selected table - All columns documented in German with data types - Fields optional (for complex calculation formulas) UX improvements: - No need to guess table/column names - Clear descriptions for each field - Type-safe selection (no typos) - Cascading dropdowns (column depends on table) Closes user feedback: 'Admin weiß nicht welche Tabellen/Spalten verfügbar sind'
This commit is contained in:
1 parent
210671059a
commit
2c978bf948
3 files changed
+162
-19
No files matched your search
@@ -344,6 +344,7 @@ export const api = {
|
||||
createGoalType: (d) => req('/goals/goal-types', json(d)),
|
||||
updateGoalType: (id,d) => req(`/goals/goal-types/${id}`, jput(d)),
|
||||
deleteGoalType: (id) => req(`/goals/goal-types/${id}`, {method:'DELETE'}),
|
||||
getSchemaInfo: () => req('/goals/schema-info'),
|
||||
|
||||
// Training Phases
|
||||
listTrainingPhases: () => req('/goals/phases'),
|
||||
|
||||
Reference in new issue
Block a user