Reverted transaction cannot be undone
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<fa-icon icon="edit"></fa-icon> Edit
|
<fa-icon icon="edit"></fa-icon> Edit
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-raised-button color="warn" (click)="undoTransaction()">
|
<button mat-raised-button color="warn" (click)="undoTransaction()" *ngIf="allowUndo">
|
||||||
<fa-icon icon="undo"></fa-icon> Undo
|
<fa-icon icon="undo"></fa-icon> Undo
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ export class ViewTransactionComponent {
|
|||||||
transactionData: any;
|
transactionData: any;
|
||||||
/** Is Editable */
|
/** Is Editable */
|
||||||
allowEdition = true;
|
allowEdition = true;
|
||||||
|
/** Is Undoable */
|
||||||
|
allowUndo = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the Transaction data from `resolve`.
|
* Retrieves the Transaction data from `resolve`.
|
||||||
@@ -46,6 +48,7 @@ export class ViewTransactionComponent {
|
|||||||
this.transactionData = data.loansAccountTransaction;
|
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.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.transactionData.type.id === 23);
|
||||||
|
this.allowUndo = !this.transactionData.manuallyReversed;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user