This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
FoodLoop-Web/src/app/shared/payroll-result.component.ts

23 lines
576 B
TypeScript
Raw Normal View History

2017-09-19 16:22:19 +00:00
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import * as moment from 'moment';
interface PayrollData {
entry_period: string;
gross_payroll: number;
employee_amount: number;
}
@Component({
// tslint:disable-next-line
selector: '[payroll-result]',
templateUrl: 'payroll-result.component.html',
})
export class PayrollResultComponent implements OnInit {
@Input() public payroll: PayrollData;
public payrollDate: string;
ngOnInit(): void {
this.payrollDate = moment(this.payroll.entry_period).format('MMMM YYYY');
}
}