From 52a3a0013daf856947a95a99df53bdaf2452dd75 Mon Sep 17 00:00:00 2001 From: aastabk Date: Mon, 7 Jul 2025 13:11:53 +0200 Subject: [PATCH 1/2] Able to change status and convert to draft for analysis orders --- src/staff/templates/staff/analysisorder_detail.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/staff/templates/staff/analysisorder_detail.html b/src/staff/templates/staff/analysisorder_detail.html index 9dddec5e..283df9b4 100644 --- a/src/staff/templates/staff/analysisorder_detail.html +++ b/src/staff/templates/staff/analysisorder_detail.html @@ -28,10 +28,18 @@
Samples to analyze
back Samples Assign staff - {% if object.status != object.OrderStatus.DRAFT%} -
+ +
+ {% if object.status == object.OrderStatus.DELIVERED%} {% url 'staff:order-to-draft' pk=object.id as to_draft_url %} {% action-button action=to_draft_url class="bg-secondary text-white" submit_text="Convert to draft" csrf_token=csrf_token %} {% endif %} + + {% if object.status != object.OrderStatus.DRAFT and object.next_status %} + {% url 'staff:order-to-next-status' pk=object.id as to_next_status_url %} + {% with "Set as "|add:object.next_status as btn_name %} + {% action-button action=to_next_status_url class="bg-secondary text-white" submit_text=btn_name csrf_token=csrf_token %} + {% endwith %} + {% endif %} {% endblock %} From ccb7e19d5ebb1365fefcb5403b27766fbeeaffb0 Mon Sep 17 00:00:00 2001 From: aastabk Date: Mon, 7 Jul 2025 13:18:15 +0200 Subject: [PATCH 2/2] Minor spacing --- src/staff/templates/staff/analysisorder_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/staff/templates/staff/analysisorder_detail.html b/src/staff/templates/staff/analysisorder_detail.html index 283df9b4..f51d23f5 100644 --- a/src/staff/templates/staff/analysisorder_detail.html +++ b/src/staff/templates/staff/analysisorder_detail.html @@ -30,7 +30,7 @@
Samples to analyze
Assign staff
- {% if object.status == object.OrderStatus.DELIVERED%} + {% if object.status == object.OrderStatus.DELIVERED %} {% url 'staff:order-to-draft' pk=object.id as to_draft_url %} {% action-button action=to_draft_url class="bg-secondary text-white" submit_text="Convert to draft" csrf_token=csrf_token %} {% endif %}