54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
|
|
import { Router } from '@angular/router';
|
|
import { Component, OnInit } from '@angular/core';
|
|
import { WrenchService } from 'src/app/services/wrench.service';
|
|
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
|
@Component({
|
|
selector: 'app-inbox',
|
|
templateUrl: './inbox.page.html',
|
|
styleUrls: ['./inbox.page.scss'],
|
|
})
|
|
export class InboxPage implements OnInit {
|
|
|
|
tabs: any = 'tasks';
|
|
|
|
constructor(
|
|
private router: Router,
|
|
public sessionDataProviderService: SessionDataProviderService,
|
|
private wrenchService: WrenchService
|
|
) { }
|
|
|
|
ngOnInit() {
|
|
this.getJobsData();
|
|
}
|
|
|
|
onCall() {
|
|
this.router.navigate(['call']);
|
|
}
|
|
|
|
onMessage() {
|
|
this.router.navigate(['message']);
|
|
}
|
|
usrData: {
|
|
action:11200, member_id: number, uid: string, sessionid: string, limit:20, page:1
|
|
};
|
|
|
|
jobsTotalData:any;
|
|
jobsData: [];
|
|
getJobsData(){
|
|
this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid, sessionid: this.sessionDataProviderService.session , limit:20, page:1}
|
|
this.wrenchService.getJobsData(this.usrData).subscribe(
|
|
jobsTotalData => {
|
|
this.jobsTotalData = jobsTotalData;
|
|
console.log("PAH HX RETURN->", this.jobsTotalData);
|
|
this.jobsData = this.jobsTotalData.result_list;
|
|
// debugger;
|
|
console.log("JOBS RETURN DATA->", this.jobsData);
|
|
// this.blogDataService.setBlogData(this.blogResult.blog_data);
|
|
}
|
|
);
|
|
|
|
}
|
|
|
|
}
|