mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Table filters
This commit is contained in:
parent
760c80dbb6
commit
d5e7489623
@ -61,6 +61,9 @@
|
|||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
{% if roles.sales_order.change %}
|
{% if roles.sales_order.change %}
|
||||||
<div id='pending-shipment-toolbar' class='btn-group' style='float: right;'>
|
<div id='pending-shipment-toolbar' class='btn-group' style='float: right;'>
|
||||||
|
<div class='btn-group' role='group'>
|
||||||
|
{% include "filter_list.html" with id="pending-shipments" %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table class='table table-striped table-condensed' id='pending-shipments-table' data-toolbar='#pending-shipment-toolbar'></table>
|
<table class='table table-striped table-condensed' id='pending-shipments-table' data-toolbar='#pending-shipment-toolbar'></table>
|
||||||
@ -74,6 +77,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
<div id='completed-shipment-toolbar' class='btn-group' style='float: right;'>
|
<div id='completed-shipment-toolbar' class='btn-group' style='float: right;'>
|
||||||
|
<div class='btn-group' role='group'>
|
||||||
|
{% include "filter_list.html" with id="completed-shipments" %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table class='table table-striped table-condensed' id='completed-shipments-table' data-toolbar='#completed-shipment-toolbar'></table>
|
<table class='table table-striped table-condensed' id='completed-shipments-table' data-toolbar='#completed-shipment-toolbar'></table>
|
||||||
</div>
|
</div>
|
||||||
@ -84,7 +90,12 @@
|
|||||||
<h4>{% trans "Build Orders" %}</h4>
|
<h4>{% trans "Build Orders" %}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
<table class='table table-striped table-condensed' id='builds-table'></table>
|
<div id='builds-toolbar' class='btn-group' style='float: right;'>
|
||||||
|
<div class='btn-group' role='group'>
|
||||||
|
{% include "filter_list.html" with id='build' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class='table table-striped table-condensed' id='builds-table' data-toolbar='#builds-toolbar'></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -138,6 +149,7 @@
|
|||||||
loadSalesOrderShipmentTable('#pending-shipments-table', {
|
loadSalesOrderShipmentTable('#pending-shipments-table', {
|
||||||
order: {{ order.pk }},
|
order: {{ order.pk }},
|
||||||
shipped: false,
|
shipped: false,
|
||||||
|
filter_target: '#filter-list-pending-shipments',
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#new-shipment').click(function() {
|
$('#new-shipment').click(function() {
|
||||||
@ -151,11 +163,14 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
onPanelLoad('order-shipments-complete', function() {
|
||||||
loadSalesOrderShipmentTable('#completed-shipments-table', {
|
loadSalesOrderShipmentTable('#completed-shipments-table', {
|
||||||
order: {{ order.pk }},
|
order: {{ order.pk }},
|
||||||
shipped: true,
|
shipped: true,
|
||||||
|
filter_target: '#filter-list-completed-shipments',
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#edit-notes').click(function() {
|
$('#edit-notes').click(function() {
|
||||||
|
@ -1156,7 +1156,7 @@ function loadSalesOrderShipmentTable(table, options={}) {
|
|||||||
filters[key] = options.params[key];
|
filters[key] = options.params[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
var todo = "Setup filter list for this table";
|
setupFilterList('salesordershipment', $(table), options.filter_target);
|
||||||
|
|
||||||
function makeShipmentActions(row) {
|
function makeShipmentActions(row) {
|
||||||
// Construct "actions" for the given shipment row
|
// Construct "actions" for the given shipment row
|
||||||
@ -1733,6 +1733,10 @@ function showAllocationSubTable(index, row, element, options) {
|
|||||||
data: row.allocations,
|
data: row.allocations,
|
||||||
showHeader: false,
|
showHeader: false,
|
||||||
columns: [
|
columns: [
|
||||||
|
{
|
||||||
|
field: 'part',
|
||||||
|
title: '{% trans "Part" %}',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'allocated',
|
field: 'allocated',
|
||||||
title: '{% trans "Quantity" %}',
|
title: '{% trans "Quantity" %}',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user