최상부{{ unconnected.highstRank }}
diff --git a/src/app/modules/admin/member/unconnected/components/list.component.ts b/src/app/modules/admin/member/unconnected/components/list.component.ts
index a0e9730..a10ed3b 100644
--- a/src/app/modules/admin/member/unconnected/components/list.component.ts
+++ b/src/app/modules/admin/member/unconnected/components/list.component.ts
@@ -5,7 +5,9 @@ import {
Component,
OnDestroy,
OnInit,
+ QueryList,
ViewChild,
+ ViewChildren,
ViewEncapsulation,
} from '@angular/core';
import {
@@ -14,7 +16,7 @@ import {
FormGroup,
Validators,
} from '@angular/forms';
-import { MatCheckboxChange } from '@angular/material/checkbox';
+import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import {
@@ -71,6 +73,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
+ @ViewChildren('chkUsers') chkUsers!: QueryList
;
+
unconnecteds$!: Observable;
__isSearchOpened = false;
@@ -79,6 +83,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
selectedUnconnected?: Unconnected;
pagination?: UnconnectedPagination;
+ __checkedUsers: string[] = [];
+
private _unsubscribeAll: Subject = new Subject();
/**
@@ -180,6 +186,27 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
// @ Private methods
// -----------------------------------------------------------------------------------------------------
+ __onChangeChkUsersAll(event: MatCheckboxChange): void {
+ let checked = event.checked;
+ this.chkUsers.forEach((c, i) => {
+ c.checked = checked;
+ });
+ this.__updateCheckedUsers();
+ }
+
+ __onChangeChkUsers(event: MatCheckboxChange): void {
+ this.__updateCheckedUsers();
+ }
+
+ __updateCheckedUsers(): void {
+ this.__checkedUsers = [];
+ this.chkUsers.forEach((c, i) => {
+ if (c.checked) {
+ this.__checkedUsers.push(c.value);
+ }
+ });
+ }
+
/**
* Create product
*/