feat: adopt solution and close ticket
This commit is contained in:
@@ -66,11 +66,15 @@ export function TicketDetailPage({ ticketId }: { ticketId: number }) {
|
||||
const [transitionError, setTransitionError] = React.useState('')
|
||||
|
||||
React.useEffect(() => {
|
||||
refreshTicket()
|
||||
refreshEvents()
|
||||
}, [ticketId])
|
||||
|
||||
function refreshTicket() {
|
||||
getTicket(ticketId)
|
||||
.then(setTicket)
|
||||
.catch((reason: unknown) => setError(reason instanceof Error ? reason.message : '加载失败'))
|
||||
refreshEvents()
|
||||
}, [ticketId])
|
||||
}
|
||||
|
||||
function refreshEvents() {
|
||||
listTicketEvents(ticketId).then(setEvents).catch(() => setEvents([]))
|
||||
@@ -189,7 +193,13 @@ export function TicketDetailPage({ ticketId }: { ticketId: number }) {
|
||||
side={
|
||||
<>
|
||||
<TicketMetaPanel ticket={ticket} />
|
||||
<SolutionLinkPanel ticketId={ticket.id} />
|
||||
<SolutionLinkPanel
|
||||
ticketId={ticket.id}
|
||||
onTicketChanged={() => {
|
||||
refreshTicket()
|
||||
refreshEvents()
|
||||
}}
|
||||
/>
|
||||
<AppSection title="AI 支持分析" action={<Badge variant="ai">后续接入</Badge>}>
|
||||
<div className="grid gap-3">
|
||||
<div className="flex items-center gap-2 text-sm font-medium text-foreground">
|
||||
|
||||
Reference in New Issue
Block a user