fix(tickets): refresh status and resources in detail panel after update
Status update was returning only new_status (string) and the parent list's onStatusUpdated only set status_name. The <select> was bound to status_id, which never changed — so it visually reverted to the old status even though the PATCH succeeded. - Backend: include new_status_id in the status-update response. - Panel: own currentStatusId/currentStatusName state so the select reflects the change immediately and survives stale parent snapshots. - Parent list: update status_id on both the row and selectedTicket so the list row stays in sync when the panel stays open. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,7 @@ class PSATicketStatusUpdateSchema(BaseModel):
|
||||
ticket_id: int
|
||||
previous_status: str
|
||||
new_status: str
|
||||
new_status_id: int
|
||||
|
||||
|
||||
class TicketCreatePayloadSchema(BaseModel):
|
||||
|
||||
@@ -87,6 +87,7 @@ async def update_status(
|
||||
ticket_id=ticket_id,
|
||||
previous_status=previous_status,
|
||||
new_status=new_status,
|
||||
new_status_id=status_id,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user