From 0a91f6250759b8299a52cc05d8b565b76fe9e057 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Thu, 4 Aug 2022 07:05:33 +0000 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/report/sessionin-info/api.ts | 2 +- .../apps/report/sessionin-info/data.ts | 95 +++-- .../components/list.component.html | 381 ++++++------------ .../components/list.component.ts | 95 ++++- .../sessionin-info/models/sessionin-info.ts | 29 +- .../sessionin-info/sessionin-info.module.ts | 4 + 6 files changed, 283 insertions(+), 323 deletions(-) diff --git a/src/app/mock-api/apps/report/sessionin-info/api.ts b/src/app/mock-api/apps/report/sessionin-info/api.ts index 2ab2c9f..1aca46a 100644 --- a/src/app/mock-api/apps/report/sessionin-info/api.ts +++ b/src/app/mock-api/apps/report/sessionin-info/api.ts @@ -42,7 +42,7 @@ export class ReportSessioninInfoMockApi { let sessioninInfos: any[] | null = cloneDeep(this._sessioninInfos); // Sort the sessioninInfos - if (sort === 'sku' || sort === 'name' || sort === 'active') { + if (sort === 'signinId' || sort === 'nickname') { sessioninInfos.sort((a, b) => { const fieldA = a[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase(); diff --git a/src/app/mock-api/apps/report/sessionin-info/data.ts b/src/app/mock-api/apps/report/sessionin-info/data.ts index fb47140..ad41ca6 100644 --- a/src/app/mock-api/apps/report/sessionin-info/data.ts +++ b/src/app/mock-api/apps/report/sessionin-info/data.ts @@ -2,32 +2,73 @@ export const sessioninInfos = [ { - id: 'on00', - totalPartnerCount: '5', - totalHoldingMoney: 303675, - totalComp: 108933, - total: 412608, - branchCount: 1, - divisionCount: 1, - officeCount: 1, - storeCount: 1, - memberCount: 1, - nickname: 'on00', - accountHolder: '11', - phoneNumber: '010-1111-1111', - calculateType: '롤링', - ownCash: 50000, - ownComp: 1711, - ownCoupon: 50000, - gameMoney: 0, - todayComp: 0, - totalDeposit: 0, - totalWithdraw: 0, - balance: 0, - registDate: '2022-06-12 15:38', - finalSigninDate: '', - ip: '', - state: '정상', - note: '', + id: '1', + signinId: 'lala1', + nickname: '라라1', + ip: '192.168.1.9', + signinStatus: '성공', + finalSigninDate: '2022-01-01T16:00', + isIpBlock: false, + isIdBlock: false, + }, + { + id: '2', + signinId: 'onon6', + nickname: 'kakao', + ip: '192.168.1.90', + signinStatus: '삭제된아이디', + finalSigninDate: '2022-01-01T16:00', + isIpBlock: true, + isIdBlock: true, + }, + { + id: '3', + signinId: 'on04', + nickname: '라크라', + ip: '192.168.1.9', + signinStatus: '비밀번호오류', + finalSigninDate: '2022-01-01T16:00', + isIpBlock: true, + isIdBlock: false, + }, + { + id: '4', + signinId: 'on01', + nickname: 'test1', + ip: '192.168.1.9', + signinStatus: '성공', + finalSigninDate: '2022-01-01T16:00', + isIpBlock: false, + isIdBlock: false, + }, + { + id: '5', + signinId: 'onon6', + nickname: '가가가', + ip: '192.168.1.9', + signinStatus: '성공', + finalSigninDate: '2022-01-01T16:00', + isIpBlock: false, + isIdBlock: false, + }, + { + id: '6', + signinId: 'test12', + nickname: 'test12', + ip: '192.168.1.9', + signinStatus: '성공', + finalSigninDate: '2022-01-01T16:00', + isIpBlock: false, + isIdBlock: false, + }, + { + id: '7', + signinId: 'kgon5', + nickname: 'kgon5', + ip: '192.168.1.9', + signinStatus: '성공', + finalSigninDate: '2022-01-01T16:00', + isIpBlock: false, + isIdBlock: false, }, ]; diff --git a/src/app/modules/admin/report/sessionin-info/components/list.component.html b/src/app/modules/admin/report/sessionin-info/components/list.component.html index c4426db..a680b8a 100644 --- a/src/app/modules/admin/report/sessionin-info/components/list.component.html +++ b/src/app/modules/admin/report/sessionin-info/components/list.component.html @@ -13,110 +13,59 @@
로그인정보
- - - - - - - 40 - 60 - 80 - 100 - - - - - LV.1 - LV.2 - LV.3 - LV.4 - - - - - 정상 - 대기 - 탈퇴 - 휴면 - 블랙 - 정지 - - - - - 카지노제한 - 슬롯제한 - - - - - 계좌입금 - - - - - 카지노콤프 - 슬롯콤프 - 배팅콤프 - 첫충콤프 - - - + + +
+ + + +
+ +
+
+ + + + + +
+
+ + + + + +
+ - -
@@ -152,182 +100,83 @@ class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto" > - +
- - - - - - - - - - - - - - - - - - - - + + + + + + +
- diff --git a/src/app/modules/admin/report/sessionin-info/components/list.component.ts b/src/app/modules/admin/report/sessionin-info/components/list.component.ts index 4b4462e..520f9b7 100644 --- a/src/app/modules/admin/report/sessionin-info/components/list.component.ts +++ b/src/app/modules/admin/report/sessionin-info/components/list.component.ts @@ -41,19 +41,19 @@ import { Router } from '@angular/router'; styles: [ /* language=SCSS */ ` - .inventory-grid { - grid-template-columns: 60px auto 40px; + .sessionin-info-grid { + grid-template-columns: 60px auto 200px 100px 100px 100px; @screen sm { - grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px; + grid-template-columns: 60px auto 200px 100px 100px 100px; } @screen md { - grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px; + grid-template-columns: 60px auto 200px 100px 100px 100px; } @screen lg { - grid-template-columns: 60px 70px 70px 70px 70px 100px 60px 60px auto 60px 60px 60px 60px; + grid-template-columns: 60px auto 200px 100px 100px 100px; } } `, @@ -73,6 +73,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { searchInputControl = new FormControl(); selectedSessioninInfo?: SessioninInfo; pagination?: SessioninInfoPagination; + __isSearchOpened = false; + + ipBlockConfigForm!: FormGroup; + idBlockConfigForm!: FormGroup; private _unsubscribeAll: Subject = new Subject(); @@ -108,6 +112,9 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // Get the products this.sessioninInfos$ = this._sessioninInfoService.sessioninInfos$; + + this.__idBlockConfirmConfig(); + this.__ipBlockConfirmConfig(); } /** @@ -174,6 +181,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // @ Private methods // ----------------------------------------------------------------------------------------------------- + /** + * toggle the search + * Used in 'bar' + */ + __onClickSearch(): void { + this.__isSearchOpened = !this.__isSearchOpened; + } + /** * Create product */ @@ -195,4 +210,74 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { __trackByFn(index: number, item: any): any { return item.id || index; } + + __ipBlockConfirmConfig(): void { + this.ipBlockConfigForm = this._formBuilder.group({ + title: '알림', + message: 'IP 차단 처리하시겠습니까?', + icon: this._formBuilder.group({ + show: true, + name: 'heroicons_outline:exclamation', + color: 'warn', + }), + actions: this._formBuilder.group({ + confirm: this._formBuilder.group({ + show: true, + label: '확인', + color: 'warn', + }), + cancel: this._formBuilder.group({ + show: true, + label: '취소', + }), + }), + dismissible: true, + }); + } + __onClickIpBlock(event: MouseEvent, id: string = '1'): void { + // Open the dialog and save the reference of it + const dialogRef = this._fuseConfirmationService.open( + this.ipBlockConfigForm.value + ); + + // Subscribe to afterClosed from the dialog reference + dialogRef.afterClosed().subscribe((result) => { + console.log(result); + }); + } + __idBlockConfirmConfig(): void { + this.idBlockConfigForm = this._formBuilder.group({ + title: '알림', + message: 'ID블럭 처리하시겠습니까?', + icon: this._formBuilder.group({ + show: true, + name: 'heroicons_outline:exclamation', + color: 'warn', + }), + actions: this._formBuilder.group({ + confirm: this._formBuilder.group({ + show: true, + label: '확인', + color: 'warn', + }), + cancel: this._formBuilder.group({ + show: true, + label: '취소', + }), + }), + dismissible: true, + }); + } + + __onClickIdBlock(event: MouseEvent, id: string = '1'): void { + // Open the dialog and save the reference of it + const dialogRef = this._fuseConfirmationService.open( + this.idBlockConfigForm.value + ); + + // Subscribe to afterClosed from the dialog reference + dialogRef.afterClosed().subscribe((result) => { + console.log(result); + }); + } } diff --git a/src/app/modules/admin/report/sessionin-info/models/sessionin-info.ts b/src/app/modules/admin/report/sessionin-info/models/sessionin-info.ts index cc39dd9..58de398 100644 --- a/src/app/modules/admin/report/sessionin-info/models/sessionin-info.ts +++ b/src/app/modules/admin/report/sessionin-info/models/sessionin-info.ts @@ -1,29 +1,10 @@ export interface SessioninInfo { id?: string; - totalPartnerCount?: number; - totalHoldingMoney?: number; - totalComp?: number; - total?: number; - branchCount?: number; - divisionCount?: number; - officeCount?: number; - storeCount?: number; - memberCount?: number; + signinId?: string; nickname?: string; - accountHolder?: string; - phoneNumber?: string; - calculateType?: string; - ownCash?: number; - ownComp?: number; - ownCoupon?: number; - gameMoney?: number; - todayComp?: number; - totalDeposit?: number; - totalWithdraw?: number; - balance?: number; - registDate?: string; - finalSigninDate?: string; ip?: string; - state?: string; - note?: string; + signinStatus?: string; + finalSigninDate?: string; + isIpBlock: boolean | false; + isIdBlock: boolean | false; } diff --git a/src/app/modules/admin/report/sessionin-info/sessionin-info.module.ts b/src/app/modules/admin/report/sessionin-info/sessionin-info.module.ts index 1a86656..d6ce809 100644 --- a/src/app/modules/admin/report/sessionin-info/sessionin-info.module.ts +++ b/src/app/modules/admin/report/sessionin-info/sessionin-info.module.ts @@ -15,6 +15,8 @@ import { MatGridListModule } from '@angular/material/grid-list'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatRadioModule } from '@angular/material/radio'; import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatMomentDateModule } from '@angular/material-moment-adapter'; import { TranslocoModule } from '@ngneat/transloco'; @@ -45,6 +47,8 @@ import { sessioninInfoRoutes } from './sessionin-info.routing'; MatSlideToggleModule, MatRadioModule, MatCheckboxModule, + MatDatepickerModule, + MatMomentDateModule, ], }) export class SessioninInfoModule {}