mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
More cleanup
- Allow user filtering for purchase-order table in part view - Remove some debug strings
This commit is contained in:
parent
eb3b5308ab
commit
ea466c3588
@ -73,8 +73,6 @@ function saveTableFilters(tableKey, filters) {
|
||||
|
||||
var filterstring = strings.join('&');
|
||||
|
||||
console.log(`Saving filters for table '${tableKey}' - ${filterstring}`);
|
||||
|
||||
inventreeSave(lookup, filterstring);
|
||||
}
|
||||
|
||||
@ -256,12 +254,8 @@ function setupFilterList(tableKey, table, target) {
|
||||
var clear = `filter-clear-${tableKey}`;
|
||||
var make = `filter-make-${tableKey}`;
|
||||
|
||||
console.log(`Generating filter list: ${tableKey}`);
|
||||
|
||||
var filters = loadTableFilters(tableKey);
|
||||
|
||||
console.log("Filters: " + filters.count);
|
||||
|
||||
var element = $(target);
|
||||
|
||||
// One blank slate, please
|
||||
|
@ -114,7 +114,7 @@ function loadPurchaseOrderTable(table, options) {
|
||||
|
||||
setupFilterList("order", table);
|
||||
|
||||
table.inventreeTable({
|
||||
$(table).inventreeTable({
|
||||
url: options.url,
|
||||
queryParams: filters,
|
||||
groupBy: false,
|
||||
|
@ -25,7 +25,7 @@
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
loadPurchaseOrderTable($("#purchase-order-table"), {
|
||||
loadPurchaseOrderTable("#purchase-order-table", {
|
||||
url: "{% url 'api-po-list' %}?supplier={{ company.id }}",
|
||||
});
|
||||
|
||||
@ -48,7 +48,4 @@
|
||||
newOrder();
|
||||
});
|
||||
|
||||
$(".po-table").inventreeTable({
|
||||
});
|
||||
|
||||
{% endblock %}
|
||||
|
@ -37,10 +37,7 @@ $("#po-create").click(function() {
|
||||
);
|
||||
});
|
||||
|
||||
$("#po-table").inventreeTable({
|
||||
});
|
||||
|
||||
loadPurchaseOrderTable($("#purchase-order-table"), {
|
||||
loadPurchaseOrderTable("#purchase-order-table", {
|
||||
url: "{% url 'api-po-list' %}",
|
||||
});
|
||||
|
||||
|
@ -9,8 +9,11 @@
|
||||
<hr>
|
||||
|
||||
<div id='button-bar'>
|
||||
<div class='btn-group'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
<button class='btn btn-primary' type='button' id='part-order2' title='Order part'>Order Part</button>
|
||||
<div class='filter-list' id='filter-list-order'>
|
||||
<!-- An empty div in which the filter list will be constructed -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user