From 150f5fd883ce19ea740630af6f135a98e5043acf Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 15 Nov 2023 19:40:58 -0500 Subject: [PATCH] session expired --- .../fastreward/fastreward.component.ts | 2 +- src/app/pages/home/home.page.ts | 8 ++++++++ src/app/services/wrench.service.ts | 16 +++++++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/app/components/fastreward/fastreward.component.ts b/src/app/components/fastreward/fastreward.component.ts index bb3f998..40728e6 100644 --- a/src/app/components/fastreward/fastreward.component.ts +++ b/src/app/components/fastreward/fastreward.component.ts @@ -42,7 +42,7 @@ export class FastrewardComponent implements OnInit { familyTotalData => { this.familyTotalData = familyTotalData; console.log("FAMILY RETURN->", this.familyTotalData); - this.familyData = this.familyTotalData.result_list.slice(0,3); + this.familyData = this.familyTotalData.result_list; //.slice(0,3); // debugger; this.session_image_server = this.familyTotalData.session_image_server; console.log("FAMILY RETURN DATA->", this.familyData); diff --git a/src/app/pages/home/home.page.ts b/src/app/pages/home/home.page.ts index 3525c14..0196415 100644 --- a/src/app/pages/home/home.page.ts +++ b/src/app/pages/home/home.page.ts @@ -62,9 +62,17 @@ export class HomePage implements OnInit { this.profilePicture = this.sessionDataProviderService.profilePicture(this.sessionDataProviderService.session, this.sessionDataProviderService.member_uid); this.walletPresentation(); + } + ngOnInit() { + this.allInitFunctions(); + } + ionViewWillEnter(){ + console.log('Home page did enter - > ionViewWillEnter'); + this.allInitFunctions(); + } walletPresentation(){ this.walletData = this.userWalletService.getWallet(); if( this.walletData?.length > 0 ) { diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index 2e46c53..f69df2b 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -35,9 +35,23 @@ export class WrenchService { ); /* We have to check if this sessio + {"status_msg":"invalid_session_msg","internal_return":"-9999"} */ + // if (apiReturn.internal_return == -9999){ + // + // } + + apiReturn.pipe().subscribe(ret => { + //alert('Todays report: ' + internal_return); + + if (ret["internal_return"] == -9999){ + console.log("AMEYE**** ",ret["internal_return"]); + this.sessionDataProviderService.DestroySessionOnLogout(); + this.router.navigate(['login']); + } + + }); - console.log("apiReturn --->",apiReturn); return apiReturn; }