Projekt

Obecné

Profil

Stáhnout (1.06 KB) Statistiky
| Větev: | Tag: | Revize:
1
import {Component} from '@angular/core';
2
import {MatDialog} from '@angular/material';
3
import {LocalizationService} from '../localization/localization.service';
4
import {UserService} from '../services/api/user.service';
5
import {UserProfile} from '../models/user.model';
6

    
7
@Component({
8
  selector: 'app-header',
9
  templateUrl: './header.component.html',
10
  styleUrls: ['./header.component.sass']
11
})
12
export class HeaderComponent {
13
  profile: UserProfile;
14

    
15
  constructor(
16
    private dialog: MatDialog,
17
    private localizationService: LocalizationService,
18
    private userService: UserService
19
    ) {
20
    userService.getLoggedUserProfile()
21
      .subscribe((data: UserProfile) => this.profile = data);
22
  }
23

    
24
  onProfileClick(): void {
25
    // TODO (až bude hotovej endpoint na post notifikace)
26
    // this.dialog.open(ProfileSettingsComponent, {
27
    //   data: {
28
    //     notifyDate: this.notificationSettings,
29
    //     notifyTime: {
30
    //       hour: this.notificationSettings.getHours(),
31
    //       minute: this.notificationSettings.getMinutes()
32
    //     }
33
    //   }
34
    // });
35
  }
36
}
(3-3/3)