Revize 18dbad83
Přidáno uživatelem Václav Jirák před téměř 6 roky(ů)
webapp/src/app/dashboard/employer-dashboard/employer-dashboard.component.ts | ||
---|---|---|
5 | 5 |
import {Requests} from '../../models/requests.model'; |
6 | 6 |
import {UserProfile} from '../../models/user-profile.model'; |
7 | 7 |
import {UserService} from '../../services/user.service'; |
8 |
import {ProfileService} from "../../services/profile.service"; |
|
8 |
import {ProfileService} from '../../services/profile.service'; |
|
9 |
import {TimeUnit} from '../../enums/common.enum'; |
|
9 | 10 |
|
10 | 11 |
@Component({ |
11 | 12 |
selector: 'app-employer-dashboard', |
... | ... | |
27 | 28 |
) { } |
28 | 29 |
|
29 | 30 |
ngOnInit() { |
30 |
this.profileService.getProfile() |
|
31 |
.subscribe((data: UserProfile) => this.profile = data); |
|
31 |
// this.profileService.getProfile() |
|
32 |
// .subscribe((data: UserProfile) => this.profile = data); |
|
33 |
// |
|
34 |
// this.usersService.getAuthorizationRequests() |
|
35 |
// .subscribe((data: Requests) => this.authorizationRequests = data); |
|
36 |
// |
|
37 |
// this.usersService.getVacationRequests() |
|
38 |
// .subscribe((data: Requests) => this.daysOffRequests = data); |
|
32 | 39 |
|
33 |
this.usersService.getAuthorizationRequests() |
|
34 |
.subscribe((data: Requests) => this.authorizationRequests = data); |
|
35 |
|
|
36 |
this.usersService.getVacationRequests() |
|
37 |
.subscribe((data: Requests) => this.daysOffRequests = data); |
|
40 |
// Tmp mock |
|
41 |
this.profile = { |
|
42 |
id: 1, |
|
43 |
name: { |
|
44 |
first: 'Jon', |
|
45 |
last: 'Doe', |
|
46 |
}, |
|
47 |
photo: 'http://mosaddek.com/theme/diverse/assets/img/user1.png', |
|
48 |
settings: { |
|
49 |
notification: new Date(2019, 3, 25, 18, 0) |
|
50 |
}, |
|
51 |
vacation: { |
|
52 |
value: 5, |
|
53 |
unit: TimeUnit.DAY, |
|
54 |
}, |
|
55 |
sickDay: { |
|
56 |
value: 10, |
|
57 |
unit: TimeUnit.DAY |
|
58 |
} |
|
59 |
}; |
|
38 | 60 |
} |
39 | 61 |
|
40 | 62 |
private userApproved(requestId: number, approved: boolean) { |
Také k dispozici: Unified diff
Re #7475 Implemented basic localization with usage examples