From 9f6abf5635c2b00ffd73f2f4b7bd101a9d0cec98 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Thu, 1 Sep 2022 09:19:42 +0000 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=ED=8A=BC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../withdraw/components/list.component.html | 53 ++++++++++--------- .../withdraw/components/list.component.ts | 28 +++++++++- .../customer/components/list.component.html | 6 +-- .../customer/components/list.component.ts | 52 ++++++++---------- .../message/components/list.component.html | 25 ++++++--- .../message/components/list.component.ts | 28 +++++++++- 6 files changed, 127 insertions(+), 65 deletions(-) diff --git a/src/app/modules/admin/bank/withdraw/components/list.component.html b/src/app/modules/admin/bank/withdraw/components/list.component.html index a0d1cc5..181686d 100644 --- a/src/app/modules/admin/bank/withdraw/components/list.component.html +++ b/src/app/modules/admin/bank/withdraw/components/list.component.html @@ -33,24 +33,6 @@ -
-
- -
-
- -
-
- -
-
-
+
+
+ +
+
+ +
+
+ +
+
@@ -143,10 +145,11 @@
-
- +
+
-
구분
@@ -198,10 +201,12 @@
-
- +
+
-
회원
diff --git a/src/app/modules/admin/bank/withdraw/components/list.component.ts b/src/app/modules/admin/bank/withdraw/components/list.component.ts index 900e343..e2c5367 100644 --- a/src/app/modules/admin/bank/withdraw/components/list.component.ts +++ b/src/app/modules/admin/bank/withdraw/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 { @@ -75,7 +77,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatSort) private _sort!: MatSort; + @ViewChildren('chkUsers') chkUsers!: QueryList; + bankWithdraw$!: Observable; + __checkedUsers: string[] = []; __isSearchOpened = false; isLoading = false; @@ -199,6 +204,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 */ diff --git a/src/app/modules/admin/board/customer/components/list.component.html b/src/app/modules/admin/board/customer/components/list.component.html index c46c335..a7f5fac 100644 --- a/src/app/modules/admin/board/customer/components/list.component.html +++ b/src/app/modules/admin/board/customer/components/list.component.html @@ -90,7 +90,7 @@
@@ -114,7 +114,7 @@ >
번호
@@ -156,7 +156,7 @@
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 4e01c0c..ffc0027 100644 --- a/src/app/modules/admin/board/customer/components/list.component.ts +++ b/src/app/modules/admin/board/customer/components/list.component.ts @@ -74,7 +74,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChildren('chkUsers') chkUsers!: QueryList; customers$!: Observable; - __checkedCustomers: string[] = []; + __checkedUsers: string[] = []; isLoading = false; searchInputControl = new FormControl(); @@ -182,6 +182,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); + } + }); + } + /** * toggle the search * Used in 'bar' @@ -211,33 +232,4 @@ 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/board/message/components/list.component.html b/src/app/modules/admin/board/message/components/list.component.html index 0b6744b..fd3579c 100644 --- a/src/app/modules/admin/board/message/components/list.component.html +++ b/src/app/modules/admin/board/message/components/list.component.html @@ -93,6 +93,16 @@
+
+
+ +
+
@@ -106,10 +116,11 @@
-