Show which exercises differ from their last published release.
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Failing after 30s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 17s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m42s
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Failing after 30s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 17s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m42s
The release tab names the changed areas, and an admin list collects those exercises so a new release stays a deliberate publication. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4b33b17b2d
commit
4ad62b6e38
14 files changed
+305
-6
No files matched your search
@@ -60,6 +60,7 @@ const AdminUsersPage = lazyWithRetry(() => import('./pages/AdminUsersPage'))
|
||||
const AdminClubCreationRequestsPage = lazyWithRetry(() => import('./pages/AdminClubCreationRequestsPage'))
|
||||
const AdminRightsPage = lazyWithRetry(() => import('./pages/AdminRightsPage'))
|
||||
const AdminDistributionPage = lazyWithRetry(() => import('./pages/AdminDistributionPage'))
|
||||
const AdminReleaseUpdatesPage = lazyWithRetry(() => import('./pages/AdminReleaseUpdatesPage'))
|
||||
const MediaLibraryPage = lazyWithRetry(() => import('./pages/MediaLibraryPage'))
|
||||
const LegalPage = lazyWithRetry(() => import('./pages/LegalPage'))
|
||||
const AdminLegalDocumentsPage = lazyWithRetry(() => import('./pages/AdminLegalDocumentsPage'))
|
||||
@@ -328,6 +329,10 @@ const appRouter = createBrowserRouter([
|
||||
path: 'admin/distribution',
|
||||
element: <AdminDistributionPage />,
|
||||
},
|
||||
{
|
||||
path: 'admin/release-updates',
|
||||
element: <AdminReleaseUpdatesPage />,
|
||||
},
|
||||
{
|
||||
path: 'admin/rights',
|
||||
element: (
|
||||
|
||||
@@ -81,6 +81,10 @@ export function getDistributionAccess() {
|
||||
return request('/api/distribution/access')
|
||||
}
|
||||
|
||||
export function getDistributionReleaseUpdates() {
|
||||
return request('/api/distribution/release-updates')
|
||||
}
|
||||
|
||||
export function setClubDistributionApi(clubId, enabled) {
|
||||
return request(`/api/distribution/access/clubs/${clubId}`, {
|
||||
method: 'PUT',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import { TreePine, FolderTree, Download, Grid3x3, Users, Scale, Sparkles, Bot, Wand2, Activity, Building2, Shield, Share2 } from 'lucide-react'
|
||||
import { TreePine, FolderTree, Download, Grid3x3, Users, Scale, Sparkles, Bot, Wand2, Activity, Building2, Shield, Share2, FileDiff } from 'lucide-react'
|
||||
|
||||
/**
|
||||
* Admin-Seiten-Navigation (horizontal) — nur für Super-Admins (globaler Portal-Mandant).
|
||||
@@ -19,6 +19,7 @@ export default function AdminPageNav() {
|
||||
{ to: '/admin/openrouter', label: 'KI-Modell', icon: Bot },
|
||||
{ to: '/admin/exercise-enrichment', label: 'Übungs-Anreicherung', icon: Wand2 },
|
||||
{ to: '/admin/distribution', label: 'API-Schnittstelle', icon: Share2 },
|
||||
{ to: '/admin/release-updates', label: 'Release-Abgleich', icon: FileDiff },
|
||||
]
|
||||
|
||||
return (
|
||||
|
||||
@@ -128,6 +128,15 @@ export default function ExerciseDistributionPanel({ exerciseId }) {
|
||||
<p>Die Distribution ist auf dieser Instanz nicht aktiv. Bearbeitung und Planung bleiben davon unberührt.</p>
|
||||
) : (
|
||||
<>
|
||||
{overview.drift?.differs ? (
|
||||
<p>
|
||||
Die Arbeitsfassung weicht vom Release Revision {overview.drift.revision} ab
|
||||
{overview.drift.areas?.length ? `: ${overview.drift.areas.join(', ')}` : ''}. Ein neues Release
|
||||
veröffentlicht diesen Stand. Das bisherige Release bleibt unter seiner ID abrufbar.
|
||||
</p>
|
||||
) : overview.releases?.length ? (
|
||||
<p>Die Arbeitsfassung entspricht dem letzten Release.</p>
|
||||
) : null}
|
||||
{overview.release_block ? <p>{overview.release_block}</p> : null}
|
||||
<label className="form-label">
|
||||
API-Schlüssel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useState, useRef, useMemo, useCallback } from 'react'
|
||||
import { useNavigate, useParams, Link, useLocation } from 'react-router-dom'
|
||||
import { useNavigate, useParams, Link, useLocation, useSearchParams } from 'react-router-dom'
|
||||
import api, { buildExerciseApiPayload } from '../../utils/api'
|
||||
import { resolveExerciseMediaFileUrl, resolveMediaAssetFileUrl, useMediaAccessToken } from '../../utils/exerciseMediaUrl'
|
||||
import RichTextEditor from '../RichTextEditor'
|
||||
@@ -647,7 +647,13 @@ function ExerciseFormPageRoot() {
|
||||
const [aiSuggestBusy, setAiSuggestBusy] = useState(false)
|
||||
const [aiSuggestionPreview, setAiSuggestionPreview] = useState(null)
|
||||
const [variantEditSelection, setVariantEditSelection] = useState(null)
|
||||
const [activeFormTab, setActiveFormTab] = useState('stammdaten')
|
||||
const [searchParams] = useSearchParams()
|
||||
const requestedTab = searchParams.get('tab')
|
||||
const [activeFormTab, setActiveFormTab] = useState(
|
||||
['stammdaten', 'anleitung', 'einordnung', 'kombination', 'varianten', 'medien', 'freigabe'].includes(requestedTab)
|
||||
? requestedTab
|
||||
: 'stammdaten',
|
||||
)
|
||||
const variantsSavedSnapshotRef = useRef({})
|
||||
|
||||
const exerciseFormTabs = useMemo(() => {
|
||||
|
||||
@@ -608,6 +608,8 @@ function AccountSettingsPage() {
|
||||
|
||||
<p className="muted" style={{ marginTop: '1.75rem', fontSize: '0.875rem', lineHeight: 1.5 }}>
|
||||
<Link to="/admin/distribution">API-Schlüssel</Link>
|
||||
{' · '}
|
||||
<Link to="/admin/release-updates">Offene Release-Änderungen</Link>
|
||||
{' — Schnittstelle für Übungen und spätere Planungsinhalte'}
|
||||
</p>
|
||||
<p className="muted" style={{ marginTop: '0.6rem', fontSize: '0.875rem', lineHeight: 1.5 }}>
|
||||
|
||||
@@ -200,6 +200,9 @@ export default function AdminDistributionPage() {
|
||||
<div style={{ padding: 16, maxWidth: 880 }}>
|
||||
{superadmin ? <AdminPageNav /> : <p><Link to="/settings">Zurück zu Einstellungen</Link></p>}
|
||||
<h1>API-Schnittstelle</h1>
|
||||
<p>
|
||||
<Link to="/admin/release-updates">Offene Änderungen gegenüber dem letzten Release</Link>
|
||||
</p>
|
||||
<p style={{ color: 'var(--text2)', maxWidth: '68ch' }}>
|
||||
Ein Schlüssel gehört zu einer Anwendung. Du weist ihm die Bereiche zu, die diese Anwendung abrufen darf.
|
||||
Fällt dir eine Rolle weg, liefert der Schlüssel diesen Bereich nicht mehr aus.
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import AdminPageNav from '../components/AdminPageNav'
|
||||
import { useAuth } from '../context/AuthContext'
|
||||
import { getDistributionReleaseUpdates } from '../api/distribution'
|
||||
|
||||
const VISIBILITY = {
|
||||
official: 'Global',
|
||||
club: 'Verein',
|
||||
private: 'Eigene',
|
||||
}
|
||||
|
||||
export default function AdminReleaseUpdatesPage() {
|
||||
const { user } = useAuth()
|
||||
const superadmin = user?.role === 'superadmin'
|
||||
const [items, setItems] = useState(null)
|
||||
const [error, setError] = useState('')
|
||||
|
||||
const load = useCallback(async () => {
|
||||
try {
|
||||
const data = await getDistributionReleaseUpdates()
|
||||
setItems(data.items || [])
|
||||
setError('')
|
||||
} catch (err) {
|
||||
setError(err.message || 'Die offenen Änderungen konnten nicht geladen werden.')
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
load()
|
||||
}, [load])
|
||||
|
||||
return (
|
||||
<div style={{ padding: 16, maxWidth: 880 }}>
|
||||
{superadmin ? <AdminPageNav /> : <p><Link to="/admin/distribution">Zurück zur API-Schnittstelle</Link></p>}
|
||||
<h1>Release-Abgleich</h1>
|
||||
<p style={{ color: 'var(--text2)', maxWidth: '68ch' }}>
|
||||
Hier stehen Übungen, deren Arbeitsfassung vom letzten veröffentlichten Release abweicht.
|
||||
Ein neues Release übernimmt den aktuellen Stand. Das bisherige Release bleibt unter seiner ID abrufbar.
|
||||
</p>
|
||||
{error ? <p role="alert">{error}</p> : null}
|
||||
{!items ? <p>Wird geladen …</p> : null}
|
||||
{items && !items.length ? (
|
||||
<p>Keine Arbeitsfassung weicht von ihrem letzten Release ab.</p>
|
||||
) : null}
|
||||
{items?.length ? (
|
||||
<ul style={{ paddingLeft: 18 }}>
|
||||
{items.map((item) => (
|
||||
<li key={item.exercise_id} style={{ marginBottom: 16 }}>
|
||||
<strong>{item.title}</strong>
|
||||
<div style={{ color: 'var(--text2)', fontSize: 13 }}>
|
||||
{item.visibility === 'club' && item.club_name ? item.club_name : VISIBILITY[item.visibility] || item.visibility}
|
||||
{' · Release Revision '}
|
||||
{item.revision}
|
||||
{item.areas?.length ? ` · ${item.areas.join(', ')}` : ''}
|
||||
</div>
|
||||
<Link to={`/exercises/${item.exercise_id}/edit?tab=freigabe`}>Freigabe öffnen</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user