From e2f4b99155c21315725c38be905cf08068044711 Mon Sep 17 00:00:00 2001 From: Will Hill Date: Wed, 21 Nov 2018 11:29:41 +0800 Subject: [PATCH] button text --- src/routes/dashboard/profile-route.js | 10 ++++++++-- src/routes/dashboard/review-route.js | 10 +++++++++- src/routes/dashboard/status-route.js | 4 ++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/routes/dashboard/profile-route.js b/src/routes/dashboard/profile-route.js index 113a908..e092fe7 100644 --- a/src/routes/dashboard/profile-route.js +++ b/src/routes/dashboard/profile-route.js @@ -835,7 +835,7 @@ class ProfileRoute extends PolymerElement { @@ -867,6 +867,10 @@ class ProfileRoute extends PolymerElement { showIframe: { type: Boolean, value: false, + }, + btnText:{ + type: Text, + value: 'Save Application Form', } }; } @@ -938,6 +942,7 @@ class ProfileRoute extends PolymerElement { } _saveProfile(){ + this.btnText = 'Saving..'; let check = true const name_first = this.nameFirst; const name_middle = this.nameMiddle; @@ -1042,7 +1047,8 @@ _save(data){ if(response.data === true){ const token = response.newjwt; localStorage.setItem("token", token); - this.set('route.path', '/dashboard/review/') + this.set('route.path', '/dashboard/review/'); + this.btnText = 'Save Application Form'; } else { console.log(error) } diff --git a/src/routes/dashboard/review-route.js b/src/routes/dashboard/review-route.js index 970eb33..40017f5 100644 --- a/src/routes/dashboard/review-route.js +++ b/src/routes/dashboard/review-route.js @@ -314,7 +314,7 @@ class ReviewRoute extends PolymerElement { @@ -350,11 +350,16 @@ class ReviewRoute extends PolymerElement { route: { type: Object, observer: '_routeChanged' + }, + btnText: { + type: Text, + value: 'Submit Application' } }; } _submitApplication(){ + this.btnText = "Submitting..."; if(this.documentCount >= 2){ const token = localStorage.getItem("token"); const url = `${this.apiPath}/kyc/check/`; @@ -368,6 +373,7 @@ class ReviewRoute extends PolymerElement { const token = response.token; localStorage.setItem("token", token); this.set('route.path', '/dashboard/status'); + this.btnText = 'Submit Application' } }) } else { @@ -396,6 +402,7 @@ class ReviewRoute extends PolymerElement { this.nameFirst = response.profile.name_first || ""; this.nameMiddle = response.profile.name_middle || ""; this.nameLast = response.profile.name_last || ""; + this.addressNumber = response.profile.address_number || ""; this.addressOne = response.profile.address_one || ""; this.addressTwo = response.profile.address_two || ""; @@ -403,6 +410,7 @@ class ReviewRoute extends PolymerElement { this.addressRegion = response.profile.address_region || ""; this.addressZip = response.profile.address_zip || ""; this.addressCountry = response.profile.address_country || ""; + this.phoneCode = response.profile.phone_code || ""; this.phoneMobile = response.profile.phone_mobile || ""; this.dobYear = response.profile.date_birth_year || ""; diff --git a/src/routes/dashboard/status-route.js b/src/routes/dashboard/status-route.js index e7868bc..a7cd51a 100644 --- a/src/routes/dashboard/status-route.js +++ b/src/routes/dashboard/status-route.js @@ -266,7 +266,7 @@ class StatusRoute extends PolymerElement {
Document Report
-

Verified

+

Reviewing

@@ -275,7 +275,7 @@ class StatusRoute extends PolymerElement {
Facial Similarity Report
-

Failed

+

Reviewing