feat: add reference values snapshot endpoints and data layer functions
Deploy Development / deploy (push) Successful in 1m3s
Build Test / pytest-backend (push) Successful in 5s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 17s

- Introduced `get_profile_reference_values_current_snapshot` and `get_profile_reference_values_recent_snapshot` functions to retrieve current and recent reference values for profiles.
- Updated the placeholder resolver to include new placeholders for current and recent reference values.
- Added new API endpoints for fetching current and recent reference values snapshots.
- Enhanced the frontend API utility to support the new snapshot endpoints.
- Improved unit tests to validate the new data layer functions and their behavior.
This commit is contained in:
Lars committed 2026-04-19 10:52:31 +02:00
1 parent df0165bee3
commit 42ae796448
7 files changed
+359 -1

No files matched your search

+10
View File
@@ -102,6 +102,16 @@ export const api = {
listProfileReferenceValues: (typeKey) =>
req(`/profile-reference-values?type_key=${encodeURIComponent(typeKey)}`),
listProfileReferenceValuesSummary: () => req('/profile-reference-values/summary'),
/** Layer-1-Snapshots (gleiche Daten wie KI-Platzhalter reference_values_*_json) */
listProfileReferenceValuesSnapshotCurrent: () => req('/profile-reference-values/snapshot-current'),
listProfileReferenceValuesSnapshotRecent: (opts = {}) => {
const p = new URLSearchParams()
if (opts.limit_per_type != null) p.set('limit_per_type', String(opts.limit_per_type))
if (opts.date_from) p.set('date_from', opts.date_from)
if (opts.date_to) p.set('date_to', opts.date_to)
const q = p.toString()
return req(`/profile-reference-values/snapshot-recent${q ? `?${q}` : ''}`)
},
createProfileReferenceValue: (d) => req('/profile-reference-values', json(d)),
updateProfileReferenceValue: (id, d) => req(`/profile-reference-values/${id}`, jput(d)),
deleteProfileReferenceValue: (id) => req(`/profile-reference-values/${id}`, { method: 'DELETE' }),