Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/timeline/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
}
]
Expand Down
6 changes: 5 additions & 1 deletion src/pages/dashboard/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}` : '';
Expand All @@ -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'
});
Expand Down
17 changes: 15 additions & 2 deletions src/pages/login/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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,
Expand All @@ -46,6 +49,8 @@ export class LoginPage {
*/

login() {
/* Commenting out for the demo

this._userService.login(this.loginCreds.value)
.subscribe(
(res) => {
Expand Down Expand Up @@ -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) => {
Expand All @@ -104,6 +115,8 @@ export class LoginPage {
);
}

End comment for demo */

toDashboard() {
let toast = this.toastCtrl.create({
message: "Login successful!",
Expand Down
24 changes: 21 additions & 3 deletions src/providers/chart/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}