diff --git a/src/app/mock-api/apps/report/sessionin-admin/api.ts b/src/app/mock-api/apps/report/sessionin-admin/api.ts index c03f480..dbab087 100644 --- a/src/app/mock-api/apps/report/sessionin-admin/api.ts +++ b/src/app/mock-api/apps/report/sessionin-admin/api.ts @@ -33,8 +33,8 @@ export class ReportSessioninAdminMockApi { .reply(({ request }) => { // Get available queries const search = request.params.get('search'); - const sort = request.params.get('sort') || 'name'; - const order = request.params.get('order') || 'asc'; + // const sort = request.params.get('sort') || 'name'; + // const order = request.params.get('order') || 'asc'; const page = parseInt(request.params.get('page') ?? '1', 10); const size = parseInt(request.params.get('size') ?? '10', 10); @@ -42,19 +42,19 @@ export class ReportSessioninAdminMockApi { let sessioninAdmins: any[] | null = cloneDeep(this._sessioninAdmins); // Sort the sessioninAdmins - if (sort === 'sku' || sort === 'name' || sort === 'active') { - sessioninAdmins.sort((a, b) => { - const fieldA = a[sort].toString().toUpperCase(); - const fieldB = b[sort].toString().toUpperCase(); - return order === 'asc' - ? fieldA.localeCompare(fieldB) - : fieldB.localeCompare(fieldA); - }); - } else { - sessioninAdmins.sort((a, b) => - order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] - ); - } + // if (sort === 'sku' || sort === 'name' || sort === 'active') { + // sessioninAdmins.sort((a, b) => { + // const fieldA = a[sort].toString().toUpperCase(); + // const fieldB = b[sort].toString().toUpperCase(); + // return order === 'asc' + // ? fieldA.localeCompare(fieldB) + // : fieldB.localeCompare(fieldA); + // }); + // } else { + // sessioninAdmins.sort((a, b) => + // order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] + // ); + // } // If search exists... if (search) { diff --git a/src/app/mock-api/apps/report/sessionin-admin/data.ts b/src/app/mock-api/apps/report/sessionin-admin/data.ts index 33aa15a..28bd243 100644 --- a/src/app/mock-api/apps/report/sessionin-admin/data.ts +++ b/src/app/mock-api/apps/report/sessionin-admin/data.ts @@ -2,32 +2,58 @@ export const sessioninAdmins = [ { - 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', + rank: '본사', + signinId: 'kgon1', + ip: '192.128.11.11', + domain: 'www.test.com', + tryConnectDate: '2022-01-01 16:30 PM', + errorType: '본사-아이디오류', + isSigninBlock: true, + isIpBlock: true, + }, + { + id: '2', + rank: '회원', + signinId: 'kgon2', + ip: '192.128.11.11', + domain: 'www.test.com', + tryConnectDate: '2022-01-01 16:30 PM', + errorType: '부본사-아이디오류', + isSigninBlock: true, + isIpBlock: true, + }, + { + id: '3', + rank: '총판', + signinId: 'kgon4', + ip: '192.128.11.11', + domain: 'www.test.com', + tryConnectDate: '2022-01-01 16:30 PM', + errorType: '총판-아이디오류', + isSigninBlock: true, + isIpBlock: true, + }, + { + id: '4', + rank: '회원', + signinId: 'kgo41', + ip: '192.128.11.11', + domain: 'www.test.com', + tryConnectDate: '2022-01-01 16:30 PM', + errorType: '회원-아이디오류', + isSigninBlock: false, + isIpBlock: true, + }, + { + id: '5', + rank: '회원', + signinId: 'kgon45', + ip: '192.128.11.11', + domain: 'www.test.com', + tryConnectDate: '2022-01-01 16:30 PM', + errorType: '회원-아이디오류', + isSigninBlock: true, + isIpBlock: true, }, ]; diff --git a/src/app/modules/admin/report/sessionin-admin/components/list.component.html b/src/app/modules/admin/report/sessionin-admin/components/list.component.html index 5aca1f8..451e441 100644 --- a/src/app/modules/admin/report/sessionin-admin/components/list.component.html +++ b/src/app/modules/admin/report/sessionin-admin/components/list.component.html @@ -13,110 +13,59 @@
관리자로그인정보
- - - - - - - 40 - 60 - 80 - 100 - - - - - LV.1 - LV.2 - LV.3 - LV.4 - - - - - 정상 - 대기 - 탈퇴 - 휴면 - 블랙 - 정지 - - - - - 카지노제한 - 슬롯제한 - - - - - 계좌입금 - - - - - 카지노콤프 - 슬롯콤프 - 배팅콤프 - 첫충콤프 - - - + + +
+ + + +
+ +
+
+ + + + + +
+
+ + + + + +
+ - -
@@ -152,182 +100,101 @@ class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto" > - +
- - - - - - - - - - - - - - - - - - - - +
번호
+
+ 정보 +
+ 아이디 +
+ +
+ IP +
+ 도메인 +
+
+ 접속시간 +
+ 성공실패 +
+
로그인차단/해제
+
IP차단/해제
+
회원차단/해제
+ - + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -347,11 +214,11 @@
- +
- There are no sessionin Admin Infos! + There are no data!
diff --git a/src/app/modules/admin/report/sessionin-admin/components/list.component.ts b/src/app/modules/admin/report/sessionin-admin/components/list.component.ts index 0d81262..92b7e59 100644 --- a/src/app/modules/admin/report/sessionin-admin/components/list.component.ts +++ b/src/app/modules/admin/report/sessionin-admin/components/list.component.ts @@ -8,12 +8,7 @@ import { ViewChild, ViewEncapsulation, } from '@angular/core'; -import { - FormBuilder, - FormControl, - FormGroup, - Validators, -} from '@angular/forms'; +import { FormBuilder, FormControl } from '@angular/forms'; import { MatCheckboxChange } from '@angular/material/checkbox'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; @@ -29,7 +24,6 @@ import { import { fuseAnimations } from '@fuse/animations'; import { FuseConfirmationService } from '@fuse/services/confirmation'; -import { User } from '../../../member/user/models/user'; import { SessioninAdmin } from '../models/sessionin-admin'; import { SessioninAdminPagination } from '../models/sessionin-admin-pagination'; import { SessioninAdminService } from '../services/sessionin-admin.service'; @@ -42,18 +36,18 @@ import { Router } from '@angular/router'; /* language=SCSS */ ` .inventory-grid { - grid-template-columns: 60px auto 40px; + grid-template-columns: 60px 150px auto 200px 100px 100px 100px; @screen sm { - grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px; + grid-template-columns: 60px 150px auto 200px 100px 100px 100px; } @screen md { - grid-template-columns: 60px 60px 60px 60px 60px 60px auto 60px 60px; + grid-template-columns: 60px 150px 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 150px auto 200px 100px 100px 100px; } } `, @@ -67,12 +61,12 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatSort) private _sort!: MatSort; sessioninAdmins$!: Observable; - users$!: Observable; isLoading = false; searchInputControl = new FormControl(); selectedSessioninAdmin?: SessioninAdmin; pagination?: SessioninAdminPagination; + __isSearchOpened = false; private _unsubscribeAll: Subject = new Subject(); @@ -113,45 +107,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { /** * After view init */ - ngAfterViewInit(): void { - if (this._sort && this._paginator) { - // Set the initial sort - this._sort.sort({ - id: 'name', - start: 'asc', - disableClear: true, - }); - - // Mark for check - this._changeDetectorRef.markForCheck(); - - // If the sessioninAdmin changes the sort order... - this._sort.sortChange - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe(() => { - // Reset back to the first page - this._paginator.pageIndex = 0; - }); - - // Get products if sort or page changes - merge(this._sort.sortChange, this._paginator.page) - .pipe( - switchMap(() => { - this.isLoading = true; - return this._sessioninAdminService.getSessioninAdmins( - this._paginator.pageIndex, - this._paginator.pageSize, - this._sort.active, - this._sort.direction - ); - }), - map(() => { - this.isLoading = false; - }) - ) - .subscribe(); - } - } + ngAfterViewInit(): void {} /** * On destroy @@ -166,14 +122,17 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { // @ Public methods // ----------------------------------------------------------------------------------------------------- - viewUserDetail(id: string): void { - let url: string = 'member/user/' + id; - this.router.navigateByUrl(url); - } // ----------------------------------------------------------------------------------------------------- // @ Private methods // ----------------------------------------------------------------------------------------------------- + /** + * toggle the search + * Used in 'bar' + */ + __onClickSearch(): void { + this.__isSearchOpened = !this.__isSearchOpened; + } /** * Create product */ diff --git a/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin.ts b/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin.ts index d285865..7e07b8c 100644 --- a/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin.ts +++ b/src/app/modules/admin/report/sessionin-admin/models/sessionin-admin.ts @@ -1,29 +1,11 @@ export interface SessioninAdmin { - id?: string; - totalPartnerCount?: number; - totalHoldingMoney?: number; - totalComp?: number; - total?: number; - branchCount?: number; - divisionCount?: number; - officeCount?: number; - storeCount?: number; - memberCount?: number; - 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; + id: string; + rank?: string; + signinId?: string; ip?: string; - state?: string; - note?: string; + domain?: string; + tryConnectDate?: string; + errorType?: string; + isSigninBlock: boolean | false; + isIpBlock: boolean | false; } diff --git a/src/app/modules/admin/report/sessionin-admin/sessionin-admin.module.ts b/src/app/modules/admin/report/sessionin-admin/sessionin-admin.module.ts index c281ee5..e22d1e3 100644 --- a/src/app/modules/admin/report/sessionin-admin/sessionin-admin.module.ts +++ b/src/app/modules/admin/report/sessionin-admin/sessionin-admin.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 { sessioninAdminRoutes } from './sessionin-admin.routing'; MatSlideToggleModule, MatRadioModule, MatCheckboxModule, + MatDatepickerModule, + MatMomentDateModule, ], }) export class SessioninAdminModule {}