Recurring Deposit view account homologation (#1910)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
7c53b82965
commit
79595f6a1c
+13
-13
@@ -19,11 +19,13 @@
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{"labels.inputs.Transaction Amount" | translate }}</mat-label>
|
||||
<input matInput required formControlName="transactionAmount">
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>{{"labels.inputs.Transaction Amount" | translate}}</mat-label>
|
||||
<span matTextSuffix class="m-l-10">{{ currency.code }}</span>
|
||||
<span fxFlex="auto"></span>
|
||||
<input type="number" matInput required class="right-input" formControlName="transactionAmount">
|
||||
<mat-error *ngIf="depositRecurringDepositForm.controls.transactionAmount.hasError('required')">
|
||||
{{"labels.inputs.Transaction Amount" | translate }} {{ "labels.commons.is" |translate}} <strong>{{ "labels.commons.required" |translate}}</strong>
|
||||
{{"labels.inputs.Transaction Amount" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -40,14 +42,12 @@
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="25%">{{"labels.inputs.Show Payment Details" | translate }}</span>
|
||||
<span fxFlex="75%" class="expandcollapsebutton" (click)="toggleDisplay()">
|
||||
<button mat-raised-button color="primary" *ngIf="showPaymentDetails">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button mat-raised-button color="primary" *ngIf="!showPaymentDetails">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
<span fxFlex="75%" class="expandcollapsebutton m-l-10 m-t-40" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle>
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">{{"labels.inputs.Show Payment Details" | translate}}</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>{{"labels.inputs.Cheque" | translate }} #</mat-label>
|
||||
<input matInput formControlName="chequeNumber">
|
||||
<input matInput formControlName="checkNumber">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
|
||||
+8
@@ -6,3 +6,11 @@
|
||||
margin-top: -7px;
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
.right-input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.right-label {
|
||||
padding-right: 25px !important;
|
||||
}
|
||||
|
||||
+25
-7
@@ -1,12 +1,13 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators } from '@angular/forms';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
/** Custom Services */
|
||||
import { RecurringDepositsService } from '../../recurring-deposits.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
/**
|
||||
* Deposits Recurring Deposits Account Component
|
||||
@@ -18,6 +19,8 @@ import { Dates } from 'app/core/utils/dates';
|
||||
})
|
||||
export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
|
||||
@Input() currency: Currency;
|
||||
|
||||
/** Transactions Amount */
|
||||
transactionAmount: any;
|
||||
/** Outstanding Charge Amount */
|
||||
@@ -75,15 +78,30 @@ export class DepositRecurringDepositsAccountComponent implements OnInit {
|
||||
'transactionDate': [new Date(), Validators.required],
|
||||
'transactionAmount': [this.transactionAmount, Validators.required],
|
||||
'paymentTypeId': ['', Validators.required],
|
||||
'accountNumber': '',
|
||||
'chequeNumber': '',
|
||||
'routingCode': '',
|
||||
'receiptNumber': '',
|
||||
'bankNumber': '',
|
||||
'note': ''
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add payment detail fields to the UI.
|
||||
*/
|
||||
addPaymentDetails() {
|
||||
this.showPaymentDetails = !this.showPaymentDetails;
|
||||
if (this.showPaymentDetails) {
|
||||
this.depositRecurringDepositForm.addControl('accountNumber', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('checkNumber', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('routingCode', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('receiptNumber', new UntypedFormControl(''));
|
||||
this.depositRecurringDepositForm.addControl('bankNumber', new UntypedFormControl(''));
|
||||
} else {
|
||||
this.depositRecurringDepositForm.removeControl('accountNumber');
|
||||
this.depositRecurringDepositForm.removeControl('checkNumber');
|
||||
this.depositRecurringDepositForm.removeControl('routingCode');
|
||||
this.depositRecurringDepositForm.removeControl('receiptNumber');
|
||||
this.depositRecurringDepositForm.removeControl('bankNumber');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles the display of payment details
|
||||
*/
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
<mifosx-undo-approval-recurring-deposits-account *ngIf="actions['Undo Approval']"></mifosx-undo-approval-recurring-deposits-account>
|
||||
<mifosx-approve-recurring-deposits-account *ngIf="actions['Approve']"></mifosx-approve-recurring-deposits-account>
|
||||
<mifosx-reject-recurring-deposits-account *ngIf="actions['Reject']"></mifosx-reject-recurring-deposits-account>
|
||||
<mifosx-withdraw-by-client-recurring-deposits-account *ngIf="actions['Withdraw By Client']"></mifosx-withdraw-by-client-recurring-deposits-account>
|
||||
<mifosx-withdraw-by-client-recurring-deposits-account *ngIf="actions['Withdrawn by client']"></mifosx-withdraw-by-client-recurring-deposits-account>
|
||||
<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 *ngIf="actions['Deposit']"></mifosx-deposit-recurring-deposits-account>
|
||||
<mifosx-deposit-recurring-deposits-account [currency]="currency" *ngIf="actions['Deposit']"></mifosx-deposit-recurring-deposits-account>
|
||||
|
||||
+11
-3
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Currency } from 'app/shared/models/general.model';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-recurring-deposits-account-actions',
|
||||
@@ -14,7 +15,7 @@ export class RecurringDepositsAccountActionsComponent {
|
||||
'Undo Approval': boolean
|
||||
'Approve': boolean
|
||||
'Reject': boolean
|
||||
'Withdraw By Client': boolean
|
||||
'Withdrawn by client': boolean
|
||||
'Add Charge': boolean
|
||||
'Premature Close': boolean
|
||||
'Close': boolean
|
||||
@@ -24,17 +25,24 @@ export class RecurringDepositsAccountActionsComponent {
|
||||
'Undo Approval': false,
|
||||
'Approve': false,
|
||||
'Reject': false,
|
||||
'Withdraw By Client': false,
|
||||
'Withdrawn by client': false,
|
||||
'Add Charge': false,
|
||||
'Premature Close': false,
|
||||
'Close': false,
|
||||
'Deposit': false
|
||||
};
|
||||
|
||||
currency: Currency;
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route
|
||||
*/
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.route.data.subscribe((data: { recurringDepositsAccountActionData: any }) => {
|
||||
if (data.recurringDepositsAccountActionData) {
|
||||
this.currency = data.recurringDepositsAccountActionData.currency;
|
||||
}
|
||||
});
|
||||
const name = this.route.snapshot.params['name'];
|
||||
this.actions[name] = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user