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