Already reverted transaction cannot be edited / undo
This commit is contained in:
+4
-3
@@ -4,10 +4,11 @@
|
|||||||
<button mat-raised-button color="primary" [routerLink]="'edit'" *ngIf="allowEdition">
|
<button mat-raised-button color="primary" [routerLink]="'edit'" *ngIf="allowEdition">
|
||||||
<fa-icon icon="edit"></fa-icon> Edit
|
<fa-icon icon="edit"></fa-icon> Edit
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button mat-raised-button color="warn" *ngIf="allowEdition" (click)="undoTransaction()">
|
||||||
|
<fa-icon icon="undo"></fa-icon> Undo
|
||||||
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<button mat-raised-button color="warn" *mifosxHasPermission="'ADJUST_LOAN'" (click)="undoTransaction()">
|
|
||||||
<fa-icon icon="undo"></fa-icon> Undo
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ export class ViewTransactionComponent {
|
|||||||
private settingsService: SettingsService) {
|
private settingsService: SettingsService) {
|
||||||
this.route.data.subscribe((data: { loansAccountTransaction: any }) => {
|
this.route.data.subscribe((data: { loansAccountTransaction: any }) => {
|
||||||
this.transactionData = data.loansAccountTransaction;
|
this.transactionData = data.loansAccountTransaction;
|
||||||
this.allowEdition = !(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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user