Enhancement in loan and savings account views (#1690)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-02-22 23:15:51 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent c0185627f7
commit 6ef53c6462
91 changed files with 841 additions and 568 deletions
@@ -20,9 +20,11 @@
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-form-field appearance="fill">
<mat-label>Transaction Amount</mat-label>
<input type="number" formControlName="transactionAmount" required matInput />
<span matTextSuffix class="m-l-10">{{ currencyCode }}</span>
<span fxFlex="auto"></span>
<input type="number" class="right-input" formControlName="transactionAmount" required matInput />
<mat-error *ngIf="savingAccountTransactionForm.controls.transactionAmount.hasError('required')">
Transaction Amount is <strong>required</strong>
</mat-error>
@@ -30,7 +32,7 @@
<mat-form-field>
<mat-label>Payment Type</mat-label>
<mat-select formControlName="paymentTypeId">
<mat-select required formControlName="paymentTypeId">
<mat-option *ngFor="let paymentType of paymentTypeOptions" [value]="paymentType.id">
{{ paymentType.name }}
</mat-option>
@@ -1,3 +1,15 @@
.expandcollapsebutton {
margin-top: -7px;
}
.container {
width: 37rem;
max-width: 37rem;
}
.right-input {
text-align: right;
}
.right-label {
padding-right: 25px !important;
}
@@ -1,5 +1,5 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
import { Router, ActivatedRoute } from '@angular/router';
@@ -18,6 +18,8 @@ import { Dates } from 'app/core/utils/dates';
})
export class SavingsAccountTransactionsComponent implements OnInit {
@Input() currencyCode: string;
/** Minimum Due Date allowed. */
minDate = new Date(2000, 0, 1);
/** Maximum Due Date allowed. */
@@ -61,7 +63,7 @@ export class SavingsAccountTransactionsComponent implements OnInit {
});
this.transactionCommand = this.route.snapshot.params['name'].toLowerCase();
this.transactionType[this.transactionCommand] = true;
this.savingAccountId = this.route.parent.snapshot.params['savingAccountId'];
this.savingAccountId = this.route.snapshot.params['savingAccountId'];
}
/**
@@ -77,8 +79,8 @@ export class SavingsAccountTransactionsComponent implements OnInit {
*/
createSavingAccountTransactionForm() {
this.savingAccountTransactionForm = this.formBuilder.group({
'transactionDate': ['', Validators.required],
'transactionAmount': ['', Validators.required],
'transactionDate': [this.settingsService.businessDate, Validators.required],
'transactionAmount': [0, Validators.required],
'paymentTypeId': [''],
'note': ['']
});
@@ -89,7 +91,6 @@ export class SavingsAccountTransactionsComponent implements OnInit {
*/
addPaymentDetails() {
this.addPaymentDetailsFlag = !this.addPaymentDetailsFlag;
/*
if (this.addPaymentDetailsFlag) {
this.savingAccountTransactionForm.addControl('accountNumber', new FormControl(''));
this.savingAccountTransactionForm.addControl('checkNumber', new FormControl(''));
@@ -103,8 +104,6 @@ export class SavingsAccountTransactionsComponent implements OnInit {
this.savingAccountTransactionForm.removeControl('receiptNumber');
this.savingAccountTransactionForm.removeControl('bankNumber');
}
*/
}
/**