fix: update setup_complete based on current app
This commit is contained in:
parent
f8a6cf8995
commit
b4686d83e6
2 changed files with 9 additions and 6 deletions
|
|
@ -280,6 +280,14 @@ frappe.Application = class Application {
|
|||
if (frappe.boot.print_css) {
|
||||
frappe.dom.set_style(frappe.boot.print_css, "print-style");
|
||||
}
|
||||
|
||||
let current_app = localStorage.current_app;
|
||||
if (current_app) {
|
||||
frappe.boot.setup_complete =
|
||||
frappe.boot.setup_wizard_not_required_apps?.includes(current_app) ||
|
||||
frappe.boot.setup_wizard_completed_apps?.includes(current_app);
|
||||
}
|
||||
|
||||
frappe.user.name = frappe.boot.user.name;
|
||||
frappe.router.setup();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -128,13 +128,8 @@ frappe.router = {
|
|||
if (!frappe.app) return;
|
||||
|
||||
let sub_path = this.get_sub_path();
|
||||
let current_app = localStorage.current_app;
|
||||
|
||||
if (
|
||||
frappe.boot.setup_complete ||
|
||||
(current_app && frappe.boot.setup_wizard_not_required_apps?.includes(current_app)) ||
|
||||
(current_app && frappe.boot.setup_wizard_completed_apps?.includes(current_app))
|
||||
) {
|
||||
if (frappe.boot.setup_complete) {
|
||||
!frappe.re_route["setup-wizard"] && (frappe.re_route["setup-wizard"] = "app");
|
||||
} else if (!sub_path.startsWith("setup-wizard")) {
|
||||
frappe.re_route["setup-wizard"] && delete frappe.re_route["setup-wizard"];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue