Skip to content
Snippets Groups Projects

Resolve "Chargement d'une session: Afficher la page de note si elle existe au lieu du diagramme des modules"

1 file
+ 11
3
Compare changes
  • Side-by-side
  • Inline
+ 11
3
@@ -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]);
}
}
Loading