Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 25a20eec

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

Re #8678 - Implementace dynamického dotazování

+ endpoint calls with dynamic params

Zobrazit rozdíly:

src/app/dashboard/components/dashboard.component.ts
37 37
    console.log('Get Groups');
38 38
    this.groupService.getGroups({Operation: 'GetGroups'}).pipe(
39 39
      tap(data => this.groups = data)
40
    ).toPromise();
40
    ).subscribe();
41 41
  }
42 42

  
43 43
  getUnits() {
44 44
    this.dataService.getData().pipe(
45
      tap(data => this.units = data)
46
    ).toPromise()
45
      tap(data => {
46
        this.units = data;
47
        this.units.forEach(unit => unit.sensors.sort((a, b)  => a.sensorId - b.sensorId));
48
      })
49
    ).subscribe();
47 50
  }
48 51

  
49 52
  editUnit($event: MouseEvent, unit: Unit) {

Také k dispozici: Unified diff