mirror of
https://github.com/frappe/books.git
synced 2024-12-24 20:00:29 +00:00
refactor(ux): route to GetStarted if not complete or hidden
This commit is contained in:
parent
46af6cebc4
commit
0d90efa819
16
src/App.vue
16
src/App.vue
@ -30,7 +30,7 @@ import DatabaseSelector from './pages/DatabaseSelector';
|
|||||||
import WindowsTitleBar from '@/components/WindowsTitleBar';
|
import WindowsTitleBar from '@/components/WindowsTitleBar';
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import config from '@/config';
|
import config from '@/config';
|
||||||
import { routeTo } from '@/utils';
|
import { routeTo } from '@/utils';
|
||||||
import { IPC_MESSAGES, IPC_ACTIONS } from '@/messages';
|
import { IPC_MESSAGES, IPC_ACTIONS } from '@/messages';
|
||||||
import { connectToLocalDatabase, purgeCache } from '@/initialization';
|
import { connectToLocalDatabase, purgeCache } from '@/initialization';
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showSetupWizardOrDesk(resetRoute = false) {
|
async showSetupWizardOrDesk(resetRoute = false) {
|
||||||
const { setupComplete } = frappe.AccountingSettings;
|
const { setupComplete } = frappe.AccountingSettings;
|
||||||
if (!setupComplete) {
|
if (!setupComplete) {
|
||||||
this.activeScreen = 'SetupWizard';
|
this.activeScreen = 'SetupWizard';
|
||||||
@ -87,8 +87,18 @@ export default {
|
|||||||
this.activeScreen = 'Desk';
|
this.activeScreen = 'Desk';
|
||||||
this.checkForUpdates();
|
this.checkForUpdates();
|
||||||
}
|
}
|
||||||
if (resetRoute) {
|
|
||||||
|
if (!resetRoute) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { onboardingComplete } = await frappe.getSingle('GetStarted');
|
||||||
|
const { hideGetStarted } = await frappe.getSingle('SystemSettings');
|
||||||
|
|
||||||
|
if (hideGetStarted || onboardingComplete) {
|
||||||
routeTo('/');
|
routeTo('/');
|
||||||
|
} else {
|
||||||
|
routeTo('/get-started');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkForUpdates() {
|
checkForUpdates() {
|
||||||
|
Loading…
Reference in New Issue
Block a user