feat: add ticket solution closure loop

This commit is contained in:
hailin
2026-07-02 10:11:30 +08:00
parent 0ea4a3c853
commit a6df96ebb0
18 changed files with 435 additions and 68 deletions

View File

@@ -23,6 +23,7 @@ const STATUS_ACTION_LABELS: Partial<Record<TicketStatus, string>> = {
type TicketTransitionDialogProps = {
open: boolean
status: TicketStatus | null
actionLabel?: string
onOpenChange: (open: boolean) => void
onSubmit: (status: TicketStatus, remark: string) => Promise<void>
}
@@ -30,12 +31,13 @@ type TicketTransitionDialogProps = {
export function TicketTransitionDialog({
open,
status,
actionLabel: customActionLabel,
onOpenChange,
onSubmit
}: TicketTransitionDialogProps) {
const [remark, setRemark] = React.useState('')
const [submitting, setSubmitting] = React.useState(false)
const actionLabel = status ? STATUS_ACTION_LABELS[status] ?? '调整状态' : '调整状态'
const actionLabel = customActionLabel ?? (status ? STATUS_ACTION_LABELS[status] ?? '调整状态' : '调整状态')
React.useEffect(() => {
if (!open) {