체크박스 영역 추가.
This commit is contained in:
parent
7750c94001
commit
e7356b3ad3
|
@ -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<number>();
|
||||
@Output()
|
||||
checkUser = new EventEmitter<{
|
||||
isChecked: boolean;
|
||||
userInfo: UserInfoSS;
|
||||
}>();
|
||||
@Output()
|
||||
toggleUser = new EventEmitter<UserInfoSS>();
|
||||
@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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user