2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-10 22:00:56 +00:00

Refactorin'

- Add the "download" button into the "filters" list
- Cuts down on boilerplate code
This commit is contained in:
Oliver
2022-03-03 21:16:27 +11:00
parent 85e9c4d3ca
commit ba406a4da9
9 changed files with 17 additions and 39 deletions

View File

@@ -170,9 +170,6 @@
<div class='panel-content'>
<div id='assigned-stock-button-toolbar'>
<div class='btn-group' role='group'>
<button class='btn btn-outline-secondary filter-button' id='assigned-stock-export' title='{% trans "Export Stock Information" %}'>
<span class='fas fa-download'></span>
</button>
{% include "filter_list.html" with id="customerstock" %}
</div>
</div>
@@ -233,10 +230,6 @@
filterTarget: '#filter-list-customerstock',
});
$('#assigned-stock-export').click(function() {
downloadTableData($('#assigned-stock-table'));
});
{% if company.is_customer %}
loadSalesOrderTable("#sales-order-table", {
url: "{% url 'api-so-list' %}",
@@ -291,10 +284,6 @@
filterKey: "companystock",
});
$("#stock-export").click(function() {
downloadTableData($("#stock-table"));
});
{% if company.is_manufacturer %}
function reloadManufacturerPartTable() {

View File

@@ -308,10 +308,6 @@ loadStockTable($("#stock-table"), {
url: "{% url 'api-stock-list' %}",
});
$("#stock-export").click(function() {
downloadTableData($("#stock-table"));
});
$("#item-create").click(function() {
createNewStockItem({
data: {