Projekt

Obecné

Profil

Stáhnout (823 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
import { Component, Inject } from '@angular/core';
2
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';
3

    
4
@Component({
5
  selector: 'app-profile-settings',
6
  templateUrl: './profile-settings.component.html',
7
  styleUrls: ['./profile-settings.component.sass']
8
})
9
export class ProfileSettingsComponent {
10
  constructor(
11
    public dialogRef: MatDialogRef<ProfileSettingsComponent>,
12
    @Inject(MAT_DIALOG_DATA) public data: ProfileSettingsDialogData,
13
  ) {
14
  }
15

    
16
  onConfirmClick(): void {
17
    this.dialogRef.close({
18
      isConfirmed: true,
19
      notifyDate: this.data.notifyDate,
20
      notifyTime: this.data.notifyTime
21
    });
22
  }
23

    
24
  onCloseClick(): void {
25
    this.dialogRef.close({
26
      isConfirmed: false
27
    });
28
  }
29
}
30

    
31
export interface ProfileSettingsDialogData {
32
  notifyDate: Date;
33
  notifyTime: string;
34
}
(3-3/4)