job list data
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
<ion-row>
|
||||
<ion-col size="3" class="side_lb">Reward</ion-col>
|
||||
<ion-col size="9">
|
||||
<ion-col size="3">
|
||||
<ion-input label="Price"
|
||||
[(ngModel)]='price'
|
||||
(ionChange)="verifyEntry()"
|
||||
@@ -40,11 +40,8 @@
|
||||
style="text-align: right;"
|
||||
placeholder="0.00"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col size="3" class="side_lb">Timeline</ion-col>
|
||||
<ion-col size="9">
|
||||
<ion-col size="3">
|
||||
<ion-select
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='timeline_days'
|
||||
@@ -55,8 +52,24 @@
|
||||
<ion-select-option *ngFor="let item of durationArray" value="{{item.duration}}">{{item.name}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-col>
|
||||
|
||||
</ion-row>
|
||||
|
||||
<!-- <ion-row>-->
|
||||
<!-- <ion-col size="3" class="side_lb">Timeline</ion-col>-->
|
||||
<!-- <ion-col size="9">-->
|
||||
<!-- <ion-select-->
|
||||
<!-- (ionChange)="verifyEntry()"-->
|
||||
<!-- [(ngModel)]='timeline_days'-->
|
||||
<!-- label="Timeline (expected duration)"-->
|
||||
<!-- class="inp_lb"-->
|
||||
<!-- style="height: 35px"-->
|
||||
<!-- label-placement="stacked">-->
|
||||
<!-- <ion-select-option *ngFor="let item of durationArray" value="{{item.duration}}">{{item.name}}</ion-select-option>-->
|
||||
<!-- </ion-select>-->
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
|
||||
<ion-row>
|
||||
<ion-col size="3" class="side_lb">Title</ion-col>
|
||||
<ion-col size="9">
|
||||
@@ -96,6 +109,22 @@
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row style="background-color: #f1ecec; border-radius: 10px">
|
||||
<ion-col size="3" class="side_lb">Depends on</ion-col>
|
||||
<ion-col size="9">
|
||||
<ion-select
|
||||
interface="popover"
|
||||
(ionChange)="verifyEntry()"
|
||||
style="height: 35px"
|
||||
class="inp_lb"
|
||||
[(ngModel)]='depend_uid'
|
||||
label="Depends on task">
|
||||
<ion-select-option value="">None</ion-select-option>
|
||||
<ion-select-option *ngFor="let item of ownersJobsList;" value="{{item.job_uid}}">{{item.title}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<!-- <ion-row>-->
|
||||
<!-- <ion-col size="3" class="side_lb">Category</ion-col>-->
|
||||
<!-- <ion-col size="9">-->
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
.side_lb{
|
||||
padding-top: 10px;
|
||||
font-weight: bolder;
|
||||
font-size: 14px;
|
||||
text-align: right;
|
||||
}
|
||||
.inp_lb{
|
||||
border-radius: 5px;
|
||||
border-radius: 10px;
|
||||
background-color: aliceblue;
|
||||
padding: 2px;
|
||||
padding: 5px;
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import {WrenchService} from "../../services/wrench.service";
|
||||
import {TasksDataService} from "../../store/tasks-data.service";
|
||||
import {UserWalletService} from "../../store/user-wallet.service";
|
||||
import {apiConst} from "../../../constants/constant";
|
||||
import {JobgroupDataService} from "../../store/jobgroup-data.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-addjob',
|
||||
@@ -20,23 +21,30 @@ export class AddjobPage implements OnInit {
|
||||
@ViewChild('currency') currency:any;
|
||||
@ViewChild('price') price:any;
|
||||
@ViewChild('country') country:any;
|
||||
@ViewChild('depend_uid') depend_uid:any;
|
||||
|
||||
durationArray:any;
|
||||
curr_session:string='';
|
||||
result_message:string='';
|
||||
walletResult:any;
|
||||
walletData: [];
|
||||
isDisabled:boolean=true;
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private alertController:AlertController,
|
||||
private wrenchService: WrenchService,
|
||||
private loadingCtrl: LoadingController,
|
||||
public userWalletService: UserWalletService,
|
||||
public tasksDataService:TasksDataService,) {
|
||||
ownersJobsList:any;
|
||||
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private alertController: AlertController,
|
||||
private wrenchService: WrenchService,
|
||||
private loadingCtrl: LoadingController,
|
||||
public userWalletService: UserWalletService,
|
||||
public tasksDataService: TasksDataService,
|
||||
public jobgroupDataService: JobgroupDataService,) {
|
||||
|
||||
this.durationArray = this.sessionDataProviderService.durationArray;
|
||||
this.walletResult = this.userWalletService.walletResult.result_list;
|
||||
this.ownersJobsList = this.jobgroupDataService.jobOwnerJobsData;
|
||||
debugger;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -75,7 +83,8 @@ export class AddjobPage implements OnInit {
|
||||
title:this.title,
|
||||
description:this.description,
|
||||
job_detail:this.job_detail,
|
||||
category:''
|
||||
category:'',
|
||||
depend_uid: this.depend_uid
|
||||
}
|
||||
|
||||
loading.present();
|
||||
@@ -114,7 +123,8 @@ export class AddjobPage implements OnInit {
|
||||
title:string,
|
||||
description:string,
|
||||
job_detail:string,
|
||||
category:string
|
||||
category:string,
|
||||
depend_uid:string
|
||||
};
|
||||
jobManagerCreateResult:any;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { WrenchService } from 'src/app/services/wrench.service';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {NavController} from "@ionic/angular";
|
||||
import {JobgroupDataService} from "../../store/jobgroup-data.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-joblist',
|
||||
@@ -20,13 +21,15 @@ export class JoblistPage implements OnInit {
|
||||
private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService
|
||||
private wrenchService: WrenchService,
|
||||
public jobgroupDataService: JobgroupDataService
|
||||
) {
|
||||
|
||||
addEventListener('app_add_jobs', () => {
|
||||
this.getJobManagerList()
|
||||
this.setCloseModal();
|
||||
});
|
||||
addEventListener('app_add_jobs', () => {
|
||||
this.getJobManagerList(); // set to retire this call
|
||||
this.setCloseModal();
|
||||
this.jobgroupDataService.getOwnerJobsList(); // create the list of job owner data
|
||||
});
|
||||
this.jobgroupDataService.getOwnerJobsList(); // create the list of job owner data
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -54,19 +57,24 @@ export class JoblistPage implements OnInit {
|
||||
|
||||
}
|
||||
usrData: {
|
||||
action:13005, member_id: number, uid: string, sessionid: string, limit:20, page:1,offset: 0
|
||||
action:13005, member_id: number, uid: string, sessionid: string, limit:number, page:1,offset: 0
|
||||
};
|
||||
jobManagerJobsTotalData:any;
|
||||
jobManagerJobsData: [];
|
||||
total_jobs:number=0;
|
||||
|
||||
getJobManagerList(){
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
this.usrData = {action:13005,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
limit:20, page:1,offset: 0}
|
||||
this.curr_session = this.sessionDataProviderService.session;
|
||||
|
||||
this.usrData = {
|
||||
action:13005,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
limit:60,
|
||||
page:1,
|
||||
offset: 0
|
||||
}
|
||||
|
||||
this.wrenchService.getJobManagerList(this.usrData).subscribe(
|
||||
jobManagerJobsTotalData => {
|
||||
@@ -92,9 +100,6 @@ export class JoblistPage implements OnInit {
|
||||
//this.isModalOpen = true;
|
||||
// this.isModalOpenBackdrop= true;
|
||||
}
|
||||
|
||||
|
||||
//ionViewDidEnter(){ debugger }
|
||||
ionViewWillLeave(){
|
||||
this.isModalOpen = false;
|
||||
this.isModalOpenBackdrop= false;
|
||||
@@ -102,9 +107,7 @@ export class JoblistPage implements OnInit {
|
||||
}
|
||||
ionViewDidLeave(){ this.setCloseModal(); }
|
||||
// ngOnDestroy(){ debugger }
|
||||
|
||||
processCreateJob(){
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,43 @@ export class JobgroupDataService {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
usrJobOwnerData: {
|
||||
action:13005,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
limit:number,
|
||||
page:1,
|
||||
offset: 0
|
||||
};
|
||||
jobOwnerTotalData:any;
|
||||
jobOwnerJobsData: [];
|
||||
total_owner_jobs:number=0;
|
||||
|
||||
async getOwnerJobsList(){
|
||||
|
||||
this.usrJobOwnerData = {
|
||||
action:13005,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
limit:60,
|
||||
page:1,
|
||||
offset: 0
|
||||
}
|
||||
|
||||
await this.wrenchService.getJobManagerList(this.usrJobOwnerData).subscribe(
|
||||
jobOwnerTotalData => {
|
||||
this.jobOwnerTotalData = jobOwnerTotalData;
|
||||
console.log("jobOwnerTotalData RETURN->", this.jobOwnerTotalData);
|
||||
this.jobOwnerJobsData = this.jobOwnerTotalData.result_list;
|
||||
this.total_owner_jobs=this.jobOwnerJobsData.length;
|
||||
console.log("jobOwnerJobsData RETURN DATA->", this.jobOwnerJobsData);
|
||||
// return this.jobOwnerJobsData;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user