diff --git a/src/app/mock-api/apps/settings/branch/api.ts b/src/app/mock-api/apps/settings/branch/api.ts index 61b35dc..1b23a21 100644 --- a/src/app/mock-api/apps/settings/branch/api.ts +++ b/src/app/mock-api/apps/settings/branch/api.ts @@ -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]; }); } } diff --git a/src/app/mock-api/apps/settings/branch/data.ts b/src/app/mock-api/apps/settings/branch/data.ts index ae3bccb..7b3b38f 100644 --- a/src/app/mock-api/apps/settings/branch/data.ts +++ b/src/app/mock-api/apps/settings/branch/data.ts @@ -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', + }, +]; diff --git a/src/app/mock-api/apps/settings/evo/api.ts b/src/app/mock-api/apps/settings/evo/api.ts index 8077862..47c934d 100644 --- a/src/app/mock-api/apps/settings/evo/api.ts +++ b/src/app/mock-api/apps/settings/evo/api.ts @@ -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]; }); } } diff --git a/src/app/mock-api/apps/settings/evo/data.ts b/src/app/mock-api/apps/settings/evo/data.ts index ae3bccb..c4c5aaf 100644 --- a/src/app/mock-api/apps/settings/evo/data.ts +++ b/src/app/mock-api/apps/settings/evo/data.ts @@ -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; diff --git a/src/app/mock-api/index.ts b/src/app/mock-api/index.ts index 43fd0c6..ddf2ca1 100644 --- a/src/app/mock-api/index.ts +++ b/src/app/mock-api/index.ts @@ -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, diff --git a/src/app/modules/admin/settings/branch/branch.module.ts b/src/app/modules/admin/settings/branch/branch.module.ts index 6c11d89..fd79a4a 100644 --- a/src/app/modules/admin/settings/branch/branch.module.ts +++ b/src/app/modules/admin/settings/branch/branch.module.ts @@ -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 {} diff --git a/src/app/modules/admin/settings/branch/branch.routing.ts b/src/app/modules/admin/settings/branch/branch.routing.ts index 3b47af2..57677d9 100644 --- a/src/app/modules/admin/settings/branch/branch.routing.ts +++ b/src/app/modules/admin/settings/branch/branch.routing.ts @@ -8,8 +8,8 @@ export const branchRoutes: Route[] = [ { path: '', component: ListComponent, - // resolve: { - // // branch: BranchResolver, - // }, + resolve: { + branch: BranchResolver, + }, }, ]; diff --git a/src/app/modules/admin/settings/branch/components/list.component.html b/src/app/modules/admin/settings/branch/components/list.component.html index 82b2b01..5b7c2b4 100644 --- a/src/app/modules/admin/settings/branch/components/list.component.html +++ b/src/app/modules/admin/settings/branch/components/list.component.html @@ -1 +1,87 @@ -

branch account setting page

+
+
+
+
+ +
+
+ 대본별 계좌 설정 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
상부 + + {{ info.hignRank }} + + 대본사아이디{{ info.signinId }}대본사닉네임{{ info.nickname }}은행명{{ info.bankName }}계좌번호 + {{ info.accountNumber }} + 예금주{{ info.content }}등록/수정일{{ info.reditDate }}비고 + +
+
+
+
+
+
+
diff --git a/src/app/modules/admin/settings/branch/components/list.component.ts b/src/app/modules/admin/settings/branch/components/list.component.ts index fa3f145..1b5f680 100644 --- a/src/app/modules/admin/settings/branch/components/list.component.ts +++ b/src/app/modules/admin/settings/branch/components/list.component.ts @@ -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 = new Subject(); + branchSetting$!: Observable; + + branchSettingDataSource: MatTableDataSource = 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 diff --git a/src/app/modules/admin/settings/evo/components/list.component.html b/src/app/modules/admin/settings/evo/components/list.component.html index 25dc387..fe9fad2 100644 --- a/src/app/modules/admin/settings/evo/components/list.component.html +++ b/src/app/modules/admin/settings/evo/components/list.component.html @@ -1 +1,115 @@ -

evo game setting page

+
+
+
+
+ +
+
+ 에볼루션 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
레벨 + + {{ info.level }} + + 게임설정{{ info.amountScope }}내용{{ info.description }}비고 + +
+
+
+ +
+
+ 보타카지노 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
레벨 + + {{ info.level }} + + 게임설정{{ info.amountScope }}내용{{ info.description }}비고 + +
+
+
+
+
+
+
diff --git a/src/app/modules/admin/settings/evo/components/list.component.ts b/src/app/modules/admin/settings/evo/components/list.component.ts index c5a4efa..a62b5a7 100644 --- a/src/app/modules/admin/settings/evo/components/list.component.ts +++ b/src/app/modules/admin/settings/evo/components/list.component.ts @@ -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 = new MatTableDataSource(); + votaSettingDataSource: MatTableDataSource = new MatTableDataSource(); + private _unsubscribeAll: Subject = new Subject(); /** @@ -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 diff --git a/src/app/modules/admin/settings/evo/evo.module.ts b/src/app/modules/admin/settings/evo/evo.module.ts index 05c77fc..199f50b 100644 --- a/src/app/modules/admin/settings/evo/evo.module.ts +++ b/src/app/modules/admin/settings/evo/evo.module.ts @@ -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 {} diff --git a/src/app/modules/admin/settings/evo/evo.routing.ts b/src/app/modules/admin/settings/evo/evo.routing.ts index 8b49c0a..0c74423 100644 --- a/src/app/modules/admin/settings/evo/evo.routing.ts +++ b/src/app/modules/admin/settings/evo/evo.routing.ts @@ -8,8 +8,8 @@ export const evoRoutes: Route[] = [ { path: '', component: ListComponent, - // resolve: { - // evo: EvoResolver, - // }, + resolve: { + evo: EvoResolver, + }, }, ]; diff --git a/src/app/modules/admin/settings/evo/services/evo.service.ts b/src/app/modules/admin/settings/evo/services/evo.service.ts index 6e9bb83..1b73649 100644 --- a/src/app/modules/admin/settings/evo/services/evo.service.ts +++ b/src/app/modules/admin/settings/evo/services/evo.service.ts @@ -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);