login fix
This commit is contained in:
@@ -13,40 +13,40 @@
|
||||
<!-- <ion-icon slot="end" name="bookmark-outline" color="primary"></ion-icon>-->
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="rate">
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="rate">-->
|
||||
|
||||
<ion-button size="small" fill="outline"><ion-icon name="star-half-outline" color="warning"></ion-icon> 0 Task waiting to start</ion-button>
|
||||
<!-- <ion-label class="review"></ion-label>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <ion-button size="small" fill="outline"><ion-icon name="star-half-outline" color="warning"></ion-icon> 0 Task waiting to start</ion-button>-->
|
||||
<!--<!– <ion-label class="review"></ion-label>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <ion-label class="color_text">$40</ion-label>-->
|
||||
|
||||
<div class="items">
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="people" color="primary"></ion-icon>
|
||||
<ion-label>{{total_family}} Members</ion-label>
|
||||
</div>
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="time" color="primary"></ion-icon>
|
||||
<ion-label>{{family_active}} Tasks</ion-label>
|
||||
</div>
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="document-text" color="primary"></ion-icon>
|
||||
<ion-label>0 Completed</ion-label>
|
||||
</div>
|
||||
<!-- <div class="stud">-->
|
||||
<!-- <ion-icon slot="start" name="people" color="primary"></ion-icon>-->
|
||||
<!-- <ion-label>{{total_family}} Members</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="stud">-->
|
||||
<!-- <ion-icon slot="start" name="time" color="primary"></ion-icon>-->
|
||||
<!-- <ion-label>{{family_active}} Tasks</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="stud">-->
|
||||
<!-- <ion-icon slot="start" name="document-text" color="primary"></ion-icon>-->
|
||||
<!-- <ion-label>0 Completed</ion-label>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<ion-segment [(ngModel)]="tabs">
|
||||
<ion-segment-button value="members">
|
||||
<ion-label>Members</ion-label>
|
||||
<ion-label>Members ({{total_family}})</ion-label>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="lesson">
|
||||
<ion-label>Tasks</ion-label>
|
||||
<ion-label>Tasks ({{family_active}})</ion-label>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="pending">
|
||||
<ion-label>Pending</ion-label>
|
||||
<ion-label>Pending (0) </ion-label>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
//import 'rxjs/add/operator/map';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { SessionDataProviderService } from '../store/session-data-provider.service';
|
||||
import {Router} from "@angular/router";
|
||||
|
||||
|
||||
@Injectable({
|
||||
@@ -13,12 +15,20 @@ export class WrenchService {
|
||||
apiKey = '99dfe35fcb7de1ee';
|
||||
url;
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
|
||||
constructor(private http: HttpClient,
|
||||
private router: Router,
|
||||
public sessionDataProviderService :SessionDataProviderService) {
|
||||
// this is test
|
||||
this.url = 'https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1';
|
||||
}
|
||||
|
||||
getPostData(reqPath:string, reqData): Observable<any> {
|
||||
|
||||
if (reqPath != 'userlogin'){
|
||||
const sessionId = this.sessionDataProviderService.session;
|
||||
if (sessionId.length==0){
|
||||
this.router.navigate(['login']);
|
||||
}
|
||||
}
|
||||
return this.http.post(
|
||||
`${environment.baseUrl}/${reqPath}`,reqData
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user