Projekt

Obecné

Profil

« Předchozí | Další » 

Revize b5525aef

Přidáno uživatelem Jakub Hlaváč před více než 3 roky(ů)

Re #8850 - Ověření funkčnosti - implementované enpointy

+ new use case add position to unit
  • tweaking all calls to operations with units and sensors
    + adding sensor type enum from backend endpoint
    + some form validation :)
    - removing all endpoints from /senslog1

Zobrazit rozdíly:

src/app/shared/nav-bar/components/nav-bar.component.ts
1
import {Component, OnDestroy, OnInit} from '@angular/core';
1
import {Component, EventEmitter, OnDestroy, OnInit, Output} from '@angular/core';
2 2
import {AuthService} from '../../../auth/services/auth.service';
3 3
import {User} from '../../../auth/models/user';
4 4
import {Subscription} from 'rxjs';
5 5
import {Right} from '../../api/endpoints/models/right';
6 6
import {Phenomenon} from '../../api/endpoints/models/phenomenon';
7 7
import {SensorsService} from '../../api/endpoints/services/sensors.service';
8
import {InsertUnit} from '../../api/endpoints/models/insert-unit';
9
import {InsertSensor} from '../../api/endpoints/models/insert-sensor';
8 10

  
9 11
@Component({
10 12
  selector: 'app-nav-bar',
......
19 21
  rights: Right[];
20 22
  showInsertUnitPopup = false;
21 23
  phenomenons: Phenomenon[];
24
  @Output() emitNewUnit: EventEmitter<{unit: InsertUnit, sensors: InsertSensor[]}> =
25
    new EventEmitter<{unit: InsertUnit, sensors: InsertSensor[]}>()
22 26
  constructor(
23 27
    private authService: AuthService,
24 28
    private sensorService: SensorsService
......
55 59
  addUser() {
56 60
    this.showAddUserPopup = true;
57 61
  }
62

  
63
  addUnit(inserted: any) {
64
    this.emitNewUnit.emit(inserted);
65
  }
58 66
}

Také k dispozici: Unified diff