mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Load stock location pages "on demand"
This commit is contained in:
parent
52a0665e32
commit
c3ea94827b
@ -223,13 +223,15 @@
|
||||
{{ block.super }}
|
||||
|
||||
{% if category %}
|
||||
loadParametricPartTable(
|
||||
"#parametric-part-table",
|
||||
{
|
||||
headers: {{ headers|safe }},
|
||||
data: {{ parameters|safe }},
|
||||
}
|
||||
);
|
||||
onPanelLoad('parameters', function() {
|
||||
loadParametricPartTable(
|
||||
"#parametric-part-table",
|
||||
{
|
||||
headers: {{ headers|safe }},
|
||||
data: {{ parameters|safe }},
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("#toggle-starred").click(function() {
|
||||
toggleStar({
|
||||
|
@ -202,15 +202,17 @@
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
loadStockLocationTable($('#sublocation-table'), {
|
||||
params: {
|
||||
{% if location %}
|
||||
parent: {{ location.pk }},
|
||||
{% else %}
|
||||
parent: 'null',
|
||||
{% endif %}
|
||||
},
|
||||
allowTreeView: true,
|
||||
onPanelLoad('sublocations', function() {
|
||||
loadStockLocationTable($('#sublocation-table'), {
|
||||
params: {
|
||||
{% if location %}
|
||||
parent: {{ location.pk }},
|
||||
{% else %}
|
||||
parent: 'null',
|
||||
{% endif %}
|
||||
},
|
||||
allowTreeView: true,
|
||||
});
|
||||
});
|
||||
|
||||
linkButtonsToSelection(
|
||||
@ -325,19 +327,21 @@
|
||||
});
|
||||
});
|
||||
|
||||
loadStockTable($("#stock-table"), {
|
||||
buttons: [
|
||||
'#stock-options',
|
||||
],
|
||||
params: {
|
||||
{% if location %}
|
||||
location: {{ location.pk }},
|
||||
{% endif %}
|
||||
part_detail: true,
|
||||
location_detail: true,
|
||||
supplier_part_detail: true,
|
||||
},
|
||||
url: "{% url 'api-stock-list' %}",
|
||||
onPanelLoad('stock', function() {
|
||||
loadStockTable($("#stock-table"), {
|
||||
buttons: [
|
||||
'#stock-options',
|
||||
],
|
||||
params: {
|
||||
{% if location %}
|
||||
location: {{ location.pk }},
|
||||
{% endif %}
|
||||
part_detail: true,
|
||||
location_detail: true,
|
||||
supplier_part_detail: true,
|
||||
},
|
||||
url: "{% url 'api-stock-list' %}",
|
||||
});
|
||||
});
|
||||
|
||||
enableSidebar('stocklocation');
|
||||
|
Loading…
Reference in New Issue
Block a user