Enhancement in loan and savings account views (#1690)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
c0185627f7
commit
6ef53c6462
+9
-7
@@ -34,11 +34,14 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayoutGap="5px" fxLayout="row" fxLayout.xs="column">
|
||||
<mat-label fxFlexAlign="center">Show Payment Details</mat-label>
|
||||
<button type="button" mat-mini-fab color="primary" (click)="addPaymentDetails()">
|
||||
<fa-icon [icon]="!addPaymentDetailsFlag ? 'plus-circle' : 'minus-circle'" size="lg"></fa-icon>
|
||||
</button>
|
||||
<div fxFlexFill>
|
||||
<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">Show Payment Details</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="editTransactionForm.controls['accountNumber']">
|
||||
@@ -72,10 +75,9 @@
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
|
||||
+4
-4
@@ -33,7 +33,7 @@ export class EditTransactionComponent implements OnInit {
|
||||
position: number
|
||||
}[];
|
||||
/** Flag to enable payment details fields. */
|
||||
addPaymentDetailsFlag: Boolean = false;
|
||||
showPaymentDetails: Boolean = false;
|
||||
/** saving account's Id */
|
||||
savingAccountId: string;
|
||||
/** Transaction Template */
|
||||
@@ -58,7 +58,7 @@ export class EditTransactionComponent implements OnInit {
|
||||
this.transactionTemplateData = data.savingsAccountTransactionTemplate;
|
||||
this.paymentTypeOptions = this.transactionTemplateData.paymentTypeOptions;
|
||||
});
|
||||
this.savingAccountId = this.route.parent.snapshot.params['savingAccountId'];
|
||||
this.savingAccountId = this.route.snapshot.params['savingAccountId'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,8 +89,8 @@ export class EditTransactionComponent implements OnInit {
|
||||
* Method to add payment detail fields to the UI.
|
||||
*/
|
||||
addPaymentDetails() {
|
||||
this.addPaymentDetailsFlag = !this.addPaymentDetailsFlag;
|
||||
if (this.addPaymentDetailsFlag) {
|
||||
this.showPaymentDetails = !this.showPaymentDetails;
|
||||
if (this.showPaymentDetails) {
|
||||
this.editTransactionForm.addControl('accountNumber', new FormControl(''));
|
||||
this.editTransactionForm.addControl('checkNumber', new FormControl(''));
|
||||
this.editTransactionForm.addControl('routingCode', new FormControl(''));
|
||||
|
||||
+8
-8
@@ -50,14 +50,6 @@
|
||||
{{ transactionData.date | dateFormat }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="mat-body-strong">
|
||||
Amount
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ transactionData.currency.displaySymbol }} {{ transactionData.amount | number }} ({{ transactionData.currency.code }})
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="mat-body-strong">
|
||||
Currency
|
||||
</div>
|
||||
@@ -66,6 +58,14 @@
|
||||
{{ transactionData.currency.name }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="mat-body-strong">
|
||||
Amount
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%">
|
||||
{{ transactionData.amount | currency }} {{ transactionData.currency.code }}
|
||||
</div>
|
||||
|
||||
<div fxFlex="50%" class="mat-body-strong">
|
||||
Note
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ export class ViewTransactionComponent {
|
||||
public dialog: MatDialog,
|
||||
private settingsService: SettingsService) {
|
||||
this.route.data.subscribe((data: { savingsAccountTransaction: any }) => {
|
||||
this.accountId = this.route.parent.snapshot.params['savingAccountId'];
|
||||
this.accountId = this.route.snapshot.params['savingAccountId'];
|
||||
this.transactionData = data.savingsAccountTransaction;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user