interest coiunt

This commit is contained in:
CHIEFSOFT\ameye
2024-09-06 12:27:23 -04:00
parent 0922a78138
commit 461a6f3114
3 changed files with 19 additions and 1 deletions
@@ -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){
+14
View File
@@ -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();