2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +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);
if (fieldnames.includes('displayPrecision')) {
if (
fieldnames.includes('displayPrecision') ||
fieldnames.includes('hideGetStarted')
) {
callInitializeMoneyMaker(undefined, true);
const { label } =
this.fieldsChanged[fieldnames.indexOf('displayPrecision')];
this.showReloadToast();
}
},
methods: {
showReloadToast() {
showToast({
message: _(`${label} change will be visible on reload.`),
message: _('Changes will be visible on reload'),
actionText: frappe._('Reload'),
action: async () => {
frappe.events.trigger('reload-main-window');
},
});
}
},
methods: {
handleChange(df, newValue, oldValue) {
if (!df) {
return;