-
+
+
diff --git a/src/app/modules/admin/board/customer/components/list.component.ts b/src/app/modules/admin/board/customer/components/list.component.ts
index 7557d77..4e01c0c 100644
--- a/src/app/modules/admin/board/customer/components/list.component.ts
+++ b/src/app/modules/admin/board/customer/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 {
@@ -69,7 +71,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
+ @ViewChildren('chkUsers') chkUsers!: QueryList;
+
customers$!: Observable;
+ __checkedCustomers: string[] = [];
isLoading = false;
searchInputControl = new FormControl();
@@ -206,4 +211,33 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any {
return item.id || index;
}
+
+ onClickCustomers(typeNum: number): void {
+ if (this.__checkedCustomers.length === 0) {
+ return;
+ }
+
+ this.__checkedCustomers.map((v) => {});
+ }
+
+ __onChangeChkCustomersAll(event: MatCheckboxChange): void {
+ let checked = event.checked;
+ this.chkUsers.forEach((c, i) => {
+ c.checked = checked;
+ });
+ this.__onChangeChkCustomers();
+ }
+
+ __onChangeChkUsers(event: MatCheckboxChange): void {
+ this.__onChangeChkCustomers();
+ }
+
+ __onChangeChkCustomers(): void {
+ this.__checkedCustomers = [];
+ this.chkUsers.forEach((c, i) => {
+ if (c.checked) {
+ this.__checkedCustomers.push(c.value);
+ }
+ });
+ }
}
diff --git a/src/app/modules/admin/member/unconnected/components/list.component.html b/src/app/modules/admin/member/unconnected/components/list.component.html
index 0e5d95a..37269fe 100644
--- a/src/app/modules/admin/member/unconnected/components/list.component.html
+++ b/src/app/modules/admin/member/unconnected/components/list.component.html
@@ -34,6 +34,18 @@