게임ON/OFF 페이지 수정

This commit is contained in:
Park Byung Eun 2022-07-14 09:13:06 +00:00
parent 467c31ee5c
commit 4901930c11
18 changed files with 699 additions and 281 deletions

View File

@ -23,7 +23,7 @@ export const evoSetting = {
description: '1,000~5,000,000',
},
],
vota: [
bota: [
{
level: 'LV1',
amountScope: '1,000~5,000,000(기본유저)',

View File

@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { assign, cloneDeep } from 'lodash-es';
import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
import { basicSetting as basicSettingData } from './data';
import { gameSetting as gameSettingData } from './data';
@Injectable({
providedIn: 'root',
})
export class GameSettingMockApi {
private _basicSetting: any = basicSettingData;
private _gameSetting: any = gameSettingData;
/**
* Constructor
@ -32,13 +32,13 @@ export class GameSettingMockApi {
.onGet('api/apps/settings/game', 300)
.reply(({ request }) => {
// Clone the deposits
let basicSetting: any | null = cloneDeep(this._basicSetting);
let gameSetting: any | null = cloneDeep(this._gameSetting);
// Return the response
return [
200,
{
basicSetting,
gameSetting,
},
];
});
@ -51,7 +51,7 @@ export class GameSettingMockApi {
.reply(({ request }) => {
// Get the id and deposit
const id = request.body.id;
const basicSetting = cloneDeep(request.body.basicSetting);
const gameSetting = cloneDeep(request.body.gameSetting);
// Prepare the updated basicSetting
let updatedBasicSetting = null;
@ -68,7 +68,7 @@ export class GameSettingMockApi {
// });
// Return the response
return [200, basicSetting];
return [200, gameSetting];
});
}
}

View File

@ -2,101 +2,11 @@
import { SiteStatusType } from 'app/modules/admin/settings/basic/types/site-status.type';
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;
export const gameSetting = [
{
siteName: 'kgonsample.com',
minBettingMoney: '100',
maxBettingMoney: '1000000',
maxWinMoney: '20000000',
},
];

View File

@ -1,13 +1,13 @@
import { Injectable } from '@angular/core';
import { assign, cloneDeep } from 'lodash-es';
import { FuseMockApiService, FuseMockApiUtils } from '@fuse/lib/mock-api';
import { basicSetting as basicSettingData } from './data';
import { ladderSetting as ladderSettingData } from './data';
@Injectable({
providedIn: 'root',
})
export class LadderSettingMockApi {
private _basicSetting: any = basicSettingData;
private _ladderSetting: any = ladderSettingData;
/**
* Constructor
@ -32,13 +32,13 @@ export class LadderSettingMockApi {
.onGet('api/apps/settings/ladder', 300)
.reply(({ request }) => {
// Clone the deposits
let basicSetting: any | null = cloneDeep(this._basicSetting);
let ladderSetting: any | null = cloneDeep(this._ladderSetting);
// Return the response
return [
200,
{
basicSetting,
ladderSetting,
},
];
});
@ -51,7 +51,7 @@ export class LadderSettingMockApi {
.reply(({ request }) => {
// Get the id and deposit
const id = request.body.id;
const basicSetting = cloneDeep(request.body.basicSetting);
const ladderSetting = cloneDeep(request.body.ladderSetting);
// Prepare the updated basicSetting
let updatedBasicSetting = null;
@ -68,7 +68,7 @@ export class LadderSettingMockApi {
// });
// Return the response
return [200, basicSetting];
return [200, ladderSetting];
});
}
}

View File

@ -2,101 +2,245 @@
import { SiteStatusType } from 'app/modules/admin/settings/basic/types/site-status.type';
export const basicSetting = {
infos: [
{
name: '사이트 ON/OFF 설정',
content: SiteStatusType.joinAvailable,
export const ladderSetting = [
{
game: {
ko: '파워볼',
en: 'POWERBALL',
},
{
name: '메모',
content: '메모 테스트',
isUse: true,
memo: '점검중',
},
{
game: {
ko: '에볼류션',
en: 'EVOLUTION',
},
],
earnSettings: [
{
level: 'LV1',
firstRate: '15',
firstIsUse: true,
firstMaxEarnMoney: '10000',
everyRate: '15',
everyIsUse: true,
everyMaxEarnMoney: '10000',
isUse: true,
memo: '에볼루션 카지노 긴급점검 중입니다. 이용에 불편을 드려 죄송합니다.',
},
{
game: {
ko: '디지',
en: 'DG',
},
{
level: 'LV2',
firstRate: '15',
firstIsUse: true,
firstMaxEarnMoney: '10000',
everyRate: '15',
everyIsUse: true,
everyMaxEarnMoney: '10000',
isUse: true,
memo: '점검중 10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '마이크로카지노',
en: 'MICROCASINO',
},
{
level: 'LV3',
firstRate: '15',
firstIsUse: true,
firstMaxEarnMoney: '10000',
everyRate: '15',
everyIsUse: true,
everyMaxEarnMoney: '10000',
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '프라그마카지노',
en: 'PRAGMATICCASINO',
},
{
level: 'LV4',
firstRate: '15',
firstIsUse: true,
firstMaxEarnMoney: '10000',
everyRate: '15',
everyIsUse: true,
everyMaxEarnMoney: '10000',
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '오리엔탈게임',
en: 'OG',
},
],
gameSetting: [
{
name: '스포츠게임 가져오기',
isUse: true,
memo: '슬롯 사이트 메모',
description: '다른서버에서 경기가져오고 있음(5분)',
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '아시안게이밍카지노',
en: 'ASIACASINO',
},
{
name: '스포츠게임 결과 가져오기',
isUse: false,
memo: '슬롯 사이트 메모',
description: '다른서버에서 경기결과 가져오고 있음(5분)',
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: 'CQ9카지노',
en: 'CQ9CASINO',
},
{
name: '실시간게임 가져오기',
isUse: true,
memo: '슬롯 사이트 메모',
description: '하루한번 21시50분에 가져옴',
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '이주기',
en: 'EZUGI',
},
{
name: '실시간게임 결과처리/정산',
isUse: true,
memo: '슬롯 사이트 메모',
description: '5분 단위로 체크(4분35초, 40초, 54초, 50초, 55초 정각)',
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '비보 카지노',
en: 'VIVOCASINO',
},
{
name: '스포츠실시간 포인트 정산',
isUse: true,
memo: '슬롯 사이트 메모',
description: '10초마다 완료된 경기 포인트 정산',
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '보타 카지노',
en: 'BOTACASINO',
},
{
name: '카지노 로그 가져오기',
isUse: true,
memo: '슬롯 사이트 메모',
description: '20초마다 마지막 로그 가져옴',
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '프라그마틱슬롯',
en: 'PRAGIMATICSLOT',
},
{
name: '카지노 포인트 정산',
isUse: true,
memo: '슬롯 사이트 메모',
description: '5분마다 정산내용 DB저장',
isUse: true,
memo: '점검중',
},
{
game: {
ko: '마이크로슬롯',
en: 'MICROSLOT',
},
],
};
// siteStatus?: SiteStatusType;
// memo?: string;
// earnSetting?: any;
// gameSetting?: any;
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '하바네트',
en: 'HABANERO',
},
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '부운고',
en: 'BOONGO',
},
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '플레이손',
en: 'PLAYSON',
},
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '퀵스핀',
en: 'QS',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '플레이엔고',
en: 'PLAYSNGO',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '넷엔트',
en: 'NETENT',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '매버릭',
en: 'MAVERICK',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '레드레이크',
en: 'REDRAKE',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '릴렉스',
en: 'RELAX',
},
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '블루프린트',
en: 'BLUEPRINT',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '이엘케이',
en: 'ELK',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '아시안게이밍슬롯',
en: 'ASIASLOT',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: 'CQ9슬롯',
en: 'CQ9SLOT',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '레드타이거',
en: 'REDTSLOT',
},
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '드래곤소프트',
en: 'DRAGSLOT',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '스피어헤드',
en: 'SPHSLOT',
},
isUse: true,
memo: '10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
{
game: {
ko: '엘리시움',
en: 'ELYSSLOT',
},
isUse: true,
memo: '점검중10:00~11:00까지 점검이며 연장 또는 조기종료 될 수 있습니다.',
},
];

View File

@ -10,75 +10,100 @@
대본별 계좌 설정
</div>
<div class="flex flex-col flex-auto mt-2 overflow-x-auto">
<table
class="min-w-240 overflow-y-visible"
mat-table
[dataSource]="branchSettingDataSource"
>
<!-- Total -->
<ng-container matColumnDef="highRank">
<th mat-header-cell *matHeaderCellDef>상부</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">
{{ info.hignRank }}
</span>
</td>
</ng-container>
<form [formGroup]="branchForm" autocomplete="off">
<table
class="min-w-240 overflow-y-visible"
mat-table
[dataSource]="branchSettingDataSource"
>
<!-- Total -->
<ng-container matColumnDef="highRank">
<th mat-header-cell *matHeaderCellDef>상부</th>
<td mat-cell *matCellDef="let info">
<span class="font-medium text-right">
{{ info.hignRank }}
</span>
</td>
</ng-container>
<!-- Expenses amount -->
<ng-container matColumnDef="signinId">
<th mat-header-cell *matHeaderCellDef>대본사아이디</th>
<td mat-cell *matCellDef="let info">{{ info.signinId }}</td>
</ng-container>
<!-- Expenses amount -->
<ng-container matColumnDef="signinId">
<th mat-header-cell *matHeaderCellDef>대본사아이디</th>
<td mat-cell *matCellDef="let info">{{ info.signinId }}</td>
</ng-container>
<ng-container matColumnDef="nickname">
<th mat-header-cell *matHeaderCellDef>대본사닉네임</th>
<td mat-cell *matCellDef="let info">{{ info.nickname }}</td>
</ng-container>
<ng-container matColumnDef="nickname">
<th mat-header-cell *matHeaderCellDef>대본사닉네임</th>
<td mat-cell *matCellDef="let info">{{ info.nickname }}</td>
</ng-container>
<ng-container matColumnDef="bankName">
<th mat-header-cell *matHeaderCellDef>은행명</th>
<td mat-cell *matCellDef="let info">{{ info.bankName }}</td>
</ng-container>
<ng-container matColumnDef="bankName">
<th mat-header-cell *matHeaderCellDef>은행명</th>
<!-- <td mat-cell *matCellDef="let info">{{ info.bankName }}</td> -->
<td mat-cell *matCellDef="let info">
<mat-form-field class="">
<input
id="bankName"
matInput
value="{{ info.bankName }}"
/>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="accountNumber">
<th mat-header-cell *matHeaderCellDef>계좌번호</th>
<td mat-cell *matCellDef="let info">
{{ info.accountNumber }}
</td>
</ng-container>
<ng-container matColumnDef="accountNumber">
<th mat-header-cell *matHeaderCellDef>계좌번호</th>
<td mat-cell *matCellDef="let info">
<mat-form-field class="">
<input
id="accountNumber"
matInput
value="{{ info.accountNumber }}"
/>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="accountHolder">
<th mat-header-cell *matHeaderCellDef>예금주</th>
<td mat-cell *matCellDef="let info">{{ info.content }}</td>
</ng-container>
<ng-container matColumnDef="accountHolder">
<th mat-header-cell *matHeaderCellDef>예금주</th>
<td mat-cell *matCellDef="let info">
<mat-form-field class="">
<input
id="accountHolder"
matInput
value="{{ info.accountHolder }}"
/>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="reditDate">
<th mat-header-cell *matHeaderCellDef>등록/수정일</th>
<td mat-cell *matCellDef="let info">{{ info.reditDate }}</td>
</ng-container>
<ng-container matColumnDef="reditDate">
<th mat-header-cell *matHeaderCellDef>등록/수정일</th>
<td mat-cell *matCellDef="let info">{{ info.reditDate }}</td>
</ng-container>
<!-- Expenses amount -->
<ng-container matColumnDef="etc">
<th mat-header-cell *matHeaderCellDef>비고</th>
<td mat-cell *matCellDef="let basicSetting">
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
등록/수정하기
</button>
</div>
</td>
</ng-container>
<!-- Expenses amount -->
<ng-container matColumnDef="etc">
<th mat-header-cell *matHeaderCellDef>비고</th>
<td mat-cell *matCellDef="let basicSetting">
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">
등록/수정하기
</button>
</div>
</td>
</ng-container>
<tr
mat-header-row
*matHeaderRowDef="branchSettingTableColumns"
></tr>
<tr
mat-row
*matRowDef="let row; columns: branchSettingTableColumns"
></tr>
</table>
<tr
mat-header-row
*matHeaderRowDef="branchSettingTableColumns"
></tr>
<tr
mat-row
*matRowDef="let row; columns: branchSettingTableColumns"
></tr>
</table>
</form>
</div>
</div>
</div>

View File

@ -64,6 +64,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _unsubscribeAll: Subject<any> = new Subject<any>();
branchForm!: FormGroup;
branchSetting$!: Observable<any | undefined>;
branchSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
@ -95,6 +97,11 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
* On init
*/
ngOnInit(): void {
this.branchForm = this._formBuilder.group({
bankName: [''],
accountNumber: [''],
accountHolder: [''],
});
// Get the products
this._branchService.branchSetting$
.pipe(takeUntil(this._unsubscribeAll))

View File

@ -28,7 +28,26 @@
<!-- Expenses amount -->
<ng-container matColumnDef="amountScope">
<th mat-header-cell *matHeaderCellDef>게임설정</th>
<td mat-cell *matCellDef="let info">{{ info.amountScope }}</td>
<!-- <td mat-cell *matCellDef="let info">{{ info.amountScope }}</td> -->
<td mat-cell *matCellDef="let info">
<mat-form-field
color="accent"
appearance="standard"
class="setting-select-obj ucap-mat-input-container"
>
<mat-select
[value]="amountScopeOptions[0]"
(selectionChange)="__onSelectionAmountScope($event)"
>
<mat-option
*ngFor="let amountScope of amountScopeOptions"
[value]="amountScope"
>
{{ amountScope.value }}
</mat-option>
</mat-select>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="description">
@ -65,7 +84,7 @@
<table
class="min-w-240 overflow-y-visible"
mat-table
[dataSource]="votaSettingDataSource"
[dataSource]="botaSettingDataSource"
>
<!-- Total -->
<ng-container matColumnDef="level">
@ -80,7 +99,21 @@
<!-- Expenses amount -->
<ng-container matColumnDef="amountScope">
<th mat-header-cell *matHeaderCellDef>게임설정</th>
<td mat-cell *matCellDef="let info">{{ info.amountScope }}</td>
<td mat-cell *matCellDef="let info">
<mat-form-field color="accent" appearance="standard" class="">
<mat-select
[value]="amountScopeOptions[1]"
(selectionChange)="__onSelectionAmountScope($event)"
>
<mat-option
*ngFor="let amountScope of amountScopeOptions"
[value]="amountScope"
>
{{ amountScope.value }}
</mat-option>
</mat-select>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="description">
@ -100,11 +133,11 @@
<tr
mat-header-row
*matHeaderRowDef="votaSettingTableColumns"
*matHeaderRowDef="botaSettingTableColumns"
></tr>
<tr
mat-row
*matRowDef="let row; columns: votaSettingTableColumns"
*matRowDef="let row; columns: botaSettingTableColumns"
></tr>
</table>
</div>

View File

@ -30,6 +30,7 @@ import {
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { EvoService } from '../services/evo.service';
import { MatSelectChange } from '@angular/material/select';
@Component({
selector: 'settings-evo-list',
@ -62,6 +63,11 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort;
amountScopeOptions = [
{ idx: 0, value: '1,000~5,000,000(기본유저)' },
{ idx: 1, value: '1,000~3,000,000(소액유저)' },
{ idx: 2, value: '1,000~20,000,000(고액유저)' },
];
evoSettingTableColumns: string[] = [
'level',
'amountScope',
@ -69,7 +75,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
'updateBtn',
];
votaSettingTableColumns: string[] = [
botaSettingTableColumns: string[] = [
'level',
'amountScope',
'description',
@ -77,7 +83,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
];
evoSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
votaSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
botaSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
private _unsubscribeAll: Subject<any> = new Subject<any>();
@ -104,7 +110,7 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((evoSetting: any | undefined) => {
this.evoSettingDataSource = evoSetting.evo;
this.votaSettingDataSource = evoSetting.vota;
this.botaSettingDataSource = evoSetting.bota;
// Mark for check
this._changeDetectorRef.markForCheck();
});
@ -153,4 +159,6 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any {
return item.id || index;
}
__onSelectionAmountScope(event: MatSelectChange): void {}
}

View File

@ -1 +1,107 @@
<p>powerball game setting page</p>
<div class="flex flex-col flex-auto min-w-0">
<div class="flex-auto border-t -mt-px pt-4 sm:pt-6">
<div class="w-full max-w-screen-xl mx-auto">
<div class="grid grid-cols-1 sm:grid-cols-6 gap-6 w-full min-w-0">
<!-- Budget distribution -->
<div
class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
>
<div class="text-lg font-medium tracking-tight leading-6 truncate">
게임설정
</div>
<div class="flex flex-col flex-auto mt-2 overflow-x-auto">
<form [formGroup]="gameForm" autocomplete="off">
<table
class="min-w-240 overflow-y-visible"
mat-table
[dataSource]="gameSettingDataSource"
>
<!-- Total -->
<ng-container matColumnDef="siteName">
<th mat-header-cell *matHeaderCellDef>사이트명</th>
<td mat-cell *matCellDef="let info">
<mat-form-field class="">
<input
id="siteName"
matInput
value="{{ info.siteName }}"
/>
</mat-form-field>
</td>
</ng-container>
<!-- Expenses amount -->
<ng-container matColumnDef="minBettingMoney">
<th mat-header-cell *matHeaderCellDef>파워볼 최소 배팅액</th>
<td mat-cell *matCellDef="let info">
<mat-form-field class="">
<input
id="minBettingMoney"
matInput
value="{{ info.minBettingMoney }}"
/>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="maxBettingMoney">
<th mat-header-cell *matHeaderCellDef>파워볼 최대 배팅액</th>
<td mat-cell *matCellDef="let info">
<mat-form-field class="">
<input
id="maxBettingMoney"
matInput
value="{{ info.maxBettingMoney }}"
/>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="maxWinMoney">
<th mat-header-cell *matHeaderCellDef>파워볼 최대 당첨액</th>
<!-- <td mat-cell *matCellDef="let info">{{ info.bankName }}</td> -->
<td mat-cell *matCellDef="let info">
<mat-form-field class="">
<input
id="maxWinMoney"
matInput
value="{{ info.maxWinMoney }}"
/>
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="modifyBtn">
<th mat-header-cell *matHeaderCellDef>수정</th>
<td mat-cell *matCellDef="let info">
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">수정</button>
</div>
</td>
</ng-container>
<ng-container matColumnDef="removeBtn">
<th mat-header-cell *matHeaderCellDef>삭제</th>
<td mat-cell *matCellDef="let info">
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">삭제</button>
</div>
</td>
</ng-container>
<tr
mat-header-row
*matHeaderRowDef="gameSettingTableColumns"
></tr>
<tr
mat-row
*matRowDef="let row; columns: gameSettingTableColumns"
></tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -17,6 +17,8 @@ import {
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import {
debounceTime,
map,
@ -28,6 +30,7 @@ import {
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { GameService } from '../services/game.service';
@Component({
selector: 'settings-game-list',
@ -39,15 +42,15 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
grid-template-columns: 60px auto 40px;
@screen sm {
grid-template-columns: 60px auto 60px 72px;
grid-template-columns: 100px auto 60px 60px;
}
@screen md {
grid-template-columns: 60px 60px auto 112px 72px;
grid-template-columns: 100px 100px auto 60px 60px;
}
@screen lg {
grid-template-columns: 60px 60px auto 112px 96px 96px 72px;
grid-template-columns: 100px 100px 100px 60px 60px;
}
}
`,
@ -62,13 +65,26 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _unsubscribeAll: Subject<any> = new Subject<any>();
gameForm!: FormGroup;
gameSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
gameSettingTableColumns: string[] = [
'siteName',
'minBettingMoney',
'maxBettingMoney',
'maxWinMoney',
'modifyBtn',
'removeBtn',
];
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder
private _formBuilder: FormBuilder,
private _gameService: GameService
) {}
// -----------------------------------------------------------------------------------------------------
@ -78,7 +94,18 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
/**
* On init
*/
ngOnInit(): void {}
ngOnInit(): void {
this.gameForm = this._formBuilder.group({});
// Get the products
this._gameService.gameSetting$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((gameSetting: any | undefined) => {
this.gameSettingDataSource = gameSetting;
// Mark for check
this._changeDetectorRef.markForCheck();
});
}
/**
* After view init

View File

@ -11,6 +11,7 @@ import { MatRippleModule } from '@angular/material/core';
import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatTableModule } from '@angular/material/table';
import { TranslocoModule } from '@ngneat/transloco';
@ -37,6 +38,7 @@ import { gameRoutes } from './game.routing';
MatSortModule,
MatSelectModule,
MatTooltipModule,
MatTableModule,
],
})
export class GameModule {}

View File

@ -8,8 +8,8 @@ export const gameRoutes: Route[] = [
{
path: '',
component: ListComponent,
// resolve: {
// deposits: GameResolver,
// },
resolve: {
game: GameResolver,
},
},
];

View File

@ -1 +1,31 @@
<p>indexing server setting page</p>
<div class="flex flex-col flex-auto items-center sm:justify-center min-w-0">
<div
class="w-full sm:w-auto py-8 px-4 sm:p-12 sm:rounded-2xl sm:shadow sm:bg-card"
>
<div class="w-full max-w-80 sm:w-80 mx-auto sm:mx-0">
<!-- Logo -->
<div class="w-12">
<img src="assets/images/logo/logo.svg" />
</div>
<!-- Title -->
<div class="mt-8 text-4xl font-extrabold tracking-tight leading-tight">
서버 인덱싱
</div>
<div class="mt-4">
<p>카지노/슬롯 배팅리스트 페이지가 평소보다 느릴경우 사용하세요</p>
<p>
실행시 서버가 느려질 수 있으니 사용자가 없는 시간에 하시기 바랍니다.
</p>
<p>매주 점검 기간에 인덱싱 하니 3~4일에 한번씩만 사용을 권장합니다.</p>
</div>
<!-- Form footer -->
<div class="mt-8 text-md font-medium text-secondary">
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">서버인덱싱</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -1 +1,98 @@
<p>ladder game setting page</p>
<div class="flex flex-col flex-auto min-w-0">
<div class="flex-auto border-t -mt-px pt-4 sm:pt-6">
<div class="w-full max-w-screen-xl mx-auto">
<div class="grid grid-cols-1 sm:grid-cols-6 gap-6 w-full min-w-0">
<!-- Budget distribution -->
<div
class="sm:col-span-6 flex flex-col flex-auto p-6 bg-card shadow rounded-2xl overflow-hidden"
>
<div class="text-lg font-medium tracking-tight leading-6 truncate">
게임 ON/OFF
</div>
<div class="flex flex-col flex-auto mt-2 overflow-x-auto">
<!-- <form [formGroup]="ladderForm" autocomplete="off"> -->
<table
class="min-w-240 overflow-y-visible"
mat-table
[dataSource]="ladderSettingDataSource"
>
<!-- Total -->
<ng-container matColumnDef="gameKo">
<th mat-header-cell *matHeaderCellDef>종목KO</th>
<td mat-cell *matCellDef="let info">
{{ info.game.ko }}
</td>
</ng-container>
<ng-container matColumnDef="gameEn">
<th mat-header-cell *matHeaderCellDef>종목</th>
<td mat-cell *matCellDef="let info">
{{ info.game.en }}
</td>
</ng-container>
<!-- Expenses amount -->
<ng-container matColumnDef="isUse">
<th mat-header-cell *matHeaderCellDef>사용여부</th>
<td mat-cell *matCellDef="let info">
<!-- <mat-form-field>
</mat-form-field> -->
<mat-slide-toggle [color]="'primary'"> </mat-slide-toggle>
</td>
</ng-container>
<ng-container matColumnDef="memo">
<th mat-header-cell *matHeaderCellDef>메모</th>
<td mat-cell *matCellDef="let info">
<mat-form-field>
<input id="memo" matInput value="{{ info.memo }}" />
</mat-form-field>
</td>
</ng-container>
<ng-container matColumnDef="modifyBtn">
<th mat-header-cell *matHeaderCellDef>수정</th>
<td mat-cell *matCellDef="let info">
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">수정</button>
</div>
</td>
</ng-container>
<!-- Footer -->
<ng-container matColumnDef="ladderTableFooter">
<td
class="py-6 px-0 border-0"
mat-footer-cell
*matFooterCellDef
colspan="6"
>
<div>
<button mat-stroked-button>전체 닫기</button>
</div>
<div>
<button mat-stroked-button>전체 열기</button>
</div>
</td>
</ng-container>
<tr
mat-header-row
*matHeaderRowDef="ladderSettingTableColumns"
></tr>
<tr
mat-row
*matRowDef="let row; columns: ladderSettingTableColumns"
></tr>
<tr
class="h-16 border-0"
mat-footer-row
*matFooterRowDef="['ladderTableFooter']"
></tr>
</table>
<!-- </form> -->
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -28,6 +28,8 @@ import {
} from 'rxjs';
import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation';
import { MatTableDataSource } from '@angular/material/table';
import { LadderService } from '../services/ladder.service';
@Component({
selector: 'settings-ladder-list',
@ -62,13 +64,25 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _unsubscribeAll: Subject<any> = new Subject<any>();
ladderForm!: FormGroup;
ladderSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
ladderSettingTableColumns: string[] = [
'gameKo',
'gameEn',
'isUse',
'memo',
'modifyBtn',
];
/**
* Constructor
*/
constructor(
private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder
private _formBuilder: FormBuilder,
private _ladderService: LadderService
) {}
// -----------------------------------------------------------------------------------------------------
@ -78,7 +92,18 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
/**
* On init
*/
ngOnInit(): void {}
ngOnInit(): void {
this.ladderForm = this._formBuilder.group({});
// Get the products
this._ladderService.ladderSetting$
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((ladderSetting: any | undefined) => {
this.ladderSettingDataSource = ladderSetting;
// Mark for check
this._changeDetectorRef.markForCheck();
});
}
/**
* After view init

View File

@ -11,6 +11,8 @@ import { MatRippleModule } from '@angular/material/core';
import { MatSortModule } from '@angular/material/sort';
import { MatSelectModule } from '@angular/material/select';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatTableModule } from '@angular/material/table';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { TranslocoModule } from '@ngneat/transloco';
@ -37,6 +39,8 @@ import { ladderRoutes } from './ladder.routing';
MatSortModule,
MatSelectModule,
MatTooltipModule,
MatTableModule,
MatSlideToggleModule,
],
})
export class LadderModule {}

View File

@ -8,8 +8,8 @@ export const ladderRoutes: Route[] = [
{
path: '',
component: ListComponent,
// resolve: {
// ladder: LadderResolver,
// },
resolve: {
ladder: LadderResolver,
},
},
];