Fixed account updating and display name for org
This commit is contained in:
parent
7bdcc5fb7e
commit
098b93f837
4 changed files with 37 additions and 3 deletions
|
@ -73,6 +73,37 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 form-control-label" for="text-input"><strong>Industry Sector</strong></label>
|
||||
<div class="col-md-9">
|
||||
<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 Conditioning</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>
|
||||
<span class="help-block">Alter this if your business sector has changed.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-block">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 form-control-label" for="text-input"><strong>City/Town Location</strong></label>
|
||||
|
|
|
@ -31,6 +31,7 @@ export class AccountEditComponent implements OnInit {
|
|||
name : ['', [Validators.required]],
|
||||
street_name : ['', [Validators.required]],
|
||||
town : ['', [Validators.required]],
|
||||
sector : ['', [Validators.required]],
|
||||
});
|
||||
this.settingCustomerForm = this.formBuilder.group({
|
||||
full_name : ['', [Validators.required]],
|
||||
|
@ -53,12 +54,13 @@ export class AccountEditComponent implements OnInit {
|
|||
name: result.name,
|
||||
street_name: result.street_name,
|
||||
town: result.town,
|
||||
sector: result.sector,
|
||||
});
|
||||
this.settingCustomerForm.patchValue({
|
||||
full_name: result.full_name,
|
||||
display_name: result.display_name,
|
||||
});
|
||||
this.api.setUserInfo( result.email, result.display_name );
|
||||
this.api.setUserInfo( result.email, result.display_name || result.name );
|
||||
},
|
||||
error => {
|
||||
console.log( error._body );
|
||||
|
@ -95,6 +97,7 @@ export class AccountEditComponent implements OnInit {
|
|||
name: settingOrganisationForm.name,
|
||||
street_name: settingOrganisationForm.street_name,
|
||||
town: settingOrganisationForm.town,
|
||||
sector: settingOrganisationForm.sector,
|
||||
};
|
||||
|
||||
// data.append('form', JSON.stringify(submitData));
|
||||
|
|
|
@ -41,7 +41,7 @@ export class FeedbackComponent {
|
|||
this.feedbackForm.patchValue({
|
||||
email: result.email,
|
||||
});
|
||||
this.api.setUserInfo( result.email, result.display_name );
|
||||
this.api.setUserInfo( result.email, result.display_name || result.name );
|
||||
},
|
||||
error => {
|
||||
console.log( error._body );
|
||||
|
|
|
@ -64,7 +64,7 @@ export class ApiService {
|
|||
this.setSessionKey(result.session_key);
|
||||
this.setUserInfo(
|
||||
result.email,
|
||||
result.display_name
|
||||
result.display_name || result.name
|
||||
);
|
||||
this.setUserType(result.user_type)
|
||||
}
|
||||
|
|
Reference in a new issue