1 |
696f3358
|
Václav Jirák
|
import { Component, EventEmitter, Output, Input } from '@angular/core';
|
2 |
558c8d57
|
Václav Jirák
|
import { VacationRequest } from '../../models/requests.model';
|
3 |
696f3358
|
Václav Jirák
|
|
4 |
|
|
@Component({
|
5 |
|
|
selector: 'app-days-off-approval',
|
6 |
|
|
templateUrl: './vacation-approval.component.html',
|
7 |
|
|
styleUrls: ['./vacation-approval.component.sass']
|
8 |
|
|
})
|
9 |
|
|
export class VacationApprovalComponent {
|
10 |
|
|
|
11 |
|
|
@Input() vacationRequests: VacationRequest[];
|
12 |
|
|
@Output() vacationApprovalEvent = new EventEmitter<{requestId: number, approved: boolean}>();
|
13 |
|
|
|
14 |
|
|
constructor() { }
|
15 |
|
|
|
16 |
|
|
vacationApprovalCompleted(reqId: number, isApproved: boolean ) {
|
17 |
|
|
this.vacationApprovalEvent.emit({requestId: reqId, approved: isApproved});
|
18 |
|
|
}
|
19 |
|
|
}
|