Merge branch 'rebrand-ui' of https://github.com/frappe/erpnext into rebrand-ui

This commit is contained in:
prssanna 2021-02-01 20:39:20 +05:30
commit 44a055b52f
2 changed files with 30 additions and 29 deletions

View File

@ -19,18 +19,22 @@ frappe.ui.form.on('Course Scheduling Tool', {
}
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);
}

View File

@ -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 (
`<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 @@ 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(
`<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) {