feat(ST-n1csfo4j): AlertDialog imports, state en transition voor Alles-op-done knop
Voegt AlertDialog-imports, setAllSprintTasksDoneAction-import, productId-prop (hernoemd van _productId) en showAllDoneConfirm/isSettingAllDone state toe aan sprint-header.tsx als voorbereiding op de Alles-op-done AlertDialog-knop. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
31dc429b61
commit
33c7c03a67
1 changed files with 14 additions and 2 deletions
|
|
@ -8,6 +8,16 @@ import {
|
|||
DialogContent,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog'
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogFooter,
|
||||
AlertDialogHeader,
|
||||
AlertDialogTitle,
|
||||
} from '@/components/ui/alert-dialog'
|
||||
import { toast } from 'sonner'
|
||||
import { DemoTooltip } from '@/components/shared/demo-tooltip'
|
||||
import {
|
||||
|
|
@ -20,7 +30,7 @@ import {
|
|||
entityDialogFooterClasses,
|
||||
entityDialogHeaderClasses,
|
||||
} from '@/components/shared/entity-dialog-layout'
|
||||
import { updateSprintGoalAction, updateSprintDatesAction, completeSprintAction } from '@/actions/sprints'
|
||||
import { updateSprintGoalAction, updateSprintDatesAction, completeSprintAction, setAllSprintTasksDoneAction } from '@/actions/sprints'
|
||||
import type { SprintStory } from './sprint-backlog'
|
||||
|
||||
interface Sprint {
|
||||
|
|
@ -51,12 +61,14 @@ function toDateInputValue(d: Date | null) {
|
|||
return d.toISOString().slice(0, 10)
|
||||
}
|
||||
|
||||
export function SprintHeader({ productId: _productId, productName, sprint, isDemo, sprintStories }: SprintHeaderProps) {
|
||||
export function SprintHeader({ productId, productName, sprint, isDemo, sprintStories }: SprintHeaderProps) {
|
||||
const [editingGoal, setEditingGoal] = useState(false)
|
||||
const [editingDates, setEditingDates] = useState(false)
|
||||
const [completeOpen, setCompleteOpen] = useState(false)
|
||||
const [decisions, setDecisions] = useState<Record<string, 'DONE' | 'OPEN'>>({})
|
||||
const [isCompleting, startCompleting] = useTransition()
|
||||
const [showAllDoneConfirm, setShowAllDoneConfirm] = useState(false)
|
||||
const [isSettingAllDone, startSettingAllDone] = useTransition()
|
||||
const [datesDirty, setDatesDirty] = useState(false)
|
||||
const datesFormRef = useRef<HTMLFormElement>(null)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue