2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 19:39:07 +00:00

fix: include hideGetStarted for window reloading

This commit is contained in:
18alantom 2022-01-18 14:14:44 +05:30
parent 526eaf9e2c
commit 4400416768

View File

@ -103,21 +103,24 @@ export default {
} }
const fieldnames = this.fieldsChanged.map(({ fieldname }) => fieldname); const fieldnames = this.fieldsChanged.map(({ fieldname }) => fieldname);
if (fieldnames.includes('displayPrecision')) { if (
fieldnames.includes('displayPrecision') ||
fieldnames.includes('hideGetStarted')
) {
callInitializeMoneyMaker(undefined, true); callInitializeMoneyMaker(undefined, true);
const { label } = this.showReloadToast();
this.fieldsChanged[fieldnames.indexOf('displayPrecision')]; }
},
methods: {
showReloadToast() {
showToast({ showToast({
message: _(`${label} change will be visible on reload.`), message: _('Changes will be visible on reload'),
actionText: frappe._('Reload'), actionText: frappe._('Reload'),
action: async () => { action: async () => {
frappe.events.trigger('reload-main-window'); frappe.events.trigger('reload-main-window');
}, },
}); });
} },
},
methods: {
handleChange(df, newValue, oldValue) { handleChange(df, newValue, oldValue) {
if (!df) { if (!df) {
return; return;