mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
JS linting
This commit is contained in:
parent
e7d78db87b
commit
7ecd4c70e7
@ -4,7 +4,6 @@
|
||||
/* globals
|
||||
buildStatusDisplay,
|
||||
constructForm,
|
||||
getFieldByName,
|
||||
global_settings,
|
||||
imageHoverIcon,
|
||||
inventreeGet,
|
||||
@ -397,7 +396,7 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
|
||||
var row = $(table).bootstrapTable('getRowByUniqueId', pk);
|
||||
|
||||
if (!row) {
|
||||
console.log("WARNING: getRowByUniqueId returned null");
|
||||
console.log('WARNING: getRowByUniqueId returned null');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -834,12 +833,6 @@ function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
|
||||
// ID of the associated "build output" (or null)
|
||||
var output_id = options.output || null;
|
||||
|
||||
var query_params = {
|
||||
part: part_id,
|
||||
sub_part_detail: true,
|
||||
sub_part_trackable: output_id != null
|
||||
};
|
||||
|
||||
var source_location = options.source_location;
|
||||
|
||||
function renderBomItemRow(bom_item, quantity) {
|
||||
@ -915,7 +908,7 @@ function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
|
||||
return html;
|
||||
}
|
||||
|
||||
var table_entries = "";
|
||||
var table_entries = '';
|
||||
|
||||
for (var idx = 0; idx < bom_items.length; idx++) {
|
||||
var bom_item = bom_items[idx];
|
||||
@ -1045,7 +1038,7 @@ function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
|
||||
|
||||
// Add callback to "clear" button for take_from field
|
||||
addClearCallback(
|
||||
"take_from",
|
||||
'take_from',
|
||||
take_from_field,
|
||||
options,
|
||||
);
|
||||
@ -1098,7 +1091,7 @@ function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
|
||||
|
||||
// Provide nested values
|
||||
opts.nested = {
|
||||
"items": item_pk_values
|
||||
'items': item_pk_values
|
||||
};
|
||||
|
||||
inventreePut(
|
||||
@ -1116,13 +1109,13 @@ function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
|
||||
},
|
||||
error: function(xhr) {
|
||||
switch (xhr.status) {
|
||||
case 400:
|
||||
handleFormErrors(xhr.responseJSON, fields, opts);
|
||||
break;
|
||||
default:
|
||||
$(opts.modal).modal('hide');
|
||||
showApiError(xhr);
|
||||
break;
|
||||
case 400:
|
||||
handleFormErrors(xhr.responseJSON, fields, opts);
|
||||
break;
|
||||
default:
|
||||
$(opts.modal).modal('hide');
|
||||
showApiError(xhr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -905,7 +905,7 @@ function handleNestedErrors(errors, field_name, options) {
|
||||
return;
|
||||
}
|
||||
|
||||
var nest_list = nest_list = options["nested"][field_name];
|
||||
var nest_list = nest_list = options['nested'][field_name];
|
||||
|
||||
// Nest list must be provided!
|
||||
if (!nest_list) {
|
||||
@ -996,7 +996,7 @@ function handleFormErrors(errors, fields, options) {
|
||||
|
||||
var field = fields[field_name];
|
||||
|
||||
if ((field.type == "field") && ("child" in field)) {
|
||||
if ((field.type == 'field') && ('child' in field)) {
|
||||
// This is a "nested" field
|
||||
handleNestedErrors(errors, field_name, options);
|
||||
} else {
|
||||
@ -1348,7 +1348,7 @@ function initializeRelatedField(field, fields, options) {
|
||||
query.limit = pageSize;
|
||||
|
||||
// Allow custom run-time filter augmentation
|
||||
if ("adjustFilters" in field) {
|
||||
if ('adjustFilters' in field) {
|
||||
query = field.adjustFilters(query);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user