From 30e29ada160c8acda34d79502b11f89d9147a101 Mon Sep 17 00:00:00 2001 From: Faheedkhan Date: Wed, 11 Jun 2025 18:01:36 +0300 Subject: [PATCH] changed the purchase order ui --- .../purchase_orders/includes/card_po.html | 6 +- .../includes/po_item_formset.html | 2 +- templates/purchase_orders/po_list.html | 108 +++++++++--------- templates/purchase_orders/po_update.html | 7 +- .../purchase_orders/tags/po_item_table.html | 2 +- 5 files changed, 64 insertions(+), 61 deletions(-) diff --git a/templates/purchase_orders/includes/card_po.html b/templates/purchase_orders/includes/card_po.html index ed963fea..8ccb4492 100644 --- a/templates/purchase_orders/includes/card_po.html +++ b/templates/purchase_orders/includes/card_po.html @@ -15,7 +15,7 @@ document.addEventListener('DOMContentLoaded', function() { document.getElementById('POModalBody').innerHTML = `
- + ${buttonText} diff --git a/templates/purchase_orders/includes/po_item_formset.html b/templates/purchase_orders/includes/po_item_formset.html index fc3ebe53..064a12f1 100644 --- a/templates/purchase_orders/includes/po_item_formset.html +++ b/templates/purchase_orders/includes/po_item_formset.html @@ -95,7 +95,7 @@
- +
\ No newline at end of file diff --git a/templates/purchase_orders/po_list.html b/templates/purchase_orders/po_list.html index e9359b72..f25e0080 100644 --- a/templates/purchase_orders/po_list.html +++ b/templates/purchase_orders/po_list.html @@ -1,74 +1,76 @@ {% extends "base.html" %} - +{% load i18n static %} {% block title %} Purchase Orders - {{ block.super }} {% endblock %} {% block content %} -
-

Purchase Orders

- - - {% if messages %} - {% for message in messages %} +
+ + {% if messages %} + {% for message in messages %}
{{ message }}
- {% endfor %} - {% endif %} - - - - -
- - - - - - - - - - - + {% endfor %} + {% endif %} + +
+

+ {{ _("Purchase Orders") |capfirst }} +

+ {{ _("Create New PO") }} +
+ {% include "partials/search_box.html" %} + +
+
PO NumberDescriptionStatusCreated AtActions
+ + + + + + + + + + {% if purchase_orders %} {% for po in purchase_orders %} - - - - + + + - - + - - {% endfor %} - {% else %} - + + {%endfor%} + {% else%} + {% endif %} - -
PO NumberDescriptionStatusCreated AtActions
{{ po.po_number }}{{ po.po_title }} + +
{{ po.po_number }}{{ po.po_title }} {{ po.po_status|capfirst }} {{ po.created|date:"M d, Y" }} - - View - - {% comment %} - View + {{ po.created|date:"M d, Y" }} + + + {% trans "view"|capfirst %} - - Edit - - - Delete - {% endcomment %}
No purchase orders found.
+ + +
+
+
+ {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} +
+
-
+ {% include 'modal/delete_modal.html' %} {% endblock %} \ No newline at end of file diff --git a/templates/purchase_orders/po_update.html b/templates/purchase_orders/po_update.html index e9a4e16a..d5e841fa 100644 --- a/templates/purchase_orders/po_update.html +++ b/templates/purchase_orders/po_update.html @@ -24,12 +24,13 @@ {% csrf_token %} {{ form|crispy }} {% trans 'Back to PO Detail' %} + class="btn btn-outline-secondary w-100 my-2">{% trans 'Back to PO Detail' %} {% trans 'PO List' %} + class="btn btn-outline-info + info w-100 my-2">{% trans 'PO List' %} diff --git a/templates/purchase_orders/tags/po_item_table.html b/templates/purchase_orders/tags/po_item_table.html index f4109ad9..1a82cc16 100644 --- a/templates/purchase_orders/tags/po_item_table.html +++ b/templates/purchase_orders/tags/po_item_table.html @@ -4,7 +4,7 @@
- +
{% trans 'Item' %} {% trans 'Unit Cost' %} {% trans 'PO Qty' %}