mirror of
https://github.com/frappe/books.git
synced 2024-12-23 11:29:03 +00:00
fix: Reset route on database change
This commit is contained in:
parent
d181545c70
commit
5316756843
@ -10,11 +10,11 @@
|
|||||||
<Desk class="flex-1" v-if="activeScreen === 'Desk'" />
|
<Desk class="flex-1" v-if="activeScreen === 'Desk'" />
|
||||||
<DatabaseSelector
|
<DatabaseSelector
|
||||||
v-if="activeScreen === 'DatabaseSelector'"
|
v-if="activeScreen === 'DatabaseSelector'"
|
||||||
@database-connect="showSetupWizardOrDesk"
|
@database-connect="showSetupWizardOrDesk(true)"
|
||||||
/>
|
/>
|
||||||
<SetupWizard
|
<SetupWizard
|
||||||
v-if="activeScreen === 'SetupWizard'"
|
v-if="activeScreen === 'SetupWizard'"
|
||||||
@setup-complete="showSetupWizardOrDesk"
|
@setup-complete="showSetupWizardOrDesk(true)"
|
||||||
/>
|
/>
|
||||||
<Settings v-if="activeScreen === 'Settings'" />
|
<Settings v-if="activeScreen === 'Settings'" />
|
||||||
<portal-target name="popovers" multiple></portal-target>
|
<portal-target name="popovers" multiple></portal-target>
|
||||||
@ -78,7 +78,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showSetupWizardOrDesk() {
|
showSetupWizardOrDesk(resetRoute = false) {
|
||||||
const { setupComplete } = frappe.AccountingSettings;
|
const { setupComplete } = frappe.AccountingSettings;
|
||||||
if (!setupComplete) {
|
if (!setupComplete) {
|
||||||
this.activeScreen = 'SetupWizard';
|
this.activeScreen = 'SetupWizard';
|
||||||
@ -88,6 +88,9 @@ export default {
|
|||||||
this.activeScreen = 'Desk';
|
this.activeScreen = 'Desk';
|
||||||
this.checkForUpdates();
|
this.checkForUpdates();
|
||||||
}
|
}
|
||||||
|
if (resetRoute) {
|
||||||
|
this.$router.replace('/');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
reloadMainWindowOnSettingsClose() {
|
reloadMainWindowOnSettingsClose() {
|
||||||
if (this.activeScreen === 'Settings') {
|
if (this.activeScreen === 'Settings') {
|
||||||
|
Loading…
Reference in New Issue
Block a user