From db8c2c55090b3c5733d2648984ef91028c0c6a10 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 25 Dec 2023 10:12:33 -0500 Subject: [PATCH] job group --- .../job-group/job-group.component.html | 91 +++++++++++++------ .../job-group/job-group.component.ts | 21 +++-- 2 files changed, 75 insertions(+), 37 deletions(-) diff --git a/src/app/components/job-group/job-group.component.html b/src/app/components/job-group/job-group.component.html index b003d37..bd4e01d 100644 --- a/src/app/components/job-group/job-group.component.html +++ b/src/app/components/job-group/job-group.component.html @@ -1,35 +1,66 @@ +
+
+ + + + You do not have any group currently + + + + + Create a group + + + +
- - - - You do not have any group currently - - - - - Create a group - - - +
+ +
+
+ + Select Group + {{item.group_name}} + +
+
+ +Group +
+
+ +
+ Send Task to Group +
+ +
+ + + + +
{{item.firstname}} {{item.lastname}}
+
{{item.email}}
+
+ + + Delete + +
+ +
+
+ +
- - - - Select Group - {{item.group_name}} - - +
- - -
{{item.firstname}} {{item.lastname}}
-
{{item.email}}
-
- - Delete - -
- - diff --git a/src/app/components/job-group/job-group.component.ts b/src/app/components/job-group/job-group.component.ts index eb6cb0f..9386723 100644 --- a/src/app/components/job-group/job-group.component.ts +++ b/src/app/components/job-group/job-group.component.ts @@ -21,23 +21,30 @@ export class JobGroupComponent implements OnInit { jobGroupDataResult: any; jobGroupListDataResult: any; + group_count:number = 0; + group_member_count:number = 0; + ngOnInit() { this.jobgroupDataService.getjobGroupData(); - this.jobGroupDataTotalResult = this.jobgroupDataService.jobGroupDataTotalResult; - this.jobGroupDataResult = this.jobgroupDataService.jobGroupDataResult; - this.jobGroupListDataResult = this.jobgroupDataService.jobGroupListDataResult; + this.refreshData(); setInterval(()=>{ - this.jobGroupDataTotalResult = this.jobgroupDataService.jobGroupDataTotalResult; - this.jobGroupDataResult = this.jobgroupDataService.jobGroupDataResult; - this.jobGroupListDataResult = this.jobgroupDataService.jobGroupListDataResult; - //debugger; + this.refreshData(); }, 3000 ); } + + refreshData(){ + this.jobGroupDataTotalResult = this.jobgroupDataService.jobGroupDataTotalResult; + this.jobGroupDataResult = this.jobgroupDataService.jobGroupDataResult; + this.jobGroupListDataResult = this.jobgroupDataService.jobGroupListDataResult; + this.group_count = this.jobGroupDataResult?.length; + } jobGroupListFilterdData:any; refreshList(){ + this.group_member_count= 0; this.jobGroupListFilterdData = this.jobGroupListDataResult.filter(k=> k.group_id == this.job_group); + this.group_member_count= this.jobGroupListFilterdData.length; } }