버튼 수정
This commit is contained in:
parent
c3c6da5e86
commit
cb9184648a
|
@ -89,6 +89,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
*ngIf="__checkedCustomers"
|
||||||
|
class="relative flex flex-col sm:flex-row flex-0 sm:items-center py-4 px-6 md:px-8 border-b"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
|
||||||
|
디비에서 완전삭제
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Main -->
|
<!-- Main -->
|
||||||
<div class="flex flex-auto overflow-hidden">
|
<div class="flex flex-auto overflow-hidden">
|
||||||
<!-- Products list -->
|
<!-- Products list -->
|
||||||
|
@ -102,8 +112,10 @@
|
||||||
<div
|
<div
|
||||||
class="customer-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
|
class="customer-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
|
||||||
>
|
>
|
||||||
<div>
|
<div style="text-align: center">
|
||||||
<mat-checkbox></mat-checkbox>
|
<mat-checkbox
|
||||||
|
(change)="__onChangeChkCustomersAll($event)"
|
||||||
|
></mat-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div>번호</div>
|
<div>번호</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -141,8 +153,11 @@
|
||||||
<div
|
<div
|
||||||
class="customer-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
|
class="customer-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
|
||||||
>
|
>
|
||||||
<div class="hidden sm:block truncate">
|
<div style="text-align: center">
|
||||||
<mat-checkbox></mat-checkbox>
|
<mat-checkbox
|
||||||
|
#chkUsers
|
||||||
|
(change)="__onChangeChkCustomers()"
|
||||||
|
></mat-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<!-- 일련번호 -->
|
<!-- 일련번호 -->
|
||||||
<div class="hidden sm:block truncate">
|
<div class="hidden sm:block truncate">
|
||||||
|
|
|
@ -5,7 +5,9 @@ import {
|
||||||
Component,
|
Component,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
OnInit,
|
||||||
|
QueryList,
|
||||||
ViewChild,
|
ViewChild,
|
||||||
|
ViewChildren,
|
||||||
ViewEncapsulation,
|
ViewEncapsulation,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
|
@ -14,7 +16,7 @@ import {
|
||||||
FormGroup,
|
FormGroup,
|
||||||
Validators,
|
Validators,
|
||||||
} from '@angular/forms';
|
} from '@angular/forms';
|
||||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
|
||||||
import { MatPaginator } from '@angular/material/paginator';
|
import { MatPaginator } from '@angular/material/paginator';
|
||||||
import { MatSort } from '@angular/material/sort';
|
import { MatSort } from '@angular/material/sort';
|
||||||
import {
|
import {
|
||||||
|
@ -69,7 +71,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
|
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
|
||||||
@ViewChild(MatSort) private _sort!: MatSort;
|
@ViewChild(MatSort) private _sort!: MatSort;
|
||||||
|
|
||||||
|
@ViewChildren('chkUsers') chkUsers!: QueryList<MatCheckbox>;
|
||||||
|
|
||||||
customers$!: Observable<Customer[] | undefined>;
|
customers$!: Observable<Customer[] | undefined>;
|
||||||
|
__checkedCustomers: string[] = [];
|
||||||
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
searchInputControl = new FormControl();
|
searchInputControl = new FormControl();
|
||||||
|
@ -206,4 +211,33 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
__trackByFn(index: number, item: any): any {
|
__trackByFn(index: number, item: any): any {
|
||||||
return item.id || index;
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="relative flex flex-col sm:flex-row flex-0 sm:items-center py-4 px-6 md:px-8 border-b"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
|
||||||
|
탈퇴
|
||||||
|
</button>
|
||||||
|
<button mat-flat-button class="bet-mat-small-8" [color]="'primary'">
|
||||||
|
휴면
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Main -->
|
<!-- Main -->
|
||||||
<div class="flex flex-auto overflow-hidden">
|
<div class="flex flex-auto overflow-hidden">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user