Skip to content
This repository was archived by the owner on Sep 24, 2020. It is now read-only.

Add transfer component #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './authentication/login/login.component';
import { TransferComponent } from './transfers/transfer/transfer.component';
const routes: Routes = [
{path: '', component : LoginComponent},
{path: 'transfer', component : TransferComponent},
{path: '**', redirectTo : ''}
];
@NgModule({
Expand Down
5 changes: 5 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export class AppComponent implements OnInit, OnDestroy {
icon: 'person',
link: 'login'
},
{
title: 'Tranfers',
icon: 'compare_arrows',
link: 'transfer'
},
];
title = 'Online-Banking-App-3.0';
mobileQuery: MediaQueryList;
Expand Down
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ import { SignUpComponent } from './authentication/sign-up/sign-up.component';
import { ForgotPasswordComponent } from './authentication/forgot-password/forgot-password.component';
import { VerificationComponent } from './authentication/verification/verification.component';
import { AppService } from './app.service';
import { TransferComponent } from './transfers/transfer/transfer.component';

@NgModule({
declarations: [
AppComponent,
LoginComponent,
ForgotPasswordComponent,
SignUpComponent,
VerificationComponent
VerificationComponent,
TransferComponent
],
imports: [
BrowserAnimationsModule,
Expand Down
72 changes: 72 additions & 0 deletions src/app/beneficiary/beneficiary.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@


<mat-card>
<div class="row">
<div class="col-md-6">
<h2>Beneficiaries List</h2>
</div>
<div class="col-md-6">
<mat-form-field>
<input matInput (keyup)="applyFilter($event.target.value)" placeholder="Search">
</mat-form-field>
</div>
</div>
</mat-card>

<div class="example-container mat-elevation-z8">
<table mat-table [dataSource]="dataSource">

<!-- Position Column -->
<ng-container matColumnDef="Id" sticky>
<th mat-header-cell *matHeaderCellDef mat-sort-header> Id </th>
<td mat-cell *matCellDef="let element"> {{element.id}} </td>
</ng-container>

<!-- Position Column -->
<ng-container matColumnDef="Account">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Account </th>
<td mat-cell *matCellDef="let element"> {{element.account}} </td>
</ng-container>

<!-- Name Column -->
<ng-container matColumnDef="AccountType">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Account Type </th>
<td mat-cell *matCellDef="let element"> {{element.accountType}} </td>
</ng-container>

<!-- Weight Column -->
<ng-container matColumnDef="TransferLimit">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Transfer Limit </th>
<td mat-cell *matCellDef="let element"> {{element.transferLimit}} </td>
</ng-container>

<!-- Symbol Column -->
<ng-container matColumnDef="Name">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Name </th>
<td mat-cell *matCellDef="let element"> {{element.name}} </td>
</ng-container>

<!-- Symbol Column -->
<ng-container matColumnDef="OfficeName" mat-sort-header>
<th mat-header-cell *matHeaderCellDef> Office Name </th>
<td mat-cell *matCellDef="let element"> {{element.officeName}} </td>
</ng-container>

<!-- Symbol Column -->
<ng-container matColumnDef="ClientName" mat-sort-header>
<th mat-header-cell *matHeaderCellDef> Client Name </th>
<td mat-cell *matCellDef="let element"> {{element.clientName}} </td>
</ng-container>

<!-- Symbol Column -->
<ng-container matColumnDef="Actions">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Actions </th>
<td mat-cell *matCellDef="let element"> {{element.actions}} </td>
</ng-container>


<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [pageSizeOptions]="[5, 10, 20]" showFirstLastButtons></mat-paginator>
</div>
42 changes: 42 additions & 0 deletions src/app/transfers/transfer/transfer.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<mat-card>
<div class="example-container">
<mat-form-field>
<mat-select placeholder="Pay To">
<mat-option value="option">Option</mat-option>
</mat-select>
</mat-form-field>

<mat-form-field>
<mat-select placeholder="Pay From">
<mat-option value="option">Option</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<input matInput placeholder="Amount" type="number" class="example-right-align">
<span matPrefix>$&nbsp;</span>
<span matSuffix>.00</span>
</mat-form-field>
<div class="row">
<div class="col-md-6">
Transfer Date
</div>
<div class="col-md-6">
<mat-icon>date_range</mat-icon> {{date}}
</div>
</div>
<mat-form-field>
<textarea matInput placeholder="Remarks"></textarea>
</mat-form-field>

<div class="row">
<div class="col-md-6">
<button mat-raised-button color="warn">Cancel</button>
</div>
<div class="col-md-6">
<button mat-raised-button color="primary">Review Transfer</button>
</div>
</div>


</div>
</mat-card>
32 changes: 32 additions & 0 deletions src/app/transfers/transfer/transfer.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
mat-card{
display:block;
margin: 20px auto;
width:50%;
}
.example-container {
display: flex;
flex-direction: column;
}

.example-container > * {
width: 100%;
}
button{
display:block;
margin: auto;
width:80%;
}

@media only screen and (max-width: 768px) {
/* For mobile phones: */
mat-card{
display:block;
margin: 15px auto;
width:80%;
}
button{
display:block;
margin: 5px auto;
width:80%;
}
}
17 changes: 17 additions & 0 deletions src/app/transfers/transfer/transfer.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-transfer',
templateUrl: './transfer.component.html',
styleUrls: ['./transfer.component.scss']
})
export class TransferComponent implements OnInit {
today = new Date();
date = '';
constructor() { }

ngOnInit() {
this.date = this.today.getFullYear() + '-' + (this.today.getMonth() + 1) + '-' + this.today.getDate();
}

}