2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-09 21: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

@@ -299,27 +299,12 @@ loadSupplierPriceBreakTable({
});
$('#new-price-break').click(function() {
constructForm(
'{% url "api-part-supplier-price-list" %}',
{
method: 'POST',
fields: {
quantity: {},
part: {
value: {{ part.pk }},
hidden: true,
},
price: {},
price_currency: {
},
},
title: '{% trans "Add Price Break" %}',
onSuccess: function() {
$("#price-break-table").bootstrapTable("refresh");
}
createSupplierPartPriceBreak({{ part.pk }}, {
onSuccess: function() {
$("#price-break-table").bootstrapTable("refresh");
}
);
});
});
loadPurchaseOrderTable($("#purchase-order-table"), {