Merge pull request #28 from Pear-Trading/finn/leaderboardfix

Fixes made
This commit is contained in:
Finn 2017-11-13 16:25:07 +00:00 committed by GitHub
commit a05b0c3dae
7 changed files with 18 additions and 10 deletions

View file

@ -2,6 +2,14 @@
# Next Release # Next Release
* Customer Leaderboards added
* Map made available to Customers
* Map renamed from "Supplier Map" to "Purchase Map" to fall in line with
previous change
* Added placeholder while password reset is not present
* Fixed error on store list during a transaction
# v0.0.2 # v0.0.2
* Supplier map added to organisation view * Supplier map added to organisation view

View file

@ -12,9 +12,9 @@ describe('Login Page', () => {
expect(page.getLoginHeaderText()).toEqual('Login'); expect(page.getLoginHeaderText()).toEqual('Login');
}); });
it('should have a username box of type text', () => { it('should have a username box of type email', () => {
expect(page.isUsernameFieldPresent()).toBeTruthy(); expect(page.isUsernameFieldPresent()).toBeTruthy();
expect(page.getUsernameFieldType()).toBe('text'); expect(page.getUsernameFieldType()).toEqual('email');
}); });
it('should have a password box of type password', () => { it('should have a password box of type password', () => {

View file

@ -10,7 +10,7 @@
<form [formGroup]="signin" (ngSubmit)="onSubmit()"> <form [formGroup]="signin" (ngSubmit)="onSubmit()">
<div class="input-group mb-3"> <div class="input-group mb-3">
<span class="input-group-addon">@</span> <span class="input-group-addon">@</span>
<input id="username" type="text" class="form-control" formControlName="email" placeholder="Email"> <input id="username" type="email" class="form-control" formControlName="email" placeholder="Email">
</div> </div>
<div class="input-group mb-4"> <div class="input-group mb-4">
<span class="input-group-addon"><i class="icon-lock"></i></span> <span class="input-group-addon"><i class="icon-lock"></i></span>

View file

@ -237,7 +237,7 @@ export class AddDataComponent implements OnInit {
town: '', town: '',
postcode: '', postcode: '',
}; };
this.storeList = null; this.storeList = [];
this.amount = null; this.amount = null;
this.transactionFormInvalid = true; this.transactionFormInvalid = true;
this.showAddStore = false; this.showAddStore = false;

View file

@ -50,6 +50,7 @@ const routes: Routes = [
path: 'leaderboard', path: 'leaderboard',
component: LeaderboardComponent, component: LeaderboardComponent,
data: { title: 'Leaderboards' }, data: { title: 'Leaderboards' },
canActivate: [CustomerGuard],
}, },
{ {
path: 'transaction-log', path: 'transaction-log',
@ -59,8 +60,7 @@ const routes: Routes = [
{ {
path: 'map', path: 'map',
component: MapComponent, component: MapComponent,
data: { title: 'Supplier Map' }, data: { title: 'Purchase Map' },
canActivate: [OrgGuard],
}, },
{ {
path: 'payroll-log', path: 'payroll-log',

View file

@ -3,7 +3,7 @@
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<strong>Supplier Map</strong> <strong>Purchase Map</strong>
<small>Required Data marked in <strong>bold</strong>.</small> <small>Required Data marked in <strong>bold</strong>.</small>
</div> </div>
<div [ngSwitch]="dataReceived"> <div [ngSwitch]="dataReceived">

View file

@ -40,12 +40,12 @@
<i class="icon-envelope-letter"></i> Enter Feedback <i class="icon-envelope-letter"></i> Enter Feedback
</a> </a>
</li> </li>
<li *ngIf="accountType == 'customer'" class="nav-item"> <li class="nav-item">
<a class="nav-link" routerLinkActive="active" [routerLink]="['/map']"> <a class="nav-link" routerLinkActive="active" [routerLink]="['/map']">
<i class="icon-map"></i> Supplier Map <i class="icon-map"></i> Purchase Map
</a> </a>
</li> </li>
<li class="nav-item"> <li *ngIf="accountType == 'customer'" class="nav-item">
<a class="nav-link" routerLinkActive="active" [routerLink]="['/leaderboard']"> <a class="nav-link" routerLinkActive="active" [routerLink]="['/leaderboard']">
<i class="icon-basket"></i> Leaderboard <i class="icon-basket"></i> Leaderboard
</a> </a>