interest coiunt
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
<div class="stud">
|
||||
<ion-icon slot="start" name="document-text" color="primary"></ion-icon>
|
||||
<ion-label>({{jobData.interest_count ?? 0 }} interest count)</ion-label>
|
||||
<ion-label>({{interestCount ?? 0 }} interest count)</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ export class MarketdetailPage implements OnInit {
|
||||
linkedJob:[];
|
||||
jobData: any;
|
||||
jobOpen:boolean =false;
|
||||
jobsInterestData:[];
|
||||
constructor(
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
@@ -51,7 +52,10 @@ export class MarketdetailPage implements OnInit {
|
||||
else{
|
||||
this.jobOpen= true;
|
||||
}
|
||||
this.interestCount = this.marketDataService.getInterestCount(this.jobData.job_uid);
|
||||
//this.jobsInterestData = this.marketDataService.jobsInterestData;
|
||||
}
|
||||
interestCount:number=0;
|
||||
reqVerifyResult:any;
|
||||
verifyCompletion(linkedJobUid:string){
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ export class MarketDataService {
|
||||
|
||||
jobsTotalData:any;
|
||||
jobsData: [];
|
||||
jobsInterestData: [];
|
||||
getJobsData(){
|
||||
if (
|
||||
this.sessionDataProviderService.session == '' ||
|
||||
@@ -43,6 +44,7 @@ export class MarketDataService {
|
||||
this.jobsTotalData = jobsTotalData;
|
||||
console.log("PAH HX RETURN->", this.jobsTotalData);
|
||||
this.jobsData = this.jobsTotalData.result_list;
|
||||
this.jobsInterestData = this.jobsTotalData?.interest_list;
|
||||
this.session_image_server = this.jobsTotalData.session_image_server;
|
||||
console.log("JOBS RETURN DATA->", this.jobsData);
|
||||
}
|
||||
@@ -50,6 +52,18 @@ export class MarketDataService {
|
||||
|
||||
}
|
||||
|
||||
getInterestCount(job_uid){
|
||||
// debugger;
|
||||
try {
|
||||
const result:any = this.jobsInterestData.filter((item: any) => job_uid == item.job_uid);
|
||||
return ( result[0].interest_count != undefined ) ? result[0].interest_count: 0;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
socketRefreshJobsData(data){
|
||||
console.log("BAD REFESH NEED TO FIX ", data);
|
||||
this.getJobsData();
|
||||
|
||||
Reference in New Issue
Block a user