profile fix
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<ion-item class="pad_logout" lines="none" (click)="onLogin()">
|
||||
<ion-item class="pad_logout" lines="none" (click)="onLogout()">
|
||||
<ion-icon name="log-out-outline" color="dark"></ion-icon>
|
||||
<ion-label class="ion_label_red">Logout</ion-label>
|
||||
<ion-icon name="chevron-forward-outline" color="medium"></ion-icon>
|
||||
|
||||
@@ -56,7 +56,8 @@ export class ProfilePage implements OnInit {
|
||||
onMyFiles() {
|
||||
this.router.navigate(['myfiles']);
|
||||
}
|
||||
onLogin() {
|
||||
onLogout() {
|
||||
this.sessionDataProviderService.DestroySessionOnLogout();
|
||||
this.router.navigate(['login']);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
import { NavController } from '@ionic/angular';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { SessionDataProviderService } from 'src/app/store/session-data-provider.service';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-security',
|
||||
@@ -10,7 +12,9 @@ import { Component, OnInit } from '@angular/core';
|
||||
export class SecurityPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private navctr: NavController
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService:SessionDataProviderService
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -23,6 +27,11 @@ export class SecurityPage implements OnInit {
|
||||
requestDeleteResult:string = '';
|
||||
requestDelete(){
|
||||
this.requestDeleteResult = "Received";
|
||||
this.onLogout();
|
||||
}
|
||||
|
||||
onLogout() {
|
||||
this.sessionDataProviderService.DestroySessionOnLogout();
|
||||
this.router.navigate(['login']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,22 @@ export class SessionDataProviderService {
|
||||
return this.session_contructed;
|
||||
}
|
||||
|
||||
DestroySessionOnLogout(){
|
||||
console.log('Hello DestroySessionOnLogout Provider');
|
||||
this.firstname = "";
|
||||
this.lastname = "";
|
||||
this.session = "INVALID";
|
||||
this.session_contructed= false;
|
||||
this.username="";
|
||||
this.last_login = "";
|
||||
this.member_id = -1;
|
||||
this.member_uid = "";
|
||||
this.balance = -1;
|
||||
this.ccard= 0;
|
||||
this.profile_pic="";
|
||||
this.isPedningJob = 0;
|
||||
this.isOfferJob = 0;
|
||||
}
|
||||
profilePicture(){
|
||||
var profile_p = '';
|
||||
if (this.profile_pic !=''){
|
||||
|
||||
Reference in New Issue
Block a user