AuthGuard commented out & sector added to registration

This commit is contained in:
piratefinn 2017-06-29 13:47:41 +01:00
parent 0e6529db85
commit 23b5dbde6e
4 changed files with 87 additions and 52 deletions

View file

@ -15,7 +15,7 @@ export const routes: Routes = [
{
path: '',
component: FullLayoutComponent,
canActivate: [AuthGuard],
// canActivate: [AuthGuard],
data: {
title: 'Home'
},

View file

@ -81,6 +81,34 @@
<input type="text" class="form-control" formControlName="name" placeholder="Organisation Name">
</div>
<!-- Uses the UK SIC 2007 classifications for sector as used by ONS -->
<div class="input-group mb-3">
<select required class="form-control" type="text" formControlName="sector">
<option value=''>Select Organisation Sector</option>
<option value='A'>Agriculture, Forestry & Fishing</option>
<option value='B'>Mining & Quarrying</option>
<option value='C'>Manufacturing</option>
<option value='D'>Electricity, Gas, Steam & Air Conditiioning</option>
<option value='E'>Water & Waste Management</option>
<option value='F'>Construction</option>
<option value='G'>Wholesale & Retail Trade</option>
<option value='H'>Transportation & Storage</option>
<option value='I'>Accomodation & Food Services</option>
<option value='J'>Information & Communication</option>
<option value='K'>Financial & Insurance Activities</option>
<option value='L'>Real Estate</option>
<option value='M'>Professional, Scientfic & Technical</option>
<option value='N'>Administrative & Support Services</option>
<option value='O'>Public Administration, Defence & Social Security</option>
<option value='P'>Education</option>
<option value='Q'>Human Health & Social Work</option>
<option value='R'>Arts, Entertainment & Recreation</option>
<option value='S'>Other Service Activities</option>
<option value='T'>Household Domestic Business</option>
</select>
</div>
<div class="input-group mb-3">
<span class="input-group-addon"><i class="icon-user"></i></span>
<input type="text" class="form-control" formControlName="street_name" placeholder="Street Name">
@ -93,6 +121,11 @@
<div class="input-group mb-3">
<span class="input-group-addon"><i class="icon-user"></i></span>
<input type="text" class="form-control" formControlName="town" placeholder="Town">
</div>
<div class="input-group mb-3">
<span class="input-group-addon"><i class="icon-user"></i></span>
<input type="text" class="form-control" formControlName="postcode" placeholder="Postcode">
</div>

View file

@ -41,10 +41,11 @@ export class RegisterComponent {
display_name: 'required',
full_name: 'required',
postcode: 'required',
year_of_birth: 'required',
year_of_birth:'required',
});
this.organisationForm = new ValidationManager({
name: 'required',
name: 'sector',
street_name: 'required',
town: 'required',
postcode: 'required',
@ -100,6 +101,7 @@ export class RegisterComponent {
email: signupForm.email,
password: signupForm.password,
name: organisationForm.name,
name: organisationForm.sector,
street_name: organisationForm.street_name,
town: organisationForm.town,
postcode: organisationForm.postcode,