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'" />
|
||||
<DatabaseSelector
|
||||
v-if="activeScreen === 'DatabaseSelector'"
|
||||
@database-connect="showSetupWizardOrDesk"
|
||||
@database-connect="showSetupWizardOrDesk(true)"
|
||||
/>
|
||||
<SetupWizard
|
||||
v-if="activeScreen === 'SetupWizard'"
|
||||
@setup-complete="showSetupWizardOrDesk"
|
||||
@setup-complete="showSetupWizardOrDesk(true)"
|
||||
/>
|
||||
<Settings v-if="activeScreen === 'Settings'" />
|
||||
<portal-target name="popovers" multiple></portal-target>
|
||||
@ -78,7 +78,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showSetupWizardOrDesk() {
|
||||
showSetupWizardOrDesk(resetRoute = false) {
|
||||
const { setupComplete } = frappe.AccountingSettings;
|
||||
if (!setupComplete) {
|
||||
this.activeScreen = 'SetupWizard';
|
||||
@ -88,6 +88,9 @@ export default {
|
||||
this.activeScreen = 'Desk';
|
||||
this.checkForUpdates();
|
||||
}
|
||||
if (resetRoute) {
|
||||
this.$router.replace('/');
|
||||
}
|
||||
},
|
||||
reloadMainWindowOnSettingsClose() {
|
||||
if (this.activeScreen === 'Settings') {
|
||||
|
Loading…
Reference in New Issue
Block a user