2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Js forms updates (#4378)

* Refactor forms for creating and editing SalesOrder

- Common function for defining fields

* More visual improvements for forms

* Refactor fields for SupplierPartPriceBreak

* More refactoring

* Refactor for stockitemtestresult table

* Comment fields

* JS linting fix
This commit is contained in:
Oliver
2023-02-21 07:24:49 +11:00
committed by GitHub
parent 17bfea4428
commit 62455199f3
12 changed files with 267 additions and 172 deletions

View File

@ -206,28 +206,7 @@ src="{% static 'img/blank_image.png' %}"
$("#edit-order").click(function() {
constructForm('{% url "api-so-detail" order.pk %}', {
fields: {
reference: {
icon: 'fa-hashtag',
},
{% if order.lines.count == 0 and order.status == SalesOrderStatus.PENDING %}
customer: {
},
{% endif %}
customer_reference: {},
description: {},
target_date: {
icon: 'fa-calendar-alt',
},
link: {
icon: 'fa-link',
},
responsible: {
icon: 'fa-user',
},
},
title: '{% trans "Edit Sales Order" %}',
editSalesOrder({{ order.pk }}, {
reload: true,
});
});