Revize 230804d9
Přidáno uživatelem Václav Jirák před téměř 6 roky(ů)
webapp/angular.json | ||
---|---|---|
27 | 27 |
"src/assets" |
28 | 28 |
], |
29 | 29 |
"styles": [ |
30 |
"node_modules/flag-icon-css/css/flag-icon.min.css", |
|
30 | 31 |
"src/styles.sass" |
31 | 32 |
], |
32 | 33 |
"scripts": [], |
... | ... | |
137 | 138 |
} |
138 | 139 |
}, |
139 | 140 |
"defaultProject": "ymanager-frontend" |
140 |
} |
|
141 |
} |
webapp/package.json | ||
---|---|---|
29 | 29 |
"angularx-flatpickr": "^6.1.0", |
30 | 30 |
"core-js": "^2.5.4", |
31 | 31 |
"date-fns": "^1.30.1", |
32 |
"flag-icon-css": "^3.3.0", |
|
32 | 33 |
"flatpickr": "^4.5.7", |
33 | 34 |
"luxon": "^1.15.0", |
34 | 35 |
"ngx-material-timepicker": "^3.1.0", |
webapp/src/app/app.component.ts | ||
---|---|---|
1 | 1 |
import {Component, OnInit} from '@angular/core'; |
2 |
import { registerLocaleData } from '@angular/common'; |
|
3 |
import localeCs from '@angular/common/locales/cs'; |
|
4 | 2 |
|
5 | 3 |
@Component({ |
6 | 4 |
selector: 'app-root', |
... | ... | |
9 | 7 |
}) |
10 | 8 |
export class AppComponent implements OnInit { |
11 | 9 |
|
12 |
constructor() { |
|
13 |
registerLocaleData(localeCs); |
|
14 |
} |
|
10 |
constructor() {} |
|
15 | 11 |
|
16 | 12 |
ngOnInit() {} |
17 | 13 |
|
webapp/src/app/app.module.ts | ||
---|---|---|
1 |
import { BrowserModule } from '@angular/platform-browser';
|
|
2 |
import { NgModule } from '@angular/core';
|
|
1 |
import {BrowserModule} from '@angular/platform-browser';
|
|
2 |
import {NgModule} from '@angular/core';
|
|
3 | 3 |
|
4 |
import { AppRoutingModule } from './app-routing.module';
|
|
5 |
import { AppComponent } from './app.component';
|
|
6 |
import { MenuComponent } from './menu/menu.component';
|
|
7 |
import { DashboardModule } from './dashboard/dashboard.module';
|
|
8 |
import { HeaderComponent } from './header/header.component';
|
|
9 |
import { MatDialogModule } from '@angular/material';
|
|
10 |
import { ProfileSettingsModule } from './profile-settings/profile-settings.module';
|
|
11 |
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
12 |
import { EmployeesModule } from './employees/employees.module';
|
|
13 |
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
|
14 |
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
15 |
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
|
4 |
import {AppRoutingModule} from './app-routing.module';
|
|
5 |
import {AppComponent} from './app.component';
|
|
6 |
import {MenuComponent} from './menu/menu.component';
|
|
7 |
import {DashboardModule} from './dashboard/dashboard.module';
|
|
8 |
import {HeaderComponent} from './header/header.component';
|
|
9 |
import {MatDialogModule, MatMenuModule} from '@angular/material';
|
|
10 |
import {ProfileSettingsModule} from './profile-settings/profile-settings.module';
|
|
11 |
import {HttpClient, HttpClientModule} from '@angular/common/http';
|
|
12 |
import {EmployeesModule} from './employees/employees.module';
|
|
13 |
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
|
|
14 |
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
|
15 |
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
|
|
16 | 16 |
|
17 | 17 |
@NgModule({ |
18 | 18 |
declarations: [ |
... | ... | |
35 | 35 |
DashboardModule, |
36 | 36 |
MatDialogModule, |
37 | 37 |
ProfileSettingsModule, |
38 |
EmployeesModule |
|
38 |
EmployeesModule, |
|
39 |
MatMenuModule |
|
39 | 40 |
], |
40 | 41 |
providers: [], |
41 | 42 |
bootstrap: [AppComponent] |
webapp/src/app/day-picker/day-picker.component.ts | ||
---|---|---|
44 | 44 |
private dateToolsService: DateToolsService) { |
45 | 45 |
|
46 | 46 |
this.locale = localizationService.getCurrentLocale(); |
47 |
localizationService.currentLanguageSubject
|
|
47 |
localizationService.currentLocaleSubject
|
|
48 | 48 |
.subscribe((data) => { |
49 | 49 |
this.locale = data; |
50 | 50 |
}); |
... | ... | |
54 | 54 |
this.currentYear = this.viewDate.getFullYear(); |
55 | 55 |
|
56 | 56 |
// Calendar component needs to be refreshed on language switch or else language switch doesn't have an effect |
57 |
this.localizationService.currentLanguageSubject.subscribe(e => this.refresh.next());
|
|
57 |
this.localizationService.currentLocaleSubject.subscribe(e => this.refresh.next());
|
|
58 | 58 |
} |
59 | 59 |
|
60 | 60 |
public setVacation(vacations: Calendar[]) { |
webapp/src/app/employees/edit-employee-dialog/edit-employee-dialog.component.html | ||
---|---|---|
18 | 18 |
class="example-radio-button" |
19 | 19 |
*ngFor="let type of _userTypes" [value]="type" |
20 | 20 |
> |
21 |
{{type}} |
|
21 |
{{type | translate}}
|
|
22 | 22 |
</mat-radio-button> |
23 | 23 |
</mat-radio-group> |
24 | 24 |
</div> |
... | ... | |
41 | 41 |
<input |
42 | 42 |
matInput |
43 | 43 |
type="number" |
44 |
placeholder="Dovolená"
|
|
44 |
placeholder="{{'basic.vacation' | translate}}"
|
|
45 | 45 |
min="1" |
46 | 46 |
step="0.5" |
47 | 47 |
[(ngModel)]="_vacationDaysCount" |
... | ... | |
49 | 49 |
</mat-form-field> |
50 | 50 |
</div> |
51 | 51 |
<div mat-dialog-actions> |
52 |
<button class="btn btn-primary" style="margin-right: 5px" (click)="onConfirmClick()">Potvrdit</button>
|
|
53 |
<button class="btn btn-danger" (click)="onCloseClick()">Zavřít</button>
|
|
52 |
<button class="btn btn-primary" style="margin-right: 5px" (click)="onConfirmClick()">{{'button.confirm' | translate}}</button>
|
|
53 |
<button class="btn btn-danger" (click)="onCloseClick()">{{'button.close' | translate}}</button>
|
|
54 | 54 |
</div> |
webapp/src/app/employees/employees-list.component.html | ||
---|---|---|
1 | 1 |
<div class="employee-component"> |
2 | 2 |
<div> |
3 |
<span class="align-baseline" style="font-size: x-large">Zaměstnanci</span>
|
|
3 |
<span class="align-baseline" style="font-size: x-large">{{'basic.employees' | translate}}</span>
|
|
4 | 4 |
|
5 | 5 |
<button |
6 | 6 |
id="settings-button" |
... | ... | |
20 | 20 |
(change)="uploadXlsxFile(fileInput.files); fileInput.value = null;" |
21 | 21 |
/> |
22 | 22 |
|
23 |
<label for="input-file" class="btn btn-primary " style="margin-right: 5px">Import</label>
|
|
23 |
<label for="input-file" class="btn btn-primary" style="margin-right: 5px">Import</label> |
|
24 | 24 |
<label class="btn btn-danger" (click)="downloadPdf()"> |
25 | 25 |
Export |
26 | 26 |
</label> |
... | ... | |
30 | 30 |
<table class="table text-center table-hover"> |
31 | 31 |
<thead class="thead-light"> |
32 | 32 |
<tr> |
33 |
<th scope="col" style="width: 15%">Celé jméno</th>
|
|
34 |
<th scope="col" style="width: 5.0%" *ngFor="let day of days">{{day}}</th> |
|
33 |
<th scope="col" style="width: 15%">{{'basic.name' | translate}}</th>
|
|
34 |
<th scope="col" style="width: 5.0%" *ngFor="let day of days">{{day | translate}}</th>
|
|
35 | 35 |
<th></th> |
36 | 36 |
</tr> |
37 | 37 |
</thead> |
... | ... | |
55 | 55 |
</div> |
56 | 56 |
</td> |
57 | 57 |
<td> |
58 |
<span class="material-icons" style="font-size: small" (click)="openUserProfile(user)">visibility</span>
|
|
59 |
<span class="material-icons" style="font-size: small" (click)="openEditUserDialog(user)">edit</span> |
|
58 |
<span class="material-icons button-icon" style="font-size: small; margin-right: 10px" (click)="openUserProfile(user)">visibility</span>
|
|
59 |
<span class="material-icons button-icon" style="font-size: small" (click)="openEditUserDialog(user)">edit</span>
|
|
60 | 60 |
</td> |
61 | 61 |
</tr> |
62 | 62 |
</tbody> |
webapp/src/app/employees/employees-list.component.sass | ||
---|---|---|
30 | 30 |
.input-file |
31 | 31 |
display: none |
32 | 32 |
|
33 |
.button-icon |
|
34 |
cursor: pointer |
|
35 |
|
|
33 | 36 |
|
webapp/src/app/employees/employees-list.component.ts | ||
---|---|---|
13 | 13 |
import {DateFormatterService} from '../services/util/date-formatter.service'; |
14 | 14 |
import {FileService} from '../services/api/file.service'; |
15 | 15 |
import {ProfileService} from '../services/util/profile.service'; |
16 |
import {UserProfileDialogComponent} from "./user-profile/user-profile-dialog.component";
|
|
16 |
import {UserProfileDialogComponent} from './user-profile/user-profile-dialog.component';
|
|
17 | 17 |
|
18 | 18 |
const daysOfWeek: string[] = [ |
19 |
'po',
|
|
20 |
'ut',
|
|
21 |
'st',
|
|
22 |
'ct',
|
|
23 |
'pa',
|
|
24 |
'so',
|
|
25 |
'ne',
|
|
19 |
'dayShortName.mon',
|
|
20 |
'dayShortName.tue',
|
|
21 |
'dayShortName.wed',
|
|
22 |
'dayShortName.thu',
|
|
23 |
'dayShortName.fri',
|
|
24 |
'dayShortName.sat',
|
|
25 |
'dayShortName.sun',
|
|
26 | 26 |
]; |
27 | 27 |
|
28 | 28 |
@Component({ |
webapp/src/app/employees/employees.module.ts | ||
---|---|---|
1 | 1 |
import {NgModule} from '@angular/core'; |
2 | 2 |
import {CommonModule} from '@angular/common'; |
3 | 3 |
import {EmployeesListComponent} from './employees-list.component'; |
4 |
import {TranslateModule} from '@ngx-translate/core'; |
|
4 | 5 |
|
5 | 6 |
import { |
6 | 7 |
MatButtonModule, |
... | ... | |
9 | 10 |
MatFormFieldModule, |
10 | 11 |
MatInputModule, |
11 | 12 |
MatRadioModule, |
12 |
MatTableModule |
|
13 |
MatTableModule, |
|
14 |
|
|
13 | 15 |
} from '@angular/material'; |
14 | 16 |
import {EditEmployeeDialogComponent} from './edit-employee-dialog/edit-employee-dialog.component'; |
15 | 17 |
import {FormsModule} from '@angular/forms'; |
... | ... | |
40 | 42 |
MatButtonModule, |
41 | 43 |
DayPickerModule, |
42 | 44 |
SharedModule, |
43 |
VacationInfoModule |
|
45 |
VacationInfoModule, |
|
46 |
TranslateModule, |
|
44 | 47 |
], |
45 | 48 |
entryComponents: [ |
46 | 49 |
EditEmployeeDialogComponent, |
webapp/src/app/header/header.component.html | ||
---|---|---|
1 | 1 |
<div class="row header"> |
2 |
<img class="logo" src="../../assets/images/logo.png" /> |
|
2 |
<img class="logo" src="../../assets/images/logo.png" alt="logo"/>
|
|
3 | 3 |
<div class="language-and-user"> |
4 |
<button (click)="localizationService.switchLanguage('cs')">CS</button> |
|
5 |
<button (click)="localizationService.switchLanguage('en')">EN</button> |
|
6 |
<button class="user-info" (click)="onProfileClick()"> |
|
7 |
<img class="user-icon" src="../../assets/images/default-user.png"/> |
|
8 |
<span *ngIf="profile" class="user-name">{{profile.firstName}} {{profile.lastName}}</span> |
|
4 |
<label [matMenuTriggerFor]="menu" class="language-menu"> |
|
5 |
<span class="flag-icon flags flag-icon-gb" *ngIf="language === 'EN'"></span> |
|
6 |
<span class="flag-icon flags flag-icon-cz" *ngIf="language === 'CZ'"></span> |
|
7 |
</label> |
|
8 |
|
|
9 |
<mat-menu #menu="matMenu"> |
|
10 |
<button mat-menu-item (click)="switchLanguage('en')"> |
|
11 |
English <span class="flag-icon flag-icon-gb" ></span> |
|
12 |
</button> |
|
13 |
<button mat-menu-item (click)="switchLanguage('cs')"> |
|
14 |
Česky <span class="flag-icon flag-icon-cz"></span> |
|
15 |
</button> |
|
16 |
</mat-menu> |
|
17 |
<button *ngIf="profile" class="user-info" (click)="onProfileClick()"> |
|
18 |
<img class="user-icon" src="{{profile.photo}}" alt="profile-photo"/> |
|
19 |
<span class="user-name">{{profile.firstName}} {{profile.lastName}}</span> |
|
9 | 20 |
</button> |
10 | 21 |
</div> |
11 | 22 |
</div> |
webapp/src/app/header/header.component.sass | ||
---|---|---|
26 | 26 |
color: white |
27 | 27 |
margin-left: 10px |
28 | 28 |
margin-right: 10px |
29 |
|
|
30 |
.flags |
|
31 |
height: 18px |
|
32 |
|
|
33 |
.language-menu |
|
34 |
cursor: pointer |
|
35 |
margin-right: 10px |
webapp/src/app/header/header.component.ts | ||
---|---|---|
12 | 12 |
}) |
13 | 13 |
export class HeaderComponent { |
14 | 14 |
profile: UserProfile; |
15 |
language: string; |
|
15 | 16 |
|
16 | 17 |
constructor( |
17 | 18 |
private dialog: MatDialog, |
... | ... | |
20 | 21 |
) { |
21 | 22 |
userService.getLoggedUserProfile() |
22 | 23 |
.subscribe((data: UserProfile) => this.profile = data); |
24 |
this.language = this.localizationService.getCurrentLanguage(); |
|
23 | 25 |
} |
24 | 26 |
|
27 |
switchLanguage(language: string) { |
|
28 |
this.language = this.localizationService.switchLocale(language); |
|
29 |
} |
|
25 | 30 |
onProfileClick(): void { |
26 | 31 |
this.userService.getLoggedUserProfile() |
27 | 32 |
.subscribe((data: UserProfile) => { |
webapp/src/app/localization/localization.service.ts | ||
---|---|---|
4 | 4 |
import localeEn from '@angular/common/locales/en'; |
5 | 5 |
import localeCs from '@angular/common/locales/cs'; |
6 | 6 |
import {Subject} from 'rxjs'; |
7 |
import {Languages} from "../enums/common.enum";
|
|
7 |
import {Languages} from '../enums/common.enum';
|
|
8 | 8 |
|
9 | 9 |
@Injectable({ |
10 | 10 |
providedIn: 'root' |
11 | 11 |
}) |
12 | 12 |
export class LocalizationService { |
13 |
readonly defaultLanguage = 'en';
|
|
13 |
readonly defaultLocale = 'cs';
|
|
14 | 14 |
|
15 |
currentLanguageSubject: Subject<string>;
|
|
15 |
currentLocaleSubject: Subject<string>;
|
|
16 | 16 |
|
17 |
private currentLanguage = this.defaultLanguage;
|
|
17 |
private currentLocale = this.defaultLocale;
|
|
18 | 18 |
|
19 | 19 |
constructor(private translate: TranslateService) { |
20 |
this.currentLanguageSubject = new Subject<string>();
|
|
20 |
this.currentLocaleSubject = new Subject<string>();
|
|
21 | 21 |
|
22 | 22 |
registerLocaleData(localeEn); |
23 | 23 |
registerLocaleData(localeCs); |
24 | 24 |
|
25 |
translate.setDefaultLang(this.defaultLanguage);
|
|
25 |
translate.setDefaultLang(this.defaultLocale);
|
|
26 | 26 |
} |
27 | 27 |
|
28 |
switchLanguage(lang: string) { |
|
29 |
this.translate.use(lang); |
|
30 |
this.currentLanguageSubject.next(lang); |
|
31 |
this.currentLanguage = lang; |
|
28 |
switchLocale(locale: string): string { |
|
29 |
this.translate.use(locale); |
|
30 |
this.currentLocaleSubject.next(locale); |
|
31 |
this.currentLocale = locale; |
|
32 |
|
|
33 |
return this.getCurrentLanguage(); |
|
32 | 34 |
} |
33 | 35 |
|
34 | 36 |
getCurrentLanguage(): Languages { |
35 |
switch (this.currentLanguage) {
|
|
37 |
switch (this.currentLocale) {
|
|
36 | 38 |
case 'cs': |
37 | 39 |
return Languages.CZECH; |
38 | 40 |
case 'en': |
... | ... | |
42 | 44 |
} |
43 | 45 |
|
44 | 46 |
getCurrentLocale(): string { |
45 |
return this.currentLanguage;
|
|
47 |
return this.currentLocale;
|
|
46 | 48 |
} |
47 | 49 |
} |
webapp/src/app/oncoming-vacation/oncoming-vacation.component.html | ||
---|---|---|
1 | 1 |
<div class="oncoming-days-off-container"> |
2 | 2 |
|
3 | 3 |
<div class="component-header"> |
4 |
Mé nadcházející volno
|
|
4 |
{{'oncomingVacation.headline' | translate}}
|
|
5 | 5 |
</div> |
6 | 6 |
|
7 | 7 |
<table class="table text-center table-hover"> |
8 | 8 |
<thead class="thead-light"> |
9 | 9 |
<tr> |
10 |
<th>Typ volna</th>
|
|
11 |
<th>Datum</th>
|
|
12 |
<th>Od</th>
|
|
13 |
<th>Do</th>
|
|
14 |
<th>Status</th>
|
|
10 |
<th>{{'basic.vacationType' | translate}}</th>
|
|
11 |
<th>{{'basic.date' | translate}}</th>
|
|
12 |
<th>{{'basic.from' | translate}}</th>
|
|
13 |
<th>{{'basic.to' | translate}}</th>
|
|
14 |
<th>{{'oncomingVacation.status' | translate}}</th>
|
|
15 | 15 |
<th></th> |
16 | 16 |
</tr> |
17 | 17 |
</thead> |
18 | 18 |
<tbody> |
19 | 19 |
<tr *ngFor="let vac of oncomingVacation"> |
20 | 20 |
<td style="width:15%"> |
21 |
{{vac.type}} |
|
21 |
{{vac.type | translate}}
|
|
22 | 22 |
</td> |
23 | 23 |
|
24 | 24 |
<td style="width:15%"> |
webapp/src/app/oncoming-vacation/oncoming-vacation.module.ts | ||
---|---|---|
1 |
import { NgModule } from '@angular/core';
|
|
2 |
import { OncomingVacationComponent } from './oncoming-vacation.component';
|
|
3 |
import { BrowserModule } from '@angular/platform-browser';
|
|
1 |
import {NgModule} from '@angular/core';
|
|
2 |
import {OncomingVacationComponent} from './oncoming-vacation.component';
|
|
3 |
import {BrowserModule} from '@angular/platform-browser';
|
|
4 | 4 |
import {MatButtonModule} from '@angular/material'; |
5 |
import {TranslateModule} from '@ngx-translate/core'; |
|
6 |
import {CommonModule} from '@angular/common'; |
|
5 | 7 |
|
6 | 8 |
@NgModule({ |
7 |
declarations: [ OncomingVacationComponent ],
|
|
8 |
exports: [ OncomingVacationComponent ],
|
|
9 |
imports: [ BrowserModule, MatButtonModule ],
|
|
9 |
declarations: [OncomingVacationComponent ], |
|
10 |
exports: [OncomingVacationComponent ],
|
|
11 |
imports: [BrowserModule, MatButtonModule, TranslateModule, CommonModule],
|
|
10 | 12 |
}) |
11 | 13 |
export class OncomingVacationModule {} |
webapp/src/app/user-approval/user-approval.component.html | ||
---|---|---|
1 | 1 |
<div class="user-approval-container"> |
2 | 2 |
|
3 | 3 |
<div class="component-header"> |
4 |
Schvalování uživatelů
|
|
4 |
{{'userApproval.headline' | translate}}
|
|
5 | 5 |
</div> |
6 | 6 |
|
7 | 7 |
<table class="table text-center table-hover"> |
8 | 8 |
<thead class="thead-light"> |
9 | 9 |
<tr> |
10 |
<th style="width: 35%"> Jméno </th>
|
|
11 |
<th style="width: 35%"> Datum žádosti </th>
|
|
10 |
<th style="width: 35%">{{'basic.name' | translate}}</th>
|
|
11 |
<th style="width: 35%">{{'userApproval.requestDate' | translate}}</th>
|
|
12 | 12 |
<th></th> |
13 | 13 |
</tr> |
14 | 14 |
</thead> |
webapp/src/app/user-approval/user-approval.component.ts | ||
---|---|---|
1 | 1 |
import {Component, EventEmitter, Input, Output} from '@angular/core'; |
2 |
import {AuthorizationRequest, Requests} from '../models/requests.model'; |
|
2 |
import {AuthorizationRequest} from '../models/requests.model'; |
|
3 |
import {LocalizationService} from '../localization/localization.service'; |
|
3 | 4 |
|
4 | 5 |
@Component({ |
5 | 6 |
selector: 'app-user-approval', |
... | ... | |
11 | 12 |
@Input() authorizationRequests: AuthorizationRequest[]; |
12 | 13 |
@Output() userApprovalEvent = new EventEmitter<{requestId: number, approved: boolean}>(); |
13 | 14 |
|
14 |
constructor() { } |
|
15 |
constructor(private localizationService: LocalizationService) { }
|
|
15 | 16 |
|
16 | 17 |
private userApproved(reqId: number, isApproved: boolean) { |
17 | 18 |
this.userApprovalEvent.emit({requestId: reqId, approved: isApproved}); |
webapp/src/app/user-approval/user-approval.module.ts | ||
---|---|---|
2 | 2 |
import { UserApprovalComponent } from './user-approval.component'; |
3 | 3 |
import { BrowserModule } from '@angular/platform-browser'; |
4 | 4 |
import {MatButtonModule} from '@angular/material'; |
5 |
import {TranslateModule} from '@ngx-translate/core'; |
|
6 |
import {CommonModule} from '@angular/common'; |
|
5 | 7 |
|
6 | 8 |
@NgModule({ |
7 | 9 |
declarations: [ UserApprovalComponent ], |
8 | 10 |
exports: [ UserApprovalComponent ], |
9 |
imports: [BrowserModule, MatButtonModule] |
|
11 |
imports: [BrowserModule, MatButtonModule, TranslateModule, CommonModule]
|
|
10 | 12 |
}) |
11 | 13 |
export class UserApprovalModule { } |
webapp/src/app/vacation-approval/vacation-approval.component.html | ||
---|---|---|
1 | 1 |
<div class="days-off-approval-container"> |
2 | 2 |
|
3 | 3 |
<div class="component-header"> |
4 |
Schvalování volna
|
|
4 |
{{'vacationApproval.headline' | translate}}
|
|
5 | 5 |
</div> |
6 | 6 |
|
7 | 7 |
<table class="table text-center table-hover"> |
8 | 8 |
<thead class="thead-light"> |
9 | 9 |
<tr> |
10 |
<th scope="col"> Jméno </th>
|
|
11 |
<th scope="col"> Požádáno </th>
|
|
12 |
<th scope="col"> Typ volna </th>
|
|
13 |
<th scope="col"> Datum </th>
|
|
14 |
<th scope="col"> Od </th>
|
|
15 |
<th scope="col"> Do </th>
|
|
10 |
<th scope="col"> {{'basic.name' | translate}}</th>
|
|
11 |
<th scope="col"> {{'vacationApproval.requestDate' | translate}}</th>
|
|
12 |
<th scope="col"> {{'basic.vacationType' | translate}} </th>
|
|
13 |
<th scope="col"> {{'basic.date' | translate}} </th>
|
|
14 |
<th scope="col"> {{'basic.from' | translate}} </th>
|
|
15 |
<th scope="col"> {{'basic.to' | translate}} </th>
|
|
16 | 16 |
<th></th> |
17 | 17 |
</tr> |
18 | 18 |
</thead> |
... | ... | |
25 | 25 |
{{request.timestamp | date:'yyyy/MM/dd HH:mm'}} |
26 | 26 |
</td> |
27 | 27 |
<td> |
28 |
{{request.type}} |
|
28 |
{{request.type | translate}}
|
|
29 | 29 |
</td> |
30 | 30 |
<td> |
31 | 31 |
{{request.date | date:'yyyy/MM/dd'}} |
webapp/src/app/vacation-approval/vacation-approval.module.ts | ||
---|---|---|
1 |
import { NgModule } from '@angular/core';
|
|
2 |
import { VacationApprovalComponent } from './vacation-approval.component';
|
|
3 |
import { BrowserModule } from '@angular/platform-browser';
|
|
1 |
import {NgModule} from '@angular/core';
|
|
2 |
import {VacationApprovalComponent} from './vacation-approval.component';
|
|
3 |
import {BrowserModule} from '@angular/platform-browser';
|
|
4 | 4 |
import {MatButtonModule} from '@angular/material'; |
5 |
import {TranslateModule} from '@ngx-translate/core'; |
|
6 |
import {CommonModule} from '@angular/common'; |
|
5 | 7 |
|
6 | 8 |
@NgModule({ |
7 |
declarations: [ VacationApprovalComponent ],
|
|
8 |
exports: [ VacationApprovalComponent ],
|
|
9 |
imports: [BrowserModule, MatButtonModule] |
|
9 |
declarations: [VacationApprovalComponent],
|
|
10 |
exports: [VacationApprovalComponent],
|
|
11 |
imports: [BrowserModule, MatButtonModule, TranslateModule, CommonModule]
|
|
10 | 12 |
}) |
11 |
export class VacationApprovalModule { } |
|
13 |
export class VacationApprovalModule { |
|
14 |
} |
webapp/src/assets/i18n/cs.json | ||
---|---|---|
2 | 2 |
"daysOffInfo": { |
3 | 3 |
"remaining": "Zbývající dovolená" |
4 | 4 |
}, |
5 |
"userApproval": { |
|
6 |
"headline": "Schvalování uživatelů", |
|
7 |
"requestDate": "Datum žádosti" |
|
8 |
}, |
|
9 |
"vacationApproval": { |
|
10 |
"headline": "Schválení volna", |
|
11 |
"requestDate": "Datum žádosti" |
|
12 |
}, |
|
5 | 13 |
"vacationType": { |
6 | 14 |
"vacation": "Extra dovolená", |
7 | 15 |
"sickday": "Sickday" |
8 |
} |
|
16 |
}, |
|
17 |
"oncomingVacation": { |
|
18 |
"headline": "Mé nadcházející volno", |
|
19 |
"status": "Status" |
|
20 |
}, |
|
21 |
"basic": { |
|
22 |
"name": "Jméno", |
|
23 |
"employees": "Zaměstnanci", |
|
24 |
"vacation": "Dovolená", |
|
25 |
"requested": "Požádáno", |
|
26 |
"date": "Datum", |
|
27 |
"from": "Od", |
|
28 |
"to": "Do", |
|
29 |
"vacationType": "Typ volna" |
|
30 |
}, |
|
31 |
"dayShortName": { |
|
32 |
"mon": "po", |
|
33 |
"tue": "ut", |
|
34 |
"wed": "st", |
|
35 |
"thu": "ct", |
|
36 |
"fri": "pa", |
|
37 |
"sat": "so", |
|
38 |
"sun": "ne" |
|
39 |
}, |
|
40 |
"button": { |
|
41 |
"confirm": "Potvrdit", |
|
42 |
"close": "Zavřít" |
|
43 |
}, |
|
44 |
"EMPLOYER": "Zaměstnavatel", |
|
45 |
"EMPLOYEE": "Zaměstnanec", |
|
46 |
"VACATION": "Dovolená", |
|
47 |
"SICKDAY": "Sickday" |
|
9 | 48 |
} |
webapp/src/assets/i18n/en.json | ||
---|---|---|
2 | 2 |
"daysOffInfo": { |
3 | 3 |
"remaining": "Vacation remaining" |
4 | 4 |
}, |
5 |
"userApproval": { |
|
6 |
"headline": "User approval", |
|
7 |
"requestDate": "Date of request" |
|
8 |
}, |
|
9 |
"vacationApproval": { |
|
10 |
"headline": "Vacation approval", |
|
11 |
"requestDate": "Date of request" |
|
12 |
}, |
|
5 | 13 |
"vacationType": { |
6 | 14 |
"vacation": "Extra vacation", |
7 | 15 |
"sickday": "Sickday" |
8 |
} |
|
16 |
}, |
|
17 |
"oncomingVacation": { |
|
18 |
"headline": "My oncoming vacation", |
|
19 |
"status": "Status" |
|
20 |
}, |
|
21 |
"basic": { |
|
22 |
"name": "Name", |
|
23 |
"employees": "Employees", |
|
24 |
"vacation": "Vacation days", |
|
25 |
"date": "Date", |
|
26 |
"from": "From", |
|
27 |
"to": "To", |
|
28 |
"vacationType": "Type" |
|
29 |
}, |
|
30 |
"dayShortName" : { |
|
31 |
"mon": "mon", |
|
32 |
"tue": "tue", |
|
33 |
"wed": "wed", |
|
34 |
"thu": "thu", |
|
35 |
"fri": "fri", |
|
36 |
"sat": "sat", |
|
37 |
"sun": "sun" |
|
38 |
}, |
|
39 |
"button": { |
|
40 |
"confirm": "Confirm", |
|
41 |
"close": "Close" |
|
42 |
}, |
|
43 |
"EMPLOYER": "Employer", |
|
44 |
"EMPLOYEE": "Employee", |
|
45 |
"VACATION": "Vacation", |
|
46 |
"SICKDAY": "Sickday" |
|
47 |
|
|
9 | 48 |
} |
webapp/yarn.lock | ||
---|---|---|
3098 | 3098 |
dependencies: |
3099 | 3099 |
locate-path "^3.0.0" |
3100 | 3100 |
|
3101 |
flag-icon-css@^3.3.0: |
|
3102 |
version "3.3.0" |
|
3103 |
resolved "https://registry.yarnpkg.com/flag-icon-css/-/flag-icon-css-3.3.0.tgz#7772461e4480d3d86da5962f02120a2825688433" |
|
3104 |
integrity sha512-u5lCGVExrJJRykNGd//ZrBU5Bkt0LTZJFSuG+Az/pwcHgzDeFwomwFbsgVtI1aJd6ysyHsx+5UGrA+nhSGd4yw== |
|
3105 |
|
|
3101 | 3106 |
flatpickr@^4.5.7: |
3102 | 3107 |
version "4.5.7" |
3103 | 3108 |
resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-4.5.7.tgz#6efc0d93c65547aa77294205c67830ebabe3565c" |
Také k dispozici: Unified diff
Re #7475 Localization