mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
let vs var
This commit is contained in:
@ -1686,16 +1686,16 @@ function addSecondaryModal(field, fields, options) {
|
||||
// Callback function when the secondary button is pressed
|
||||
$(options.modal).find(`#btn-new-${field_name}`).click(function() {
|
||||
|
||||
var secondary = field.secondary;
|
||||
let secondary = field.secondary;
|
||||
|
||||
// Determine the API query URL
|
||||
var url = secondary.api_url || field.api_url;
|
||||
let url = secondary.api_url || field.api_url;
|
||||
|
||||
// If the "fields" attribute is a function, call it with data
|
||||
if (secondary.fields instanceof Function || secondary.fieldsFunction instanceof Function) {
|
||||
|
||||
// Extract form values at time of button press
|
||||
var data = extractFormData(fields, options);
|
||||
let data = extractFormData(fields, options);
|
||||
|
||||
// Backup and execute fields function in sequential executions of modal
|
||||
if (secondary.fields instanceof Function) {
|
||||
|
@ -758,7 +758,7 @@ function createPurchaseOrderLineItem(order, options={}) {
|
||||
/* Construct a set of fields for the SalesOrderLineItem form */
|
||||
function soLineItemFields(options={}) {
|
||||
|
||||
var fields = {
|
||||
let fields = {
|
||||
order: {
|
||||
hidden: true,
|
||||
},
|
||||
|
Reference in New Issue
Block a user