Files
shinkan-jinkendo/frontend/src/components/exercises/ExerciseListBulkToolbar.jsx
T
LarsandCursor b59b7eae16
Deploy Development / deploy (push) Successful in 53s
Test Suite / pytest-backend (push) Failing after 29s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 16s
Test Suite / k6 /health Baseline (push) Successful in 35s
Test Suite / playwright-tests (push) Failing after 7m42s
Offer the current exercise through an explicit API switch.
The exercise list turns the live catalog on or off for the caller's edit rights. A distribution key reads that current selection and the changes since its last cursor.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 15:37:25 +01:00

50 lines
1.5 KiB
React

import React from 'react'
export default function ExerciseListBulkToolbar({
selectedCount,
bulkMaxIds,
onClearSelection,
onOpenBulkModal,
onOpenSaveModuleModal,
onSetApiOffering,
apiOfferingBusy = false,
}) {
if (selectedCount < 1) return null
return (
<div className="card exercise-bulk-toolbar" data-testid="exercise-list-bulk-toolbar">
<strong>{selectedCount} ausgewählt</strong>
<button type="button" className="btn btn-secondary btn-small" onClick={onClearSelection}>
Auswahl aufheben
</button>
<button type="button" className="btn btn-secondary btn-small" onClick={onOpenSaveModuleModal}>
Als Modul speichern…
</button>
<button type="button" className="btn btn-primary btn-small" onClick={onOpenBulkModal}>
Massenänderung…
</button>
<button
type="button"
className="btn btn-secondary btn-small"
disabled={apiOfferingBusy}
onClick={() => onSetApiOffering(true)}
>
API bereitstellen
</button>
<button
type="button"
className="btn btn-secondary btn-small"
disabled={apiOfferingBusy}
onClick={() => onSetApiOffering(false)}
>
API ausblenden
</button>
<span className="exercise-bulk-toolbar__meta">
Bis zu {bulkMaxIds} pro Anfrage. Für „Verein“ ohne Auswahl: aktiver Vereinskontext (
<code>X-Active-Club-Id</code>
).
</span>
</div>
)
}