mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 05:25:42 +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
|
// Callback function when the secondary button is pressed
|
||||||
$(options.modal).find(`#btn-new-${field_name}`).click(function() {
|
$(options.modal).find(`#btn-new-${field_name}`).click(function() {
|
||||||
|
|
||||||
var secondary = field.secondary;
|
let secondary = field.secondary;
|
||||||
|
|
||||||
// Determine the API query URL
|
// 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 the "fields" attribute is a function, call it with data
|
||||||
if (secondary.fields instanceof Function || secondary.fieldsFunction instanceof Function) {
|
if (secondary.fields instanceof Function || secondary.fieldsFunction instanceof Function) {
|
||||||
|
|
||||||
// Extract form values at time of button press
|
// 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
|
// Backup and execute fields function in sequential executions of modal
|
||||||
if (secondary.fields instanceof Function) {
|
if (secondary.fields instanceof Function) {
|
||||||
|
@ -758,7 +758,7 @@ function createPurchaseOrderLineItem(order, options={}) {
|
|||||||
/* Construct a set of fields for the SalesOrderLineItem form */
|
/* Construct a set of fields for the SalesOrderLineItem form */
|
||||||
function soLineItemFields(options={}) {
|
function soLineItemFields(options={}) {
|
||||||
|
|
||||||
var fields = {
|
let fields = {
|
||||||
order: {
|
order: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user