From 44004167685c012d2842603ef5fa71887354ab89 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Tue, 18 Jan 2022 14:14:44 +0530 Subject: [PATCH] fix: include hideGetStarted for window reloading --- src/pages/Settings/Settings.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/pages/Settings/Settings.vue b/src/pages/Settings/Settings.vue index 276ef4f1..f5838a71 100644 --- a/src/pages/Settings/Settings.vue +++ b/src/pages/Settings/Settings.vue @@ -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;