feat: redesign ticket detail experience
This commit is contained in:
@@ -31,9 +31,17 @@ export function transitionTicket(ticketId: number, status: TicketStatus, remark
|
||||
})
|
||||
}
|
||||
|
||||
export function addTicketComment(ticketId: number, content: string) {
|
||||
export function addTicketComment(
|
||||
ticketId: number,
|
||||
content: string,
|
||||
options: { comment_type?: string; visibility?: string } = {}
|
||||
) {
|
||||
return apiRequest<TicketComment>(`/tickets/${ticketId}/comments`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ content, comment_type: 'internal_note', visibility: 'internal' })
|
||||
body: JSON.stringify({
|
||||
content,
|
||||
comment_type: options.comment_type ?? 'internal_note',
|
||||
visibility: options.visibility ?? 'internal'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user