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
@@ -6,6 +6,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import api from '../utils/api'
|
||||
import { useAuth } from '../context/AuthContext'
|
||||
import { getTenantClubDependencyKey } from '../utils/activeClub'
|
||||
import ExercisePickerModal from './ExercisePickerModal'
|
||||
|
||||
const VIS_OPTIONS = [
|
||||
@@ -102,6 +103,8 @@ export default function ExerciseProgressionGraphPanel({
|
||||
}) {
|
||||
const { user } = useAuth()
|
||||
const isSuperadmin = user?.role === 'superadmin'
|
||||
const tenantClubDepKey = useMemo(() => getTenantClubDependencyKey(user), [user])
|
||||
|
||||
const filteredGraphVisOptions = useMemo(
|
||||
() => VIS_OPTIONS.filter((o) => o.value !== 'official' || isSuperadmin),
|
||||
[isSuperadmin],
|
||||
@@ -134,6 +137,10 @@ export default function ExerciseProgressionGraphPanel({
|
||||
const [notesDraft, setNotesDraft] = useState('')
|
||||
const [uiTab, setUiTab] = useState('overview')
|
||||
|
||||
useEffect(() => {
|
||||
setSelectedGraphId(null)
|
||||
}, [tenantClubDepKey])
|
||||
|
||||
const refreshGraphs = useCallback(async () => {
|
||||
const list = await api.listExerciseProgressionGraphs()
|
||||
setGraphs(Array.isArray(list) ? list : [])
|
||||
@@ -171,7 +178,7 @@ export default function ExerciseProgressionGraphPanel({
|
||||
return () => {
|
||||
cancelled = true
|
||||
}
|
||||
}, [refreshGraphs])
|
||||
}, [refreshGraphs, tenantClubDepKey])
|
||||
|
||||
useEffect(() => {
|
||||
if (!selectedGraphId) {
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import React from 'react'
|
||||
import { createPortal } from 'react-dom'
|
||||
|
||||
/**
|
||||
* Bei blocker.state === "blocked": Speichern, Abbrechen (auf Seite bleiben), Verwerfen (Navigation fortsetzen).
|
||||
*/
|
||||
export default function UnsavedChangesPrompt({
|
||||
blocker,
|
||||
isBusy,
|
||||
onSave,
|
||||
onDiscardWithoutSave,
|
||||
title = 'Ungespeicherte Änderungen',
|
||||
detail = 'Es gibt Änderungen, die noch nicht gespeichert sind. Was möchten Sie tun?',
|
||||
}) {
|
||||
if (!blocker || blocker.state !== 'blocked') return null
|
||||
|
||||
return createPortal(
|
||||
<div
|
||||
className="unsaved-prompt-backdrop"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="unsaved-prompt-title"
|
||||
onMouseDown={(e) => {
|
||||
if (e.target === e.currentTarget && !isBusy) blocker.reset()
|
||||
}}
|
||||
>
|
||||
<div className="unsaved-prompt-sheet card" onMouseDown={(e) => e.stopPropagation()}>
|
||||
<h2 id="unsaved-prompt-title" className="unsaved-prompt-title">
|
||||
{title}
|
||||
</h2>
|
||||
<p style={{ margin: '0 0 1rem', fontSize: '0.9375rem', color: 'var(--text2)', lineHeight: 1.55 }}>
|
||||
{detail}
|
||||
</p>
|
||||
<div className="unsaved-prompt-actions">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary"
|
||||
disabled={isBusy}
|
||||
onClick={onSave}
|
||||
>
|
||||
Speichern
|
||||
</button>
|
||||
<button type="button" className="btn btn-secondary" disabled={isBusy} onClick={() => blocker.reset()}>
|
||||
Abbrechen
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn"
|
||||
disabled={isBusy}
|
||||
style={{ borderColor: 'var(--danger)', color: 'var(--danger)' }}
|
||||
onClick={() => {
|
||||
onDiscardWithoutSave()
|
||||
blocker.proceed()
|
||||
}}
|
||||
>
|
||||
Nicht speichern
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
document.body,
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user