feat: add view account transfer (#1192)

Fixes: #1188
This commit is contained in:
Muskan Khedia
2020-08-11 17:04:46 +05:30
committed by GitHub
parent 75b1d605f4
commit cfc27b53e2
21 changed files with 274 additions and 27 deletions
@@ -0,0 +1,82 @@
<div class="container">
<mat-card>
<mat-card-content>
<div fxLayout="row wrap" fxLayout.lt-md="column">
<h3 class="mat-h3" fxFlexFill>Transaction Details</h3>
<mat-divider [inset]="true"></mat-divider>
<div fxFlexFill>
<span fxFlex="40%">Transaction Amount:</span>
<span fxFlex="60%">{{ viewAccountTransferData.transferAmount }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Transaction Date:</span>
<span fxFlex="60%">{{ viewAccountTransferData.transferDate | date }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Description:</span>
<span fxFlex="60%">{{ viewAccountTransferData.transferDescription }}</span>
</div>
<h3 class="mat-h3" fxFlexFill>Transferred From</h3>
<mat-divider [inset]="true"></mat-divider>
<div fxFlexFill>
<span fxFlex="40%">Office:</span>
<span fxFlex="60%">{{ viewAccountTransferData.fromOffice.name }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Client:</span>
<span fxFlex="60%">{{ viewAccountTransferData.fromClient.displayName }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Account Type:</span>
<span fxFlex="60%">{{ viewAccountTransferData.fromAccountType.value }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Account #:</span>
<span fxFlex="60%">{{ viewAccountTransferData.fromAccount.accountNo }}</span>
</div>
<h3 class="mat-h3" fxFlexFill>Transferred To</h3>
<mat-divider [inset]="true"></mat-divider>
<div fxFlexFill>
<span fxFlex="40%">Office:</span>
<span fxFlex="60%">{{ viewAccountTransferData.toOffice.name }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Client:</span>
<span fxFlex="60%">{{ viewAccountTransferData.toClient.displayName }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Account Type:</span>
<span fxFlex="60%">{{ viewAccountTransferData.toAccountType.value }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">Account #:</span>
<span fxFlex="60%">{{ viewAccountTransferData.toAccount.accountNo }}</span>
</div>
</div>
</mat-card-content>
</mat-card>
</div>
@@ -0,0 +1,12 @@
h3 {
margin: 0;
font-weight: 500;
}
span {
margin: 0.5em 0;
}
mat-divider {
margin: 0 0 0.5em 0;
}
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ViewAccountTransferComponent } from './view-account-transfer.component';
describe('ViewAccountTransferComponent', () => {
let component: ViewAccountTransferComponent;
let fixture: ComponentFixture<ViewAccountTransferComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ViewAccountTransferComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ViewAccountTransferComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,23 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'mifosx-view-account-transfer',
templateUrl: './view-account-transfer.component.html',
styleUrls: ['./view-account-transfer.component.scss']
})
export class ViewAccountTransferComponent {
viewAccountTransferData: any;
/**
* Retrieves the view account transfer data from `resolve`.
* @param {ActivatedRoute} route Activated Route.
*/
constructor(private route: ActivatedRoute) {
this.route.data.subscribe((data: { viewAccountTransferData: any }) => {
this.viewAccountTransferData = data.viewAccountTransferData;
});
}
}