Merge branch 'master' into glim

This commit is contained in:
Ramveer
2022-08-30 17:37:37 +05:30
committed by GitHub
25 changed files with 189 additions and 170 deletions
@@ -4,8 +4,8 @@
<button mat-raised-button color="primary" [routerLink]="'edit'" *ngIf="allowEdition">
<fa-icon icon="edit"></fa-icon>&nbsp;&nbsp;Edit
</button>
<button mat-raised-button color="warn" *ngIf="allowEdition" (click)="undoTransaction()">
<button mat-raised-button color="warn" (click)="undoTransaction()" *ngIf="allowUndo">
<fa-icon icon="undo"></fa-icon>&nbsp;&nbsp;Undo
</button>
</span>
@@ -26,6 +26,8 @@ export class ViewTransactionComponent {
transactionData: any;
/** Is Editable */
allowEdition = true;
/** Is Undoable */
allowUndo = true;
/**
* Retrieves the Transaction data from `resolve`.
@@ -46,6 +48,7 @@ export class ViewTransactionComponent {
this.transactionData = data.loansAccountTransaction;
this.allowEdition = !this.transactionData.manuallyReversed && !(this.transactionData.type.id === 20 || this.transactionData.type.id === 21 || this.transactionData.type.id === 22
|| this.transactionData.type.id === 23);
this.allowUndo = !this.transactionData.manuallyReversed;
});
}