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:
parent
526eaf9e2c
commit
4400416768
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user