Skip to content

Commit 804d851

Browse files
authored
Merge pull request #191 from SoftStackFactory/dev
Dev
2 parents 24484bb + 01e98d0 commit 804d851

6 files changed

Lines changed: 98 additions & 112 deletions

File tree

src/pages/profile/profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<div class="buttons-div">
103103
<button ion-button class="buttons1" outline color="dark">Edit Profile</button>
104104

105-
<button ion-button outline class="buttons1" color="dark">Logout</button>
105+
<button ion-button outline class="buttons1" color="dark" (click)='onLogout()'>Logout</button>
106106
</div>
107107

108108
</ion-content>

src/pages/profile/profile.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Component } from '@angular/core';
22
import { NavController, NavParams } from 'ionic-angular';
3+
import { UserProvider } from '../../providers/user/user';
34

45
/**
56
* Generated class for the ProfilePage page.
@@ -14,11 +15,19 @@ import { NavController, NavParams } from 'ionic-angular';
1415
})
1516
export class ProfilePage {
1617

17-
constructor(public navCtrl: NavController, public navParams: NavParams) {
18+
constructor(public navCtrl: NavController, public navParams: NavParams, public user :UserProvider) {
1819
}
1920

2021
ionViewDidLoad() {
2122
console.log('ionViewDidLoad ProfilePage');
2223
}
2324

25+
onLogout() {
26+
this.user.logoutUser(window.sessionStorage.getItem('token'))
27+
.subscribe( response => {
28+
console.log('onsubscibe-logout')
29+
window.sessionStorage.clear()
30+
})
31+
}
32+
2433
}

src/pages/wizard/wizard.html

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -45,46 +45,48 @@ <h1 class="h1">Home Dasboard</h1>
4545
<p class="h2">Here you will find links to the timeline and self assessment section.
4646
Usefull tips and links are also available to check out.</p>
4747
</ion-list>
48-
<img id='dashImg' src='../../assets/imgs/dashboard.png'>
48+
<img class= "demo-img" src='../../assets/imgs/dashboard.png'>
4949
</div>
5050
</ion-slide>
5151

5252
<ion-slide class="demo-slide">
5353
<div class='top-demo'>
54-
<ion-list class="demo-header list list-ios" >
54+
<ion-list class="demo-header list list-ios">
5555
<ion-list-header class='item item-ios list-header list-header-ios'>
56-
<h1 class="h1">Self Assessment</h1>
56+
<h1 class="h1">Life Balance Wheel</h1>
5757
</ion-list-header>
58-
<p class='h2'>Here you will be promted to take your self assessment to assess your finances, relationships, family, and
59-
more!
60-
</p>
58+
<p class='h2'>Here you will be promted to take your self assessment for your finances, health, family, and
59+
more. This chart will display the results of your self assesment.</p>
6160
</ion-list>
62-
<img id="self" src='../../assets/imgs/asssesment.png'>
61+
<img class='demo-img' src='../../assets/imgs/assessment.png'>
6362
</div>
6463
</ion-slide>
6564

6665
<ion-slide class="demo-slide">
6766
<div class='top-demo'>
68-
<ion-list class="demo-header list list-ios">
69-
<ion-list-header class='item item-ios list-header list-header-ios'>
70-
<h1 class="h1">Life Balance Wheel</h1>
67+
<ion-list class="demo-header list list-ios" >
68+
<ion-list-header class='item item-ios list-header list-header-ios'>
69+
<h1 class="h1">Timeline</h1>
7170
</ion-list-header>
72-
<p class='h2'>This chart will display the results of your self assesment by category.</p>
71+
<p class='h2'>This is a timeline that will make your transition to the civilian life smoother. Each section has a to-do
72+
item that you need to accomplish.
73+
</p>
7374
</ion-list>
74-
<img src='../../assets/imgs/whell.png'>
75+
<img class='demo-img' src='../../assets/imgs/timeline.png'>
7576
</div>
7677
</ion-slide>
7778

7879
<ion-slide class="demo-slide">
7980
<div class='top-demo'>
80-
<ion-list class="demo-header list list-iosr" >
81-
<ion-list-header class='item item-ios list-header list-header-ios'>
82-
<h1 class="h1">Timeline</h1>
81+
<ion-list class="demo-header list list-ios" >
82+
<ion-list-header class='item item-ios list-header list-header-ios'>
83+
<h1 class="h1">Profile</h1>
8384
</ion-list-header>
84-
<p class='h2'>This is a timeline that will make your transition to the civilian life smoother. Each section has a to-do
85-
item that you need to accomplish.</p>
86-
</ion-list >
87-
<img id="time" src='../../assets/imgs/timeline.png'>
85+
<p class='h2'>
86+
In your profile page you can see your information or update it at any time .
87+
</p>
88+
</ion-list>
89+
<img class= 'demo-img'src='../../assets/imgs/profile.png'>
8890
</div>
8991
</ion-slide>
9092

@@ -145,7 +147,6 @@ <h1 class="h1">Questionnaire <ion-badge>1/3</ion-badge></h1>
145147
Are you an active member or a veteran?
146148
</ion-item-divider>
147149
<ion-item class="q-wrapper">
148-
<a class="select" >Select</a>
149150
<ion-select
150151
placeholder="Select &#x25BC;"
151152
formControlName="vetOrActive"
@@ -197,7 +198,7 @@ <h1 class="h1">Questionnaire <ion-badge>1/3</ion-badge></h1>
197198
</ion-select>
198199
</ion-item>
199200
<ion-item no-lines *ngIf="!firstForm.controls.disability.valid && (firstForm.controls.disability.touched || submitIntent)" >
200-
<p class="invalid-text">Enter an option</p>
201+
<p class="invalid-text">Enter an option</p>
201202
</ion-item>
202203
</ion-item-group>
203204
</ion-card>
@@ -249,7 +250,7 @@ <h1 class="h1">Questionnaire <ion-badge>2/3</ion-badge></h1>
249250
<ion-select
250251
placeholder="Select&#x25BC;"
251252
formControlName="employment"
252-
[selectOptions] = 'UnemployedOptions'>
253+
[selectOptions] = 'unemployedOptions'>
253254
<ion-option value="Employed">Employed</ion-option>
254255
<ion-option value="Unemployed">Unemployed</ion-option>
255256
</ion-select>
@@ -281,27 +282,6 @@ <h1 class="h1">Questionnaire <ion-badge>2/3</ion-badge></h1>
281282
</ion-item-group>
282283
</ion-card>
283284

284-
<ion-card [class.invalid]="!secondForm.controls.marital.valid && (secondForm.controls.marital.touched)" class="card-wrapper">
285-
<ion-item-group>
286-
<ion-item-divider class='q-group' color="light">
287-
Are you married?
288-
</ion-item-divider>
289-
<ion-item class="q-wrapper">
290-
<ion-select
291-
placeholder="Select&#x25BC;"
292-
formControlName="marital"
293-
[selectOptions] = 'marriageOptions'>
294-
<ion-option value="married">Yes</ion-option>
295-
<ion-option value="notMarried">No</ion-option>
296-
</ion-select>
297-
</ion-item>
298-
<ion-item *ngIf="!secondForm.controls.marital.valid && (secondForm.controls.marital.touched)" >
299-
<p class="invalid-text">Enter an option</p>
300-
</ion-item>
301-
</ion-item-group>
302-
</ion-card>
303-
304-
305285
<ion-card [class.invalid]="!secondForm.controls.marital.valid && (secondForm.controls.marital.touched)" class="card-wrapper">
306286
<ion-item-group>
307287
<ion-item-divider class='q-group' color="light">
@@ -324,7 +304,7 @@ <h1 class="h1">Questionnaire <ion-badge>2/3</ion-badge></h1>
324304
</ion-item>
325305
</ion-item-group>
326306
</ion-card>
327-
<!-- <button ion-button type="submit" [disabled]="" (click)="onSubmit()" >submit</button> -->
307+
328308
</form>
329309
</div>
330310
</ion-slide>
@@ -406,7 +386,7 @@ <h1 class="h1">Questionnaire <ion-badge>3/3</ion-badge> </h1>
406386
</ion-select>
407387
</ion-item>
408388
<ion-item *ngIf="!thirdForm.controls.enlistedPay.valid && (thirdForm.controls.enlistedPay.touched)" >
409-
<p class="invalid-text">Enter an option</p>
389+
<p class="invalid-text">Enter an option</p>
410390
</ion-item>
411391
</ion-item-group>
412392
</ion-card>

src/pages/wizard/wizard.scss

Lines changed: 55 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ page-wizard {
5656
}
5757
.top-question{
5858
position: relative;
59-
//display: block;
60-
// width: 70%;
6159
margin: auto auto 50px auto;
62-
// font-size: 2.5vw;
6360
top: 12vw;
6461
}
6562
.list-header-md {
@@ -76,12 +73,12 @@ page-wizard {
7673
padding: 5px;
7774
margin: 0px !important;
7875
top: -5px;
79-
8076
}
8177
.h1{
8278
font-weight: bold;
8379
font-size: 20px;
8480
margin-right: 5px;
81+
white-space: normal;
8582
}
8683
.h2 {
8784
white-space: normal;
@@ -90,22 +87,15 @@ page-wizard {
9087
margin: 15px auto auto auto;
9188
top: 20px;
9289
}
93-
#dashImg {
94-
width: 60%;
95-
//height: 80%;
96-
}
97-
#self {
98-
width: 60%;
99-
// height: 70%;
100-
}
101-
#timeline {
102-
width: 80%;
103-
}
10490
img {
10591
// margin-top: 10px auto auto auto;
10692
display: inline;
10793
box-shadow: 0px 1px 66px -4px rgba(0,0,0,0.68);
10894
}
95+
.demo-img{
96+
width: 60%;
97+
98+
}
10999
.select-placeholder, .select-text{
110100
font-size: 20px;
111101
}
@@ -124,7 +114,6 @@ page-wizard {
124114
.date {
125115
float: left;
126116
}
127-
128117
.question-header {
129118
position: relative;
130119
}
@@ -212,33 +201,29 @@ page-wizard {
212201
height: 55px;
213202
margin: auto
214203
}
215-
}
216-
@media screen and (min-width: 1024px) {
217204
.h1 {
218205
font-size: 40px;
219206
}
220207
.h2 {
221208
font-size: 28px;
222-
}
209+
}
210+
211+
}
212+
@media screen and (min-width: 1024px) {
223213
@media screen and(orientation: portrait){
224214
.button1{
225215
width: 230px;
226216
height: 70px;
227217
}
218+
.h1 {
219+
font-size: 50px;
220+
}
221+
.h2 {
222+
font-size: 38px;
223+
}
228224
}
229225
}
230-
@media screen and (max-width: 812px) and (orientation: landscape){
231-
.question-header{
232-
margin: 0px;
233-
top: -30px;
234-
}
235-
.form {
236-
margin-top: -25px;
237-
}
238-
.inner-question-header {
239-
margin: 7px auto 0px auto;
240-
}
241-
}
226+
242227
@media screen and (max-width: 767px){
243228
ion-badge{
244229
font-size: 15px;
@@ -254,24 +239,7 @@ page-wizard {
254239
}
255240
}
256241
}
257-
@media screen and (max-width: 824px) and (orientation: landscape){
258-
ion-badge{
259-
font-size: 15px;
260-
padding: 3px;
261-
}
262-
.top-simple {
263-
top: auto;
264-
width: 80%!important;
265-
}
266-
}
267-
@media screen and (min-width: 700px) and (orientation: portrait){
268-
.h1 {
269-
font-size: 40px;
270-
}
271-
.h2 {
272-
font-size: 28px;
273-
}
274-
}
242+
275243
@media screen and (orientation:landscape) {
276244
.demo-slide .slide-zoom {
277245
display: flex;
@@ -291,20 +259,10 @@ page-wizard {
291259
.demo-header {
292260
width: 40%;
293261
}
294-
img {
295-
width: 100px;
296-
}
297-
#dashImg {
298-
width: 30%;
299-
height: 80%;
300-
}
301-
#self {
302-
width: 30%;
303-
height: 70%;
304-
}
305-
#timeline {
306-
width: 35%;
307-
}
262+
.demo-img{
263+
width: 37%;
264+
margin-left: 2.2vw;
265+
}
308266
.top-question {
309267
position: relative;
310268
top: 80px;
@@ -316,8 +274,41 @@ page-wizard {
316274
height: 70px;
317275
font-size: 30px;
318276
}
319-
}
277+
.h1 {
278+
font-size: 50px;
279+
}
280+
.h2 {
281+
font-size: 38px;
282+
}
283+
}
284+
@media screen and (max-width: 850px) {
285+
ion-badge{
286+
font-size: 15px;
287+
padding: 3px;
288+
}
289+
.top-simple {
290+
top: auto;
291+
width: 80%;
292+
}
293+
.demo-img{
294+
width: 25%;
295+
}
296+
.demo-header {
297+
width: 55%;
298+
}
299+
.question-header{
300+
margin: 0px;
301+
top: -30px;
302+
}
303+
.form {
304+
margin-top: -25px;
305+
}
306+
.inner-question-header {
307+
margin: 7px auto 0px auto;
308+
}
309+
}
320310
}
311+
321312
.invalid {
322313
box-shadow: 0px 0px 10px 3px#ea6153;
323314
}

src/pages/wizard/wizard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export class WizardPage {
231231
branchOption = this.customizeSelectOptions("Military Branch", "Select a branch");
232232
vetOrActiveOptions = this.customizeSelectOptions("Military Status", "Select one");
233233
disabilityOptions = this.customizeSelectOptions("Disability Status", "Select one");
234-
UnemployedOptions = this.customizeSelectOptions("Employement Status", "Select one");
234+
unemployedOptions = this.customizeSelectOptions("Employement Status", "Select one");
235235
maritalOptions = this.customizeSelectOptions("Marital Status","Select one");
236236
insigniaOptions = this.customizeSelectOptions("Officer Rank Insignia", "Select one")
237237
enlistedPayOptions = this.customizeSelectOptions("Enlisted Pay Rank", "Select one")

src/providers/user/user.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ export class UserProvider {
3232
return this.http.post(this.requestUrl + '/appUsers/login', creds);
3333
}
3434

35+
logoutUser(token:any) {
36+
console.log('onservice-logout')
37+
return this.http.post(this.requestUrl + "/appUsers/logout", token )
38+
}
39+
3540
getUser(id) {
3641
return this.http.get(this.requestUrl + '/appUsers/' + id)
42+
3743
}
3844
}

0 commit comments

Comments
 (0)