From c8b5293f7e71ae5448c59468fbdb1c301850fc53 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Wed, 13 Jul 2022 11:18:14 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EB=B3=B8=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mock-api/apps/settings/basic/api.ts | 2 +- src/app/mock-api/apps/settings/basic/data.ts | 226 ++++++++---------- .../admin/settings/basic/basic.module.ts | 2 + .../basic/components/list.component.html | 88 ++++--- .../basic/components/list.component.ts | 18 +- 5 files changed, 170 insertions(+), 166 deletions(-) diff --git a/src/app/mock-api/apps/settings/basic/api.ts b/src/app/mock-api/apps/settings/basic/api.ts index db372d9..7c00a67 100644 --- a/src/app/mock-api/apps/settings/basic/api.ts +++ b/src/app/mock-api/apps/settings/basic/api.ts @@ -7,7 +7,7 @@ import { basicSetting as basicSettingData } from './data'; providedIn: 'root', }) export class BasicSettingMockApi { - private _basicSetting: any[] = basicSettingData; + private _basicSetting: any = basicSettingData; /** * Constructor diff --git a/src/app/mock-api/apps/settings/basic/data.ts b/src/app/mock-api/apps/settings/basic/data.ts index 7ab80d1..ae3bccb 100644 --- a/src/app/mock-api/apps/settings/basic/data.ts +++ b/src/app/mock-api/apps/settings/basic/data.ts @@ -2,131 +2,101 @@ import { SiteStatusType } from 'app/modules/admin/settings/basic/types/site-status.type'; -export const basicSetting = [ - { - siteStatus: SiteStatusType.joinAvailable, - memo: '메모 테스트', - earnSettings: [ - { - lv1: [ - { - earnFirst: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - { - earnEvery: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - ], - }, - { - lv2: [ - { - earnFirst: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - { - earnEvery: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - ], - }, - { - lv3: [ - { - earnFirst: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - { - earnEvery: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - ], - }, - { - lv4: [ - { - earnFirst: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - { - earnEvery: { - rate: '15', - isUse: true, - maxEarnMoney: '10000', - }, - }, - ], - }, - ], - gameSetting: [ - { - name: '스포츠게임 가져오기', - isUse: true, - memo: '슬롯 사이트 메모', - description: '다른서버에서 경기가져오고 있음(5분)', - }, - { - name: '스포츠게임 결과 가져오기', - isUse: false, - memo: '슬롯 사이트 메모', - description: '다른서버에서 경기결과 가져오고 있음(5분)', - }, - { - name: '실시간게임 가져오기', - isUse: true, - memo: '슬롯 사이트 메모', - description: '하루한번 21시50분에 가져옴', - }, - { - name: '실시간게임 결과처리/정산', - isUse: true, - memo: '슬롯 사이트 메모', - description: '5분 단위로 체크(4분35초, 40초, 54초, 50초, 55초 정각)', - }, - { - name: '스포츠실시간 포인트 정산', - isUse: true, - memo: '슬롯 사이트 메모', - description: '10초마다 완료된 경기 포인트 정산', - }, - { - name: '카지노 로그 가져오기', - isUse: true, - memo: '슬롯 사이트 메모', - description: '20초마다 마지막 로그 가져옴', - }, - { - name: '카지노 포인트 정산', - isUse: true, - memo: '슬롯 사이트 메모', - description: '5분마다 정산내용 DB저장', - }, - ], - }, - // siteStatus?: SiteStatusType; - // memo?: string; - // earnSetting?: any; - // gameSetting?: any; -]; +export const basicSetting = { + infos: [ + { + name: '사이트 ON/OFF 설정', + content: SiteStatusType.joinAvailable, + }, + { + name: '메모', + content: '메모 테스트', + }, + ], + earnSettings: [ + { + level: 'LV1', + firstRate: '15', + firstIsUse: true, + firstMaxEarnMoney: '10000', + everyRate: '15', + everyIsUse: true, + everyMaxEarnMoney: '10000', + }, + { + level: 'LV2', + firstRate: '15', + firstIsUse: true, + firstMaxEarnMoney: '10000', + everyRate: '15', + everyIsUse: true, + everyMaxEarnMoney: '10000', + }, + { + level: 'LV3', + firstRate: '15', + firstIsUse: true, + firstMaxEarnMoney: '10000', + everyRate: '15', + everyIsUse: true, + everyMaxEarnMoney: '10000', + }, + { + level: 'LV4', + firstRate: '15', + firstIsUse: true, + firstMaxEarnMoney: '10000', + everyRate: '15', + everyIsUse: true, + everyMaxEarnMoney: '10000', + }, + ], + gameSetting: [ + { + name: '스포츠게임 가져오기', + isUse: true, + memo: '슬롯 사이트 메모', + description: '다른서버에서 경기가져오고 있음(5분)', + }, + { + name: '스포츠게임 결과 가져오기', + isUse: false, + memo: '슬롯 사이트 메모', + description: '다른서버에서 경기결과 가져오고 있음(5분)', + }, + { + name: '실시간게임 가져오기', + isUse: true, + memo: '슬롯 사이트 메모', + description: '하루한번 21시50분에 가져옴', + }, + { + name: '실시간게임 결과처리/정산', + isUse: true, + memo: '슬롯 사이트 메모', + description: '5분 단위로 체크(4분35초, 40초, 54초, 50초, 55초 정각)', + }, + { + name: '스포츠실시간 포인트 정산', + isUse: true, + memo: '슬롯 사이트 메모', + description: '10초마다 완료된 경기 포인트 정산', + }, + { + name: '카지노 로그 가져오기', + isUse: true, + memo: '슬롯 사이트 메모', + description: '20초마다 마지막 로그 가져옴', + }, + { + name: '카지노 포인트 정산', + isUse: true, + memo: '슬롯 사이트 메모', + description: '5분마다 정산내용 DB저장', + }, + ], +}; +// siteStatus?: SiteStatusType; +// memo?: string; +// earnSetting?: any; +// gameSetting?: any; diff --git a/src/app/modules/admin/settings/basic/basic.module.ts b/src/app/modules/admin/settings/basic/basic.module.ts index 69fb13c..21a6bf0 100644 --- a/src/app/modules/admin/settings/basic/basic.module.ts +++ b/src/app/modules/admin/settings/basic/basic.module.ts @@ -10,6 +10,7 @@ import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatRippleModule } from '@angular/material/core'; import { MatSortModule } from '@angular/material/sort'; import { MatSelectModule } from '@angular/material/select'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatTooltipModule } from '@angular/material/tooltip'; import { MatTableModule } from '@angular/material/table'; import { MatMenuModule } from '@angular/material/menu'; @@ -43,6 +44,7 @@ import { basicSettingRoutes } from './basic.routing'; MatTableModule, MatMenuModule, MatDividerModule, + MatSlideToggleModule, ], }) export class BasicModule {} diff --git a/src/app/modules/admin/settings/basic/components/list.component.html b/src/app/modules/admin/settings/basic/components/list.component.html index 8430f08..f41a6bd 100644 --- a/src/app/modules/admin/settings/basic/components/list.component.html +++ b/src/app/modules/admin/settings/basic/components/list.component.html @@ -13,14 +13,14 @@ - @@ -28,16 +28,16 @@ - + - @@ -63,14 +63,14 @@
정보 + - {{ user.highRank }} + {{ info.name }} 내용 - {{ user.rank }} - {{ info.content }} 수정 - {{ user.rank }} + +
- @@ -78,9 +78,9 @@ - @@ -88,39 +88,47 @@ - - - - - @@ -155,15 +163,15 @@
레벨 + - {{ user.level }} + {{ earn.level }} 요율 + - {{ user.highRank }} + {{ earn.firstRate }} 사용여부 - {{ user.rank }} + +
+ + +
최대금액 - {{ user.level }} + + {{ earn.firstMaxEarnMoney }} 요율 - {{ user.signinId }} + + {{ earn.everyRate }} 사용여부 - {{ user.nickname }} + + {{ earn.everyIsUse }} 최대금액 - {{ user.currentLocation }} + + {{ earn.everyMaxEarnMoney }}
- @@ -171,34 +179,42 @@ - - - - diff --git a/src/app/modules/admin/settings/basic/components/list.component.ts b/src/app/modules/admin/settings/basic/components/list.component.ts index ee36dfc..612577b 100644 --- a/src/app/modules/admin/settings/basic/components/list.component.ts +++ b/src/app/modules/admin/settings/basic/components/list.component.ts @@ -89,7 +89,12 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { 'updateBtn', ]; - currentUserDataSource: MatTableDataSource = new MatTableDataSource(); + basicInfoSettingDataSource: MatTableDataSource = + new MatTableDataSource(); + basicEarnSettingDataSource: MatTableDataSource = + new MatTableDataSource(); + basicGameSettingDataSource: MatTableDataSource = + new MatTableDataSource(); basicSetting$!: Observable; @@ -115,6 +120,17 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { * On init */ ngOnInit(): void { + // Get the products + this._basicService.basicSetting$ + .pipe(takeUntil(this._unsubscribeAll)) + .subscribe((basicSetting: any | undefined) => { + this.basicInfoSettingDataSource = basicSetting.infos; + this.basicEarnSettingDataSource = basicSetting.earnSettings; + this.basicGameSettingDataSource = basicSetting.gameSetting; + // Mark for check + this._changeDetectorRef.markForCheck(); + }); + // Get the products this.basicSetting$ = this._basicService.basicSetting$; }
제목 + - {{ user.signinId }} + {{ game.name }} 사용여부 - - {{ user.highRank }} - + +
+ + +
메모 - {{ user.rank }} + + {{ game.memo }} 내용 - {{ user.level }} + + {{ game.description }} 수정 - {{ user.signinId }} + +