diff --git a/src/components/chart/chart.ts b/src/components/chart/chart.ts index ed166e1b..9fb4e2a6 100644 --- a/src/components/chart/chart.ts +++ b/src/components/chart/chart.ts @@ -1,83 +1,158 @@ 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'; /** + * Generated class for the ChartComponent component. + * + * 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. + 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) + + '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(); + } - + } diff --git a/src/components/timeline/timeline.scss b/src/components/timeline/timeline.scss index 0e6425b1..abed636a 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: 8%; + // margin-left: 12%; } .item-checkbox-checked { @@ -135,18 +136,21 @@ 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%; + margin-right: 2%; + 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; diff --git a/src/components/timeline/timeline.ts b/src/components/timeline/timeline.ts index cf403287..588822c4 100644 --- a/src/components/timeline/timeline.ts +++ b/src/components/timeline/timeline.ts @@ -82,13 +82,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.html b/src/pages/dashboard/dashboard.html index f555c2dd..331ea584 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! @@ -50,22 +51,23 @@

Hello, {{ this.name }}!

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
- - + + Veterans Affairs News - More news + More news @@ -76,20 +78,28 @@

{{ currentActionItem }}

- + Transition Readiness Test - - + + +

Please complete a Self Assessment

+ + Complete an assessment + + +
+ +
- + Build Your Network @@ -110,12 +120,12 @@

{{ currentActionItem }}

a 2.


- Learn More + Learn More
-
\
+
diff --git a/src/pages/dashboard/dashboard.scss b/src/pages/dashboard/dashboard.scss index 4fe04e87..f4ebb87f 100644 --- a/src/pages/dashboard/dashboard.scss +++ b/src/pages/dashboard/dashboard.scss @@ -9,8 +9,16 @@ page-dashboard { font-size: 20px; } + .button1{ + width: 138px; + height:42px; + background-color: rgb(26, 39, 71); + padding: 0px; + } + .cards { - background-color: color($colors, light) + background-color: color($colors, light); + position: relative; } .sep { @@ -53,6 +61,16 @@ page-dashboard { padding-left: 5px } + .row2 { + min-height: 35vh; + } + + .dashboardLinks { + position:absolute; + bottom:0; + right: 1vw; + } + #networkingContent { padding: 0px 16px; display: flex; @@ -75,11 +93,17 @@ page-dashboard { padding-left: 20px; } - #networkingLink { - 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; + position: relative; + top: -7px; + font-size: 20px; } } diff --git a/src/pages/dashboard/dashboard.ts b/src/pages/dashboard/dashboard.ts index 0f5f3c23..2c38498b 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, @@ -23,7 +24,8 @@ export class DashboardPage { assessDate: any daysTilSep: any daysTilSepAbs: any - currentActionItem + currentActionItem: String; + prevAssess: boolean = false; constructor(public navCtrl: NavController, public navParams: NavParams, @@ -35,6 +37,8 @@ export class DashboardPage { this.currentActionItem = this.actionItem.currentItem; } + // commenting out for demo + ionViewWillLoad() { // this.storage.get('userInfo').then((val) => { // this.name = val ? `${val.firstName} ${val.lastName}` : ''; @@ -56,6 +60,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 +72,12 @@ export class DashboardPage { }); } + toSelfAssessment() { + this.navCtrl.setRoot(SelfAssessmentPage); + } + + // End of comment for demo */ + toTimeline() { this.navCtrl.setRoot(TimelinePage); } diff --git a/src/pages/history/history.html b/src/pages/history/history.html index 066bb969..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 diff --git a/src/pages/history/history.scss b/src/pages/history/history.scss index 8d9ba9db..f0d6efdc 100644 --- a/src/pages/history/history.scss +++ b/src/pages/history/history.scss @@ -1,4 +1,5 @@ page-history { + ion-card-title { text-align: center; } @@ -17,4 +18,18 @@ page-history { #self-assessment-table .odd { background: lightgray; } + + #rows { + border-bottom: 1px solid black; + padding: 20px 0px; + } + + #date { + font-size: 25px; + padding-left: 20%; + } + + #chart { + padding-left: 10%; + } } diff --git a/src/pages/login/login.html b/src/pages/login/login.html index 2d9a616b..b37e3c06 100644 --- a/src/pages/login/login.html +++ b/src/pages/login/login.html @@ -13,75 +13,75 @@ - - - - - -
- - - -

Transitioning from the military to civilian environment is more than just a job change.

-
-

It's a life change.

-
-
- - - - EMAIL ADDRESS - - - - - - - -

Please enter a valid email

-

-
-
- - - - PASSWORD - - - - - - - -

Password contains 6-30 letters, numbers, or special characters

-

-
-
- - - - - - - - - - -

If you don't have an account yet, you can register now.

-
- -
- -
- - - - - - - -
+ + + +

INTRANSITION

+
+
+ +
+ + + +

Transitioning from the military to civilian environment is more than just a job change.

+
+

It's a life change.

+
+
+ + + + EMAIL ADDRESS + + + + + + + +

Please enter a valid email

+

+
+
+ + + + PASSWORD + + + + + + + +

Password contains 6-30 letters, numbers, or special characters

+

+
+
+ + + + + + + + + + +

If you don't have an account yet, you can register now.

+
+ +
+ +
+ + + + + + + +
\ No newline at end of file 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/login/login.ts b/src/pages/login/login.ts index 28fdbc7d..0df0ed1d 100644 --- a/src/pages/login/login.ts +++ b/src/pages/login/login.ts @@ -128,4 +128,4 @@ export class LoginPage { toast.present(); } -} +} \ No newline at end of file diff --git a/src/pages/news/news.html b/src/pages/news/news.html index 303dec0a..83d1f6b4 100644 --- a/src/pages/news/news.html +++ b/src/pages/news/news.html @@ -7,9 +7,7 @@ - - -