File tree 3 files changed +12
-19
lines changed
src/Client/Logistics.OfficeApp/src
app/pages/accounting/list-payroll
3 files changed +12
-19
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ <h1>Payrolls</h1>
69
69
< td > {{payroll.employee.fullName}}</ td >
70
70
< td > {{getSalaryTypeDesc(payroll.employee.salaryType)}}</ td >
71
71
< td >
72
- @if (isShareOfGrossSalary( payroll.employee.salaryType) ) {
72
+ @if (payroll.employee.salaryType === salaryType.ShareOfGross ) {
73
73
{{payroll.employee.salary | percent}}
74
74
}
75
75
@else {
@@ -84,12 +84,15 @@ <h1>Payrolls</h1>
84
84
</ td >
85
85
< td > {{getPaymentMethodDesc(payroll.payment.method)}}</ td >
86
86
< td class ="overflow-visible ">
87
- < p-button
88
- icon ="bi bi-credit-card "
89
- pTooltip ="Make payment "
90
- tooltipPosition ="bottom "
91
- [routerLink] ="['/payment/payroll', payroll.id] ">
92
- </ p-button >
87
+ @if (payroll.payment.status === paymentStatus.Pending) {
88
+ < p-button
89
+ icon ="bi bi-credit-card "
90
+ pTooltip ="Make payment "
91
+ tooltipPosition ="bottom "
92
+ [routerLink] ="['/payment/payroll', payroll.id] ">
93
+ </ p-button >
94
+ }
95
+
93
96
< p-button class ="ms-2 "
94
97
icon ="bi bi-pencil "
95
98
pTooltip ="Edit payroll "
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ import {ApiService} from '@core/services';
39
39
] ,
40
40
} )
41
41
export class ListPayrollComponent {
42
+ public salaryType = SalaryType ;
43
+ public paymentStatus = PaymentStatus ;
42
44
public payrolls : Payroll [ ] = [ ] ;
43
45
public isLoading = false ;
44
46
public totalRecords = 0 ;
@@ -82,14 +84,6 @@ export class ListPayrollComponent {
82
84
} ) ;
83
85
}
84
86
85
- isShareOfGrossSalary ( salaryType : SalaryType ) : boolean {
86
- return salaryType === SalaryType . ShareOfGross ;
87
- }
88
-
89
- isPendingPaymentStatus ( paymentStatus : PaymentStatus ) : boolean {
90
- return paymentStatus === PaymentStatus . Pending ;
91
- }
92
-
93
87
getPaymentStatusTagSeverity ( paymentStatus : PaymentStatus ) : string {
94
88
return paymentStatus === PaymentStatus . Paid ? 'success' : 'warning' ;
95
89
}
Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ body {
27
27
text-decoration : none ;
28
28
}
29
29
30
- .p-button-icon {
31
- padding-right : 4px ;
32
- }
33
-
34
30
ol , ul {
35
31
padding-left : 0 ;
36
32
}
You can’t perform that action at this time.
0 commit comments