From 577e2fa54a244f5acae2e6115d47acf7ec450659 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 26 Nov 2018 20:40:12 -0800 Subject: [PATCH 01/49] register and user call done => WIP wizard --- package-lock.json | 28 +++++++++++++++++++++------- package.json | 2 +- src/pages/register/register.ts | 30 +++++++++++++++--------------- src/providers/user/user.ts | 8 ++++---- 4 files changed, 41 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 72738487..51b0b8c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2569,11 +2569,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2586,15 +2588,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2697,7 +2702,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2707,6 +2713,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2719,17 +2726,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2746,6 +2756,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2818,7 +2829,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2828,6 +2840,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2933,6 +2946,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/package.json b/package.json index 47826674..48098ce9 100644 --- a/package.json +++ b/package.json @@ -62,4 +62,4 @@ "cordova-sqlite-storage": {} } } -} \ No newline at end of file +} diff --git a/src/pages/register/register.ts b/src/pages/register/register.ts index 712930e4..58598e8a 100644 --- a/src/pages/register/register.ts +++ b/src/pages/register/register.ts @@ -5,7 +5,7 @@ import { PasswordValidator } from '../../validators/password.validator'; import { UserProvider } from '../../providers/user/user'; import { WizardPage } from '../wizard/wizard' import { LoginPage } from '../login/login'; -import { Storage } from '@ionic/storage'; +// import { Storage } from '@ionic/storage'; @Component({ selector: 'page-register', @@ -22,7 +22,7 @@ export class RegisterPage { public navParams: NavParams, private formBuilder: FormBuilder, public _userService: UserProvider, - private storage: Storage, + // private storage: Storage, private toastCtrl: ToastController) { this.validate = this.formBuilder.group({ @@ -49,19 +49,19 @@ export class RegisterPage { password: this.validate.value.pass.password } this.submitAttempt = true - this._userService.sendReg(this.registerUser) - .subscribe( (data: any) => { - this.storage.remove('userData') - this.storage.set('userData', data) - console.log('data from submitReg()', data) - }, - err => { - console.error('err from register:', err) - }, - () => { - this.goWizard() - } - ) + // this._userService.sendReg(this.registerUser) + // .subscribe( (data: any) => { + // this.storage.remove('userData') + // this.storage.set('userData', data) + // console.log('data from submitReg()', data) + // }, + // err => { + // console.error('err from register:', err) + // }, + // () => { + this.goWizard() + // } + // ) } goLogin() { diff --git a/src/providers/user/user.ts b/src/providers/user/user.ts index 832fddf8..92e43355 100644 --- a/src/providers/user/user.ts +++ b/src/providers/user/user.ts @@ -18,10 +18,10 @@ export class UserProvider { console.log('Hello UserProvider Provider'); } - sendReg(user) { - console.log('sendReg() runs', user) - return this.http.post(this.requestUrl + '/appUsers', user) - } + // sendReg(user) { + // console.log('sendReg() runs', user) + // return this.http.post(this.requestUrl + '/appUsers', user) + // } //update data from wizard page and patch user model updateUserModel(data: any, id) { console.log(data, "#1-updateUserModel") From ce487af52220f686a7b45bb4a4e86a6c3a0a7fef Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 26 Nov 2018 20:49:34 -0800 Subject: [PATCH 02/49] done with wizard and call on service --- src/pages/wizard/wizard.ts | 10 +++++----- src/providers/user/user.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index c17ace22..0245e795 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -252,11 +252,11 @@ export class WizardPage { MOS: this.thirdForm.value.MOS } console.log(userData, this.LockSwipeToPrev) - this.user.updateUserModel(userData, window.sessionStorage.getItem('userId')) - .subscribe( - (data) => { - console.log(data, "YEY!!!!!!") - }) + // this.user.updateUserModel(userData, window.sessionStorage.getItem('userId')) + // .subscribe( + // (data) => { + // console.log(data, "YEY!!!!!!") + // }) this.shouldLockSwipeToNext = false; this.lockNextSlide() this.next(); diff --git a/src/providers/user/user.ts b/src/providers/user/user.ts index 92e43355..bebd88f1 100644 --- a/src/providers/user/user.ts +++ b/src/providers/user/user.ts @@ -23,10 +23,10 @@ export class UserProvider { // return this.http.post(this.requestUrl + '/appUsers', user) // } //update data from wizard page and patch user model - updateUserModel(data: any, id) { - console.log(data, "#1-updateUserModel") - return this.http.patch(this.requestUrl + '/appUsers/' + id , data) - } + // updateUserModel(data: any, id) { + // console.log(data, "#1-updateUserModel") + // return this.http.patch(this.requestUrl + '/appUsers/' + id , data) + // } login(creds) { return this.http.post(this.requestUrl + '/appUsers/login', creds); From e5bdd977d92d98292b5cf9eccb529fbd788ae944 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 26 Nov 2018 21:00:34 -0800 Subject: [PATCH 03/49] changes made to profile, and transition --- src/pages/profile/profile.ts | 10 +++++----- src/pages/transition/transition.ts | 12 ++++++------ src/providers/user/user.ts | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/pages/profile/profile.ts b/src/pages/profile/profile.ts index b0fdd964..4943856f 100644 --- a/src/pages/profile/profile.ts +++ b/src/pages/profile/profile.ts @@ -23,11 +23,11 @@ export class ProfilePage { } onLogout() { - this.user.logoutUser(window.sessionStorage.getItem('token')) - .subscribe( response => { - console.log('onsubscibe-logout') - window.sessionStorage.clear() - }) + // this.user.logoutUser(window.sessionStorage.getItem('token')) + // .subscribe( response => { + // console.log('onsubscibe-logout') + // window.sessionStorage.clear() + // }) } } diff --git a/src/pages/transition/transition.ts b/src/pages/transition/transition.ts index 567a8290..88183a28 100644 --- a/src/pages/transition/transition.ts +++ b/src/pages/transition/transition.ts @@ -2,7 +2,7 @@ import { Component, ViewChild } from '@angular/core'; import { NavController, NavParams, ToastController } from 'ionic-angular'; import { ChartComponent } from '../../components/chart/chart'; import { ChartProvider } from '../../providers/chart/chart'; -import { Storage } from '@ionic/storage' +//import { Storage } from '@ionic/storage' /** * Generated class for the TransitionPage page. @@ -24,7 +24,7 @@ export class TransitionPage { constructor(public navCtrl: NavController, public navParams: NavParams, public chartProvider: ChartProvider, - private storage: Storage, + // private storage: Storage, private toastCtrl: ToastController) { this.areas = [ @@ -90,10 +90,10 @@ export class TransitionPage { } ionViewWillLoad() { - this.storage.get('chartData').then((val) => { - this.date = val ? val.Date : ''; - // console.log('this.date:', this.date, 'val.Date:', val.Date) - }).then(() => this.lastDate()) + // this.storage.get('chartData').then((val) => { + // this.date = val ? val.Date : ''; + // // console.log('this.date:', this.date, 'val.Date:', val.Date) + // }).then(() => this.lastDate()) } toggleSection(area) { diff --git a/src/providers/user/user.ts b/src/providers/user/user.ts index bebd88f1..e6397ec8 100644 --- a/src/providers/user/user.ts +++ b/src/providers/user/user.ts @@ -32,10 +32,10 @@ export class UserProvider { return this.http.post(this.requestUrl + '/appUsers/login', creds); } - logoutUser(token:any) { - console.log('onservice-logout') - return this.http.post(this.requestUrl + "/appUsers/logout", token ) - } + // logoutUser(token:any) { + // console.log('onservice-logout') + // return this.http.post(this.requestUrl + "/appUsers/logout", token ) + // } getUser(id) { return this.http.get(this.requestUrl + '/appUsers/' + id) From 12c7ce5fa6c8add39ecbcec3523569a2eee99a27 Mon Sep 17 00:00:00 2001 From: awstin17 Date: Mon, 26 Nov 2018 21:06:13 -0800 Subject: [PATCH 04/49] Deleted all requests to databases made in dashboard, history, timeline, login pages, as well as the chart provider and timeline component --- src/components/timeline/timeline.ts | 4 ++-- src/pages/dashboard/dashboard.ts | 6 +++++- src/pages/login/login.ts | 17 +++++++++++++++-- src/providers/chart/chart.ts | 24 +++++++++++++++++++++--- 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src/components/timeline/timeline.ts b/src/components/timeline/timeline.ts index 7db06522..a6e71b20 100644 --- a/src/components/timeline/timeline.ts +++ b/src/components/timeline/timeline.ts @@ -28,13 +28,13 @@ export class TimelineComponent { { title: 'Find out your separation date', checkmark: true, - completed: false, + completed: true, children: [] }, { title: 'Complete Pre-Separation Counseling', checkmark: true, - completed: false, + completed: true, children: [] } ] diff --git a/src/pages/dashboard/dashboard.ts b/src/pages/dashboard/dashboard.ts index e9aeb1f6..a3982297 100644 --- a/src/pages/dashboard/dashboard.ts +++ b/src/pages/dashboard/dashboard.ts @@ -16,6 +16,8 @@ export class DashboardPage { constructor(public navCtrl: NavController, public navParams: NavParams,public chartProvider: ChartProvider, private toastCtrl: ToastController, private storage: Storage) { } + /* commenting out for demo + ionViewWillLoad() { this.storage.get('userInfo').then((val) => { this.name = val ? `${val.firstName} ${val.lastName}` : ''; @@ -25,13 +27,15 @@ export class DashboardPage { }).then(() => this.lastDate()) } + End of comment for demo */ + toTimeline() { this.navCtrl.setRoot(TimelinePage); } lastDate() { let toast = this.toastCtrl.create({ - message: `Your last assessment was ${this.date}`, + message: `Your last assessment was on 11/17/2018`, duration: 2500, position: 'middle' }); diff --git a/src/pages/login/login.ts b/src/pages/login/login.ts index bb70b7e6..5d0e421f 100644 --- a/src/pages/login/login.ts +++ b/src/pages/login/login.ts @@ -13,6 +13,7 @@ import { ChartProvider } from '../../providers/chart/chart'; }) export class LoginPage { + /* Commenting out for demo dummyChart: any = { Date: "10/29/2018", Data: [8, 2, 5, 10, 3, 5, 6, 8] @@ -21,10 +22,12 @@ export class LoginPage { getDummyChart: any user: any userId: any - - private loginCreds : FormGroup; loginResponse: any; + End comment for demo */ + + private loginCreds : FormGroup; + constructor(public navCtrl: NavController, public navParams: NavParams, public _userService: UserProvider, @@ -46,6 +49,8 @@ export class LoginPage { */ login() { + /* Commenting out for the demo + this._userService.login(this.loginCreds.value) .subscribe( (res) => { @@ -85,12 +90,18 @@ export class LoginPage { toast.present() } ) + + Comment end for demo */ + + this.toDashboard(); } toRegisterPage() { this.navCtrl.push(RegisterPage) } + /*Commenting out for demo + getChartData() { this.chartProvider.getChartHistory() .subscribe((res) => { @@ -104,6 +115,8 @@ export class LoginPage { ); } + End comment for demo */ + toDashboard() { let toast = this.toastCtrl.create({ message: "Login successful!", diff --git a/src/providers/chart/chart.ts b/src/providers/chart/chart.ts index 4813e343..7046966f 100644 --- a/src/providers/chart/chart.ts +++ b/src/providers/chart/chart.ts @@ -6,14 +6,32 @@ import { ENV } from '@app/env'; @Injectable() export class ChartProvider { - chartHistory: any; // Data for the history page - mostRecentChart: any = [0, 0, 0, 0, 0, 0, 0, 0]; // Data for the chart on the dashboard page + chartHistory: any = [ + { date: "11/26/2018", + data: [10, 8, 9, 6, 9, 10, 6, 4] + }, + { + date: "8/26/2018", + data: [9, 8, 8, 6, 7, 10, 8, 5] + }, + { + date: "5/26/2018", + data: [5, 6, 9, 3, 2, 10, 6, 4] + } + ]; // Data for the history page + + mostRecentChart: any = [10, 8, 9, 6, 9, 10, 6, 4]; // Data for the chart on the dashboard page assessmentChartData: any = [0, 0, 0, 0, 0, 0, 0, 0]; // Range sliders on transition page are ngmodeled to this array - requestUrl: string = ENV.url + + //Commenting the variable below out for demo + //requestUrl: string = ENV.url constructor(public http: HttpClient) { } + /* Commenting out for the demo + getChartHistory() { return this.http.get(this.requestUrl + '/appUsers/' + sessionStorage.getItem('userId') + '/charts') } + End of comment for the demo */ } From 94ddf895ae1821846b69b7d4c5db70d359aa3795 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 26 Nov 2018 21:28:20 -0800 Subject: [PATCH 05/49] html {{}}, and user comments --- src/pages/wizard/wizard.html | 2 +- src/providers/user/user.ts | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index 328633f2..67e08f91 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -26,7 +26,7 @@
-

Welcome Peter!!

+

Welcome {{user.userName}}!

InTransition is an app designed for Veterans to transition into the civil environment. This wizard will guide you through the app.

diff --git a/src/providers/user/user.ts b/src/providers/user/user.ts index e6397ec8..bc0a0518 100644 --- a/src/providers/user/user.ts +++ b/src/providers/user/user.ts @@ -13,6 +13,7 @@ import { ENV } from '@app/env'; export class UserProvider { requestUrl: string = ENV.url + userName: any = "Maurice"; constructor(public http: HttpClient) { console.log('Hello UserProvider Provider'); @@ -28,17 +29,18 @@ export class UserProvider { // return this.http.patch(this.requestUrl + '/appUsers/' + id , data) // } - login(creds) { - return this.http.post(this.requestUrl + '/appUsers/login', creds); - } + // login(creds) { + // return this.http.post(this.requestUrl + '/appUsers/login', creds); + // } // logoutUser(token:any) { // console.log('onservice-logout') // return this.http.post(this.requestUrl + "/appUsers/logout", token ) // } - getUser(id) { - return this.http.get(this.requestUrl + '/appUsers/' + id) + // getUser(id) { + // return this.http.get(this.requestUrl + '/appUsers/' + id) - } + // } } + From 1a9f08e88c94378c9fd8a62566b4faec2b174af6 Mon Sep 17 00:00:00 2001 From: awstin17 Date: Mon, 26 Nov 2018 21:48:48 -0800 Subject: [PATCH 06/49] changed styling on history page --- src/pages/history/history.html | 7 +++---- src/pages/history/history.scss | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/history/history.html b/src/pages/history/history.html index d49bf639..26ef26ac 100644 --- a/src/pages/history/history.html +++ b/src/pages/history/history.html @@ -18,11 +18,10 @@ - - -

{{ chart.date }}

+ +

{{ chart.date }}

- + diff --git a/src/pages/history/history.scss b/src/pages/history/history.scss index 52c98ccd..ee76b36f 100644 --- a/src/pages/history/history.scss +++ b/src/pages/history/history.scss @@ -7,5 +7,10 @@ page-history { #date { font-size: 25px; + padding-left: 20%; + } + + #chart { + padding-left: 10%; } } From 3ff7714eba8deeb0346ae134cd7b7e40e1f552f0 Mon Sep 17 00:00:00 2001 From: Gino17 Date: Mon, 17 Dec 2018 17:28:30 -0800 Subject: [PATCH 07/49] moved top navbar for slides into its own grid row, modified wizard sass file to remove absolute positioning from nav-start class to fix formating issues with grid --- src/pages/wizard/wizard.html | 60 ++++++++++++++++++++---------------- src/pages/wizard/wizard.scss | 1 - 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index 21bcf106..b02e4ac3 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -14,14 +14,20 @@ - - - + + + + + + + + +
@@ -35,7 +41,7 @@

Welcome {{name}}!!

- +
@@ -48,7 +54,7 @@

Home Dasboard

- +
@@ -61,7 +67,7 @@

Life Balance Wheel

- +
@@ -75,7 +81,7 @@

Timeline

- +
@@ -89,7 +95,7 @@

Profile

- +
@@ -103,7 +109,7 @@

Questionnaire

- +
@@ -114,7 +120,7 @@

Questionnaire 1/3

- + @@ -160,7 +166,7 @@

Questionnaire 1/3

- + @@ -196,7 +202,7 @@

Questionnaire 1/3

- + @@ -216,7 +222,7 @@

Questionnaire 1/3

- + Questionnaire 1/3 - +
- +
@@ -274,7 +280,7 @@

Questionnaire 2/3

- + @@ -295,7 +301,7 @@

Questionnaire 2/3

- + @@ -322,7 +328,7 @@

Questionnaire 2/3

- +
@@ -333,7 +339,7 @@

Questionnaire 3/3

- + @@ -404,7 +410,7 @@

Questionnaire 3/3

- + @@ -425,11 +431,11 @@

Questionnaire 3/3



- +
- +
@@ -449,8 +455,8 @@

Thank you for using the Wizard

-
+
diff --git a/src/pages/wizard/wizard.scss b/src/pages/wizard/wizard.scss index f11edf69..f8937b6a 100644 --- a/src/pages/wizard/wizard.scss +++ b/src/pages/wizard/wizard.scss @@ -14,7 +14,6 @@ page-wizard { align-items: flex-start; } .nav-start { - position: absolute; background-color: rgb(26, 39, 71); width: 100%; height: 4.5vw; From 00f8026fbc23db449fb3d99b2297c892be8e2508 Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 18 Dec 2018 13:51:05 -0800 Subject: [PATCH 08/49] fixed header title for smaller screens using portrait media query, moved header into its own row within grid --- src/pages/login/login.html | 12 ++++++------ src/pages/login/login.scss | 8 +++++++- src/pages/register/register.html | 11 ++++++----- src/pages/register/register.scss | 9 +++++++++ 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/pages/login/login.html b/src/pages/login/login.html index 4edd6460..5eabddee 100644 --- a/src/pages/login/login.html +++ b/src/pages/login/login.html @@ -14,13 +14,13 @@ + + + +

INTRANSITION

+
+
- - - -
diff --git a/src/pages/login/login.scss b/src/pages/login/login.scss index 58ac5ef3..6b772f55 100644 --- a/src/pages/login/login.scss +++ b/src/pages/login/login.scss @@ -75,7 +75,13 @@ page-login { } @media screen and (orientation:portrait){ - + #title { + letter-spacing: 3px; + font-weight: bold; + font-family: proxima-nova; + font-size: 40px; + color: white; + } } @media screen and (orientation:landscape){ diff --git a/src/pages/register/register.html b/src/pages/register/register.html index 2567bb13..4f08149f 100644 --- a/src/pages/register/register.html +++ b/src/pages/register/register.html @@ -150,11 +150,12 @@

Login if you already have an account.

- - - + + + +

INTRANSITION

+
+
diff --git a/src/pages/register/register.scss b/src/pages/register/register.scss index 26fcf60c..c84c5bd4 100644 --- a/src/pages/register/register.scss +++ b/src/pages/register/register.scss @@ -187,6 +187,15 @@ page-register { } } + @media screen and (orientation:portrait){ + #title { + letter-spacing: 3px; + font-weight: bold; + font-family: proxima-nova; + font-size: 40px; + color: white; + } + } @media screen and (orientation:landscape){ #header { From 5b893e146b43ac79f5c59da0175849c1db64ee01 Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 18 Dec 2018 14:01:09 -0800 Subject: [PATCH 09/49] minor adjustments to nav, added no-padding to grid --- src/pages/wizard/wizard.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index b02e4ac3..4b342466 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -13,15 +13,15 @@ - - + + - + + + + + From 4a6446e9266ebc10664e98244c829887758f4c28 Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 18 Dec 2018 14:17:06 -0800 Subject: [PATCH 10/49] fixed typo for assessment image in assets folder to correct broken image on slide 3 in wizard page --- src/assets/imgs/{asssesment.png => assessment.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename src/assets/imgs/{asssesment.png => assessment.png} (100%) diff --git a/src/assets/imgs/asssesment.png b/src/assets/imgs/assessment.png similarity index 100% rename from src/assets/imgs/asssesment.png rename to src/assets/imgs/assessment.png From 9515729fff4246352ae988e368646d1d950f533d Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 18 Dec 2018 15:03:50 -0800 Subject: [PATCH 11/49] modified navbar to use flexbox, moved and formatted exit button to be at the center of navbar --- src/pages/wizard/wizard.html | 6 +++--- src/pages/wizard/wizard.scss | 41 ++++++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index 4b342466..eb9b84b5 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -18,9 +18,9 @@ - - - + + + diff --git a/src/pages/wizard/wizard.scss b/src/pages/wizard/wizard.scss index f8937b6a..9b9d885c 100644 --- a/src/pages/wizard/wizard.scss +++ b/src/pages/wizard/wizard.scss @@ -14,6 +14,9 @@ page-wizard { align-items: flex-start; } .nav-start { + display: flex; + flex-direction: row; + justify-content: space-between; background-color: rgb(26, 39, 71); width: 100%; height: 4.5vw; @@ -28,15 +31,23 @@ page-wizard { width: 10vw; min-width: 65px; } - #end { - font-size:20px ; - min-width: 65px; - width: 10vw; + .leave-wizard{ + font-size: 20px; height: 85%; - float:right; - color: black; - background-color: aliceblue; + color: white; + background-color: #f53d3d; + width: 10vw; + min-width: 65px; } + // #end { + // font-size:20px ; + // min-width: 65px; + // width: 10vw; + // height: 85%; + // float:right; + // color: black; + // background-color: aliceblue; + // } .top-demo { position: relative; display: block; @@ -149,9 +160,9 @@ page-wizard { width: 168px; height:42px; } - #end-wizard-h{ - white-space: normal - } + // #end-wizard-h{ + // white-space: normal + // } .buttons { position: relative; margin-top: 15vw; @@ -172,11 +183,13 @@ page-wizard { } .start { font-size:25px ; - } - #end { - font-size:25px ; - } + .leave-wizard{ + font-size: 25px; + } + // #end { + // font-size:25px ; + // } .button1{ height: 55px; width: 180px; From 0bd2aaa9ab9bdb92473c32ee3e7a409102a9e8dc Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 18 Dec 2018 15:12:34 -0800 Subject: [PATCH 12/49] commented out navbar --- src/pages/wizard/wizard.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index eb9b84b5..28147c4c 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -5,12 +5,12 @@ Ionic pages and navigation. --> - + From e70078980325856302509f439910829b3fe6ca32 Mon Sep 17 00:00:00 2001 From: Gino17 Date: Wed, 19 Dec 2018 16:34:57 -0800 Subject: [PATCH 13/49] reformatted news page for desktop view --- src/pages/news/news.html | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/src/pages/news/news.html b/src/pages/news/news.html index 303dec0a..88ca5c4e 100644 --- a/src/pages/news/news.html +++ b/src/pages/news/news.html @@ -7,9 +7,7 @@ - - -
- + + - + -->
@@ -447,9 +449,9 @@

Questionnaire 3/3

-

Thank you for using the Wizard

+

Thank you for completing the InTransition Questionnaire.

-

You may go to your dashboard or to the transition page to take the assessmentc.

+

You may go to your Dashboard or take the Self Assessment.

@@ -465,10 +467,6 @@

Thank you for using the Wizard

- - - - diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index 109199c0..da22da43 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -36,6 +36,9 @@ export class WizardPage { } // index: number; + leftArrowVisible: boolean = false; + rightArrowVisible: boolean = true; + @ViewChild(Slides) slides: Slides; constructor(public alertCtrl: AlertController, @@ -54,6 +57,7 @@ export class WizardPage { this.firstFormFunct(); this.secondFormFunct(); this.thirdFormFunct(); + } ionViewDidLoad() { @@ -203,9 +207,20 @@ export class WizardPage { } next() { this.slides.slideNext(500); + console.log(this.slides.getActiveIndex()) + + if(this.slides.getActiveIndex() === 8) { + this.leftArrowVisible = false; + this.rightArrowVisible = false; + } else if (this.slides.getActiveIndex() === 5) { + this.leftArrowVisible = false; + } else if (this.slides.getActiveIndex() !== 5 || 8) { + this.leftArrowVisible = true; + } } back() { this.slides.slidePrev(500); + console.log(this.slides.getActiveIndex()) } //shouldLockSwipeToNext variable can be either true/false depending on condition lockNextSlide() { @@ -290,5 +305,16 @@ export class WizardPage { return Math.ceil(diff/86400000); } + // yesOrNoArrow() { + // if(this.slides.getActiveIndex() === 8) { + // this.leftArrowVisible = false; + // this.rightArrowVisible = false; + // } else if (this.slides.getActiveIndex() === 0) { + // this.leftArrowVisible = false; + // } else if (this.slides.getActiveIndex() === 5) { + // this.leftArrowVisible = false; + // } + // } + } From bc3be251da571e1316a01b5b3f85b7b8c2c722c4 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 11:26:12 -0800 Subject: [PATCH 19/49] Left arrow no longer shows up on 1st slide when clicking back --- src/pages/wizard/wizard.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index da22da43..f9a8a29f 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -220,6 +220,7 @@ export class WizardPage { } back() { this.slides.slidePrev(500); + if(this.slides.getActiveIndex() === 0) this.leftArrowVisible = false; console.log(this.slides.getActiveIndex()) } //shouldLockSwipeToNext variable can be either true/false depending on condition From 725e28eb8c0abfd41cfe04a18e5b48d2abfe81fe Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 12:42:03 -0800 Subject: [PATCH 20/49] Dashboard now has link to self assessment --- src/pages/dashboard/dashboard.html | 8 ++++++-- src/pages/dashboard/dashboard.scss | 7 +++++++ src/pages/dashboard/dashboard.ts | 7 +++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/pages/dashboard/dashboard.html b/src/pages/dashboard/dashboard.html index f555c2dd..c18136ff 100644 --- a/src/pages/dashboard/dashboard.html +++ b/src/pages/dashboard/dashboard.html @@ -81,8 +81,12 @@

{{ currentActionItem }}

Transition Readiness Test - - + + Please complete a Self Assessment + + + + diff --git a/src/pages/dashboard/dashboard.scss b/src/pages/dashboard/dashboard.scss index 4fe04e87..568ee454 100644 --- a/src/pages/dashboard/dashboard.scss +++ b/src/pages/dashboard/dashboard.scss @@ -9,6 +9,13 @@ page-dashboard { font-size: 20px; } + .button1{ + width: 138px; + height:42px; + background-color: rgb(26, 39, 71); + padding: 0px; + } + .cards { background-color: color($colors, light) } diff --git a/src/pages/dashboard/dashboard.ts b/src/pages/dashboard/dashboard.ts index 0f5f3c23..73dfe1f8 100644 --- a/src/pages/dashboard/dashboard.ts +++ b/src/pages/dashboard/dashboard.ts @@ -7,6 +7,7 @@ import { UserProvider } from '../../providers/user/user'; import * as moment from 'moment'; import { NewsPage } from '../news/news'; import { ActionItemProvider } from '../../providers/action-item/action-item'; +import { SelfAssessmentPage } from '../self-assessment/self-assessment'; interface UserData { firstName: any, @@ -24,6 +25,7 @@ export class DashboardPage { daysTilSep: any daysTilSepAbs: any currentActionItem + prevAssess: boolean = false; constructor(public navCtrl: NavController, public navParams: NavParams, @@ -56,6 +58,7 @@ export class DashboardPage { this.user.getUserChart(window.sessionStorage.getItem('userId')) .subscribe( (data: Array) => { if (!data.length) return + this.prevAssess = true; this.assessDate = moment(data[0].date.substring(0,10), "YYYY-MM-DD").toDate().getTime(); let now = new Date().getTime(); this.assessDate = Math.ceil((this.assessDate - now)/86400000); @@ -67,6 +70,10 @@ export class DashboardPage { }); } + toSelfAssessment() { + this.navCtrl.setRoot(SelfAssessmentPage); + } + toTimeline() { this.navCtrl.setRoot(TimelinePage); } From 65a877260f4765f4bc4b3a9678225cb0d3d8d7da Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 15 Jan 2019 15:00:27 -0800 Subject: [PATCH 21/49] minor adjustments --- src/pages/wizard/wizard.html | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index 28147c4c..a202e4c0 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -14,17 +14,6 @@ - - - - - - - - - - - @@ -458,5 +447,17 @@

Thank you for using the Wizard

+ + + + + + + + + + + + From 4ebbe0df355ccc06356e1c78e016e93345e282be Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 15 Jan 2019 16:24:31 -0800 Subject: [PATCH 22/49] commented out timeline component sass on lines 138-140 to adjust checkbox and text --- src/components/timeline/timeline.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index 0e6425b1..e1d43196 100644 --- a/src/components/timeline/timeline.scss +++ b/src/components/timeline/timeline.scss @@ -135,9 +135,9 @@ padding-left: 2em; } .item.item-md .checkbox-md { - margin: -6px 17px 8px -20px !important; - padding-left: 4%; - padding-top: 2%; + // margin: -6px 17px 8px -20px !important; + // padding-left: 4%; + // padding-top: 2%; } .item-ios h2:last-child, .item-ios h3:last-child, .item-ios h4:last-child, .item-ios h5:last-child, .item-ios h6:last-child, .item-ios p:last-child { From 29e3678137b5373f352ce0387100430d842afd6c Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 15 Jan 2019 16:31:50 -0800 Subject: [PATCH 23/49] commented out timeline component sass on lines 146-152 to indent immediate child topics of the main timeline topics --- src/components/timeline/timeline.scss | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index e1d43196..510fa04e 100644 --- a/src/components/timeline/timeline.scss +++ b/src/components/timeline/timeline.scss @@ -138,15 +138,18 @@ padding-left: 2em; // margin: -6px 17px 8px -20px !important; // padding-left: 4%; // padding-top: 2%; + margin-right: 0%; + padding-left: 2%; + padding-right: 2%; } - .item-ios h2:last-child, .item-ios h3:last-child, .item-ios h4:last-child, .item-ios h5:last-child, .item-ios h6:last-child, .item-ios p:last-child { - padding-left: 5% !important; - } + // .item-ios h2:last-child, .item-ios h3:last-child, .item-ios h4:last-child, .item-ios h5:last-child, .item-ios h6:last-child, .item-ios p:last-child { + // padding-left: 5% !important; + // } - h1:first-child,h2:first-child,h3:first-child,h4:first-child, h5:first-child, h6:first-child { - margin-left: 2%; - } + // h1:first-child,h2:first-child,h3:first-child,h4:first-child, h5:first-child, h6:first-child { + // margin-left: 2%; + // } .bulletItem { // padding-top: 1em; From a49fe70399d44e2f03e252879e8ce9adc3b9b15b Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 16:35:01 -0800 Subject: [PATCH 24/49] Removed officer rank insignia question --- src/pages/wizard/wizard.html | 23 ++++++++--------------- src/pages/wizard/wizard.scss | 1 + src/pages/wizard/wizard.ts | 32 ++++++++++---------------------- 3 files changed, 19 insertions(+), 37 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index 14230d0b..1c03894a 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -17,14 +17,6 @@ - - -
@@ -40,7 +32,7 @@

Welcome {{name}}!!

-

InTransition is an app designed for Veterans to transition into the civil environment. +

InTransition is an app designed for Veterans to transition into civilian life. This wizard will guide you through the app.

Swipe to the right to begin ➤

@@ -140,7 +132,7 @@

Questionnaire 1/3

[selectOptions] = 'branchOption'> Air Force Army - Coast Guards + Coast Guard Marines Navy @@ -165,6 +157,7 @@

Questionnaire 1/3

[selectOptions] = 'vetOrActiveOptions'> Veteran Active + @@ -368,7 +361,7 @@

Questionnaire 3/3

- + - + @@ -460,7 +453,7 @@

Thank you for completing the InTransition Quest - + diff --git a/src/pages/wizard/wizard.scss b/src/pages/wizard/wizard.scss index 157f0622..4e4d2e4a 100644 --- a/src/pages/wizard/wizard.scss +++ b/src/pages/wizard/wizard.scss @@ -199,6 +199,7 @@ page-wizard { height: 55px; width: 180px; font-size: 25px; + white-space: normal; } .select-placeholder, .select-text{ font-size: 25px; diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index f9a8a29f..946882ee 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -3,7 +3,7 @@ import { NavController, NavParams, Slides, AlertController, Platform } from 'ion import { Validators, FormBuilder, FormGroup } from '@angular/forms'; // import { createOfflineCompileUrlResolver, ProviderAst } from '@angular/compiler'; import { DashboardPage } from '../../pages/dashboard/dashboard'; -import { TransitionPage } from '../../pages/transition/transition'; +import { SelfAssessmentPage } from '../../pages/self-assessment/self-assessment'; import { UserProvider } from '../../providers/user/user'; import * as moment from 'moment'; @@ -129,7 +129,7 @@ export class WizardPage { } else if (val == "Navy") { codeNumber.setValidators(Validators.compose([Validators.maxLength(3), Validators.required, Validators.pattern('[a-zA-Z ]+$')])); this.codeErrorMessage = "Enter a maximum of 3 letters" - } else if (val == 'Coast Guards') { + } else if (val == 'Coast Guard') { codeNumber.setValidators(Validators.compose([Validators.maxLength(9), Validators.required, Validators.pattern('[A-Za-z0-9]+$')])) this.codeErrorMessage = "Max 9 characters" } @@ -145,7 +145,7 @@ export class WizardPage { this.SeparationQuestion = "When is your separation date?" enlistedPay.setValidators(Validators.compose([Validators.required,])); } else if (val == "Veteran") { - this.SeparationQuestion = "When was your sepatation date?" + this.SeparationQuestion = "When was your separation date?" enlistedPay.clearValidators(); } this.vetValue = val; @@ -195,9 +195,9 @@ export class WizardPage { //declare thirdForm; set contol names; set validators thirdFormFunct() { this.thirdForm = this.formBuilder.group({ - rank: ["", Validators.compose([Validators.required, Validators.maxLength(30), Validators.pattern('[a-zA-Z ]*')])], - insignia: ['', Validators.compose([Validators.required])], - enlistedPay: [''], + rank: ["", Validators.compose([Validators.required, Validators.maxLength(30), Validators.pattern('[a-zA-Z0-9 ]*')])], + // insignia: ['', Validators.compose([Validators.required])], + // enlistedPay: [''], MOS: ["", Validators.compose([Validators.required])] }); }; @@ -260,7 +260,7 @@ export class WizardPage { branchOption = this.customizeSelectOptions("Military Branch", "Select a branch"); vetOrActiveOptions = this.customizeSelectOptions("Military Status", "Select one"); disabilityOptions = this.customizeSelectOptions("Disability Status", "Select one"); - unemployedOptions = this.customizeSelectOptions("Employement Status", "Select one"); + unemployedOptions = this.customizeSelectOptions("Employment Status", "Select one"); maritalOptions = this.customizeSelectOptions("Marital Status", "Select one"); insigniaOptions = this.customizeSelectOptions("Officer Rank Insignia", "Select one") enlistedPayOptions = this.customizeSelectOptions("Enlisted Pay Rank", "Select one") @@ -276,8 +276,8 @@ export class WizardPage { lastEmployed: this.secondForm.value.lastEmployed, maritalStatus: this.secondForm.value.marital, militaryRank: this.thirdForm.value.rank, - officerRank: this.thirdForm.value.insignia, - enlistingPay: this.thirdForm.value.enlistedPay, + // officerRank: this.thirdForm.value.insignia, + // enlistingPay: this.thirdForm.value.enlistedPay, codeIdentifier: this.thirdForm.value.MOS, } console.log(this.user.userData, this.LockSwipeToPrev) @@ -296,7 +296,7 @@ export class WizardPage { } setAssestmentPage() { - this.navCtrl.setRoot(TransitionPage) + this.navCtrl.setRoot(SelfAssessmentPage) } calcDate() { @@ -305,17 +305,5 @@ export class WizardPage { let diff = sepDate - now; return Math.ceil(diff/86400000); } - - // yesOrNoArrow() { - // if(this.slides.getActiveIndex() === 8) { - // this.leftArrowVisible = false; - // this.rightArrowVisible = false; - // } else if (this.slides.getActiveIndex() === 0) { - // this.leftArrowVisible = false; - // } else if (this.slides.getActiveIndex() === 5) { - // this.leftArrowVisible = false; - // } - // } - } From 9606d9906c8abb5deafca226d4134e29720ec623 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 16:36:38 -0800 Subject: [PATCH 25/49] Cleaned up link to assessment to match the other links on page --- src/pages/dashboard/dashboard.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/dashboard/dashboard.html b/src/pages/dashboard/dashboard.html index c18136ff..b34a9457 100644 --- a/src/pages/dashboard/dashboard.html +++ b/src/pages/dashboard/dashboard.html @@ -83,7 +83,9 @@

{{ currentActionItem }}

Please complete a Self Assessment - + Complete an assessment + + From b08e8ef5da261ffe2e038ccc460ff1459666db43 Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 15 Jan 2019 17:13:07 -0800 Subject: [PATCH 26/49] added a new margin-left on line 72 for the timeline sass component --- src/components/timeline/timeline.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index 510fa04e..a00276b2 100644 --- a/src/components/timeline/timeline.scss +++ b/src/components/timeline/timeline.scss @@ -69,7 +69,8 @@ padding-left: 2em; } .item-checkbox { - margin-left: 12%; + margin-left: 10%; + // margin-left: 12%; } .item-checkbox-checked { @@ -138,7 +139,7 @@ padding-left: 2em; // margin: -6px 17px 8px -20px !important; // padding-left: 4%; // padding-top: 2%; - margin-right: 0%; + margin-right: 2%; padding-left: 2%; padding-right: 2%; } From ff0501eeb8ed18c4c3e1fde41f540b4a5db9546c Mon Sep 17 00:00:00 2001 From: Gino17 Date: Tue, 15 Jan 2019 17:14:12 -0800 Subject: [PATCH 27/49] changed timeline sass component from 10% to 8% on line 72 --- src/components/timeline/timeline.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index a00276b2..abed636a 100644 --- a/src/components/timeline/timeline.scss +++ b/src/components/timeline/timeline.scss @@ -69,7 +69,7 @@ padding-left: 2em; } .item-checkbox { - margin-left: 10%; + margin-left: 8%; // margin-left: 12%; } From 59ea26034ee2d679ae5d3d1c71c57a387e696a4e Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 19:54:14 -0800 Subject: [PATCH 28/49] Removed " --- src/pages/news/news.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/news/news.html b/src/pages/news/news.html index 0908329e..1df0cb2c 100644 --- a/src/pages/news/news.html +++ b/src/pages/news/news.html @@ -51,7 +51,7 @@

{{data.title}}

- \ + mock news picture From 0a4e1f504fdad05c147d6fba152ce39815a3ec0a Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 21:52:54 -0800 Subject: [PATCH 29/49] Created dropdown menu for rank instead of making the user type in the rank --- src/pages/wizard/wizard.html | 32 ++++++++++++++++++++++++++----- src/pages/wizard/wizard.ts | 37 +++++++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 14 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index 7a494677..616e89f1 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -346,16 +346,38 @@

Questionnaire 3/3

What is your military rank? - - - - + --> + + O1 + O2 + O3 + O4 + O5 + O6 + O7 + E1 + E2 + E3 + E4 + E5 + E6 + E7 + E8 + E9 + + + +
diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index f1c0e2cd..6fe7e6ea 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -205,24 +205,41 @@ export class WizardPage { exit() { this.navCtrl.setRoot(DashboardPage) } - next() { - this.slides.slideNext(500); - console.log(this.slides.getActiveIndex()) - - if(this.slides.getActiveIndex() === 8) { + leftOrRightArrow() { + if(this.slides.getActiveIndex() === 0){ + this.leftArrowVisible = false; + } + else if (this.slides.getActiveIndex() === 8) { this.leftArrowVisible = false; this.rightArrowVisible = false; - } else if (this.slides.getActiveIndex() === 5) { + } + else if (this.slides.getActiveIndex() === 5) { this.leftArrowVisible = false; - } else if (this.slides.getActiveIndex() !== 5 || 8) { + } + else if (this.slides.getActiveIndex() === 7) { + this.rightArrowVisible = false; + } + else if (this.slides.getActiveIndex() !== 5 || 8) { this.leftArrowVisible = true; - } + } + else if (this.slides.getActiveIndex() === 6) { + this.rightArrowVisible = true; + } + } + + next() { + this.slides.slideNext(500); + console.log(this.slides.getActiveIndex()) + this.leftOrRightArrow(); } + back() { this.slides.slidePrev(500); - if(this.slides.getActiveIndex() === 0) this.leftArrowVisible = false; console.log(this.slides.getActiveIndex()) + this.leftOrRightArrow(); } + + //shouldLockSwipeToNext variable can be either true/false depending on condition lockNextSlide() { this.slides.lockSwipeToNext(this.shouldLockSwipeToNext); @@ -262,6 +279,8 @@ export class WizardPage { disabilityOptions = this.customizeSelectOptions("Disability Status", "Select one"); unemployedOptions = this.customizeSelectOptions("Employment Status", "Select one"); maritalOptions = this.customizeSelectOptions("Marital Status", "Select one"); + rankOptions = this.customizeSelectOptions("Military Rank", "Select one"); + // insigniaOptions = this.customizeSelectOptions("Officer Rank Insignia", "Select one") // enlistedPayOptions = this.customizeSelectOptions("Enlisted Pay Rank", "Select one") From 44f27405139745041ab60c84395370d5b779e95b Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 23:05:49 -0800 Subject: [PATCH 30/49] Min-height added to 2nd row of items in dashboard --- src/pages/dashboard/dashboard.html | 17 +++++++++-------- src/pages/dashboard/dashboard.scss | 11 +++++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/pages/dashboard/dashboard.html b/src/pages/dashboard/dashboard.html index b34a9457..fa9f3143 100644 --- a/src/pages/dashboard/dashboard.html +++ b/src/pages/dashboard/dashboard.html @@ -17,12 +17,13 @@ -

Hello, {{ this.name }}!

+

Hello, Peter!

+
- + Welcome to the Military and Veteran's "InTransition" Personal Transition Assistant. Your personal guide to @@ -34,8 +35,8 @@

Hello, {{ this.name }}!

- - + + {{daysTilSep}} Days Until Separation! @@ -58,8 +59,8 @@

{{ currentActionItem }}

- - + + Veterans Affairs News @@ -76,7 +77,7 @@

{{ currentActionItem }}

- + Transition Readiness Test @@ -95,7 +96,7 @@

{{ currentActionItem }}

- + Build Your Network diff --git a/src/pages/dashboard/dashboard.scss b/src/pages/dashboard/dashboard.scss index 568ee454..121e3b2f 100644 --- a/src/pages/dashboard/dashboard.scss +++ b/src/pages/dashboard/dashboard.scss @@ -60,6 +60,10 @@ page-dashboard { padding-left: 5px } + .row2 { + min-height: 35vh; + } + #networkingContent { padding: 0px 16px; display: flex; @@ -82,6 +86,13 @@ page-dashboard { padding-left: 20px; } + // .dashboardLink { + // padding-top: 0px; + // position: relative; + // top: -7px; + // font-size: 20px; + // } + #networkingLink { padding-top: 0px; position: relative; From ff19d5c3155ea16408b3586c817e4f941825619e Mon Sep 17 00:00:00 2001 From: warreng8 Date: Tue, 15 Jan 2019 23:16:59 -0800 Subject: [PATCH 31/49] Resources page grid now added --- src/pages/dashboard/dashboard.ts | 4 ++-- src/pages/resources/resources.html | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/dashboard/dashboard.ts b/src/pages/dashboard/dashboard.ts index 2e34212f..ea10ec43 100644 --- a/src/pages/dashboard/dashboard.ts +++ b/src/pages/dashboard/dashboard.ts @@ -37,7 +37,7 @@ export class DashboardPage { this.currentActionItem = this.actionItem.currentItem; } - /* commenting out for demo + // commenting out for demo ionViewWillLoad() { // this.storage.get('userInfo').then((val) => { @@ -76,7 +76,7 @@ export class DashboardPage { this.navCtrl.setRoot(SelfAssessmentPage); } - End of comment for demo */ + // End of comment for demo */ toTimeline() { this.navCtrl.setRoot(TimelinePage); diff --git a/src/pages/resources/resources.html b/src/pages/resources/resources.html index 25bf3c59..ac775925 100644 --- a/src/pages/resources/resources.html +++ b/src/pages/resources/resources.html @@ -14,21 +14,21 @@ - +

Hello, {{user.firstName}}!

- + This page will provide helpful resources to aid in your transition. Based on your self assessment, here are some areas which might need more help than others. - + - + Your lowest score on self assessment is:

{{userPro.userData.lowScoreName}} @@ -45,7 +45,7 @@

- + {{res.title}} From 97ab4bff95d96d8fb601158371f61d9e4fa63047 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 11:35:19 -0800 Subject: [PATCH 32/49] Dashboard links are now placed in the bottom right corner of its card --- src/pages/dashboard/dashboard.html | 13 ++++++++----- src/pages/dashboard/dashboard.scss | 25 +++++++++++++++++-------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/pages/dashboard/dashboard.html b/src/pages/dashboard/dashboard.html index fa9f3143..65161b50 100644 --- a/src/pages/dashboard/dashboard.html +++ b/src/pages/dashboard/dashboard.html @@ -36,7 +36,7 @@

Hello, Peter!

- + {{daysTilSep}} Days Until Separation! @@ -51,8 +51,9 @@

Hello, Peter!

Being informed and prepared will make your transition into civilization easier to see what your next steps are. The next step is:
+

{{ currentActionItem }}

- See what's next + See what's next @@ -60,13 +61,13 @@

{{ currentActionItem }}

- + Veterans Affairs News - More news + More news @@ -97,7 +98,9 @@

{{ currentActionItem }}

+ + Build Your Network @@ -117,7 +120,7 @@

{{ currentActionItem }}

a 2.


- Learn More + Learn More
diff --git a/src/pages/dashboard/dashboard.scss b/src/pages/dashboard/dashboard.scss index 121e3b2f..fb043166 100644 --- a/src/pages/dashboard/dashboard.scss +++ b/src/pages/dashboard/dashboard.scss @@ -17,7 +17,8 @@ page-dashboard { } .cards { - background-color: color($colors, light) + background-color: color($colors, light); + position: relative; } .sep { @@ -64,6 +65,12 @@ page-dashboard { min-height: 35vh; } + .dashboardLinks { + position:absolute; + bottom:0; + right: 1vw; + } + #networkingContent { padding: 0px 16px; display: flex; @@ -86,19 +93,21 @@ page-dashboard { padding-left: 20px; } - // .dashboardLink { - // padding-top: 0px; - // position: relative; - // top: -7px; - // font-size: 20px; - // } + - #networkingLink { + .dashboardLink { padding-top: 0px; position: relative; top: -7px; font-size: 20px; } + + #networkingLink { + padding-top: 0px; + position: relative; + top: -7px; + font-size: 20px; + } } // .toaster{ From 2c046cf0588db310600ead64f9710904e1b3ed18 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 11:50:54 -0800 Subject: [PATCH 33/49] Please complete assessment text centered. --- src/pages/dashboard/dashboard.html | 10 +++++----- src/pages/dashboard/dashboard.scss | 14 ++++++-------- src/pages/dashboard/dashboard.ts | 2 +- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/pages/dashboard/dashboard.html b/src/pages/dashboard/dashboard.html index 65161b50..1afb6a4a 100644 --- a/src/pages/dashboard/dashboard.html +++ b/src/pages/dashboard/dashboard.html @@ -84,7 +84,9 @@

{{ currentActionItem }}

Transition Readiness Test - Please complete a Self Assessment + +

Please complete a Self Assessment

+ Complete an assessment @@ -97,10 +99,8 @@

{{ currentActionItem }}

- - + - Build Your Network @@ -125,7 +125,7 @@

{{ currentActionItem }}

-
\
+
diff --git a/src/pages/dashboard/dashboard.scss b/src/pages/dashboard/dashboard.scss index fb043166..8037b8f4 100644 --- a/src/pages/dashboard/dashboard.scss +++ b/src/pages/dashboard/dashboard.scss @@ -93,14 +93,12 @@ page-dashboard { padding-left: 20px; } - - - .dashboardLink { - padding-top: 0px; - position: relative; - top: -7px; - font-size: 20px; - } + // .dashboardLink { + // padding-top: 0px; + // position: relative; + // top: -7px; + // font-size: 20px; + // } #networkingLink { padding-top: 0px; diff --git a/src/pages/dashboard/dashboard.ts b/src/pages/dashboard/dashboard.ts index ea10ec43..2c38498b 100644 --- a/src/pages/dashboard/dashboard.ts +++ b/src/pages/dashboard/dashboard.ts @@ -24,7 +24,7 @@ export class DashboardPage { assessDate: any daysTilSep: any daysTilSepAbs: any - currentActionItem + currentActionItem: String; prevAssess: boolean = false; constructor(public navCtrl: NavController, From d58c2d1f48948dddda4d68e560bae7014e9b3bca Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 12:05:54 -0800 Subject: [PATCH 34/49] Made dashboard page responsive. Cards take up full width in iPad or iPad pro view --- src/pages/dashboard/dashboard.html | 10 +++++----- src/pages/dashboard/dashboard.scss | 11 +++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/pages/dashboard/dashboard.html b/src/pages/dashboard/dashboard.html index 1afb6a4a..331ea584 100644 --- a/src/pages/dashboard/dashboard.html +++ b/src/pages/dashboard/dashboard.html @@ -23,7 +23,7 @@

Hello, Peter!

- + Welcome to the Military and Veteran's "InTransition" Personal Transition Assistant. Your personal guide to @@ -35,7 +35,7 @@

Hello, Peter!

- + {{daysTilSep}} Days Until Separation! @@ -60,7 +60,7 @@

{{ currentActionItem }}

- + Veterans Affairs News @@ -78,7 +78,7 @@

{{ currentActionItem }}

- + Transition Readiness Test @@ -99,7 +99,7 @@

Please complete a Self Assessment

- + Build Your Network diff --git a/src/pages/dashboard/dashboard.scss b/src/pages/dashboard/dashboard.scss index 8037b8f4..f4ebb87f 100644 --- a/src/pages/dashboard/dashboard.scss +++ b/src/pages/dashboard/dashboard.scss @@ -93,12 +93,11 @@ page-dashboard { padding-left: 20px; } - // .dashboardLink { - // padding-top: 0px; - // position: relative; - // top: -7px; - // font-size: 20px; - // } + @media (max-width: 1100px) and (min-width: 700px) { + .row2 { + min-height: 25vh; + } + } #networkingLink { padding-top: 0px; From f30569ad112a4b0f22da0b0239959eec27eb80fb Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 12:21:25 -0800 Subject: [PATCH 35/49] Fixed grid on self assessment page. Moved instructions to top of page --- src/pages/self-assessment/self-assessment.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/self-assessment/self-assessment.html b/src/pages/self-assessment/self-assessment.html index ba5cc924..bbd773aa 100644 --- a/src/pages/self-assessment/self-assessment.html +++ b/src/pages/self-assessment/self-assessment.html @@ -46,8 +46,10 @@

{{area.title}}

--> +

DRAG SLIDER TO RATE FROM 0 - 10 + HOW WELL YOU ARE DOING IN EACH CATEGORY

- + @@ -64,8 +66,8 @@

{{area.title}}

... {{ area.description }}

-

DRAG SLIDER TO RATE FROM 0 - 10 - HOW WELL YOU ARE DOING IN "{{area.title | uppercase}}"

+ 0 10 From d47153b9c597ff1678f4c3695f26eac2e4761ca1 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 12:21:45 -0800 Subject: [PATCH 36/49] Fixed grid on self assessment page. Moved instructions to top of page --- src/pages/self-assessment/self-assessment.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/self-assessment/self-assessment.html b/src/pages/self-assessment/self-assessment.html index bbd773aa..85670d3a 100644 --- a/src/pages/self-assessment/self-assessment.html +++ b/src/pages/self-assessment/self-assessment.html @@ -46,8 +46,7 @@

{{area.title}}

--> -

DRAG SLIDER TO RATE FROM 0 - 10 - HOW WELL YOU ARE DOING IN EACH CATEGORY

+

DRAG SLIDER TO RATE FROM 0 - 10 HOW WELL YOU ARE DOING IN EACH CATEGORY

From 5b9f9058bebf3729becce5f59b0f51687168aaaf Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 14:07:13 -0800 Subject: [PATCH 37/49] Fixed grid for resources page. Created view to for user that has not yet completed a self assessment. --- src/pages/resources/resources.html | 59 ++++++++++++--------- src/pages/resources/resources.scss | 84 ++++++++++++++++-------------- src/pages/resources/resources.ts | 2 + 3 files changed, 81 insertions(+), 64 deletions(-) diff --git a/src/pages/resources/resources.html b/src/pages/resources/resources.html index ac775925..691e780d 100644 --- a/src/pages/resources/resources.html +++ b/src/pages/resources/resources.html @@ -18,19 +18,30 @@

Hello, {{user.firstName}}!

- + - This page will provide helpful resources to aid in your transition. Based on your self assessment, here are some areas which might need more help than others. +

This page will provide helpful resources to aid you in your transition. + Based on your self assessment, here are some areas which might require more focus than others. + + + Please complete a self assessment in order to assess which resources would help you most. + +

+ + + + +
- - - - - - + + + + + + - Your lowest score on self assessment is:

+ Your lowest score on the self assessment is:

{{userPro.userData.lowScoreName}}
@@ -38,25 +49,23 @@

{{userPro.userData.lowestScore}}
Maybe you can start there?
- + - - - - {{res.title}} - - - {{res.message}} - - - Learn more... - - - - - + + + {{res.title}} + + + {{res.message}} + + + Learn more... + + + + diff --git a/src/pages/resources/resources.scss b/src/pages/resources/resources.scss index 542546c8..8f222fae 100644 --- a/src/pages/resources/resources.scss +++ b/src/pages/resources/resources.scss @@ -1,42 +1,48 @@ page-resources { -} - -#title { - font-size: 24px; - text-align: center; -} - -#score-box { - margin: auto; - width: 50px; - height: 30px; - font-size: 20px; - border-radius: 10%; - -} - -#card-text { - margin-left: 60px; - margin-right: 60px; - font-size: 18px; - -} - -.red { - color: red; -} - -.yellow { - color: yellow; -} - -#resource { - margin-left: 20px; - font-size: 100px; -} - -button { - background-color : rgb(46, 66, 86); - + .linkIcons { + font-weight: bold; + font-size: 40px; + position: relative; + top: 10px; + padding-left: 5px + } + + #title { + font-size: 24px; + text-align: center; + } + + #score-box { + margin: auto; + width: 50px; + height: 30px; + font-size: 20px; + border-radius: 10%; + + } + + #card-text { + margin-left: 60px; + margin-right: 60px; + font-size: 18px; + + } + + .red { + color: red; + } + + .yellow { + color: yellow; + } + + #resource { + margin-left: 20px; + font-size: 100px; + } + + button { + background-color : rgb(46, 66, 86); + } } diff --git a/src/pages/resources/resources.ts b/src/pages/resources/resources.ts index 8f46d393..970ea454 100644 --- a/src/pages/resources/resources.ts +++ b/src/pages/resources/resources.ts @@ -19,6 +19,7 @@ export class ResourcesPage { //user model to be pushed to user: any = {}; values: Array = []; + assessmentCompleted: boolean = false; //Resource tempate resources data resources: any = [ @@ -92,6 +93,7 @@ export class ResourcesPage { this.userPro.userData.lowScoreName = lowestProp; this.userPro.updateUserModel(this.userPro.userData, window.sessionStorage.getItem('userId')) console.log(this.values) + this.assessmentCompleted = true; } catch(e) { console.log('i ran') return From 4856ce9956926d4f3ed686d9cb049c2039ebcd33 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 14:45:58 -0800 Subject: [PATCH 38/49] Fixed grid on resources page for iPad and web views --- src/pages/resources/resources.html | 5 +++-- src/pages/resources/resources.scss | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/resources/resources.html b/src/pages/resources/resources.html index 691e780d..597a0114 100644 --- a/src/pages/resources/resources.html +++ b/src/pages/resources/resources.html @@ -34,9 +34,10 @@

This page will provide helpful resources to aid you in your transition. - + + - + diff --git a/src/pages/resources/resources.scss b/src/pages/resources/resources.scss index 8f222fae..3f45b209 100644 --- a/src/pages/resources/resources.scss +++ b/src/pages/resources/resources.scss @@ -29,6 +29,10 @@ page-resources { } + // #chartCard { + // max-height: 50vh; + // } + .red { color: red; } From a31bb5e9ebbd7cf068cb70a4c1f9418d06431f68 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 14:46:45 -0800 Subject: [PATCH 39/49] Fixed grid on history page for iPad and web views --- src/pages/history/history.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/history/history.html b/src/pages/history/history.html index 57e0e377..959c226b 100644 --- a/src/pages/history/history.html +++ b/src/pages/history/history.html @@ -15,7 +15,7 @@ - + Self Assessment History @@ -27,7 +27,7 @@ - + Self Assessments Over Time From e1043f7dd7cef2a9c109294d728c07cd0ffebdd4 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 15:39:31 -0800 Subject: [PATCH 40/49] Fixed swiping on wizard. --- src/pages/wizard/wizard.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index 6fe7e6ea..adcab2ba 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -81,14 +81,14 @@ export class WizardPage { this.shouldLockSwipeToNext = true; } - eneableSwipe() { + enableSwipe() { this.nextButtonDisabled = false; this.shouldLockSwipeToNext = false; } //callled when status changes for forms statusChangeFunct(valid: boolean) { if (valid == true) { - this.eneableSwipe() + this.enableSwipe() } else if (valid == false) { this.disableSwipe() } @@ -229,14 +229,10 @@ export class WizardPage { next() { this.slides.slideNext(500); - console.log(this.slides.getActiveIndex()) - this.leftOrRightArrow(); } back() { this.slides.slidePrev(500); - console.log(this.slides.getActiveIndex()) - this.leftOrRightArrow(); } @@ -249,16 +245,22 @@ export class WizardPage { } //the logic that determines if slide should be lockSwiped slideChanged() { + this.leftOrRightArrow(); let index = this.slides.realIndex; - if ((index == 6 && !this.firstForm.valid) || (index == 7 && !this.secondForm.valid) || (index == 8) || (index == 9)) { + console.log(index); + if ((index == 5 && !this.firstForm.valid) || (index == 6 && !this.secondForm.valid) || (index == 7)) { this.disableSwipe() } else { - this.eneableSwipe() + this.enableSwipe() } - if (index == 6 || index == 9) { - this.LockSwipeToPrev = true + if (index == 5) { + this.LockSwipeToPrev = true; this.lockPrevSlide() - } else { + } else if (index == 8) { + this.slides.lockSwipes(true); + this.disableSwipe(); + } + else { this.LockSwipeToPrev = false; this.lockPrevSlide() } From 464d4d19743d0f18b71d402389235fdfe3aecfe0 Mon Sep 17 00:00:00 2001 From: AlexRingrose Date: Thu, 17 Jan 2019 15:51:29 -0800 Subject: [PATCH 41/49] Adjusted chart resizing and trimmed padding --- src/components/chart/chart.ts | 61 ++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/src/components/chart/chart.ts b/src/components/chart/chart.ts index ed166e1b..c2cf59cb 100644 --- a/src/components/chart/chart.ts +++ b/src/components/chart/chart.ts @@ -1,5 +1,5 @@ import { ChartProvider } from './../../providers/chart/chart'; -import { Component, ViewChild} from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { Chart } from 'chart.js'; // import 'chartjs-plugin-labelsreboot'; @@ -9,45 +9,46 @@ import { Chart } from 'chart.js'; * See https://angular.io/api/core/Component for more info on Angular * Components. */ -@Component({ +@Component( { selector: 'chart', templateUrl: 'chart.html' -}) +} ) export class ChartComponent { - @ViewChild('canvas') canvas; + @ViewChild( 'canvas' ) canvas; chart: any; chartValues: any; - constructor(public chartProvider: ChartProvider) { + constructor ( public chartProvider: ChartProvider ) { //this subscribes to the provider which gets the data from the DB - this.chartProvider.mostRecentData().subscribe(res=>{ + this.chartProvider.mostRecentData().subscribe( res => { //calls the function that draws the chart on the canvas within the .html file of the component taking the response from the provider as an argument. - this.buildChart(res) - }) + this.buildChart( res ) + } ) } //this builds the chart, it takes one parameter, the parameter needs to be an array with a length of 8 numbers in order for the chart to draw correctly - buildChart(data){ - if (data.length < 1) return - this.chart = new Chart(this.canvas.nativeElement, { + buildChart ( data ) { + if ( data.length < 1 ) return + this.chart = new Chart( this.canvas.nativeElement, { type: 'polarArea', - data: { labels: ["Career", "Finances", "Personal \n Growth", "Health", "Family", "Relationships", "Social life", "Attitude"], - datasets: [ - { - backgroundColor: ["rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)"], - borderColor: "black", - //data is the argument passed into the function. - data: data - } - ] + data: { + labels: [ "Career", "Finances", "Personal \n Growth", "Health", "Family", "Relationships", "Social life", "Attitude" ], + datasets: [ + { + backgroundColor: [ "rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)" ], + borderColor: "black", + //data is the argument passed into the function. + data: data + } + ] }, options: { //Set padding of the chart inside of the canvas element. layout: { padding: { - top: 55, - bottom: 55 + top: 10, + bottom: 10 } }, //Hides the chart legend. @@ -55,29 +56,31 @@ export class ChartComponent { display: false }, //Generates an event whenever a section of the chart has been clicked. - 'onClick' : function(evt, item) { - let clickedOn = this.chart.getElementAtEvent(evt) - console.log(clickedOn) + 'onClick': function ( evt, item ) { + let clickedOn = this.chart.getElementAtEvent( evt ) + console.log( clickedOn ) }, plugins: { //labelsReboot is the chartjs-labels plugin that has been revised for this project //to allow the labels to be anchored to the outer radius of the chart regardless of chart value - labelsReboot: { + labelsReboot: { render: 'label', fontSize: 18, fontStyle: 'bold', - fontColor: ["rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)"], + fontColor: [ "rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)" ], arc: true, position: "outside", overlap: true, } }, + aspectRatio: 3, + maintainAspectRatio: true, } - }); + } ); //This sets the ticks on the chart to always start at 0 and end at 10, utilizing the global API of the local chart. this.chart.config.options.scale.ticks.min = 0; this.chart.config.options.scale.ticks.max = 10; this.chart.update(); } - + } From 381a35052462a1b0ddfc5db4f6d5c7b7089cbdf7 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 16:00:47 -0800 Subject: [PATCH 42/49] Alex R fixed chart aspect to make chart size more appropriate. --- src/components/chart/chart.scss | 2 +- src/components/chart/chart.ts | 224 +++++++++++++++++++++----------- 2 files changed, 152 insertions(+), 74 deletions(-) diff --git a/src/components/chart/chart.scss b/src/components/chart/chart.scss index f70a12b7..151aae4a 100644 --- a/src/components/chart/chart.scss +++ b/src/components/chart/chart.scss @@ -1,3 +1,3 @@ chart { - + } diff --git a/src/components/chart/chart.ts b/src/components/chart/chart.ts index ed166e1b..e81e5835 100644 --- a/src/components/chart/chart.ts +++ b/src/components/chart/chart.ts @@ -1,83 +1,161 @@ -import { ChartProvider } from './../../providers/chart/chart'; -import { Component, ViewChild} from '@angular/core'; -import { Chart } from 'chart.js'; +import { ChartProvider } from './../../providers/chart/chart'; + +import { Component, ViewChild } from '@angular/core'; + +import { Chart } from 'chart.js'; + // import 'chartjs-plugin-labelsreboot'; /** + * Generated class for the ChartComponent component. + * + * See https://angular.io/api/core/Component for more info on Angular + * Components. + */ -@Component({ - selector: 'chart', - templateUrl: 'chart.html' -}) -export class ChartComponent { - - @ViewChild('canvas') canvas; - - chart: any; - chartValues: any; - constructor(public chartProvider: ChartProvider) { - //this subscribes to the provider which gets the data from the DB - this.chartProvider.mostRecentData().subscribe(res=>{ - //calls the function that draws the chart on the canvas within the .html file of the component taking the response from the provider as an argument. - this.buildChart(res) - }) - } + +@Component( { + + selector: 'chart', + + templateUrl: 'chart.html' + +} ) + +export class ChartComponent { + + @ViewChild( 'canvas' ) canvas; + + chart: any; + + chartValues: any; + + constructor ( public chartProvider: ChartProvider ) { + + //this subscribes to the provider which gets the data from the DB + + this.chartProvider.mostRecentData().subscribe( res => { + + //calls the function that draws the chart on the canvas within the .html file of the component taking the response from the provider as an argument. + + this.buildChart( res ) + + } ) + + } //this builds the chart, it takes one parameter, the parameter needs to be an array with a length of 8 numbers in order for the chart to draw correctly - buildChart(data){ - if (data.length < 1) return - this.chart = new Chart(this.canvas.nativeElement, { - type: 'polarArea', - data: { labels: ["Career", "Finances", "Personal \n Growth", "Health", "Family", "Relationships", "Social life", "Attitude"], - datasets: [ - { - backgroundColor: ["rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)"], - borderColor: "black", - //data is the argument passed into the function. - data: data - } - ] - }, - options: { - //Set padding of the chart inside of the canvas element. - layout: { - padding: { - top: 55, - bottom: 55 - } - }, - //Hides the chart legend. - legend: { - display: false - }, - //Generates an event whenever a section of the chart has been clicked. - 'onClick' : function(evt, item) { - let clickedOn = this.chart.getElementAtEvent(evt) - console.log(clickedOn) - }, - plugins: { - //labelsReboot is the chartjs-labels plugin that has been revised for this project - //to allow the labels to be anchored to the outer radius of the chart regardless of chart value - labelsReboot: { - render: 'label', - fontSize: 18, - fontStyle: 'bold', - fontColor: ["rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)"], - arc: true, - position: "outside", - overlap: true, - } - }, - } - }); - //This sets the ticks on the chart to always start at 0 and end at 10, utilizing the global API of the local chart. - this.chart.config.options.scale.ticks.min = 0; - this.chart.config.options.scale.ticks.max = 10; - this.chart.update(); - } - -} + + buildChart ( data ) { + + if ( data.length < 1 ) return + + this.chart = new Chart( this.canvas.nativeElement, { + + type: 'polarArea', + + data: { + + labels: [ "Career", "Finances", "Personal \n Growth", "Health", "Family", "Relationships", "Social life", "Attitude" ], + + datasets: [ + + { + + backgroundColor: [ "rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)" ], + + borderColor: "black", + + //data is the argument passed into the function. + + data: data + + } + + ] + + }, + + options: { + + //Set padding of the chart inside of the canvas element. + + layout: { + + padding: { + + top: 10, + + bottom: 10 + + } + + }, + + //Hides the chart legend. + + legend: { + + display: false + + }, + + //Generates an event whenever a section of the chart has been clicked. + + 'onClick': function ( evt, item ) { + + let clickedOn = this.chart.getElementAtEvent( evt ) + + console.log( clickedOn ) + + }, + + plugins: { + + //labelsReboot is the chartjs-labels plugin that has been revised for this project + + //to allow the labels to be anchored to the outer radius of the chart regardless of chart value + + labelsReboot: { + + render: 'label', + + fontSize: 18, + + fontStyle: 'bold', + + fontColor: [ "rgba(0,0,255, .6)", "rgba(255,0,0, .6)", "rgba(128,0,128, .6)", "rgba(0,128,0, .6)", "rgba(255,165,0, .6)", "rgba(0,128,128, .6)", "rgba(255,0,255, .6)", "rgba(0,255,0, .6)" ], + + arc: true, + + position: "outside", + + overlap: true, + + } + + }, + + aspectRatio: 3, + + maintainAspectRatio: true, + + } + + } ); + + //This sets the ticks on the chart to always start at 0 and end at 10, utilizing the global API of the local chart. + + this.chart.config.options.scale.ticks.min = 0; + + this.chart.config.options.scale.ticks.max = 10; + + this.chart.update(); + + } + +} \ No newline at end of file From 32d0f31cb22ea88f8c55562bef7d466575b45bfc Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 17:39:12 -0800 Subject: [PATCH 43/49] Resources now sort by lowest score to highest when an assessment has been completed --- src/pages/resources/resources.html | 44 ++++++++++++++------ src/pages/resources/resources.ts | 30 +++++++++---- src/pages/self-assessment/self-assessment.ts | 1 + 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/src/pages/resources/resources.html b/src/pages/resources/resources.html index 597a0114..ea3b3892 100644 --- a/src/pages/resources/resources.html +++ b/src/pages/resources/resources.html @@ -56,17 +56,35 @@

This page will provide helpful resources to aid you in your transition. - - - {{res.title}} - - - {{res.message}} - - - Learn more... - - - - +
+ + + {{res.title}} + + + {{res.message}} + + + Learn more... + + + + +
+
+ + + {{res.title}} + + + {{res.message}} + + + Learn more... + + + + +
+ diff --git a/src/pages/resources/resources.ts b/src/pages/resources/resources.ts index 970ea454..03a5462e 100644 --- a/src/pages/resources/resources.ts +++ b/src/pages/resources/resources.ts @@ -20,48 +20,57 @@ export class ResourcesPage { user: any = {}; values: Array = []; assessmentCompleted: boolean = false; + sortedResources: Array = []; //Resource tempate resources data resources: any = [ { title: 'Career', message: 'How is your career going? We spend a lot of time working so how is it for you? Does it excite you? Have you a clear idea what it is you want to achieve?', - modalMessage: 'How is your career going? We spend a lot of time working so how is it for you? Does it excite you? Have you a clear idea what it is you want to achieve?' + modalMessage: 'How is your career going? We spend a lot of time working so how is it for you? Does it excite you? Have you a clear idea what it is you want to achieve?', + score: 0 }, { title: 'Finances', message: 'This is not about how much you have but rather how you relate to money. There are some millionaires who worry themselves sick about money so might score very low here and others who have just enough to get by and simply go with the flow.', - modalMessage: 'This is not about how much you have but rather how you relate to money. There are some millionaires who worry themselves sick about money so might score very low here and others who have just enough to get by and simply go with the flow.' + modalMessage: 'This is not about how much you have but rather how you relate to money. There are some millionaires who worry themselves sick about money so might score very low here and others who have just enough to get by and simply go with the flow.', + score: 0 }, { title: 'Personal Growth', message: 'People who are truly successful commit themselves continually to learning and improving themselves. Are you a 10 – committed to learning as much as you can about life?', - modalMessage: 'People who are truly successful commit themselves continually to learning and improving themselves. Are you a 10 – committed to learning as much as you can about life?' + modalMessage: 'People who are truly successful commit themselves continually to learning and improving themselves. Are you a 10 – committed to learning as much as you can about life?', + score: 0 }, { title: 'Health', message: 'We all take our health for granted until it lets us down. How is yours? Do you look after yourself? Are you eating well? Do you get regular exercise?', - modalMessage: 'We all take our health for granted until it lets us down. How is yours? Do you look after yourself? Are you eating well? Do you get regular exercise?' + modalMessage: 'We all take our health for granted until it lets us down. How is yours? Do you look after yourself? Are you eating well? Do you get regular exercise?', + score: 0 }, { title: 'Family', message: 'Family life is very important. Although family life should be loving, caring and supportive it often is not for a variety of reasons such as crying babies, wild teenage sons or daughters or constant arguments and tension.', - modalMessage: 'Family life is very important. Although family life should be loving, caring and supportive it often is not for a variety of reasons such as crying babies, wild teenage sons or daughters or constant arguments and tension.' + modalMessage: 'Family life is very important. Although family life should be loving, caring and supportive it often is not for a variety of reasons such as crying babies, wild teenage sons or daughters or constant arguments and tension.', + score: 0 }, { title: 'Relationships', message: 'Consider the key relationship you have whether it is with your boyfriend/girlfriend husband/wife/friend or family member.', - modalMessage: 'Consider the key relationship you have whether it is with your boyfriend/girlfriend husband/wife/friend or family member.' + modalMessage: 'Consider the key relationship you have whether it is with your boyfriend/girlfriend husband/wife/friend or family member.', + score: 0 }, { title: 'Social Life', message: 'This can be about the quality of your social life which can score very low for people with busy careers. However you can also decide to score it based on how you interact with people as how often you get to socialise. A vital component of life is the need to get on and interact with people.', - modalMessage: 'This can be about the quality of your social life which can score very low for people with busy careers. However you can also decide to score it based on how you interact with people as how often you get to socialise. A vital component of life is the need to get on and interact with people.' + modalMessage: 'This can be about the quality of your social life which can score very low for people with busy careers. However you can also decide to score it based on how you interact with people as how often you get to socialise. A vital component of life is the need to get on and interact with people.', + score: 0 }, { title: 'Attitude', message: 'Attitude is vital and can influence every aspect of your life. Is your glass half full or half empty?', - modalMessage: 'Attitude is vital and can influence every aspect of your life. Is your glass half full or half empty?' + modalMessage: 'Attitude is vital and can influence every aspect of your life. Is your glass half full or half empty?', + score: 0 } ]; @@ -76,12 +85,14 @@ export class ResourcesPage { this.userPro.getUserChart(window.sessionStorage.getItem('userId')) .subscribe((data: Array) => { try{ + this.resources.forEach(x => x.score = data['0'].data[x.title]); + this.sortedResources = this.resources.sort((a, b) => a.score - b.score); console.log(data); this.values = data[data.length - 1].data; let lowest = 10; let lowestProp: any; console.log("values",this.values); - console.log(lowest); + console.log(lowest); for (var prop in this.values) { if (this.values[prop] < lowest) { lowest = this.values[prop]; @@ -94,6 +105,7 @@ export class ResourcesPage { this.userPro.updateUserModel(this.userPro.userData, window.sessionStorage.getItem('userId')) console.log(this.values) this.assessmentCompleted = true; + console.log(data); } catch(e) { console.log('i ran') return diff --git a/src/pages/self-assessment/self-assessment.ts b/src/pages/self-assessment/self-assessment.ts index 87e1b78f..be8bcfe5 100644 --- a/src/pages/self-assessment/self-assessment.ts +++ b/src/pages/self-assessment/self-assessment.ts @@ -137,6 +137,7 @@ export class SelfAssessmentPage { toSubmit() { this.chartProvider.addAssessment(this.currentAssessment) .subscribe(res => { + console.log(this.currentAssessment); console.log('response:', res); this.navCtrl.setRoot(ResourcesPage); }, err => { From d7a8627cb6b8839ca6254bfb4b5755340e6107e7 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 19:00:31 -0800 Subject: [PATCH 44/49] Fixed arrow bug --- src/pages/wizard/wizard.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index adcab2ba..ae0cdff7 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -219,12 +219,13 @@ export class WizardPage { else if (this.slides.getActiveIndex() === 7) { this.rightArrowVisible = false; } - else if (this.slides.getActiveIndex() !== 5 || 8) { - this.leftArrowVisible = true; - } else if (this.slides.getActiveIndex() === 6) { + this.leftArrowVisible = true; this.rightArrowVisible = true; } + else if (this.slides.getActiveIndex() !== 5 || 8) { + this.leftArrowVisible = true; + } } next() { @@ -248,6 +249,13 @@ export class WizardPage { this.leftOrRightArrow(); let index = this.slides.realIndex; console.log(index); + // Slide 0 no slide left + // Slides 1 - 4 swipe both directions + + // Slide 5 & 6 need a valid form can't swipe + + + if ((index == 5 && !this.firstForm.valid) || (index == 6 && !this.secondForm.valid) || (index == 7)) { this.disableSwipe() } else { From 42820eee4f9c376361518ce9cd6a0433e3e981d7 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 19:05:27 -0800 Subject: [PATCH 45/49] Fixed arrow bug. Refactored leftOrRightArrow --- src/pages/wizard/wizard.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index ae0cdff7..b72c7e6d 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -219,13 +219,10 @@ export class WizardPage { else if (this.slides.getActiveIndex() === 7) { this.rightArrowVisible = false; } - else if (this.slides.getActiveIndex() === 6) { + else { this.leftArrowVisible = true; this.rightArrowVisible = true; - } - else if (this.slides.getActiveIndex() !== 5 || 8) { - this.leftArrowVisible = true; - } + } } next() { From af3a7362f04e715daa686059204112e5118700c2 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 21:15:27 -0800 Subject: [PATCH 46/49] Refactored swipe locking logic. Added ionicChange methods to evauate if user can go to the next page. Removed observables. --- src/pages/wizard/wizard.html | 35 +++++------ src/pages/wizard/wizard.ts | 111 ++++++++++++----------------------- 2 files changed, 52 insertions(+), 94 deletions(-) diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index 1c93d6a5..b123416a 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -77,21 +77,7 @@

Timeline

- - - +
@@ -125,6 +111,7 @@

Questionnaire 1/3

@@ -150,6 +137,7 @@

Questionnaire 1/3

@@ -172,6 +160,7 @@

Questionnaire 1/3

Questionnaire 1/3

> Questionnaire 1/3

Yes @@ -230,6 +221,7 @@

Questionnaire 1/3

Questionnaire 2/3 @@ -293,6 +286,7 @@

Questionnaire 2/3

displayFormat="MM/DD/YYYY" pickerFormat="MMMM DD YYYY" [max]="today" + (ionChange)="slideChanged()" >
@@ -311,7 +305,8 @@

Questionnaire 2/3

+ [selectOptions] = 'maritalOptions' + (ionChange)="slideChanged()"> Married Single Widowed @@ -355,7 +350,8 @@

Questionnaire 3/3

+ (ionChange)="slideChanged()" + [selectOptions] = 'rankOptions'> O1 O2 O3 @@ -443,6 +439,7 @@

Questionnaire 3/3

placeholder='Input Answer here..' formControlName="MOS" + (ionChange)="slideChanged()" >
@@ -464,7 +461,7 @@

Questionnaire 3/3

Thank you for completing the InTransition Questionnaire.

-

You may go to your Dashboard or take the Self Assessment.

+

You may go to the Dashboard or take the Self Assessment.

diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index b72c7e6d..b6bf5e68 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -53,7 +53,6 @@ export class WizardPage { this.name = data.firstName; }) - // let required = null; this.firstFormFunct(); this.secondFormFunct(); this.thirdFormFunct(); @@ -70,32 +69,35 @@ export class WizardPage { vetValue: string = ""; SeparationQuestion: string = ""; disabilityQValue: string = ""; - nextButtonDisabled: boolean = false; - shouldLockSwipeToNext: boolean = false; - LockSwipeToPrev: boolean = false; + LockSwipeToPrev: boolean = true; employedAnswer: string = ""; codeErrorMessage: string = ""; - disableSwipe() { - this.nextButtonDisabled = true; - this.shouldLockSwipeToNext = true; - } - - enableSwipe() { - this.nextButtonDisabled = false; - this.shouldLockSwipeToNext = false; - } - //callled when status changes for forms - statusChangeFunct(valid: boolean) { - if (valid == true) { - this.enableSwipe() - } else if (valid == false) { - this.disableSwipe() + //the logic that determines if slide should be locked from swiping and in which direction + slideChanged() { + this.leftOrRightArrow(); + let index = this.slides.realIndex; + if(index == 0) { + this.slides.lockSwipeToPrev(true); + } + else if ((index == 5 && !this.firstForm.valid) || (index == 6 && !this.secondForm.valid) || index == 7) { + index == 5 ? this.slides.lockSwipeToPrev(true) : this.slides.lockSwipeToPrev(false); + this.slides.lockSwipeToNext(true) + } + else if(index == 8) { + this.slides.lockSwipes(true); + } + else { + if(index == 5) { + this.slides.lockSwipeToPrev(true); + this.slides.lockSwipeToNext(false); + } else { + this.slides.lockSwipes(false); + } } - this.lockNextSlide() } - //declare firstForm; set contol names; set validators + //declare firstForm; set contol names; set validators firstFormFunct() { this.firstForm = this.formBuilder.group({ branch: ['', Validators.compose([Validators.required])], @@ -104,11 +106,7 @@ export class WizardPage { disability: ['', Validators.compose([Validators.required])], percentQuestion: ["",] }); - //observable called when status of firstForm changes => calls function that enables or disabled swipe if conditions are met - this.firstForm.statusChanges - .subscribe(val => { - this.statusChangeFunct(this.firstForm.valid) - }) + //sets requirements depending on the branch that users select: //1) the observable for branch checks if the vslue changes and runs a function in the parameter //2) gets the form Control 'MOS' and set it as a local variable @@ -172,11 +170,6 @@ export class WizardPage { lastEmployed: [''], marital: ['', Validators.compose([Validators.required])], }); - //when status changes call function to lock or unlock swipe dependign if form is valid - this.secondForm.statusChanges - .subscribe(val => { - this.statusChangeFunct(this.secondForm.valid) - }) //if error 'infinite loop' comment out .upadateValueAndValidity()' //when value changes for employment question, set validators for lastEmployment question and update form depending if marked as unemployed this.secondForm.controls.employment.valueChanges @@ -205,6 +198,7 @@ export class WizardPage { exit() { this.navCtrl.setRoot(DashboardPage) } + // Determines if the left and right arrows should be displayed leftOrRightArrow() { if(this.slides.getActiveIndex() === 0){ this.leftArrowVisible = false; @@ -225,51 +219,14 @@ export class WizardPage { } } - next() { - this.slides.slideNext(500); - } - + //Transitions to prev slide back() { this.slides.slidePrev(500); } - - //shouldLockSwipeToNext variable can be either true/false depending on condition - lockNextSlide() { - this.slides.lockSwipeToNext(this.shouldLockSwipeToNext); - } - lockPrevSlide() { - this.slides.lockSwipeToPrev(this.LockSwipeToPrev) - } - //the logic that determines if slide should be lockSwiped - slideChanged() { - this.leftOrRightArrow(); - let index = this.slides.realIndex; - console.log(index); - // Slide 0 no slide left - // Slides 1 - 4 swipe both directions - - // Slide 5 & 6 need a valid form can't swipe - - - - if ((index == 5 && !this.firstForm.valid) || (index == 6 && !this.secondForm.valid) || (index == 7)) { - this.disableSwipe() - } else { - this.enableSwipe() - } - if (index == 5) { - this.LockSwipeToPrev = true; - this.lockPrevSlide() - } else if (index == 8) { - this.slides.lockSwipes(true); - this.disableSwipe(); - } - else { - this.LockSwipeToPrev = false; - this.lockPrevSlide() - } - this.lockNextSlide(); + //Transitions to next slide + next() { + this.slides.slideNext(500); } customizeSelectOptions(title: string, message: string) { @@ -311,10 +268,14 @@ export class WizardPage { .subscribe( (data) => { console.log(data, "YEY!!!!!!") + this.slides.lockSwipeToNext(false); + this.next(); + + }, + (err) => { + console.log(err); + alert("Please try submitting again.") }) - this.shouldLockSwipeToNext = false; - this.lockNextSlide() - this.next(); } setDashboardPage() { From 42e825411773517089fdeaf822bcfef333973528 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 21:41:45 -0800 Subject: [PATCH 47/49] Added comments --- src/pages/wizard/wizard.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/wizard/wizard.ts b/src/pages/wizard/wizard.ts index b6bf5e68..186bace4 100644 --- a/src/pages/wizard/wizard.ts +++ b/src/pages/wizard/wizard.ts @@ -270,7 +270,6 @@ export class WizardPage { console.log(data, "YEY!!!!!!") this.slides.lockSwipeToNext(false); this.next(); - }, (err) => { console.log(err); From 20e397f20c0e9a3423d697c95428a4fa5573d8a0 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 21:44:51 -0800 Subject: [PATCH 48/49] Fixed grid for iPad and web view --- src/pages/news/news.html | 15 +++++++++------ src/pages/news/news.scss | 11 +++++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/pages/news/news.html b/src/pages/news/news.html index 1df0cb2c..83d1f6b4 100644 --- a/src/pages/news/news.html +++ b/src/pages/news/news.html @@ -46,9 +46,8 @@

{{data.title}}

- - - + + @@ -76,9 +75,13 @@

{{data.title}}

- Read full article - - + + + Read full article + + + +
diff --git a/src/pages/news/news.scss b/src/pages/news/news.scss index b487a053..9f52d66e 100644 --- a/src/pages/news/news.scss +++ b/src/pages/news/news.scss @@ -3,11 +3,14 @@ page-news { .social-cards ion-col { } - #separationLink { + a { + cursor: pointer; + } + + #newsLink { float: right; - padding: 20px; - font-size: 15px; - margin-top: 18px; + padding: 1rem; + font-size: 15px; } #linkArrow { From 35daafba26b1a9ca97e38e32393fd0a6a48c7546 Mon Sep 17 00:00:00 2001 From: warreng8 Date: Thu, 17 Jan 2019 23:06:05 -0800 Subject: [PATCH 49/49] Changed question height in questionnaire to fit % disability question. Changed size of photos in dashboard to fit in max view. Added Guard/Reserve and assigned similar logic to active status --- src/pages/news/news.ts | 2 +- src/pages/wizard/wizard.html | 8 ++++---- src/pages/wizard/wizard.scss | 25 +++++++++++++++++++++++-- src/pages/wizard/wizard.ts | 2 +- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/pages/news/news.ts b/src/pages/news/news.ts index a4e3af0b..7d2c2dae 100644 --- a/src/pages/news/news.ts +++ b/src/pages/news/news.ts @@ -10,7 +10,7 @@ import { InAppBrowser } from '@ionic-native/in-app-browser'; export class NewsPage { constructor(public navCtrl: NavController, - public navParams: NavParams, + public navParams: NavParams, public rss: RssProvider, private browser: InAppBrowser) { diff --git a/src/pages/wizard/wizard.html b/src/pages/wizard/wizard.html index b123416a..e1b84af2 100644 --- a/src/pages/wizard/wizard.html +++ b/src/pages/wizard/wizard.html @@ -77,7 +77,7 @@

Timeline

- +
@@ -141,9 +141,9 @@

Questionnaire 1/3

placeholder="Select ▼" formControlName="vetOrActive" [selectOptions] = 'vetOrActiveOptions'> - Veteran Active - + Guard/Reserve + Veteran @@ -158,7 +158,7 @@

Questionnaire 1/3

{{SeparationQuestion}} - { // const enlistedPay = this.thirdForm.get('enlistedPay') - if (val == "Active") { + if (val == "Active" || "Guard/Reserve") { this.SeparationQuestion = "When is your separation date?" // enlistedPay.setValidators(Validators.compose([Validators.required,])); } else if (val == "Veteran") {