Recurring Deposit account deposit and withdrawal transactions (#1919)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
a26c906d2c
commit
dd7faffad7
+1
-1
@@ -88,7 +88,7 @@
|
||||
</mat-card-content>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../general']">{{"labels.buttons.Cancel" | translate }}</button>
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">{{"labels.buttons.Cancel" | translate }}</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!depositRecurringDepositForm.valid">{{"labels.buttons.Submit" | translate }}</button>
|
||||
</mat-card-actions>
|
||||
|
||||
|
||||
+7
-1
@@ -38,6 +38,8 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
/** Deposits Recurring Deposit Account form. */
|
||||
depositRecurringDepositForm: UntypedFormGroup;
|
||||
|
||||
action: string;
|
||||
|
||||
/**
|
||||
* Retrieves action details transactions template data from `resolve`
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
@@ -62,6 +64,8 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
this.transactionAmount = this.transactionAmount + this.outstandingChargeAmount;
|
||||
}
|
||||
});
|
||||
const name: string = this.route.snapshot.params['name'];
|
||||
this.action = name.toLowerCase();
|
||||
this.accountId = this.route.parent.snapshot.params['recurringDepositAccountId'];
|
||||
}
|
||||
|
||||
@@ -125,7 +129,9 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
dateFormat,
|
||||
locale
|
||||
};
|
||||
this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId, 'deposit', data).subscribe(() => {
|
||||
|
||||
delete data['note'];
|
||||
this.recurringDepositsService.executeRecurringDepositsAccountCommand(this.accountId, this.action, data).subscribe(() => {
|
||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@
|
||||
<mifosx-add-charge-recurring-deposits-account *ngIf="actions['Add Charge']"></mifosx-add-charge-recurring-deposits-account>
|
||||
<mifosx-premature-close-recurring-deposit-account *ngIf="actions['Premature Close']"></mifosx-premature-close-recurring-deposit-account>
|
||||
<mifosx-close-recurring-deposits-account *ngIf="actions['Close']"></mifosx-close-recurring-deposits-account>
|
||||
<mifosx-deposit-recurring-deposits-account [currency]="currency" *ngIf="actions['Deposit']"></mifosx-deposit-recurring-deposits-account>
|
||||
<mifosx-deposit-recurring-deposits-account [currency]="currency" *ngIf="actions['Deposit'] || actions['Withdrawal']"></mifosx-deposit-recurring-deposits-account>
|
||||
|
||||
+3
-1
@@ -20,6 +20,7 @@ export class RecurringDepositsAccountActionsComponent {
|
||||
'Premature Close': boolean
|
||||
'Close': boolean
|
||||
'Deposit': boolean
|
||||
'Withdrawal': boolean
|
||||
} = {
|
||||
'Activate': false,
|
||||
'Undo Approval': false,
|
||||
@@ -29,7 +30,8 @@ export class RecurringDepositsAccountActionsComponent {
|
||||
'Add Charge': false,
|
||||
'Premature Close': false,
|
||||
'Close': false,
|
||||
'Deposit': false
|
||||
'Deposit': false,
|
||||
'Withdrawal': false
|
||||
};
|
||||
|
||||
currency: Currency;
|
||||
|
||||
Reference in New Issue
Block a user