fix(ux): re routes based on setup_complete (#21118)
* fix(ux): re routes based on setup_complete If Setup Wizard is not complete re_route any route to setup_wizard and if it complete re_route setup-wizard to app * fix: only re_route if not on setup-wizard. * fix: remove hardcoded slide number --------- Co-authored-by: Sagar Sharma <sagarsharma.s312@gmail.com>
This commit is contained in:
parent
66eb377492
commit
e6e59cbe07
1 changed files with 6 additions and 0 deletions
|
|
@ -139,6 +139,12 @@ frappe.router = {
|
|||
if (!frappe.app) return;
|
||||
|
||||
let sub_path = this.get_sub_path();
|
||||
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"];
|
||||
frappe.set_route(["setup-wizard"]);
|
||||
}
|
||||
if (this.re_route(sub_path)) return;
|
||||
|
||||
this.current_sub_path = sub_path;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue