체크박스 영역 추가.
This commit is contained in:
parent
7750c94001
commit
e7356b3ad3
|
@ -14,8 +14,12 @@ import { Sort } from '@angular/material/sort';
|
||||||
styleUrls: ['./detail-table.component.scss']
|
styleUrls: ['./detail-table.component.scss']
|
||||||
})
|
})
|
||||||
export class DetailTableComponent implements OnInit {
|
export class DetailTableComponent implements OnInit {
|
||||||
@Input()
|
@Input('selectedDepartmentUserInfoList')
|
||||||
selectedDepartmentUserInfoList: UserInfoSS[] = [];
|
set userInfoListIn(userInfo: UserInfoSS[]) {
|
||||||
|
this.selectedDepartmentUserInfoList = userInfo;
|
||||||
|
this.sortedData = userInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
presence: StatusBulkInfo[];
|
presence: StatusBulkInfo[];
|
||||||
@Input()
|
@Input()
|
||||||
|
@ -25,7 +29,20 @@ export class DetailTableComponent implements OnInit {
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
openProfile = new EventEmitter<number>();
|
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[] = [];
|
sortedData: UserInfoSS[] = [];
|
||||||
|
|
||||||
PresenceType = PresenceType;
|
PresenceType = PresenceType;
|
||||||
|
@ -40,9 +57,7 @@ export class DetailTableComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private logger: NGXLogger) {}
|
constructor(private logger: NGXLogger) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {}
|
||||||
this.sortedData = this.selectedDepartmentUserInfoList;
|
|
||||||
}
|
|
||||||
|
|
||||||
getPresence(userInfo: UserInfoSS, type: PresenceType): string {
|
getPresence(userInfo: UserInfoSS, type: PresenceType): string {
|
||||||
const presences = this.presence.filter(p => p.userSeq === userInfo.seq);
|
const presences = this.presence.filter(p => p.userSeq === userInfo.seq);
|
||||||
|
@ -143,7 +158,6 @@ export class DetailTableComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
sortData(sort: Sort) {
|
sortData(sort: Sort) {
|
||||||
console.log(sort);
|
|
||||||
const data = this.selectedDepartmentUserInfoList.slice();
|
const data = this.selectedDepartmentUserInfoList.slice();
|
||||||
if (!sort.active || sort.direction === '') {
|
if (!sort.active || sort.direction === '') {
|
||||||
this.sortedData = data;
|
this.sortedData = data;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user