JS linting

This commit is contained in:
Oliver 2021-11-05 00:32:11 +11:00
parent 78ac40083a
commit 5a0ff4c077
2 changed files with 12 additions and 10 deletions

View File

@ -10,7 +10,6 @@
modalSetSubmitText, modalSetSubmitText,
modalShowSubmitButton, modalShowSubmitButton,
modalSubmit, modalSubmit,
showAlertOrCache,
showQuestionDialog, showQuestionDialog,
*/ */

View File

@ -4,12 +4,11 @@
/* globals /* globals
attachSelect, attachSelect,
enableField,
clearField,
clearFieldOptions,
closeModal, closeModal,
constructField, constructField,
constructFormBody, constructFormBody,
disableField,
enableField,
getFormFieldValue, getFormFieldValue,
global_settings, global_settings,
handleFormErrors, handleFormErrors,
@ -33,10 +32,8 @@
printStockItemLabels, printStockItemLabels,
printTestReports, printTestReports,
renderLink, renderLink,
reloadFieldOptions,
scanItemsIntoLocation, scanItemsIntoLocation,
showAlertDialog, showAlertDialog,
setFieldValue,
setupFilterList, setupFilterList,
showApiError, showApiError,
stockStatusDisplay, stockStatusDisplay,
@ -44,6 +41,10 @@
/* exported /* exported
createNewStockItem, createNewStockItem,
createStockLocation,
duplicateStockItem,
editStockItem,
editStockLocation,
exportStock, exportStock,
loadInstalledInTable, loadInstalledInTable,
loadStockLocationTable, loadStockLocationTable,
@ -344,12 +345,14 @@ function createNewStockItem(options={}) {
} else { } else {
// Multiple stock items have been created (i.e. serialized stock) // Multiple stock items have been created (i.e. serialized stock)
var details = `
var q = response.quantity; <br>{% trans "Quantity" %}: ${response.quantity}
<br>{% trans "Serial Numbers" %}: ${response.serial_numbers}
`;
showMessage('{% trans "Created multiple stock items" %}', { showMessage('{% trans "Created multiple stock items" %}', {
icon: 'fas fa-boxes', icon: 'fas fa-boxes',
details: `{% trans "Serial numbers" %}: ${response.serial_numbers}` details: details,
}); });
var table = options.table || '#stock-table'; var table = options.table || '#stock-table';
@ -357,7 +360,7 @@ function createNewStockItem(options={}) {
// Reload the table // Reload the table
$(table).bootstrapTable('refresh'); $(table).bootstrapTable('refresh');
} }
} };
} }
constructForm(url, options); constructForm(url, options);