diff --git a/src/app/account-app/account-app.component.html b/src/app/account-app/account-app.component.html
index 2580c238f..8aec1ed97 100644
--- a/src/app/account-app/account-app.component.html
+++ b/src/app/account-app/account-app.component.html
@@ -90,7 +90,7 @@
- Personal Details
+ Personal Details
diff --git a/src/app/account-details/personal-details.component.html b/src/app/account-details/personal-details.component.html
index 68608bb2d..16bdc497c 100644
--- a/src/app/account-details/personal-details.component.html
+++ b/src/app/account-details/personal-details.component.html
@@ -75,6 +75,7 @@ Address details
+
diff --git a/src/app/account-details/personal-details.component.ts b/src/app/account-details/personal-details.component.ts
index 4b18882ae..a68516dfa 100644
--- a/src/app/account-details/personal-details.component.ts
+++ b/src/app/account-details/personal-details.component.ts
@@ -48,6 +48,7 @@ export class PersonalDetailsComponent {
modal_password_ref;
details: Subject = new Subject();
+ is_alternative_email_validated = true;
selectedCountry: any;
selectedTimezone: any;
@@ -60,6 +61,7 @@ export class PersonalDetailsComponent {
) {
this.details.subscribe((details: AccountDetailsInterface) => {
this.detailsForm.patchValue(details);
+ this.is_alternative_email_validated = details.email_alternative_status == 0;
});
this.loadDetails();
@@ -158,10 +160,20 @@ export class PersonalDetailsComponent {
.post('/rest/v1/account/details', updates)
.pipe(map((res: HttpResponse) => res['result']))
.subscribe((details) => {
- this.details.next(details);
+ if(details && details.email_alternative) {
+ this.details.next(details);
+ this.rmm.show_error('Account details updated', 'Dismiss');
+ } else {
+ this.rmm.show_error('Failed to update details', 'Dismiss');
+ }
});
+ }
- this.rmm.show_error('Account details updated', 'Dismiss');
+ public validate_alt_email() {
+ this.http.post('/rest/v1/account/alt_email_validation', {})
+ .subscribe((res) => {
+ this.rmm.show_error('Validation email resent', 'Dismiss');
+ });;
}
show_modal_password() {
diff --git a/src/app/rmm/account-details.ts b/src/app/rmm/account-details.ts
index 60a661759..09cbaf60b 100644
--- a/src/app/rmm/account-details.ts
+++ b/src/app/rmm/account-details.ts
@@ -24,6 +24,7 @@ export interface AccountDetailsInterface {
first_name: string;
last_name: string;
email_alternative: string;
+ email_alternative_status: number;
phone_number: number;
company: string;
org_number: number;
diff --git a/src/app/welcome/welcomedesk.component.html b/src/app/welcome/welcomedesk.component.html
index c3403d08c..6ceeb8e8a 100644
--- a/src/app/welcome/welcomedesk.component.html
+++ b/src/app/welcome/welcomedesk.component.html
@@ -3,6 +3,7 @@
Congratulations -- your new Runbox account is ready!