Fix for Credit loan transaction
This commit is contained in:
committed by
Arnold Gálovics
parent
66514f0936
commit
9a23ceb772
+1
-1
@@ -1,7 +1,7 @@
|
||||
<div fxLayoutAlign="end" class="container m-b-20 transaction-buttons" fxLayoutGap="2%"
|
||||
*ngIf="!(transactionData.type.contra)">
|
||||
<span *mifosxHasPermission="'ADJUST_LOAN'">
|
||||
<button mat-raised-button color="primary" [routerLink]="'edit'">
|
||||
<button mat-raised-button color="primary" [routerLink]="'edit'" *ngIf="allowEdition">
|
||||
<fa-icon icon="edit"></fa-icon> Edit
|
||||
</button>
|
||||
</span>
|
||||
|
||||
@@ -24,6 +24,8 @@ export class ViewTransactionComponent {
|
||||
|
||||
/** Transaction data. */
|
||||
transactionData: any;
|
||||
/** Is Editable */
|
||||
allowEdition = true;
|
||||
|
||||
/**
|
||||
* Retrieves the Transaction data from `resolve`.
|
||||
@@ -42,6 +44,8 @@ export class ViewTransactionComponent {
|
||||
private settingsService: SettingsService) {
|
||||
this.route.data.subscribe((data: { loansAccountTransaction: any }) => {
|
||||
this.transactionData = data.loansAccountTransaction;
|
||||
this.allowEdition = !(this.transactionData.type.id === 20 || this.transactionData.type.id === 21 || this.transactionData.type.id === 22
|
||||
|| this.transactionData.type.id === 23);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user