로그인 정보 수정

This commit is contained in:
Park Byung Eun 2022-08-04 07:05:33 +00:00
parent bc26f5c3fe
commit 0a91f62507
6 changed files with 283 additions and 323 deletions

View File

@ -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();

View File

@ -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,
},
];

View File

@ -13,110 +13,59 @@
<div class="text-4xl font-extrabold tracking-tight">로그인정보</div>
<!-- Actions -->
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="sessioninInfos$ | async as sessioninInfos">
<ng-container
*ngFor="let sessioninInfo of sessioninInfos; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
총 파트너수:{{ sessioninInfo.totalPartnerCount }} 총 보유머니:{{
sessioninInfo.totalHoldingMoney
}}
총 콤프:{{ sessioninInfo.totalComp }} 총 합계:{{
sessioninInfo.total
}}
</fieldset>
</div>
</ng-container>
</ng-container>
</mat-form-field> -->
<!-- SelectBox -->
<mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</mat-option>
<mat-option value="60">60</mat-option>
<mat-option value="80">80</mat-option>
<mat-option value="100">100</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="레벨">
<mat-option value="level1">LV.1</mat-option>
<mat-option value="level2">LV.2</mat-option>
<mat-option value="level3">LV.3</mat-option>
<mat-option value="level4">LV.4</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="상태">
<mat-option value="">정상</mat-option>
<mat-option value="">대기</mat-option>
<mat-option value="">탈퇴</mat-option>
<mat-option value="">휴면</mat-option>
<mat-option value="">블랙</mat-option>
<mat-option value="">정지</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="제한">
<mat-option value="">카지노제한</mat-option>
<mat-option value="">슬롯제한</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="입금">
<mat-option value="">계좌입금</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="내용">
<mat-option value="">카지노콤프</mat-option>
<mat-option value="">슬롯콤프</mat-option>
<mat-option value="">배팅콤프</mat-option>
<mat-option value="">첫충콤프</mat-option>
</mat-select>
</mat-form-field>
<!-- <mat-form-field>
<mat-select placeholder="입금">
<mat-option value="">계좌입금</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="아이디">
<mat-option value="">아이디</mat-option>
<mat-option value="">닉네임</mat-option>
<mat-option value="">이름</mat-option>
<mat-option value="">사이트</mat-option>
<mat-option value="">파트너수동지급</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="가입일 정렬">
<mat-option value="">가입일 정렬</mat-option>
<mat-option value="">아이디 정렬</mat-option>
<mat-option value="">닉네임 정렬</mat-option>
<mat-option value="">캐쉬 정렬</mat-option>
<mat-option value="">콤프 정렬</mat-option>
<mat-option value="">쿠폰 정렬</mat-option>
<mat-option value="">입금 정렬</mat-option>
<mat-option value="">출금 정렬</mat-option>
<mat-option value="">차익 정렬</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="내림차순">
<mat-option value="">내림차순</mat-option>
<mat-option value="">오름차순</mat-option>
</mat-select>
</mat-form-field> -->
<!-- Search -->
<button mat-icon-button (click)="__onClickSearch()">
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
</button>
</div>
</div>
<!-- Search -->
<div
*ngIf="__isSearchOpened"
class="relative flex flex-col sm:flex-row flex-0 sm:items-center sm:justify-between py-4 px-6 md:px-8 border-b"
>
<!-- Actions -->
<div fxLayout="row wrap" class="items-center mt-6 sm:mt-0 sm:ml-0">
<div class="col-span-2 sm:col-span-1">
<mat-form-field
class="fuse-mat-no-subscript w-full"
[floatLabel]="'always'"
>
<input
matInput
[matDatepicker]="picker1"
[placeholder]="'Choose a date'"
/>
<mat-datepicker-toggle
matSuffix
[for]="picker1"
></mat-datepicker-toggle>
<mat-datepicker #picker1></mat-datepicker>
</mat-form-field>
</div>
<div class="col-span-2 sm:col-span-1">
<mat-form-field
class="fuse-mat-no-subscript w-full"
[floatLabel]="'always'"
>
<input
matInput
[matDatepicker]="picker2"
[placeholder]="'Choose a date'"
/>
<mat-datepicker-toggle
matSuffix
[for]="picker2"
></mat-datepicker-toggle>
<mat-datepicker #picker2></mat-datepicker>
</mat-form-field>
</div>
<!-- Search button -->
<mat-form-field
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded min-w-64"
fxFlex
class="fuse-mat-rounded min-w-64 bet-mat-form-field-wrapper-mb-0 mr-2"
>
<mat-icon
class="icon-size-5"
@ -127,21 +76,20 @@
matInput
[formControl]="searchInputControl"
[autocomplete]="'off'"
[placeholder]="'Search'"
[placeholder]="'Search user'"
/>
</mat-form-field>
<!-- Add user button -->
<button
class="ml-4"
fxFlex
mat-flat-button
style="position: fixed; margin-top: 4px"
[color]="'primary'"
(click)="__createProduct()"
>
<!-- <mat-icon [svgIcon]="'heroicons_outline:plus'"></mat-icon> -->
<span class="ml-2 mr-1">검색하기</span>
<mat-icon [svgIcon]="'heroicons_outline:search'"></mat-icon>
<span class="ml-2 mr-1">Search</span>
</button>
<button>엑셀저장</button>
<button>카지노머니확인</button>
</div>
</div>
@ -152,182 +100,83 @@
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto"
>
<ng-container *ngIf="sessioninInfos$ | async as sessioninInfos">
<ng-container *ngIf="sessioninInfos.length > 0; else noSessioninInfo">
<ng-container *ngIf="sessioninInfos.length > 0; else noUser">
<div class="grid">
<!-- Header -->
<div
class="inventory-grid z-10 sticky top-0 grid gap-4 py-4 px-6 md:px-8 shadow text-md font-semibold text-secondary bg-gray-50 dark:bg-black dark:bg-opacity-5"
matSort
matSortDisableClear
class="sessionin-info-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 class="hidden sm:block"><mat-checkbox></mat-checkbox></div>
<div class="hidden sm:block">요율</div>
<div class="hidden sm:block">상부트리</div>
<div class="hidden sm:block">관리</div>
<div class="hidden sm:block">매장수</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">아이디</div>
<div class="hidden sm:block">닉네임</div>
<div class="hidden sm:block">예금주</div>
<div class="hidden sm:block">연락처</div>
<div class="hidden sm:block">정산</div>
<div class="hidden sm:block">보유금</div>
<div class="hidden sm:block">게임중머니</div>
<div class="hidden sm:block">카지노->캐쉬</div>
<div class="hidden sm:block">금일콤프</div>
<div class="hidden sm:block">총입출</div>
<div class="hidden sm:block">로그</div>
<div class="hidden sm:block">상태</div>
<div class="hidden sm:block">회원수</div>
<div class="hidden sm:block">비고</div>
<div class="hidden lg:block">번호</div>
<div class="hidden lg:block">
아이디
<hr style="margin: 7px 0px" />
닉네임
</div>
<div class="hidden lg:block">
IP
<hr style="margin: 7px 0px" />
Login Time
</div>
<div class="hidden lg:block">상태</div>
<div class="hidden lg:block">IP차단/해제</div>
<div class="hidden lg:block">회원차단/해제</div>
</div>
<!-- Rows -->
<ng-container *ngIf="sessioninInfos$ | async as sessioninInfos">
<ng-container
*ngFor="
let sessioninInfo of sessioninInfos;
let info of sessioninInfos;
let i = index;
trackBy: __trackByFn
"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
class="sessionin-info-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<div class="hidden sm:block truncate">
<mat-checkbox></mat-checkbox>
<!-- 번호 -->
<div class="hidden lg:block">
{{ i + 1 }}
</div>
<!-- rate -->
<div class="hidden sm:block truncate">
<!-- 아이디 || 닉네임 || 상태 -->
<div class="hidden lg:block">
{{ info.signinId }}
<hr style="margin: 7px 0px" />
{{ info.nickname }}
</div>
<!-- IP || Login Time-->
<div class="hidden lg:block">
{{ info.ip }}
<hr style="margin: 7px 0px" />
{{ info.finalSigninDate }}
</div>
<div class="hidden lg:block">
{{ info.signinStatus }}
</div>
<!-- IP차단/해제-->
<div class="hidden lg:block">
<button
mat-button
color="primary"
matTooltip="요율확인
카지노-바카라: 0%
카지노-룰렛: 0%
카지노-드레곤타이거: 0%
카지노-그외: 0%
슬롯: 0%
카지노루징: 0%
슬롯루징: 0%"
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
(click)="__onClickIpBlock($event, info.signinId)"
>
요율
</button>
<div class="hidden sm:block truncate">
<!-- 관리 -->
<button mat-flat-button [color]="'primary'">
<mat-form-field>
<mat-select placeholder="관리">
<mat-option value="">보유금지급/회수</mat-option>
<mat-option value="">수수료설정</mat-option>
<mat-option value="">콤프지급/회수</mat-option>
<mat-option value="">쿠폰머니지급/회수</mat-option>
<mat-option value="">쪽지보내기</mat-option>
<mat-option value="">베팅리스트</mat-option>
<mat-option value="">강제로그아웃</mat-option>
</mat-select>
</mat-form-field>
</button>
</div>
</div>
<!-- 매장수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ sessioninInfo.branchCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ sessioninInfo.divisionCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ sessioninInfo.officeCount }}
</button>
<button mat-flat-button [color]="'primary'">
{{ sessioninInfo.storeCount }}
<span class="ml-2 mr-1">IP차단</span>
</button>
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ sessioninInfo.memberCount }}
</button>
</div>
<!-- id -->
<ng-container *ngIf="users$ | async as users">
<ng-container
*ngFor="let user of users; trackBy: __trackByFn"
<!-- 회원차단/해제 -->
<div class="hidden lg:block">
<button
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
(click)="__onClickIdBlock($event, info.signinId)"
>
<div
class="hidden sm:block truncate"
(click)="viewUserDetail(user.id!)"
>
{{ sessioninInfo.id }}
</div>
</ng-container>
</ng-container>
<!-- nickname -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.nickname }}
</div>
<!-- accountHolder -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.accountHolder }}
</div>
<!-- 연락처 -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.phoneNumber }}
</div>
<!-- 정산 -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.calculateType }}
</div>
<!-- 보유금 -->
<div class="hidden sm:block truncate">
캐쉬{{ sessioninInfo.ownCash }} 콤프{{
sessioninInfo.ownComp
}}
쿠폰{{ sessioninInfo.ownCoupon }}
</div>
<!-- gameMoney -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.gameMoney }}
</div>
<!-- casinoCash -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
게임머니확인
</button>
<button mat-flat-button [color]="'primary'">
게임머니회수
</button>
</div>
<!-- todayComp -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.todayComp }}P
</div>
<!-- 총입출 -->
<div class="hidden sm:block truncate">
입금{{ sessioninInfo.totalDeposit }} 출금{{
sessioninInfo.totalWithdraw
}}
차익{{ sessioninInfo.balance }}
</div>
<!-- log -->
<div class="hidden sm:block truncate">
가입{{ sessioninInfo.registDate }} 최종{{
sessioninInfo.finalSigninDate
}}
IP{{ sessioninInfo.ip }}
</div>
<!-- state -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.state }}
</div>
<!-- 회원수 -->
<div class="hidden sm:block truncate">
{{ sessioninInfo.memberCount }}
</div>
<!-- 비고 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
{{ sessioninInfo.note }}
<span class="ml-2 mr-1">ID블럭</span>
</button>
</div>
</div>
@ -347,11 +196,11 @@
</ng-container>
</ng-container>
<ng-template #noSessioninInfo>
<ng-template #noUser>
<div
class="p-8 sm:p-16 border-t text-4xl font-semibold tracking-tight text-center"
>
There are no sessionin infos!
There are no data!
</div>
</ng-template>
</div>

View File

@ -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<any> = new Subject<any>();
@ -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);
});
}
}

View File

@ -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;
}

View File

@ -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 {}