From ef7d282186716fdfc7b8c914e5fb69f927d739ab Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Wed, 13 Jul 2022 02:47:08 +0000 Subject: [PATCH 1/2] ing... --- .../mock-api/apps/member/unconnected/api.ts | 7 +++- .../mock-api/apps/member/unconnected/data.ts | 2 +- .../components/list.component.html | 40 ++++++------------- .../member/unconnected/models/unconnected.ts | 2 +- 4 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/app/mock-api/apps/member/unconnected/api.ts b/src/app/mock-api/apps/member/unconnected/api.ts index 75af921..eeb4118 100644 --- a/src/app/mock-api/apps/member/unconnected/api.ts +++ b/src/app/mock-api/apps/member/unconnected/api.ts @@ -42,7 +42,12 @@ export class MemberUnconnectedMockApi { let unconnecteds: any[] | null = cloneDeep(this._unconnecteds); // Sort the unconnecteds - if (sort === 'sku' || sort === 'name' || sort === 'active') { + if ( + sort === 'id' || + sort === 'signinId' || + sort === 'nickname' || + sort === 'state' + ) { unconnecteds.sort((a, b) => { const fieldA = a[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase(); diff --git a/src/app/mock-api/apps/member/unconnected/data.ts b/src/app/mock-api/apps/member/unconnected/data.ts index 520e6cf..2c3f77d 100644 --- a/src/app/mock-api/apps/member/unconnected/data.ts +++ b/src/app/mock-api/apps/member/unconnected/data.ts @@ -2,7 +2,7 @@ export const unconnecteds = [ { - id: 'on04', + id: '8fcce528-d878-4cc8-99f7-bd3451ed5402', category: 'b899ec30-b85a-40ab-bb1f-18a596d5c6de', name: 'Benton Mens Automatic Watch 44mm 5 ATM', description: 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 fe2c51d..50fccae 100644 --- a/src/app/modules/admin/member/unconnected/components/list.component.html +++ b/src/app/modules/admin/member/unconnected/components/list.component.html @@ -40,20 +40,12 @@ matSortDisableClear >
- - - - - - + + + + + + @@ -62,9 +54,7 @@ - + @@ -77,16 +67,10 @@ - - - - + + + + @@ -104,7 +88,7 @@ diff --git a/src/app/modules/admin/member/unconnected/models/unconnected.ts b/src/app/modules/admin/member/unconnected/models/unconnected.ts index a7ae969..0e0bbd3 100644 --- a/src/app/modules/admin/member/unconnected/models/unconnected.ts +++ b/src/app/modules/admin/member/unconnected/models/unconnected.ts @@ -1,5 +1,5 @@ export interface Unconnected { - id?: string; + id: string; nickname?: string; highRank?: string; rank?: string; From 75c3333ae0dd36a1d9976a6ca79870223ff35833 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Wed, 13 Jul 2022 07:16:11 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=ED=98=84=EC=9E=AC=EC=A0=91=EC=86=8D?= =?UTF-8?q?=EC=9E=90=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mock-api/apps/member/current-user/api.ts | 2 +- .../mock-api/apps/member/current-user/data.ts | 42 +- .../components/list.component copy.html | 212 +++++++++ .../components/list.component.html | 418 ++++++++---------- .../current-user/components/list.component.ts | 31 +- .../current-user/current-user.module.ts | 6 + 6 files changed, 483 insertions(+), 228 deletions(-) create mode 100644 src/app/modules/admin/member/current-user/components/list.component copy.html diff --git a/src/app/mock-api/apps/member/current-user/api.ts b/src/app/mock-api/apps/member/current-user/api.ts index 5d7a357..591ed35 100644 --- a/src/app/mock-api/apps/member/current-user/api.ts +++ b/src/app/mock-api/apps/member/current-user/api.ts @@ -42,7 +42,7 @@ export class MemberCurrentUserMockApi { let currentUsers: any[] | null = cloneDeep(this._currentUsers); // Sort the currentUsers - if (sort === 'sku' || sort === 'name' || sort === 'active') { + if (sort === 'id' || sort === 'signinId' || sort === 'nickname') { currentUsers.sort((a, b) => { const fieldA = a[sort].toString().toUpperCase(); const fieldB = b[sort].toString().toUpperCase(); diff --git a/src/app/mock-api/apps/member/current-user/data.ts b/src/app/mock-api/apps/member/current-user/data.ts index 0286d3b..50ae0ac 100644 --- a/src/app/mock-api/apps/member/current-user/data.ts +++ b/src/app/mock-api/apps/member/current-user/data.ts @@ -2,7 +2,47 @@ export const currentUsers = [ { - id: 'aa100', + id: '2bfa2be5-7688-48d5-b5ac-dc0d9ac97f14', + signinId: 'kgon01', + highRank: '[매장]kgon5', + rank: '회원', + level: 4, + nickname: 'aa100', + currentLocation: '메인', + cash: 0, + comp: 3111, + gameMoney: 0, + siteAddress: 'web4nova114.com', + }, + { + id: '77a4383b-b5a5-4943-bc46-04c3431d1566', + signinId: 'kgon02', + highRank: '[매장]kgon5', + rank: '회원', + level: 4, + nickname: 'aa100', + currentLocation: '메인', + cash: 0, + comp: 3111, + gameMoney: 0, + siteAddress: 'web4nova114.com', + }, + { + id: '8bb0f597-673a-47ca-8c77-2f83219cb9af', + signinId: 'kgon03', + highRank: '[매장]kgon5', + rank: '회원', + level: 4, + nickname: 'aa100', + currentLocation: '메인', + cash: 0, + comp: 3111, + gameMoney: 0, + siteAddress: 'web4nova114.com', + }, + { + id: '0a8bc517-631a-4a93-aacc-000fa2e8294c', + signinId: 'kgon04', highRank: '[매장]kgon5', rank: '회원', level: 4, diff --git a/src/app/modules/admin/member/current-user/components/list.component copy.html b/src/app/modules/admin/member/current-user/components/list.component copy.html new file mode 100644 index 0000000..0e317fa --- /dev/null +++ b/src/app/modules/admin/member/current-user/components/list.component copy.html @@ -0,0 +1,212 @@ +
+ +
+ +
+ +
+ +
+ 현재접속자 & 쪽지전송 +
+ +
+
+ +
+ +
+ + +
+ +
+
+ + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+
+ + +
+ There are no currentUser! +
+
+
+
+
+ +
+
+ + + 현재 접속자 & 전체회원 쪽지보내기 + + + + +
+ + 제목 + + +
+
+ + 글쓴이 + + +
+
+ + 내용 + + +
+
+ + + +
+
+
+
+
diff --git a/src/app/modules/admin/member/current-user/components/list.component.html b/src/app/modules/admin/member/current-user/components/list.component.html index 692cdcc..3a7f57d 100644 --- a/src/app/modules/admin/member/current-user/components/list.component.html +++ b/src/app/modules/admin/member/current-user/components/list.component.html @@ -1,232 +1,202 @@ -
- -
- -
- -
- -
- 현재접속자 & 쪽지전송 -
- -
- -
- +
+
+
+
+
- - -
- -
-
- - - - - - - - - - - - - - - -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - -
-
- - -
+ 현재접속자 & 쪽지전송 +
+
+ - There are no currentUser! - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호 + + + {{ idx + 1 }} + + 상위 + + {{ user.highRank }} + + 등급 + {{ user.rank }} + 레벨 + {{ user.level }} + 아이디 + {{ user.signinId }} + 닉네임 + {{ user.nickname }} + 현재위치 + {{ user.currentLocation }} + 캐쉬 + {{ user.cash }} + 게임중머니 + {{ user.gameMoney }} + 카지노->캐쉬 + + 콤프 + {{ user.comp }} + 사이트 + {{ user.siteAddress }} + 쪽지보내기 + + 배팅내역 + + 로그아웃 + +
+
+
+ +
+
+ 현재 접속자 & 전체회원 쪽지보내기 +
+
+ + + + +
+ + 제목 + + +
+
+ + 글쓴이 + + +
+
+ + 내용 + + +
+
+ + + +
+
+
+
-
- - - 현재 접속자 & 전체회원 쪽지보내기 - - - - -
- - 제목 - - -
-
- - 글쓴이 - - -
-
- - 내용 - - -
-
- - - -
-
-
-
diff --git a/src/app/modules/admin/member/current-user/components/list.component.ts b/src/app/modules/admin/member/current-user/components/list.component.ts index 584df77..20e43ee 100644 --- a/src/app/modules/admin/member/current-user/components/list.component.ts +++ b/src/app/modules/admin/member/current-user/components/list.component.ts @@ -14,7 +14,7 @@ import { FormGroup, Validators, } from '@angular/forms'; -import { MatCheckboxChange } from '@angular/material/checkbox'; +import { MatTableDataSource } from '@angular/material/table'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { @@ -69,6 +69,26 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { currentUsers$!: Observable; users$!: Observable; + currentUserDataSource: MatTableDataSource = new MatTableDataSource(); + currentUserTableColumns: string[] = [ + 'id', + 'highRank', + 'rank', + 'level', + 'signinId', + 'nickname', + 'currentLocation', + 'cash', + 'gameMoney', + 'casinoMoney', + 'comp', + 'siteAddress', + 'sendMessageBtn', + 'betHistoryBtn', + 'forceSignOutBtn', + ]; + + data: any; isLoading = false; searchInputControl = new FormControl(); selectedCurrentUser?: CurrentUser; @@ -107,7 +127,14 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { }); // Get the products - this.currentUsers$ = this._currentUserService.currentUsers$; + this._currentUserService.currentUsers$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((currentUsers: any | undefined) => { + this.currentUserDataSource = currentUsers; + // Mark for check + this._changeDetectorRef.markForCheck(); + }); + /* this.currentUsers$ = this._currentUserService.currentUsers$; */ } /** diff --git a/src/app/modules/admin/member/current-user/current-user.module.ts b/src/app/modules/admin/member/current-user/current-user.module.ts index 72fdeb9..9388804 100644 --- a/src/app/modules/admin/member/current-user/current-user.module.ts +++ b/src/app/modules/admin/member/current-user/current-user.module.ts @@ -9,6 +9,9 @@ import { MatPaginatorModule } from '@angular/material/paginator'; import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatRippleModule } from '@angular/material/core'; import { MatSortModule } from '@angular/material/sort'; +import { MatTableModule } from '@angular/material/table'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatDividerModule } from '@angular/material/divider'; import { MatSelectModule } from '@angular/material/select'; import { MatTooltipModule } from '@angular/material/tooltip'; import { MatGridListModule } from '@angular/material/grid-list'; @@ -38,6 +41,9 @@ import { currentUserRoutes } from './current-user.routing'; MatProgressBarModule, MatRippleModule, MatSortModule, + MatTableModule, + MatMenuModule, + MatDividerModule, MatSelectModule, MatTooltipModule, MatGridListModule,