Skip to content
Snippets Groups Projects
Commit d077925c authored by AUBRY JEAN-PASCAL's avatar AUBRY JEAN-PASCAL
Browse files

feature: add new navigation rules when a session is loaded to display notes,...

feature:  add new navigation rules when a session is loaded to display notes, modules diagramm or unique module
Refs #649
parent db8fd10e
No related branches found
No related tags found
2 merge requests!252release: version 4.18.0,!245Resolve "Chargement d'une session: Afficher la page de note si elle existe au lieu du diagramme des modules"
Pipeline #160818 passed
......@@ -548,6 +548,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
this.router.navigate(["/diagram"]);
}
public toNotes() {
this.router.navigate(["/properties"]);
}
public toCalc(id: string) {
this.router.navigate(["/calculator", id]);
this.setActiveCalc(id);
......@@ -624,9 +628,13 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
this.notificationsService.notify(this.intlService.localizeText("WARNING_SESSION_LOAD_NOTES_MERGED"), 3500);
}
// go to calc or diagram depending on what was loaded
if (data.loaded.length > 1) {
this.toDiagram();
} else {
if (data.loaded.length > 1 && currentNotes) {
this.toNotes();
}
else if(data.loaded.length > 1 && !currentNotes) {
this.toDiagram()
}
else {
this.toCalc(data.loaded[0]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment