diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js index 8699103cb2c..907d79b3b83 100644 --- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js +++ b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js @@ -19,8 +19,8 @@ frappe.ui.form.on('Course Scheduling Tool', { } const { course_schedules } = r.message; if (course_schedules) { - const html = ` - + /* eslint-disable indent */ + const html = `
@@ -29,7 +29,8 @@ frappe.ui.form.on('Course Scheduling Tool', { ` ).join('')} -
${__('Following course schedules were created')}
${__("Course")}${__("Date")}
${c.schedule_date}
` + `; + /* eslint-disable indent */ frappe.msgprint(html); } diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index bf70f0785fa..338a3ccf24c 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -182,7 +182,7 @@ erpnext.PointOfSale.Controller = class { if (this.frm.doc.items.length == 0) { frappe.show_alert({ - message:__("You must add atleast one item to save it as draft."), + message: __("You must add atleast one item to save it as draft."), indicator:'red' }); frappe.utils.play_sound("error"); diff --git a/erpnext/selling/page/point_of_sale/pos_item_cart.js b/erpnext/selling/page/point_of_sale/pos_item_cart.js index 00c409dcd3d..abd1f43a51a 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -155,11 +155,11 @@ erpnext.PointOfSale.ItemCart = class { bind_events() { const me = this; - this.$customer_section.on('click', '.reset-customer-btn', function (e) { + this.$customer_section.on('click', '.reset-customer-btn', function () { me.reset_customer_selector(); }); - this.$customer_section.on('click', '.close-details-btn', function (e) { + this.$customer_section.on('click', '.close-details-btn', function () { me.toggle_customer_info(false); }); @@ -365,7 +365,7 @@ erpnext.PointOfSale.ItemCart = class { } show_discount_control() { - this.$add_discount_elem.css({ 'padding': '0px', 'border': 'none' }) + this.$add_discount_elem.css({ 'padding': '0px', 'border': 'none' }); this.$add_discount_elem.html( `
` ); @@ -447,13 +447,13 @@ erpnext.PointOfSale.ItemCart = class { function get_customer_description() { if (!email_id && !mobile_no) { - return `
Click to add email / phone
` + return `
Click to add email / phone
`; } else if (email_id && !mobile_no) { - return `
${email_id}
` + return `
${email_id}
`; } else if (mobile_no && !email_id) { - return `
${mobile_no}
` + return `
${mobile_no}
`; } else { - return `
${email_id} - ${mobile_no}
` + return `
${email_id} - ${mobile_no}
`; } } @@ -462,9 +462,9 @@ erpnext.PointOfSale.ItemCart = class { get_customer_image() { const { customer, image } = this.customer_info || {}; if (image) { - return `
${image}
` + return `
${image}
`; } else { - return `
${frappe.get_abbr(customer)}
` + return `
${frappe.get_abbr(customer)}
`; } } @@ -501,7 +501,7 @@ erpnext.PointOfSale.ItemCart = class { this.$numpad_section.find('.numpad-grand-total').html( `
Grand Total: ${format_currency(value, currency)}
` - ) + ); } render_taxes(value, taxes) { @@ -509,6 +509,7 @@ erpnext.PointOfSale.ItemCart = class { const currency = this.events.get_frm().doc.currency; this.$totals_section.find('.taxes-container').css('display', 'flex').html( `${ + // eslint-disable-next-line no-unused-vars taxes.map((t, i) => { const description = /[0-9]+/.test(t.description) ? t.description : `${t.description} @ ${t.rate}%`; return `
@@ -519,7 +520,7 @@ erpnext.PointOfSale.ItemCart = class {
` }).join('') }` - ) + ); } else { this.$totals_section.find('.taxes-container').css('display', 'none').html(''); } @@ -633,7 +634,7 @@ erpnext.PointOfSale.ItemCart = class { } } item_data.description = frappe.ellipsis(item_data.description, 45); - return `
${item_data.description}
` + return `
${item_data.description}
`; } return ``; } @@ -641,9 +642,9 @@ erpnext.PointOfSale.ItemCart = class { function get_item_image_html() { const { image, item_name } = item_data; if (image) { - return `
${image}
` + return `
${image}
`; } else { - return `
${frappe.get_abbr(item_name)}
` + return `
${frappe.get_abbr(item_name)}
`; } } } @@ -980,7 +981,7 @@ erpnext.PointOfSale.ItemCart = class { this.fetch_customer_details(frm.doc.customer).then(() => { this.events.customer_details_updated(this.customer_info); this.update_customer_section(); - }) + }); this.$cart_items_wrapper.html(''); if (frm.doc.items.length) { diff --git a/erpnext/selling/page/point_of_sale/pos_item_details.js b/erpnext/selling/page/point_of_sale/pos_item_details.js index f3aa1fc0c60..cb0a0103e00 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_details.js +++ b/erpnext/selling/page/point_of_sale/pos_item_details.js @@ -183,11 +183,11 @@ erpnext.PointOfSale.ItemDetails = class { if (!item.has_batch_no) { this.$form_container.append( `
` - ) + ); } this.$form_container.append( `
Auto Fetch Serial Numbers
` - ) + ); this.$form_container.find('.serial_no-control').find('textarea').css('height', '6rem'); } } diff --git a/erpnext/selling/page/point_of_sale/pos_number_pad.js b/erpnext/selling/page/point_of_sale/pos_number_pad.js index edde7d84dfb..962bcaf0963 100644 --- a/erpnext/selling/page/point_of_sale/pos_number_pad.js +++ b/erpnext/selling/page/point_of_sale/pos_number_pad.js @@ -22,11 +22,11 @@ erpnext.PointOfSale.NumberPad = class { return keys.reduce((a, row, i) => { return a + row.reduce((a2, number, j) => { const class_to_append = css_classes && css_classes[i] ? css_classes[i][j] : ''; - const fieldname = fieldnames && fieldnames[number] ? + const fieldname = fieldnames && fieldnames[number] ? fieldnames[number] : typeof number === 'string' ? frappe.scrub(number) : number; - return a2 + `
${number}
` - }, '') + return a2 + `
${number}
`; + }, ''); }, ''); } diff --git a/erpnext/templates/generators/item/item_configure.js b/erpnext/templates/generators/item/item_configure.js index 276837ea61d..8eadb842899 100644 --- a/erpnext/templates/generators/item/item_configure.js +++ b/erpnext/templates/generators/item/item_configure.js @@ -209,6 +209,7 @@ class ItemConfigure { __('{0} item found.', [filtered_items_count]) : __('{0} items found.', [filtered_items_count]); + /* eslint-disable indent */ const item_found_status = exact_match.length === 1 ? `