fix: Sprint-AP Bearbeiten, Sprint-Verschiebung und klarere Aktionsleiste.
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
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>
This commit is contained in:
1 parent
04d1dbf1f9
commit
ee1e1c0671
9 files changed
+178
-40
No files matched your search
@@ -3,6 +3,7 @@ import { ACTION_STATUS_LABELS, PRIORITY_LABELS } from '../constants/status.js'
|
||||
import { ActorSelect } from './ActorSelect.jsx'
|
||||
import { GateSelect } from './GateSelect.jsx'
|
||||
import { flattenLeafProjectOptions, getLeafProjects } from '../utils/projectTree.js'
|
||||
import { PLANNING_SPRINT_STATUSES } from '../utils/workCycleActions.js'
|
||||
|
||||
function isoToLocalInput(iso) {
|
||||
if (!iso) return ''
|
||||
@@ -47,7 +48,9 @@ export function ActionForm({
|
||||
const defaultActors = initial.assigned_actor_ids || []
|
||||
const leafProjects = getLeafProjects(projects)
|
||||
const projectOptions = flattenLeafProjectOptions(projects)
|
||||
const cycleOptions = workCycles.filter((c) => c.status !== 'completed')
|
||||
const cycleOptions = workCycles.filter(
|
||||
(c) => PLANNING_SPRINT_STATUSES.has(c.status) || c.id === initial.work_cycle_id,
|
||||
)
|
||||
const defaultCycleId =
|
||||
initial.work_cycle_id || (activeWorkCycle?.id && !initial.id ? activeWorkCycle.id : '')
|
||||
|
||||
@@ -108,13 +111,19 @@ export function ActionForm({
|
||||
/>
|
||||
{cycleOptions.length > 0 && (
|
||||
<label>
|
||||
Sprint (optional)
|
||||
Sprint
|
||||
<select name="work_cycle_id" defaultValue={defaultCycleId}>
|
||||
<option value="">— kein Sprint —</option>
|
||||
{cycleOptions.map((cycle) => (
|
||||
<option key={cycle.id} value={cycle.id}>
|
||||
{cycle.title}
|
||||
{cycle.status === 'active' ? ' (aktiv)' : ''}
|
||||
{cycle.status === 'active'
|
||||
? ' (aktiv)'
|
||||
: cycle.status === 'planned'
|
||||
? ' (geplant)'
|
||||
: cycle.status === 'reached'
|
||||
? ' (abgeschlossen)'
|
||||
: ''}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { PriorityBadge } from './PriorityBadge.jsx'
|
||||
import { ActionForm } from './ActionForm.jsx'
|
||||
import { gateTitleById } from './GateSelect.jsx'
|
||||
import { actionTitleById } from '../utils/actionReferences.js'
|
||||
import { SprintTransferSelect } from './SprintTransferSelect.jsx'
|
||||
|
||||
function formatDue(iso) {
|
||||
if (!iso) return null
|
||||
@@ -45,6 +46,7 @@ export function ActionHubCard({
|
||||
onQuickStatus,
|
||||
onCreateBlocker,
|
||||
onUnplanToBacklog,
|
||||
onMoveToSprint,
|
||||
canManage,
|
||||
canManageBlocker,
|
||||
formBusy,
|
||||
@@ -123,6 +125,14 @@ export function ActionHubCard({
|
||||
{action.assigned_actor_ids?.length > 0 && (
|
||||
<span>{action.assigned_actor_ids.length} zugewiesen</span>
|
||||
)}
|
||||
{action.work_cycle_id && (
|
||||
<span>
|
||||
Sprint:{' '}
|
||||
{workCycles.find((c) => c.id === action.work_cycle_id)?.title ||
|
||||
activeWorkCycle?.title ||
|
||||
'…'}
|
||||
</span>
|
||||
)}
|
||||
{due && <span>Fällig: {due}</span>}
|
||||
</div>
|
||||
</header>
|
||||
@@ -169,18 +179,29 @@ export function ActionHubCard({
|
||||
|
||||
{canManage && (
|
||||
<footer className="action-hub-card-actions">
|
||||
<select
|
||||
className="inline-select"
|
||||
value={action.status}
|
||||
onChange={(e) => onQuickStatus(e.target.value)}
|
||||
aria-label="Status ändern"
|
||||
>
|
||||
{ACTION_STATUSES.map((s) => (
|
||||
<option key={s} value={s}>
|
||||
{ACTION_STATUS_LABELS[s]}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<div className="action-hub-card-actions__primary">
|
||||
<select
|
||||
className="inline-select"
|
||||
value={action.status}
|
||||
onChange={(e) => onQuickStatus(e.target.value)}
|
||||
aria-label="Status ändern"
|
||||
>
|
||||
{ACTION_STATUSES.map((s) => (
|
||||
<option key={s} value={s}>
|
||||
{ACTION_STATUS_LABELS[s]}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
{typeof onMoveToSprint === 'function' && (
|
||||
<SprintTransferSelect
|
||||
action={action}
|
||||
workCycles={workCycles}
|
||||
busy={formBusy}
|
||||
onMove={onMoveToSprint}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className="action-hub-card-actions__secondary">
|
||||
{canManageBlocker && action.status !== 'done' && (
|
||||
<button
|
||||
type="button"
|
||||
@@ -216,6 +237,7 @@ export function ActionHubCard({
|
||||
Details
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</footer>
|
||||
)}
|
||||
</article>
|
||||
|
||||
@@ -22,6 +22,7 @@ export function InitiativeActionsHub({
|
||||
onQuickStatus,
|
||||
onCreateBlockerForAction,
|
||||
onUnplanToBacklog,
|
||||
onMoveToSprint,
|
||||
canManage,
|
||||
canManageBlocker,
|
||||
formBusy,
|
||||
@@ -32,6 +33,7 @@ export function InitiativeActionsHub({
|
||||
onReloadActors,
|
||||
sectionTitle = 'Arbeitspakete',
|
||||
sectionLead = 'Committete operative Einheit — Aufgaben im Detail. Blocker, Nachweise und Reviews hängen am Arbeitspaket.',
|
||||
allActions = [],
|
||||
}) {
|
||||
return (
|
||||
<section className="card initiative-actions-hub">
|
||||
@@ -98,6 +100,7 @@ export function InitiativeActionsHub({
|
||||
onQuickStatus={(status) => onQuickStatus(action, status)}
|
||||
onCreateBlocker={() => onCreateBlockerForAction(action.id)}
|
||||
onUnplanToBacklog={onUnplanToBacklog}
|
||||
onMoveToSprint={onMoveToSprint}
|
||||
canManage={canManage}
|
||||
canManageBlocker={canManageBlocker}
|
||||
formBusy={formBusy}
|
||||
@@ -111,7 +114,7 @@ export function InitiativeActionsHub({
|
||||
roadmapItems={roadmapItems}
|
||||
workCycles={workCycles}
|
||||
activeWorkCycle={activeWorkCycle}
|
||||
allActions={actions}
|
||||
allActions={allActions.length ? allActions : actions}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user