Revize cbb91c90
Přidáno uživatelem Jakub Hlaváč před téměř 4 roky(ů)
src/app/auth/states/user.state.ts | ||
---|---|---|
1 | 1 |
import {Injectable} from '@angular/core'; |
2 | 2 |
import {BehaviorSubject, Observable} from 'rxjs'; |
3 | 3 |
import {User} from '../models/user'; |
4 |
import {AuthService} from '../services/auth.service'; |
|
5 | 4 |
import {LoginService} from '../../shared/api/endpoints/services/login.service'; |
6 | 5 |
import {ToastService} from '../../shared/services/toast.service'; |
7 | 6 |
|
... | ... | |
28 | 27 |
return this.userState$.getValue(); |
29 | 28 |
} |
30 | 29 |
|
30 |
/** |
|
31 |
* Get user, if not exists fetch from server |
|
32 |
* @param refresh force refresh user status from backend |
|
33 |
*/ |
|
31 | 34 |
getUser$(refresh: boolean = false): Observable<User> { |
32 | 35 |
if (this.userState$.getValue()){ |
33 | 36 |
this.loginService.getUserInfo$Response().subscribe(res => { |
Také k dispozici: Unified diff
Re #8915 - Zapracování požadavků ze schůzky
+ sensor edit under edit button in menu+ sensor group names
+ adding information to unit and sensor
+ commenting
+ code refactor