2
0
mirror of https://github.com/frappe/books.git synced 2024-12-24 11:55:46 +00:00

refactor(ux): route to GetStarted if not complete or hidden

This commit is contained in:
18alantom 2021-12-02 18:50:51 +05:30
parent 46af6cebc4
commit 0d90efa819

View File

@ -79,7 +79,7 @@ export default {
}
},
methods: {
showSetupWizardOrDesk(resetRoute = false) {
async showSetupWizardOrDesk(resetRoute = false) {
const { setupComplete } = frappe.AccountingSettings;
if (!setupComplete) {
this.activeScreen = 'SetupWizard';
@ -87,8 +87,18 @@ export default {
this.activeScreen = 'Desk';
this.checkForUpdates();
}
if (resetRoute) {
if (!resetRoute) {
return;
}
const { onboardingComplete } = await frappe.getSingle('GetStarted');
const { hideGetStarted } = await frappe.getSingle('SystemSettings');
if (hideGetStarted || onboardingComplete) {
routeTo('/');
} else {
routeTo('/get-started');
}
},
checkForUpdates() {