From c88c5cf97330ac60e5ff16b5d30ba26a7ece8db6 Mon Sep 17 00:00:00 2001 From: ismail Date: Mon, 20 Jul 2026 22:26:05 +0300 Subject: [PATCH] ux(complaint): surface resolution_category and resolution_outcome in resolve modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These fields already existed on the Complaint model and are read by ComplaintService.change_status, but PX had to fill them via separate endpoints after resolving. Now they're captured in the same modal as the resolution text. Also fixed the view (complaint_change_status) to extract resolution_category from POST and pass it to the service — the service accepted the kwarg but the view never forwarded it. --- apps/complaints/ui_views.py | 2 ++ templates/complaints/complaint_detail.html | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/apps/complaints/ui_views.py b/apps/complaints/ui_views.py index c051faf..7c0a8ea 100644 --- a/apps/complaints/ui_views.py +++ b/apps/complaints/ui_views.py @@ -1589,6 +1589,7 @@ def complaint_change_status(request, pk): new_status = request.POST.get("status") note = request.POST.get("note", "") resolution = request.POST.get("resolution", "") + resolution_category = request.POST.get("resolution_category", "") resolution_outcome = request.POST.get("resolution_outcome", "") resolution_outcome_other = request.POST.get("resolution_outcome_other", "") @@ -1600,6 +1601,7 @@ def complaint_change_status(request, pk): request=request, note=note, resolution=resolution, + resolution_category=resolution_category, resolution_outcome=resolution_outcome, resolution_outcome_other=resolution_outcome_other, ) diff --git a/templates/complaints/complaint_detail.html b/templates/complaints/complaint_detail.html index 275d388..4345b0f 100644 --- a/templates/complaints/complaint_detail.html +++ b/templates/complaints/complaint_detail.html @@ -961,6 +961,28 @@ +
+
+ + +
+
+ + +
+