From e7356b3ad30c6a8b3a2b013e77080f701ad44101 Mon Sep 17 00:00:00 2001 From: leejinho Date: Thu, 5 Mar 2020 13:15:44 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=B4=ED=81=AC=EB=B0=95=EC=8A=A4=20?= =?UTF-8?q?=EC=98=81=EC=97=AD=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/components/detail-table.component.ts | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.ts b/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.ts index ed5ff0b3..3e5648b4 100644 --- a/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.ts +++ b/projects/ucap-webmessenger-ui-organization/src/lib/components/detail-table.component.ts @@ -14,8 +14,12 @@ import { Sort } from '@angular/material/sort'; styleUrls: ['./detail-table.component.scss'] }) export class DetailTableComponent implements OnInit { - @Input() - selectedDepartmentUserInfoList: UserInfoSS[] = []; + @Input('selectedDepartmentUserInfoList') + set userInfoListIn(userInfo: UserInfoSS[]) { + this.selectedDepartmentUserInfoList = userInfo; + this.sortedData = userInfo; + } + @Input() presence: StatusBulkInfo[]; @Input() @@ -25,7 +29,20 @@ export class DetailTableComponent implements OnInit { @Output() openProfile = new EventEmitter(); + @Output() + checkUser = new EventEmitter<{ + isChecked: boolean; + userInfo: UserInfoSS; + }>(); + @Output() + toggleUser = new EventEmitter(); + @Output() + checkAllUser = new EventEmitter<{ + isChecked: boolean; + userInfos: UserInfoSS[]; + }>(); + selectedDepartmentUserInfoList: UserInfoSS[]; sortedData: UserInfoSS[] = []; PresenceType = PresenceType; @@ -40,9 +57,7 @@ export class DetailTableComponent implements OnInit { constructor(private logger: NGXLogger) {} - ngOnInit() { - this.sortedData = this.selectedDepartmentUserInfoList; - } + ngOnInit() {} getPresence(userInfo: UserInfoSS, type: PresenceType): string { const presences = this.presence.filter(p => p.userSeq === userInfo.seq); @@ -143,7 +158,6 @@ export class DetailTableComponent implements OnInit { } sortData(sort: Sort) { - console.log(sort); const data = this.selectedDepartmentUserInfoList.slice(); if (!sort.active || sort.direction === '') { this.sortedData = data;