mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add ability to filter parts list by "salable" status
This commit is contained in:
parent
0c56079b41
commit
9e4d09343c
@ -158,6 +158,10 @@ function loadPartTable(table, url, options={}) {
|
|||||||
display += `<span class='fas fa-star label-right' title='Starred part'></span>`;
|
display += `<span class='fas fa-star label-right' title='Starred part'></span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (row.salable) {
|
||||||
|
display += `<span class='fas fa-dollar-sign label-right' title='Salable part'></span>`;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (row.component) {
|
if (row.component) {
|
||||||
display = display + `<span class='fas fa-cogs label-right' title='Component part'></span>`;
|
display = display + `<span class='fas fa-cogs label-right' title='Component part'></span>`;
|
||||||
|
@ -164,9 +164,8 @@
|
|||||||
<td><i>{% trans "Part can be purchased from external suppliers" %}</i></td>
|
<td><i>{% trans "Part can be purchased from external suppliers" %}</i></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% if 0 %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>{% trans "Sellable" %}</b></td>
|
<td><b>{% trans "Salable" %}</b></td>
|
||||||
<td>{% include "slide.html" with state=part.salable field='salable' %}</td>
|
<td>{% include "slide.html" with state=part.salable field='salable' %}</td>
|
||||||
{% if part.salable %}
|
{% if part.salable %}
|
||||||
<td>{% trans "Part can be sold to customers" %}</td>
|
<td>{% trans "Part can be sold to customers" %}</td>
|
||||||
@ -174,7 +173,6 @@
|
|||||||
<td><i>{% trans "Part cannot be sold to customers" %}</i></td>
|
<td><i>{% trans "Part cannot be sold to customers" %}</i></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,6 +93,10 @@ function getAvailableTableFilters(tableKey) {
|
|||||||
type: 'bool',
|
type: 'bool',
|
||||||
title: '{% trans "Starred" %}',
|
title: '{% trans "Starred" %}',
|
||||||
},
|
},
|
||||||
|
salable: {
|
||||||
|
type: 'bool',
|
||||||
|
title: '{% trans "Salable" %}',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user