fix: formatting issues
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 8699103..907d79b 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 @@
}
const { course_schedules } = r.message;
if (course_schedules) {
- const html = `
- <table class="table table-bordered">
+ /* eslint-disable indent */
+ const html = `<table class="table table-bordered">
<caption>${__('Following course schedules were created')}</caption>
<thead><tr><th>${__("Course")}</th><th>${__("Date")}</th></tr></thead>
<tbody>
@@ -29,7 +29,8 @@
<td>${c.schedule_date}</td></tr>`
).join('')}
</tbody>
- </table>`
+ </table>`;
+ /* 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 bf70f07..338a3cc 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 @@
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 00c409d..abd1f43 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 @@
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 @@
}
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(
`<div class="add-discount-field"></div>`
);
@@ -447,13 +447,13 @@
function get_customer_description() {
if (!email_id && !mobile_no) {
- return `<div class="customer-desc">Click to add email / phone</div>`
+ return `<div class="customer-desc">Click to add email / phone</div>`;
} else if (email_id && !mobile_no) {
- return `<div class="customer-desc">${email_id}</div>`
+ return `<div class="customer-desc">${email_id}</div>`;
} else if (mobile_no && !email_id) {
- return `<div class="customer-desc">${mobile_no}</div>`
+ return `<div class="customer-desc">${mobile_no}</div>`;
} else {
- return `<div class="customer-desc">${email_id} - ${mobile_no}</div>`
+ return `<div class="customer-desc">${email_id} - ${mobile_no}</div>`;
}
}
@@ -462,9 +462,9 @@
get_customer_image() {
const { customer, image } = this.customer_info || {};
if (image) {
- return `<div class="customer-image"><img src="${image}" alt="${image}""></div>`
+ return `<div class="customer-image"><img src="${image}" alt="${image}""></div>`;
} else {
- return `<div class="customer-image customer-abbr">${frappe.get_abbr(customer)}</div>`
+ return `<div class="customer-image customer-abbr">${frappe.get_abbr(customer)}</div>`;
}
}
@@ -501,7 +501,7 @@
this.$numpad_section.find('.numpad-grand-total').html(
`<div>Grand Total: <span>${format_currency(value, currency)}</span></div>`
- )
+ );
}
render_taxes(value, taxes) {
@@ -509,6 +509,7 @@
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 `<div class="tax-row">
@@ -519,7 +520,7 @@
</div>`
}).join('')
}`
- )
+ );
} else {
this.$totals_section.find('.taxes-container').css('display', 'none').html('');
}
@@ -633,7 +634,7 @@
}
}
item_data.description = frappe.ellipsis(item_data.description, 45);
- return `<div class="item-desc">${item_data.description}</div>`
+ return `<div class="item-desc">${item_data.description}</div>`;
}
return ``;
}
@@ -641,9 +642,9 @@
function get_item_image_html() {
const { image, item_name } = item_data;
if (image) {
- return `<div class="item-image"><img src="${image}" alt="${image}""></div>`
+ return `<div class="item-image"><img src="${image}" alt="${image}""></div>`;
} else {
- return `<div class="item-image item-abbr">${frappe.get_abbr(item_name)}</div>`
+ return `<div class="item-image item-abbr">${frappe.get_abbr(item_name)}</div>`;
}
}
}
@@ -980,7 +981,7 @@
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 f3aa1fc..cb0a010 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 @@
if (!item.has_batch_no) {
this.$form_container.append(
`<div class="grid-filler no-select"></div>`
- )
+ );
}
this.$form_container.append(
`<div class="btn btn-sm btn-secondary auto-fetch-btn">Auto Fetch Serial Numbers</div>`
- )
+ );
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 edde7d8..962bcaf 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 @@
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 + `<div class="numpad-btn ${class_to_append}" data-button-value="${fieldname}">${number}</div>`
- }, '')
+ return a2 + `<div class="numpad-btn ${class_to_append}" data-button-value="${fieldname}">${number}</div>`;
+ }, '');
}, '');
}
diff --git a/erpnext/templates/generators/item/item_configure.js b/erpnext/templates/generators/item/item_configure.js
index 276837e..8eadb84 100644
--- a/erpnext/templates/generators/item/item_configure.js
+++ b/erpnext/templates/generators/item/item_configure.js
@@ -209,6 +209,7 @@
__('{0} item found.', [filtered_items_count]) :
__('{0} items found.', [filtered_items_count]);
+ /* eslint-disable indent */
const item_found_status = exact_match.length === 1
? `<div class="alert alert-success d-flex justify-content-between align-items-center" role="alert">
<div><div>
@@ -230,6 +231,7 @@
${__('Clear values')}
</a>
</div>`;
+ /* eslint-disable indent */
return `
${item_found_status}