Merge branch 'feature/BETERAN-BACKEND-APP-BROWSER-init' of https://gitlab.loafle.net/bet/beteran-backend-app-browser into feature/BETERAN-BACKEND-APP-BROWSER-init
This commit is contained in:
commit
5f7f1989ee
|
@ -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 { branchSetting as branchSettingData } from './data';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class BranchSettingMockApi {
|
||||
private _basicSetting: any = basicSettingData;
|
||||
private _branchSetting: any = branchSettingData;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -32,13 +32,13 @@ export class BranchSettingMockApi {
|
|||
.onGet('api/apps/settings/branch', 300)
|
||||
.reply(({ request }) => {
|
||||
// Clone the deposits
|
||||
let basicSetting: any | null = cloneDeep(this._basicSetting);
|
||||
let branchSetting: any | null = cloneDeep(this._branchSetting);
|
||||
|
||||
// Return the response
|
||||
return [
|
||||
200,
|
||||
{
|
||||
basicSetting,
|
||||
branchSetting,
|
||||
},
|
||||
];
|
||||
});
|
||||
|
@ -51,7 +51,7 @@ export class BranchSettingMockApi {
|
|||
.reply(({ request }) => {
|
||||
// Get the id and deposit
|
||||
const id = request.body.id;
|
||||
const basicSetting = cloneDeep(request.body.basicSetting);
|
||||
const branchSetting = cloneDeep(request.body.branchSetting);
|
||||
|
||||
// Prepare the updated basicSetting
|
||||
let updatedBasicSetting = null;
|
||||
|
@ -68,7 +68,7 @@ export class BranchSettingMockApi {
|
|||
// });
|
||||
|
||||
// Return the response
|
||||
return [200, basicSetting];
|
||||
return [200, branchSetting];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,101 +2,41 @@
|
|||
|
||||
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 branchSetting = [
|
||||
{
|
||||
hignRank: 'kgon1',
|
||||
signinId: 'nova1',
|
||||
nickname: '대본사',
|
||||
bankName: '국민은행',
|
||||
accountNumber: '822-112-02-11',
|
||||
accountHolder: '케이곤',
|
||||
reditDate: '2022-05-12 11:33',
|
||||
},
|
||||
{
|
||||
hignRank: 'kgon2',
|
||||
signinId: 'nova2',
|
||||
nickname: 'bb11',
|
||||
bankName: '산업은행',
|
||||
accountNumber: '622-112-02-11',
|
||||
accountHolder: '노바',
|
||||
reditDate: '2022-05-12 11:33',
|
||||
},
|
||||
{
|
||||
hignRank: 'kgon3',
|
||||
signinId: 'nova3',
|
||||
nickname: '테스트44',
|
||||
bankName: '기업은행',
|
||||
accountNumber: '822-112-02-11',
|
||||
accountHolder: '케이곤',
|
||||
reditDate: '',
|
||||
},
|
||||
{
|
||||
hignRank: 'kgon4',
|
||||
signinId: 'nova4',
|
||||
nickname: '대본사',
|
||||
bankName: '국민은행',
|
||||
accountNumber: '822-112-02-11',
|
||||
accountHolder: '케이곤',
|
||||
reditDate: '2022-05-12 11:33',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -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 { evoSetting as evoSettingData } from './data';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class EvoSettingMockApi {
|
||||
private _basicSetting: any = basicSettingData;
|
||||
private _evoSetting: any = evoSettingData;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -32,13 +32,13 @@ export class EvoSettingMockApi {
|
|||
.onGet('api/apps/settings/evo', 300)
|
||||
.reply(({ request }) => {
|
||||
// Clone the deposits
|
||||
let basicSetting: any | null = cloneDeep(this._basicSetting);
|
||||
let evoSetting: any | null = cloneDeep(this._evoSetting);
|
||||
|
||||
// Return the response
|
||||
return [
|
||||
200,
|
||||
{
|
||||
basicSetting,
|
||||
evoSetting,
|
||||
},
|
||||
];
|
||||
});
|
||||
|
@ -50,8 +50,7 @@ export class EvoSettingMockApi {
|
|||
.onPatch('api/apps/settings/evo')
|
||||
.reply(({ request }) => {
|
||||
// Get the id and deposit
|
||||
const id = request.body.id;
|
||||
const basicSetting = cloneDeep(request.body.basicSetting);
|
||||
const evoSetting = cloneDeep(request.body.evoSetting);
|
||||
|
||||
// Prepare the updated basicSetting
|
||||
let updatedBasicSetting = null;
|
||||
|
@ -68,7 +67,7 @@ export class EvoSettingMockApi {
|
|||
// });
|
||||
|
||||
// Return the response
|
||||
return [200, basicSetting];
|
||||
return [200, evoSetting];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,102 +1,48 @@
|
|||
/* eslint-disable */
|
||||
|
||||
import { SiteStatusType } from 'app/modules/admin/settings/basic/types/site-status.type';
|
||||
|
||||
export const basicSetting = {
|
||||
infos: [
|
||||
export const evoSetting = {
|
||||
evo: [
|
||||
{
|
||||
name: '사이트 ON/OFF 설정',
|
||||
content: SiteStatusType.joinAvailable,
|
||||
level: 'LV1/EVO',
|
||||
amountScope: '1,000~5,000,000(기본유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
{
|
||||
name: '메모',
|
||||
content: '메모 테스트',
|
||||
level: 'LV2/EVO',
|
||||
amountScope: '1,000~3,000,000(소액유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
{
|
||||
level: 'LV3/EVO',
|
||||
amountScope: '1,000~20,000,000(고액유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
{
|
||||
level: 'LV4/EVO',
|
||||
amountScope: '1,000~5,000,000(기본유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
],
|
||||
earnSettings: [
|
||||
vota: [
|
||||
{
|
||||
level: 'LV1',
|
||||
firstRate: '15',
|
||||
firstIsUse: true,
|
||||
firstMaxEarnMoney: '10000',
|
||||
everyRate: '15',
|
||||
everyIsUse: true,
|
||||
everyMaxEarnMoney: '10000',
|
||||
amountScope: '1,000~5,000,000(기본유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
{
|
||||
level: 'LV2',
|
||||
firstRate: '15',
|
||||
firstIsUse: true,
|
||||
firstMaxEarnMoney: '10000',
|
||||
everyRate: '15',
|
||||
everyIsUse: true,
|
||||
everyMaxEarnMoney: '10000',
|
||||
amountScope: '1,000~3,000,000(소액유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
{
|
||||
level: 'LV3',
|
||||
firstRate: '15',
|
||||
firstIsUse: true,
|
||||
firstMaxEarnMoney: '10000',
|
||||
everyRate: '15',
|
||||
everyIsUse: true,
|
||||
everyMaxEarnMoney: '10000',
|
||||
amountScope: '1,000~20,000,000(고액유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
{
|
||||
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저장',
|
||||
amountScope: '1,000~5,000,000(기본유저)',
|
||||
description: '1,000~5,000,000',
|
||||
},
|
||||
],
|
||||
};
|
||||
// siteStatus?: SiteStatusType;
|
||||
// memo?: string;
|
||||
// earnSetting?: any;
|
||||
// gameSetting?: any;
|
||||
|
|
|
@ -41,6 +41,11 @@ import { GameCasinoMockApi } from './apps/game/casino/api';
|
|||
import { GameEvolutionMockApi } from './apps/game/evolution/api';
|
||||
import { GameSlotMockApi } from './apps/game/slot/api';
|
||||
import { BasicSettingMockApi } from './apps/settings/basic/api';
|
||||
import { BranchSettingMockApi } from './apps/settings/branch/api';
|
||||
import { EvoSettingMockApi } from './apps/settings/evo/api';
|
||||
import { GameSettingMockApi } from './apps/settings/game/api';
|
||||
import { LadderSettingMockApi } from './apps/settings/ladder/api';
|
||||
import { IndexingSettingMockApi } from './apps/settings/indexing/api';
|
||||
import { ReportDailyMockApi } from './apps/report/daily/api';
|
||||
import { ReportMonthlyMockApi } from './apps/report/monthly/api';
|
||||
import { ReportDailyPartnerMockApi } from './apps/report/daily-partner/api';
|
||||
|
@ -104,6 +109,11 @@ export const mockApiServices = [
|
|||
GameEvolutionMockApi,
|
||||
GameSlotMockApi,
|
||||
BasicSettingMockApi,
|
||||
BranchSettingMockApi,
|
||||
EvoSettingMockApi,
|
||||
GameSettingMockApi,
|
||||
LadderSettingMockApi,
|
||||
IndexingSettingMockApi,
|
||||
ReportDailyMockApi,
|
||||
ReportMonthlyMockApi,
|
||||
ReportDailyPartnerMockApi,
|
||||
|
|
|
@ -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 { branchRoutes } from './branch.routing';
|
|||
MatSortModule,
|
||||
MatSelectModule,
|
||||
MatTooltipModule,
|
||||
MatTableModule,
|
||||
],
|
||||
})
|
||||
export class BranchModule {}
|
||||
|
|
|
@ -8,8 +8,8 @@ export const branchRoutes: Route[] = [
|
|||
{
|
||||
path: '',
|
||||
component: ListComponent,
|
||||
// resolve: {
|
||||
// // branch: BranchResolver,
|
||||
// },
|
||||
resolve: {
|
||||
branch: BranchResolver,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1 +1,87 @@
|
|||
<p>branch account 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">
|
||||
<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>
|
||||
|
||||
<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="accountNumber">
|
||||
<th mat-header-cell *matHeaderCellDef>계좌번호</th>
|
||||
<td mat-cell *matCellDef="let info">
|
||||
{{ info.accountNumber }}
|
||||
</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="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>
|
||||
|
||||
<tr
|
||||
mat-header-row
|
||||
*matHeaderRowDef="branchSettingTableColumns"
|
||||
></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: branchSettingTableColumns"
|
||||
></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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 { BranchService } from '../services/branch.service';
|
||||
|
||||
@Component({
|
||||
selector: 'settings-branch-list',
|
||||
|
@ -62,13 +64,27 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
|
||||
private _unsubscribeAll: Subject<any> = new Subject<any>();
|
||||
|
||||
branchSetting$!: Observable<any | undefined>;
|
||||
|
||||
branchSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
|
||||
branchSettingTableColumns: string[] = [
|
||||
'highRank',
|
||||
'signinId',
|
||||
'nickname',
|
||||
'bankName',
|
||||
'accountNumber',
|
||||
'accountHolder',
|
||||
'reditDate',
|
||||
'etc',
|
||||
];
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(
|
||||
private _changeDetectorRef: ChangeDetectorRef,
|
||||
private _fuseConfirmationService: FuseConfirmationService,
|
||||
private _formBuilder: FormBuilder
|
||||
private _formBuilder: FormBuilder,
|
||||
private _branchService: BranchService
|
||||
) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
@ -78,7 +94,19 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
/**
|
||||
* On init
|
||||
*/
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
// Get the products
|
||||
this._branchService.branchSetting$
|
||||
.pipe(takeUntil(this._unsubscribeAll))
|
||||
.subscribe((branchSetting: any | undefined) => {
|
||||
this.branchSettingDataSource = branchSetting;
|
||||
// Mark for check
|
||||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
|
||||
// Get the products
|
||||
/* this.branchSetting$ = this._branchService.branchSetting$; */
|
||||
}
|
||||
|
||||
/**
|
||||
* After view init
|
||||
|
|
|
@ -1 +1,115 @@
|
|||
<p>evo 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">
|
||||
<table
|
||||
class="min-w-240 overflow-y-visible"
|
||||
mat-table
|
||||
[dataSource]="evoSettingDataSource"
|
||||
>
|
||||
<!-- Total -->
|
||||
<ng-container matColumnDef="level">
|
||||
<th mat-header-cell *matHeaderCellDef>레벨</th>
|
||||
<td mat-cell *matCellDef="let info">
|
||||
<span class="font-medium text-right">
|
||||
{{ info.level }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="amountScope">
|
||||
<th mat-header-cell *matHeaderCellDef>게임설정</th>
|
||||
<td mat-cell *matCellDef="let info">{{ info.amountScope }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef>내용</th>
|
||||
<td mat-cell *matCellDef="let info">{{ info.description }}</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="updateBtn">
|
||||
<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="evoSettingTableColumns"></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: evoSettingTableColumns"
|
||||
></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Budget details -->
|
||||
<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">
|
||||
<table
|
||||
class="min-w-240 overflow-y-visible"
|
||||
mat-table
|
||||
[dataSource]="votaSettingDataSource"
|
||||
>
|
||||
<!-- Total -->
|
||||
<ng-container matColumnDef="level">
|
||||
<th mat-header-cell *matHeaderCellDef>레벨</th>
|
||||
<td mat-cell *matCellDef="let info">
|
||||
<span class="font-medium text-right">
|
||||
{{ info.level }}
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="amountScope">
|
||||
<th mat-header-cell *matHeaderCellDef>게임설정</th>
|
||||
<td mat-cell *matCellDef="let info">{{ info.amountScope }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef>내용</th>
|
||||
<td mat-cell *matCellDef="let info">{{ info.description }}</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Expenses amount -->
|
||||
<ng-container matColumnDef="updateBtn">
|
||||
<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="votaSettingTableColumns"
|
||||
></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: votaSettingTableColumns"
|
||||
></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,8 @@ 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 {
|
||||
|
@ -28,6 +29,7 @@ import {
|
|||
} from 'rxjs';
|
||||
import { fuseAnimations } from '@fuse/animations';
|
||||
import { FuseConfirmationService } from '@fuse/services/confirmation';
|
||||
import { EvoService } from '../services/evo.service';
|
||||
|
||||
@Component({
|
||||
selector: 'settings-evo-list',
|
||||
|
@ -60,6 +62,23 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
@ViewChild(MatPaginator) private _paginator!: MatPaginator;
|
||||
@ViewChild(MatSort) private _sort!: MatSort;
|
||||
|
||||
evoSettingTableColumns: string[] = [
|
||||
'level',
|
||||
'amountScope',
|
||||
'description',
|
||||
'updateBtn',
|
||||
];
|
||||
|
||||
votaSettingTableColumns: string[] = [
|
||||
'level',
|
||||
'amountScope',
|
||||
'description',
|
||||
'updateBtn',
|
||||
];
|
||||
|
||||
evoSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
|
||||
votaSettingDataSource: MatTableDataSource<any> = new MatTableDataSource();
|
||||
|
||||
private _unsubscribeAll: Subject<any> = new Subject<any>();
|
||||
|
||||
/**
|
||||
|
@ -68,7 +87,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
constructor(
|
||||
private _changeDetectorRef: ChangeDetectorRef,
|
||||
private _fuseConfirmationService: FuseConfirmationService,
|
||||
private _formBuilder: FormBuilder
|
||||
private _formBuilder: FormBuilder,
|
||||
private _evoService: EvoService
|
||||
) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
@ -78,7 +98,17 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
/**
|
||||
* On init
|
||||
*/
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
// Get the products
|
||||
this._evoService.evoSetting$
|
||||
.pipe(takeUntil(this._unsubscribeAll))
|
||||
.subscribe((evoSetting: any | undefined) => {
|
||||
this.evoSettingDataSource = evoSetting.evo;
|
||||
this.votaSettingDataSource = evoSetting.vota;
|
||||
// Mark for check
|
||||
this._changeDetectorRef.markForCheck();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* After view init
|
||||
|
|
|
@ -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 { evoRoutes } from './evo.routing';
|
|||
MatSortModule,
|
||||
MatSelectModule,
|
||||
MatTooltipModule,
|
||||
MatTableModule,
|
||||
],
|
||||
})
|
||||
export class EvoModule {}
|
||||
|
|
|
@ -8,8 +8,8 @@ export const evoRoutes: Route[] = [
|
|||
{
|
||||
path: '',
|
||||
component: ListComponent,
|
||||
// resolve: {
|
||||
// evo: EvoResolver,
|
||||
// },
|
||||
resolve: {
|
||||
evo: EvoResolver,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -48,7 +48,7 @@ export class EvoService {
|
|||
evoSetting: any;
|
||||
}> {
|
||||
return this._httpClient
|
||||
.get<{ evoSetting: any }>('api/apps/settings/ladder')
|
||||
.get<{ evoSetting: any }>('api/apps/settings/evo')
|
||||
.pipe(
|
||||
tap((response) => {
|
||||
this.__evoSetting.next(response.evoSetting);
|
||||
|
|
Loading…
Reference in New Issue
Block a user