Some checks failed
Test Suite / pytest-backend (push) Waiting to run
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Has been cancelled
Behebt editingActionId-Bug in Plan/Work-Sprint; Schnellzuweisung AP zu anderem Sprint ohne Voll-Reload. Co-authored-by: Cursor <cursoragent@cursor.com>
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
import { listCarryoverTargetSprints } from '../utils/workCycleActions.js'
|
|
|
|
/**
|
|
* Schnellzuweisung: AP in einen anderen Sprint verschieben.
|
|
*/
|
|
export function SprintTransferSelect({
|
|
action,
|
|
workCycles = [],
|
|
busy = false,
|
|
onMove,
|
|
className = '',
|
|
}) {
|
|
if (!action?.work_cycle_id || action.status === 'done' || action.status === 'discarded') {
|
|
return null
|
|
}
|
|
|
|
const targets = listCarryoverTargetSprints(workCycles, action.work_cycle_id)
|
|
if (targets.length === 0) return null
|
|
|
|
return (
|
|
<label className={`sprint-transfer-select ${className}`.trim()}>
|
|
<span className="sr-only">In anderen Sprint verschieben</span>
|
|
<select
|
|
className="inline-select"
|
|
value=""
|
|
disabled={busy}
|
|
aria-label={`${action.title} in anderen Sprint verschieben`}
|
|
onChange={(e) => {
|
|
const targetId = e.target.value
|
|
if (targetId && typeof onMove === 'function') {
|
|
onMove(action, targetId)
|
|
}
|
|
e.target.value = ''
|
|
}}
|
|
>
|
|
<option value="">→ Sprint …</option>
|
|
{targets.map((cycle) => (
|
|
<option key={cycle.id} value={cycle.id}>
|
|
{cycle.title}
|
|
{cycle.status === 'active' ? ' (aktiv)' : cycle.status === 'planned' ? ' (geplant)' : ''}
|
|
</option>
|
|
))}
|
|
</select>
|
|
</label>
|
|
)
|
|
}
|