feat(version): bump to 0.8.110 and update project specifications
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Successful in 1m15s
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / playwright-tests (push) Successful in 1m15s
- Updated app version to 0.8.110 and database schema version to 20260512057, reflecting recent enhancements. - Revised project status documentation to include new versioning and next steps for development. - Enhanced the functional specification for training modules and combination exercises, detailing upcoming features and improvements. - Improved technical specifications to align with the latest code changes, ensuring consistency across documentation. - Introduced new UI elements for toast notifications and unsaved changes prompts to enhance user experience. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
81fd7d9b3b
commit
49adb395dd
24 files changed
+1001
-268
No files matched your search
@@ -37,3 +37,39 @@ export function getResolvedActiveClubIdForUi(user) {
|
||||
|
||||
return Number(clubs[0].id)
|
||||
}
|
||||
|
||||
/**
|
||||
* Fallback für Formulare (Vereins-Sichtbarkeit): wie getResolvedActiveClubIdForUi, aber wenn der
|
||||
* Nutzer keiner Mitgliedschaft-Vereinsliste angehört, nutzt ein Plattform-Admin weiterhin das in
|
||||
* effective_club_id / active_club_id gespeicherte Mandantenziel (wie X-Active-Club-Id).
|
||||
*/
|
||||
export function getDefaultClubIdForGovernanceForms(user) {
|
||||
const viaMembership = getResolvedActiveClubIdForUi(user)
|
||||
if (viaMembership != null) return viaMembership
|
||||
|
||||
const role = String(user?.role || '').toLowerCase()
|
||||
if (role !== 'admin' && role !== 'superadmin') return null
|
||||
|
||||
const rawEc = user?.effective_club_id
|
||||
const rawAc = user?.active_club_id
|
||||
const nEc = rawEc !== null && rawEc !== '' ? Number(rawEc) : NaN
|
||||
const nAc = rawAc !== null && rawAc !== '' ? Number(rawAc) : NaN
|
||||
if (Number.isFinite(nEc) && nEc > 0) return nEc
|
||||
if (Number.isFinite(nAc) && nAc > 0) return nAc
|
||||
try {
|
||||
const ls = localStorage.getItem(ACTIVE_CLUB_STORAGE_KEY)
|
||||
const nLs = ls && /^\d+$/.test(ls.trim()) ? Number(ls.trim()) : NaN
|
||||
if (Number.isFinite(nLs) && nLs > 0) return nLs
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/** Für useEffect-/Query-Deps: Änderungen am Mandanten-Vereins-Kontext sollen Daten neu laden. */
|
||||
export function getTenantClubDependencyKey(user) {
|
||||
const m = getResolvedActiveClubIdForUi(user)
|
||||
if (m != null) return String(m)
|
||||
const d = getDefaultClubIdForGovernanceForms(user)
|
||||
return d != null ? String(d) : 'none'
|
||||
}
|
||||
@@ -452,6 +452,8 @@ export function buildExerciseApiPayload(formData, extras = {}) {
|
||||
.filter((x) => x && x.target_group_id)
|
||||
.map((x) => ({ target_group_id: Number(x.target_group_id), is_primary: !!x.is_primary }))
|
||||
|
||||
const visibilityNorm = String(formData.visibility || 'private').trim().toLowerCase()
|
||||
|
||||
const payload = {
|
||||
title: (formData.title || '').trim(),
|
||||
summary: formData.summary || null,
|
||||
@@ -476,9 +478,9 @@ export function buildExerciseApiPayload(formData, extras = {}) {
|
||||
required_level: s.required_level || null,
|
||||
target_level: s.target_level || null,
|
||||
})),
|
||||
visibility: formData.visibility || 'private',
|
||||
visibility: visibilityNorm,
|
||||
status: formData.status || 'draft',
|
||||
club_id: formData.club_id ?? null,
|
||||
club_id: visibilityNorm === 'club' ? num(formData.club_id) : null,
|
||||
exercise_kind:
|
||||
String(formData.exercise_kind || 'simple').toLowerCase() === 'combination'
|
||||
? 'combination'
|
||||
|
||||
Reference in new issue
Block a user