job group
This commit is contained in:
@@ -12,3 +12,24 @@
|
|||||||
</ion-row>
|
</ion-row>
|
||||||
</ion-grid>
|
</ion-grid>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-list>
|
||||||
|
<ion-item>
|
||||||
|
<ion-select label="Select Group" [(ngModel)]='job_group' (ionChange)="refreshList()" placeholder="Select Group" label-placement="stacked">
|
||||||
|
<ion-select-option value="" selected="true">Select Group</ion-select-option>
|
||||||
|
<ion-select-option *ngFor="let item of jobGroupDataResult" value="{{item.group_id}}">{{item.group_name}}</ion-select-option>
|
||||||
|
</ion-select>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item-sliding *ngFor="let item of jobGroupListFilterdData">
|
||||||
|
<ion-item style="display: inline-flex;">
|
||||||
|
<div>{{item.firstname}} {{item.lastname}}</div>
|
||||||
|
<div>{{item.email}} </div>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item-options>
|
||||||
|
<ion-item-option color="danger">Delete</ion-item-option>
|
||||||
|
</ion-item-options>
|
||||||
|
</ion-item-sliding>
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import {Component, OnInit, ViewChild} from '@angular/core';
|
||||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||||
import {WrenchService} from "../../services/wrench.service";
|
import {WrenchService} from "../../services/wrench.service";
|
||||||
import {LoadingController} from "@ionic/angular";
|
import {LoadingController} from "@ionic/angular";
|
||||||
@@ -10,14 +10,34 @@ import {JobgroupDataService} from "../../store/jobgroup-data.service";
|
|||||||
styleUrls: ['./job-group.component.scss'],
|
styleUrls: ['./job-group.component.scss'],
|
||||||
})
|
})
|
||||||
export class JobGroupComponent implements OnInit {
|
export class JobGroupComponent implements OnInit {
|
||||||
|
@ViewChild('job_group') job_group;
|
||||||
|
|
||||||
constructor( public sessionDataProviderService: SessionDataProviderService,
|
constructor( public sessionDataProviderService: SessionDataProviderService,
|
||||||
private wrenchService: WrenchService,
|
private wrenchService: WrenchService,
|
||||||
public jobgroupDataService: JobgroupDataService,
|
public jobgroupDataService: JobgroupDataService,
|
||||||
private loadingCtrl: LoadingController) { }
|
private loadingCtrl: LoadingController) { }
|
||||||
|
|
||||||
|
jobGroupDataTotalResult: any;
|
||||||
|
jobGroupDataResult: any;
|
||||||
|
jobGroupListDataResult: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.jobgroupDataService.getjobGroupData();
|
this.jobgroupDataService.getjobGroupData();
|
||||||
|
this.jobGroupDataTotalResult = this.jobgroupDataService.jobGroupDataTotalResult;
|
||||||
|
this.jobGroupDataResult = this.jobgroupDataService.jobGroupDataResult;
|
||||||
|
this.jobGroupListDataResult = this.jobgroupDataService.jobGroupListDataResult;
|
||||||
|
setInterval(()=>{
|
||||||
|
this.jobGroupDataTotalResult = this.jobgroupDataService.jobGroupDataTotalResult;
|
||||||
|
this.jobGroupDataResult = this.jobgroupDataService.jobGroupDataResult;
|
||||||
|
this.jobGroupListDataResult = this.jobgroupDataService.jobGroupListDataResult;
|
||||||
|
//debugger;
|
||||||
|
},
|
||||||
|
3000
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
jobGroupListFilterdData:any;
|
||||||
|
refreshList(){
|
||||||
|
this.jobGroupListFilterdData = this.jobGroupListDataResult.filter(k=> k.group_id == this.job_group);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export class JobgroupDataService {
|
|||||||
|
|
||||||
jobGroupDataTotalResult: any;
|
jobGroupDataTotalResult: any;
|
||||||
jobGroupDataResult: any;
|
jobGroupDataResult: any;
|
||||||
|
jobGroupListDataResult: any;
|
||||||
|
|
||||||
async getjobGroupData(){
|
async getjobGroupData(){
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ export class JobgroupDataService {
|
|||||||
this.jobGroupDataTotalResult = jobGroupDataTotalResult;
|
this.jobGroupDataTotalResult = jobGroupDataTotalResult;
|
||||||
console.log("jobGroupDataTotalResult RETURN->", this.jobGroupDataTotalResult);
|
console.log("jobGroupDataTotalResult RETURN->", this.jobGroupDataTotalResult);
|
||||||
this.jobGroupDataResult = this.jobGroupDataTotalResult.result_list;
|
this.jobGroupDataResult = this.jobGroupDataTotalResult.result_list;
|
||||||
|
this.jobGroupListDataResult = this.jobGroupDataTotalResult.result_list_member;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user