Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui
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 907d79b..d57f46a 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 @@
}
const { course_schedules } = r.message;
if (course_schedules) {
- /* 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>
- ${course_schedules.map(c =>
- `<tr><td><a href="/app/course-schedule/${c.name}">${c.name}</a></td>
- <td>${c.schedule_date}</td></tr>`
- ).join('')}
- </tbody>
- </table>`;
- /* eslint-disable indent */
+ const course_schedules_html = course_schedules.map(c => `
+ <tr>
+ <td><a href="/app/course-schedule/${c.name}">${c.name}</a></td>
+ <td>${c.schedule_date}</td>
+ </tr>
+ `).join('');
+
+ 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>
+ ${course_schedules_html}
+ </tbody>
+ </table>
+ `;
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 fb26f22..c9b8ad9 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 @@
const margin = i % 2 === 0 ? 'pr-2' : 'pl-2';
const amount = p.amount > 0 ? format_currency(p.amount, currency) : '';
- return (
- `<div class="payment-mode-wrapper">
- <div class="mode-of-payment" data-mode="${mode}" data-payment-type="${payment_type}">
- ${p.mode_of_payment}
- <div class="${mode}-amount pay-amount">${amount}</div>
- <div class="${mode} mode-of-payment-control"></div>
+ return (`
+ <div class="payment-mode-wrapper">
+ <div class="mode-of-payment" data-mode="${mode}" data-payment-type="${payment_type}">
+ ${p.mode_of_payment}
+ <div class="${mode}-amount pay-amount">${amount}</div>
+ <div class="${mode} mode-of-payment-control"></div>
+ </div>
</div>
- </div>`
- );
+ `);
}).join('')
}`);
@@ -367,15 +367,12 @@
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(
- `<div class="cash-shortcuts">
- ${
- shortcuts.map(s => {
- return `<div class="shortcut" data-value="${s}">${format_currency(s, currency, 0)}</div>`;
- }).join('')
-}
- </div>`
- );
+ let shortcuts_html = shortcuts.map(s => {
+ return `<div class="shortcut" data-value="${s}">${format_currency(s, currency, 0)}</div>`;
+ }).join('');
+
+ this.$payment_modes.find('[data-payment-type="Cash"]').find('.mode-of-payment-control')
+ .after(`<div class="cash-shortcuts">${shortcuts_html}</div>`);
}
get_cash_shortcuts(grand_total) {