log out forced
This commit is contained in:
@@ -1,35 +1,58 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {SessionDataProviderService} from "./session-data-provider.service";
|
||||
import {WrenchService} from "../services/wrench.service";
|
||||
import {Router} from "@angular/router";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class BannersDataService {
|
||||
homebannerCount:number=0;
|
||||
constructor( public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService) { }
|
||||
bannerResult:any;
|
||||
bannerData: [];
|
||||
|
||||
constructor(
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private route:Router
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
usrData: {
|
||||
action:number, member_id: number, uid: string,
|
||||
sessionid: string,
|
||||
'limit': 30,
|
||||
'offset': 0
|
||||
};
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
limit: 30,
|
||||
offset: 0
|
||||
};
|
||||
|
||||
async getBannersData(){
|
||||
this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session,'limit': 30,
|
||||
'offset': 0 }
|
||||
this.wrenchService.getHomeBanners(this.usrData).subscribe(
|
||||
this.usrData = {
|
||||
action:11200,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
limit: 30,
|
||||
offset: 0
|
||||
};
|
||||
|
||||
this.wrenchService.getHomeBanners(this.usrData).subscribe(
|
||||
bannerResult => {
|
||||
this.bannerResult = bannerResult;
|
||||
|
||||
if ( this.bannerResult == undefined || this.bannerResult.internal_return == -9999){
|
||||
// force logout
|
||||
console.log("FORCE BANNER LOGOUT BANNERS RETURN->", this.bannerResult);
|
||||
this.sessionDataProviderService.DestroySessionOnLogout();
|
||||
this.route.navigate(['logout']);
|
||||
}
|
||||
|
||||
console.log("BANNERS RETURN->", this.bannerResult);
|
||||
this.bannerData = this.bannerResult.result_list;
|
||||
this.homebannerCount = this.bannerData.length;
|
||||
// debugger;
|
||||
console.log("BANNERS RETURN DATA->", this.bannerData);
|
||||
// this.blogDataService.setBlogData(this.blogResult.blog_data);
|
||||
this.homebannerCount = this.bannerData?.length;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,10 +26,9 @@ export class IntervalRefreshService {
|
||||
clearInterval(interval);
|
||||
return;
|
||||
}
|
||||
console.log("Interval Function ",this.sessionDataProviderService.session );
|
||||
this.bannersDataService.getBannersData();
|
||||
this.marketDataService.getJobsData();
|
||||
this.tasksDataService.getJobsData();
|
||||
this.bannersDataService.getBannersData();
|
||||
this.usersoffersDataService.getMyOffersData();
|
||||
|
||||
}, this.sessionDataProviderService.refresh*2);
|
||||
|
||||
@@ -64,9 +64,9 @@ export class TasksDataService {
|
||||
this.jobsData = AllResult.filter((item) => item.status_description == 'ACTIVE')
|
||||
this.jobsPastDueData =AllResult.filter((item) => item.status_description == 'PASTDUE')
|
||||
this.jobsInReviewData =AllResult.filter((item) => item.status_description == 'REVIEW')
|
||||
this.active_job_count = this.jobsData.length;
|
||||
this.review_job_count = this.jobsInReviewData.length;
|
||||
this.pastdue_job_count = this.jobsPastDueData.length;
|
||||
this.active_job_count = this.jobsData?.length;
|
||||
this.review_job_count = this.jobsInReviewData?.length;
|
||||
this.pastdue_job_count = this.jobsPastDueData?.length;
|
||||
// debugger;
|
||||
}
|
||||
);
|
||||
|
||||
@@ -37,10 +37,10 @@ export class UsersoffersDataService {
|
||||
myOffersTotalData => {
|
||||
this.myOffersTotalData = myOffersTotalData;
|
||||
this.session_image_server = this.myOffersTotalData.session_image_server;
|
||||
console.log("myOffersTotalData RETURN->", this.myOffersTotalData);
|
||||
//console.log("myOffersTotalData RETURN->", this.myOffersTotalData);
|
||||
this.myOffersData = this.myOffersTotalData.result_list;
|
||||
console.log("myOffersData RETURN DATA->", this.myOffersData);
|
||||
this.total_offers = this.myOffersData.length;
|
||||
//console.log("myOffersData RETURN DATA->", this.myOffersData);
|
||||
this.total_offers = this.myOffersData?.length;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user