mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fixes for table_filters.js
This commit is contained in:
parent
0620e656a0
commit
140a2092c8
@ -2,6 +2,8 @@
|
|||||||
{% load status_codes %}
|
{% load status_codes %}
|
||||||
{% load inventree_extras %}
|
{% load inventree_extras %}
|
||||||
|
|
||||||
|
import { global_settings } from '{% url "settings.js" %}';
|
||||||
|
|
||||||
{% include "status_codes.html" with label='stock' options=StockStatus.list %}
|
{% include "status_codes.html" with label='stock' options=StockStatus.list %}
|
||||||
{% include "status_codes.html" with label='stockHistory' options=StockHistoryCode.list %}
|
{% include "status_codes.html" with label='stockHistory' options=StockHistoryCode.list %}
|
||||||
{% include "status_codes.html" with label='build' options=BuildStatus.list %}
|
{% include "status_codes.html" with label='build' options=BuildStatus.list %}
|
||||||
@ -9,7 +11,7 @@
|
|||||||
{% include "status_codes.html" with label='salesOrder' options=SalesOrderStatus.list %}
|
{% include "status_codes.html" with label='salesOrder' options=SalesOrderStatus.list %}
|
||||||
|
|
||||||
|
|
||||||
function getAvailableTableFilters(tableKey) {
|
export function getAvailableTableFilters(tableKey) {
|
||||||
|
|
||||||
tableKey = tableKey.toLowerCase();
|
tableKey = tableKey.toLowerCase();
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Status codes for the {{ label }} model.
|
* Status codes for the {{ label }} model.
|
||||||
*/
|
*/
|
||||||
var {{ label }}Codes = {
|
export const {{ label }}Codes = {
|
||||||
{% for opt in options %}'{{ opt.key }}': {
|
{% for opt in options %}'{{ opt.key }}': {
|
||||||
key: '{{ opt.key }}',
|
key: '{{ opt.key }}',
|
||||||
value: '{{ opt.value }}',{% if opt.color %}
|
value: '{{ opt.value }}',{% if opt.color %}
|
||||||
label: 'label-{{ opt.color }}',{% endif %}
|
label: 'label-{{ opt.color }}',{% endif %}
|
||||||
},{% endfor %}
|
},
|
||||||
|
{% endfor %}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -14,7 +15,7 @@ var {{ label }}Codes = {
|
|||||||
* Uses the values specified in "status_codes.py"
|
* Uses the values specified in "status_codes.py"
|
||||||
* This function is generated by the "status_codes.html" template
|
* This function is generated by the "status_codes.html" template
|
||||||
*/
|
*/
|
||||||
function {{ label }}StatusDisplay(key, options={}) {
|
export function {{ label }}StatusDisplay(key, options={}) {
|
||||||
|
|
||||||
key = String(key);
|
key = String(key);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user