mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
remove import / export calls
This commit is contained in:
parent
24ca1c5641
commit
5d45fce240
@ -1,3 +1,14 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
function yesNoLabel(value) {
|
||||||
|
if (value) {
|
||||||
|
return `<span class='label label-green'>{% trans "YES" %}</span>`;
|
||||||
|
} else {
|
||||||
|
return `<span class='label label-yellow'>{% trans "NO" %}</span>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A set of simple helper functions
|
* A set of simple helper functions
|
||||||
*/
|
*/
|
||||||
|
@ -5,15 +5,6 @@
|
|||||||
* Requires api.js to be loaded first
|
* Requires api.js to be loaded first
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function yesNoLabel(value) {
|
|
||||||
if (value) {
|
|
||||||
return `<span class='label label-green'>{% trans "YES" %}</span>`;
|
|
||||||
} else {
|
|
||||||
return `<span class='label label-yellow'>{% trans "NO" %}</span>`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function partGroups(options={}) {
|
function partGroups(options={}) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
{% 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 %}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
import { inventreeLoad, inventreeSave } from '{% url "inventree.js" %}';
|
|
||||||
|
|
||||||
|
|
||||||
function reloadtable(table) {
|
function reloadtable(table) {
|
||||||
$(table).bootstrapTable('refresh');
|
$(table).bootstrapTable('refresh');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Status codes for the {{ label }} model.
|
* Status codes for the {{ label }} model.
|
||||||
*/
|
*/
|
||||||
export const {{ label }}Codes = {
|
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 %}
|
||||||
@ -15,7 +15,7 @@ export const {{ 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
|
||||||
*/
|
*/
|
||||||
export function {{ label }}StatusDisplay(key, options={}) {
|
function {{ label }}StatusDisplay(key, options={}) {
|
||||||
|
|
||||||
key = String(key);
|
key = String(key);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user