From 723bd9676dd900528559cc20bdfddb8c631bef8b Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Mon, 1 Feb 2021 20:34:21 +0530 Subject: [PATCH 1/2] style: Fix formatting issues --- .../course_scheduling_tool.js | 28 ++++++++++------- .../selling/page/point_of_sale/pos_payment.js | 31 +++++++++---------- 2 files changed, 30 insertions(+), 29 deletions(-) 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 907d79b3b8..d57f46ab98 100644 --- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js +++ b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.js @@ -19,18 +19,22 @@ frappe.ui.form.on('Course Scheduling Tool', { } const { course_schedules } = r.message; if (course_schedules) { - /* eslint-disable indent */ - const html = ` - - - - ${course_schedules.map(c => - ` - ` - ).join('')} - -
${__('Following course schedules were created')}
${__("Course")}${__("Date")}
${c.name}${c.schedule_date}
`; - /* eslint-disable indent */ + const course_schedules_html = course_schedules.map(c => ` + + ${c.name} + ${c.schedule_date} + + `).join(''); + + const html = ` + + + + + ${course_schedules_html} + +
${__('Following course schedules were created')}
${__("Course")}${__("Date")}
+ `; frappe.msgprint(html); } diff --git a/erpnext/selling/page/point_of_sale/pos_payment.js b/erpnext/selling/page/point_of_sale/pos_payment.js index fb26f22625..c9b8ad9afe 100644 --- a/erpnext/selling/page/point_of_sale/pos_payment.js +++ b/erpnext/selling/page/point_of_sale/pos_payment.js @@ -312,15 +312,15 @@ erpnext.PointOfSale.Payment = class { const margin = i % 2 === 0 ? 'pr-2' : 'pl-2'; const amount = p.amount > 0 ? format_currency(p.amount, currency) : ''; - return ( - `
-
- ${p.mode_of_payment} -
${amount}
-
+ return (` +
+
+ ${p.mode_of_payment} +
${amount}
+
+
-
` - ); + `); }).join('') }`); @@ -367,15 +367,12 @@ erpnext.PointOfSale.Payment = class { const shortcuts = this.get_cash_shortcuts(flt(grand_total)); this.$payment_modes.find('.cash-shortcuts').remove(); - this.$payment_modes.find('[data-payment-type="Cash"]').find('.mode-of-payment-control').after( - `
- ${ - shortcuts.map(s => { - return `
${format_currency(s, currency, 0)}
`; - }).join('') -} -
` - ); + let shortcuts_html = shortcuts.map(s => { + return `
${format_currency(s, currency, 0)}
`; + }).join(''); + + this.$payment_modes.find('[data-payment-type="Cash"]').find('.mode-of-payment-control') + .after(`
${shortcuts_html}
`); } get_cash_shortcuts(grand_total) { From cfb5f58141b9ce9e9ae50e559782410a8205b3fb Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Mon, 1 Feb 2021 20:37:18 +0530 Subject: [PATCH 2/2] style: Fix formatting issues --- erpnext/selling/page/point_of_sale/pos_item_cart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 abd1f43a51..9198d7d6fb 100644 --- a/erpnext/selling/page/point_of_sale/pos_item_cart.js +++ b/erpnext/selling/page/point_of_sale/pos_item_cart.js @@ -517,7 +517,7 @@ erpnext.PointOfSale.ItemCart = class { ${description}
${format_currency(value, currency)}
- ` + `; }).join('') }` ); @@ -844,7 +844,7 @@ erpnext.PointOfSale.ItemCart = class {
Recent Transactions
` ); // transactions need to be in diff div from sticky elem for scrolling - this.$customer_section.append(`
`) + this.$customer_section.append(`
`); this.render_customer_fields(); this.fetch_customer_transactions();