Projekt

Obecné

Profil

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

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

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

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