Functionality fully added
This commit is contained in:
parent
7b03f6adff
commit
089e7f7a97
9 changed files with 49 additions and 5 deletions
3
src/app/shared/payroll-result.component.html
Normal file
3
src/app/shared/payroll-result.component.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<td>{{payrollDate}}</td>
|
||||
<td>{{payroll.gross_payroll | currency:'GBP':true:'1.2-2' }}</td>
|
||||
<td>{{payroll.employee_amount}}</td>
|
22
src/app/shared/payroll-result.component.ts
Normal file
22
src/app/shared/payroll-result.component.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
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');
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ import * as moment from 'moment';
|
|||
|
||||
interface TransactionData {
|
||||
seller: number;
|
||||
value: string;
|
||||
value: number;
|
||||
purchase_time: string;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue