Added page actions menu item

This commit is contained in:
Maksim Stojkovic 2022-05-19 18:58:33 +10:00
parent 8ceff063f8
commit 239138a1b5

View File

@ -57,6 +57,9 @@ src="{% static 'img/blank_image.png' %}"
<ul class='dropdown-menu' role='menu'>
<li><a class='dropdown-item' href='#' id='edit-order'><span class='fas fa-edit icon-green'></span> {% trans "Edit order" %}</a></li>
{% if order.status == SalesOrderStatus.PENDING %}
{% if order.pending_shipment_count > 0 %}
<li><a class='dropdown-item' href='#' id='complete-order-shipments'><span class='fas fa-truck'></span> {% trans "Complete Shipments" %}</a></li>
{% endif %}
<li><a class='dropdown-item' href='#' id='cancel-order'><span class='fas fa-times-circle icon-red'></span> {% trans "Cancel order" %}</a></li>
{% endif %}
</ul>
@ -223,6 +226,16 @@ $("#edit-order").click(function() {
});
});
$("#complete-order-shipments").click(function() {
completeShipments(
{{ order.pk }},
{
reload: true,
}
);
});
$("#cancel-order").click(function() {
cancelSalesOrder(