Revize 5d32cbea
Přidáno uživatelem Václav Jirák před téměř 6 roky(ů)
webapp/src/app/employees/default-settings-dialog/default-settings-dialog.component.ts | ||
---|---|---|
1 | 1 |
import {Component, Inject} from '@angular/core'; |
2 | 2 |
import {MAT_DIALOG_DATA, MatDialogRef, MatSnackBar} from '@angular/material'; |
3 |
import {TranslateService} from '@ngx-translate/core'; |
|
3 | 4 |
|
4 | 5 |
@Component({ |
5 | 6 |
selector: 'app-default-settings', |
... | ... | |
13 | 14 |
public dialogRef: MatDialogRef<DefaultSettingsDialogComponent>, |
14 | 15 |
@Inject(MAT_DIALOG_DATA) public data: DefaultSettingsDialogData, |
15 | 16 |
private snackBar: MatSnackBar, |
17 |
private translateService: TranslateService |
|
16 | 18 |
) { |
17 | 19 |
} |
18 | 20 |
|
... | ... | |
26 | 28 |
} |
27 | 29 |
); |
28 | 30 |
} else { |
29 |
this.snackBar.open('Nevyplněny všechny potřebné položky'); |
|
31 |
this.translateService.get('error.missingField').subscribe((res: string) => { |
|
32 |
this.snackBar.open(res, 'X', { duration: 5000 }); |
|
33 |
}); |
|
30 | 34 |
} |
31 | 35 |
} |
32 | 36 |
|
Také k dispozici: Unified diff
Error and information messages modified - correct error messages from backend are displayed and information messages are translated