Revize 78eacb99
Přidáno uživatelem Václav Jirák před téměř 6 roky(ů)
webapp/src/app/add-vacation-dialog/add-vacation-dialog.component.html | ||
---|---|---|
1 |
<h1 mat-dialog-title>Výběr volna</h1>
|
|
1 |
<h1 mat-dialog-title>{{ 'addVacation.headline' | translate }}</h1>
|
|
2 | 2 |
|
3 | 3 |
<div mat-dialog-content> |
4 | 4 |
<div class="vacation-selection-container"> |
5 |
<label id="vacation-type-radio-group-label" class="dialog-label">Typ volna: </label>
|
|
5 |
<label id="vacation-type-radio-group-label" class="dialog-label">{{ 'basic.vacationType' | translate }}</label>
|
|
6 | 6 |
<mat-radio-group aria-labelledby="vacation-type-radio-group-label" class="vacation-type-radio-group" [(ngModel)]="selectedVacationType"> |
7 | 7 |
<mat-radio-button class="vacation-type-radio-button" [value]=vacationType.SICKDAY> |
8 |
{{vacationType.SICKDAY}}
|
|
8 |
{{ vacationType.SICKDAY | translate }}
|
|
9 | 9 |
</mat-radio-button> |
10 | 10 |
<mat-radio-button class="vacation-type-radio-button" [value]=vacationType.VACATION> |
11 |
{{vacationType.VACATION}}
|
|
11 |
{{ vacationType.VACATION | translate }}
|
|
12 | 12 |
</mat-radio-button> |
13 | 13 |
</mat-radio-group> |
14 | 14 |
</div> |
15 | 15 |
<div class="datetime-selection-container"> |
16 | 16 |
<div class="date-selection"> |
17 |
<span class="dialog-label">Datum:</span>
|
|
17 |
<span class="dialog-label">{{ 'basic.date' | translate }}</span>
|
|
18 | 18 |
<mat-form-field class="date-input"> |
19 | 19 |
<input id="date-input" matInput [matDatepicker]="datePicker" [(ngModel)]="data.date"> |
20 | 20 |
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle> |
... | ... | |
43 | 43 |
</div> |
44 | 44 |
|
45 | 45 |
<div mat-dialog-actions align="end"> |
46 |
<button mat-raised-button color="primary" (click)="onConfirmClick()">Potvrdit</button>
|
|
47 |
<button mat-raised-button color="basic" (click)="onCloseClick()">Zavřít</button>
|
|
46 |
<button mat-raised-button color="primary" (click)="onConfirmClick()">{{ 'button.confirm' | translate }}</button>
|
|
47 |
<button mat-raised-button color="basic" (click)="onCloseClick()">{{ 'button.close' | translate }}</button>
|
|
48 | 48 |
</div> |
webapp/src/app/add-vacation-dialog/add-vacation-dialog.module.ts | ||
---|---|---|
14 | 14 |
import {BrowserModule} from '@angular/platform-browser'; |
15 | 15 |
import {SharedModule} from '../shared/shared.module'; |
16 | 16 |
import {NgxMaterialTimepickerModule} from 'ngx-material-timepicker'; |
17 |
import {TranslateModule} from "@ngx-translate/core"; |
|
17 | 18 |
|
18 | 19 |
|
19 | 20 |
@NgModule({ |
... | ... | |
33 | 34 |
MatRadioModule, |
34 | 35 |
MatSnackBarModule, |
35 | 36 |
SharedModule, |
36 |
NgxMaterialTimepickerModule |
|
37 |
NgxMaterialTimepickerModule, |
|
38 |
TranslateModule |
|
37 | 39 |
], |
38 | 40 |
exports: [ |
39 | 41 |
AddVacationDialogComponent |
webapp/src/app/app.module.ts | ||
---|---|---|
13 | 13 |
import {TranslateLoader, TranslateModule} from '@ngx-translate/core'; |
14 | 14 |
import {TranslateHttpLoader} from '@ngx-translate/http-loader'; |
15 | 15 |
import {PageNotFoundComponent} from './page-not-found/page-not-found.component'; |
16 |
import {CommonModule} from '@angular/common'; |
|
16 | 17 |
|
17 | 18 |
@NgModule({ |
18 | 19 |
declarations: [ |
... | ... | |
36 | 37 |
MatDialogModule, |
37 | 38 |
ProfileSettingsModule, |
38 | 39 |
EmployeesModule, |
39 |
MatMenuModule |
|
40 |
MatMenuModule, |
|
41 |
CommonModule |
|
40 | 42 |
], |
41 | 43 |
providers: [], |
42 | 44 |
bootstrap: [AppComponent] |
webapp/src/app/menu/menu.component.html | ||
---|---|---|
5 | 5 |
[class.selected]="item === _selectedMenuItem" |
6 | 6 |
(click)="onSelect(item)" |
7 | 7 |
class="nav-item"> |
8 |
<a routerLink="{{item.routePath}}"><div>{{item.name}}</div></a> |
|
8 |
<a routerLink="{{item.routePath}}"><div>{{item.name | translate}}</div></a>
|
|
9 | 9 |
</li> |
10 | 10 |
</ul> |
11 | 11 |
</nav> |
webapp/src/app/profile-settings/profile-settings.component.html | ||
---|---|---|
1 |
<h1 mat-dialog-title>Nastavení</h1>
|
|
1 |
<h1 mat-dialog-title>{{ 'profileSettings.headline' | translate }}</h1>
|
|
2 | 2 |
|
3 | 3 |
<div mat-dialog-content> |
4 |
<span class="notification-label">Notifikace o vypršení dovolené: </span>
|
|
4 |
<span class="notification-label">{{ 'profileSettings.notification' | translate }}</span>
|
|
5 | 5 |
<app-datetime [(date)]="date" [(time)]="time" [minuteStep]="15"></app-datetime> |
6 | 6 |
</div> |
7 | 7 |
|
8 | 8 |
<div mat-dialog-actions align="end"> |
9 |
<button mat-raised-button color="primary" (click)="onConfirmClick()">Potvrdit</button>
|
|
10 |
<button mat-raised-button color="basic" (click)="onCloseClick()">Zavřít</button>
|
|
9 |
<button mat-raised-button color="primary" (click)="onConfirmClick()">{{ 'button.confirm' | translate }}</button>
|
|
10 |
<button mat-raised-button color="basic" (click)="onCloseClick()">{{ 'button.close' | translate }}</button>
|
|
11 | 11 |
</div> |
webapp/src/app/profile-settings/profile-settings.component.ts | ||
---|---|---|
1 | 1 |
import { Component, Inject } from '@angular/core'; |
2 | 2 |
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; |
3 | 3 |
import {DateToolsService} from '../services/util/date-tools.service'; |
4 |
import {DateFormatterService} from "../services/util/date-formatter.service";
|
|
4 |
import {DateFormatterService} from '../services/util/date-formatter.service';
|
|
5 | 5 |
|
6 | 6 |
@Component({ |
7 | 7 |
selector: 'app-profile-settings', |
... | ... | |
9 | 9 |
styleUrls: ['./profile-settings.component.sass'] |
10 | 10 |
}) |
11 | 11 |
export class ProfileSettingsComponent { |
12 |
readonly date: Date;
|
|
13 |
readonly time: string;
|
|
12 |
private date: Date;
|
|
13 |
private time: string;
|
|
14 | 14 |
|
15 | 15 |
constructor( |
16 | 16 |
private dateToolsService: DateToolsService, |
webapp/src/app/profile-settings/profile-settings.module.ts | ||
---|---|---|
11 | 11 |
import {FormsModule} from '@angular/forms'; |
12 | 12 |
import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; |
13 | 13 |
import {SharedModule} from '../shared/shared.module'; |
14 |
import {TranslateModule} from '@ngx-translate/core'; |
|
14 | 15 |
|
15 | 16 |
|
16 | 17 |
@NgModule({ |
... | ... | |
25 | 26 |
MatFormFieldModule, |
26 | 27 |
MatInputModule, |
27 | 28 |
NgbModule, |
28 |
SharedModule |
|
29 |
SharedModule, |
|
30 |
TranslateModule |
|
29 | 31 |
], |
30 | 32 |
entryComponents: [ |
31 | 33 |
ProfileSettingsComponent |
webapp/src/app/services/util/menu.service.ts | ||
---|---|---|
37 | 37 |
|
38 | 38 |
private createAppropriateMenuForUser(profile: UserProfile): MenuItem[] { |
39 | 39 |
const menuItems: MenuItem[] = []; |
40 |
menuItems.push({name: 'Dashboard', routePath: 'dashboard'});
|
|
40 |
menuItems.push({name: 'menuItem.dashboard', routePath: 'dashboard'});
|
|
41 | 41 |
if (profile.role === UserType.EMPLOYER) { |
42 |
menuItems.push({name: 'Zaměstnanci', routePath: 'employees'});
|
|
42 |
menuItems.push({name: 'menuItem.employers', routePath: 'employees'});
|
|
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
return menuItems; |
webapp/src/assets/i18n/cs.json | ||
---|---|---|
18 | 18 |
"headline": "Mé nadcházející volno", |
19 | 19 |
"status": "Status" |
20 | 20 |
}, |
21 |
"profileSettings": { |
|
22 |
"headline": "Nastavení", |
|
23 |
"notification": "Notifikace o vypršení dovolené" |
|
24 |
}, |
|
25 |
"addVacation": { |
|
26 |
"headline": "Výběr volna" |
|
27 |
}, |
|
28 |
"menuItem": { |
|
29 |
"dashboard": "Dashboard", |
|
30 |
"employers": "Zaměstnanci" |
|
31 |
}, |
|
21 | 32 |
"basic": { |
22 | 33 |
"name": "Jméno", |
23 | 34 |
"employees": "Zaměstnanci", |
... | ... | |
44 | 55 |
"EMPLOYER": "Zaměstnavatel", |
45 | 56 |
"EMPLOYEE": "Zaměstnanec", |
46 | 57 |
"VACATION": "Dovolená", |
47 |
"SICKDAY": "Sickday" |
|
58 |
"SICK_DAY": "Sickday"
|
|
48 | 59 |
} |
webapp/src/assets/i18n/en.json | ||
---|---|---|
18 | 18 |
"headline": "My oncoming vacation", |
19 | 19 |
"status": "Status" |
20 | 20 |
}, |
21 |
"profileSettings": { |
|
22 |
"headline": "Settings", |
|
23 |
"notification": "Vacation expiration notification" |
|
24 |
}, |
|
25 |
"addVacation": { |
|
26 |
"headline": "Pick vacation" |
|
27 |
}, |
|
28 |
"menuItem": { |
|
29 |
"dashboard": "Dashboard", |
|
30 |
"employers": "Employers" |
|
31 |
}, |
|
21 | 32 |
"basic": { |
22 | 33 |
"name": "Name", |
23 | 34 |
"employees": "Employees", |
Také k dispozici: Unified diff
Frontend localization completed