Revize 599dd1cf
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.html | ||
---|---|---|
1 |
<h1 mat-dialog-title>Výchozí nastavení</h1>
|
|
1 |
<h1 mat-dialog-title>{{ 'defaultSettings.headline' | translate }} </h1>
|
|
2 | 2 | |
3 | 3 |
<div mat-dialog-content> |
4 |
<span class="dialog-label">Notifikace o vypršení dovolené: </span>
|
|
4 |
<span class="dialog-label">{{ 'defaultSettings.notification' | translate }}</span>
|
|
5 | 5 |
<app-datetime [(date)]="data.notificationDate" [(time)]="data.notificationTime" [minuteStep]="MINUTE_STEP"></app-datetime> |
6 | 6 | |
7 | 7 |
<div class="sickday-count"> |
8 |
<label for="sickdays-count-input" class="dialog-label">Počet sickdays:</label>
|
|
8 |
<label for="sickdays-count-input" class="dialog-label">{{ 'defaultSettings.sickdayCount' | translate }}</label>
|
|
9 | 9 |
<mat-form-field> |
10 | 10 |
<input id="sickdays-count-input" type="number" matInput [(ngModel)]="data.sickDayCount"> |
11 | 11 |
</mat-form-field> |
... | ... | |
13 | 13 |
</div> |
14 | 14 | |
15 | 15 |
<div mat-dialog-actions align="end"> |
16 |
<button mat-raised-button color="primary" (click)="onConfirmClick()">Potvrdit</button>
|
|
17 |
<button mat-raised-button color="basic" (click)="onCloseClick()">Zavřít</button>
|
|
16 |
<button mat-raised-button color="primary" (click)="onConfirmClick()">{{ 'button.confirm' | translate }}</button>
|
|
17 |
<button mat-raised-button color="basic" (click)="onCloseClick()">{{ 'button.close' | translate }}</button>
|
|
18 | 18 |
</div> |
webapp/src/app/employees/default-settings-dialog/default-settings-dialog.component.ts | ||
---|---|---|
16 | 16 |
} |
17 | 17 | |
18 | 18 |
onConfirmClick(): void { |
19 |
this.dialogRef.close({ |
|
20 |
isConfirmed: true, |
|
21 |
notificationDatetime: this.toNotificationDatetime(), |
|
22 |
sickDayCount: this.data.sickDayCount |
|
23 |
}); |
|
19 |
let data; |
|
20 |
if (this.data.notificationDate && sickDayCount) { |
|
21 |
data = { |
|
22 |
isConfirmed: true, |
|
23 |
notificationDatetime: this.toNotificationDatetime(), |
|
24 |
sickDayCount: this.data.sickDayCount |
|
25 |
}; |
|
26 |
} else { |
|
27 |
data = { |
|
28 |
isConfirmed: false |
|
29 |
}; |
|
30 |
} |
|
31 | ||
32 |
this.dialogRef.close(data); |
|
24 | 33 |
} |
25 | 34 | |
26 | 35 |
onCloseClick(): void { |
webapp/src/assets/i18n/cs.json | ||
---|---|---|
24 | 24 |
"headline": "Nastavení", |
25 | 25 |
"notification": "Notifikace o vypršení dovolené" |
26 | 26 |
}, |
27 |
"defaultSettings": { |
|
28 |
"headline": "Výchozí nastavení", |
|
29 |
"notification": "Notifikace o vypršení dovolené", |
|
30 |
"sickdayCount": "Počet sickday" |
|
31 |
}, |
|
27 | 32 |
"addVacation": { |
28 | 33 |
"headline": "Výběr volna" |
29 | 34 |
}, |
webapp/src/assets/i18n/en.json | ||
---|---|---|
24 | 24 |
"headline": "Settings", |
25 | 25 |
"notification": "Vacation expiration notification" |
26 | 26 |
}, |
27 |
"defaultSettings": { |
|
28 |
"headline": "Default settings", |
|
29 |
"notification": "Vacation expiration notification", |
|
30 |
"sickdayCount": "Number of sickdays" |
|
31 |
}, |
|
27 | 32 |
"addVacation": { |
28 | 33 |
"headline": "Pick vacation" |
29 | 34 |
}, |
Také k dispozici: Unified diff
Default settings component translated