Projekt

Obecné

Profil

« Předchozí | Další » 

Revize cbb91c90

Přidáno uživatelem Jakub Hlaváč před téměř 4 roky(ů)

Re #8915 - Zapracování požadavků ze schůzky

+ sensor edit under edit button in menu
  • request for sensor data only for first time, then after button click
    + sensor group names
    + adding information to unit and sensor
    + commenting
    + code refactor

Zobrazit rozdíly:

src/app/shared/nav-bar/components/nav-bar.component.ts
35 35
    this.setUser();
36 36
  }
37 37

  
38
  /**
39
   * Get user from state after logged
40
   */
38 41
  setUser(){
39 42
    this.authService.getUserState().subscribe(res => {
40 43
      if(res){
......
43 46
    });
44 47
  }
45 48

  
49
  /**
50
   * Show insert unit popup
51
   */
46 52
  insertUnitPopup() {
47 53
    this.sensorService.getPhenomenons().subscribe(
48 54
      response => this.phenomenons = response
......
54 60
    this.authService.doLogout();
55 61
  }
56 62

  
63
  /**
64
   * Unsubscribe after leaving
65
   */
57 66
  ngOnDestroy(): void {
58 67
    this.subscription.forEach(subs => subs.unsubscribe());
59 68
  }
60 69

  
70
  /**
71
   * Show add user popup
72
   */
61 73
  addUser() {
62 74
    this.showAddUserPopup = true;
63 75
  }
64 76

  
77
  /**
78
   * Emit inserted unit to add it to units
79
   * @param inserted inserted unit
80
   */
65 81
  addUnit(inserted: any) {
66 82
    this.emitNewUnit.emit(inserted);
67 83
  }

Také k dispozici: Unified diff