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:
이담 정 2022-07-14 07:45:18 +00:00
commit 5f7f1989ee
14 changed files with 363 additions and 206 deletions

View File

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

View File

@ -2,101 +2,41 @@
import { SiteStatusType } from 'app/modules/admin/settings/basic/types/site-status.type'; import { SiteStatusType } from 'app/modules/admin/settings/basic/types/site-status.type';
export const basicSetting = { export const branchSetting = [
infos: [ {
{ hignRank: 'kgon1',
name: '사이트 ON/OFF 설정', signinId: 'nova1',
content: SiteStatusType.joinAvailable, nickname: '대본사',
}, bankName: '국민은행',
{ accountNumber: '822-112-02-11',
name: '메모', accountHolder: '케이곤',
content: '메모 테스트', reditDate: '2022-05-12 11:33',
}, },
], {
earnSettings: [ hignRank: 'kgon2',
{ signinId: 'nova2',
level: 'LV1', nickname: 'bb11',
firstRate: '15', bankName: '산업은행',
firstIsUse: true, accountNumber: '622-112-02-11',
firstMaxEarnMoney: '10000', accountHolder: '노바',
everyRate: '15', reditDate: '2022-05-12 11:33',
everyIsUse: true, },
everyMaxEarnMoney: '10000', {
}, hignRank: 'kgon3',
{ signinId: 'nova3',
level: 'LV2', nickname: '테스트44',
firstRate: '15', bankName: '기업은행',
firstIsUse: true, accountNumber: '822-112-02-11',
firstMaxEarnMoney: '10000', accountHolder: '케이곤',
everyRate: '15', reditDate: '',
everyIsUse: true, },
everyMaxEarnMoney: '10000', {
}, hignRank: 'kgon4',
{ signinId: 'nova4',
level: 'LV3', nickname: '대본사',
firstRate: '15', bankName: '국민은행',
firstIsUse: true, accountNumber: '822-112-02-11',
firstMaxEarnMoney: '10000', accountHolder: '케이곤',
everyRate: '15', reditDate: '2022-05-12 11:33',
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;

View File

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

View File

@ -1,102 +1,48 @@
/* eslint-disable */ /* eslint-disable */
import { SiteStatusType } from 'app/modules/admin/settings/basic/types/site-status.type'; export const evoSetting = {
evo: [
export const basicSetting = {
infos: [
{ {
name: '사이트 ON/OFF 설정', level: 'LV1/EVO',
content: SiteStatusType.joinAvailable, amountScope: '1,000~5,000,000(기본유저)',
description: '1,000~5,000,000',
}, },
{ {
name: '메모', level: 'LV2/EVO',
content: '메모 테스트', 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', level: 'LV1',
firstRate: '15', amountScope: '1,000~5,000,000(기본유저)',
firstIsUse: true, description: '1,000~5,000,000',
firstMaxEarnMoney: '10000',
everyRate: '15',
everyIsUse: true,
everyMaxEarnMoney: '10000',
}, },
{ {
level: 'LV2', level: 'LV2',
firstRate: '15', amountScope: '1,000~3,000,000(소액유저)',
firstIsUse: true, description: '1,000~5,000,000',
firstMaxEarnMoney: '10000',
everyRate: '15',
everyIsUse: true,
everyMaxEarnMoney: '10000',
}, },
{ {
level: 'LV3', level: 'LV3',
firstRate: '15', amountScope: '1,000~20,000,000(고액유저)',
firstIsUse: true, description: '1,000~5,000,000',
firstMaxEarnMoney: '10000',
everyRate: '15',
everyIsUse: true,
everyMaxEarnMoney: '10000',
}, },
{ {
level: 'LV4', level: 'LV4',
firstRate: '15', amountScope: '1,000~5,000,000(기본유저)',
firstIsUse: true, description: '1,000~5,000,000',
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;

View File

@ -41,6 +41,11 @@ import { GameCasinoMockApi } from './apps/game/casino/api';
import { GameEvolutionMockApi } from './apps/game/evolution/api'; import { GameEvolutionMockApi } from './apps/game/evolution/api';
import { GameSlotMockApi } from './apps/game/slot/api'; import { GameSlotMockApi } from './apps/game/slot/api';
import { BasicSettingMockApi } from './apps/settings/basic/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 { ReportDailyMockApi } from './apps/report/daily/api';
import { ReportMonthlyMockApi } from './apps/report/monthly/api'; import { ReportMonthlyMockApi } from './apps/report/monthly/api';
import { ReportDailyPartnerMockApi } from './apps/report/daily-partner/api'; import { ReportDailyPartnerMockApi } from './apps/report/daily-partner/api';
@ -104,6 +109,11 @@ export const mockApiServices = [
GameEvolutionMockApi, GameEvolutionMockApi,
GameSlotMockApi, GameSlotMockApi,
BasicSettingMockApi, BasicSettingMockApi,
BranchSettingMockApi,
EvoSettingMockApi,
GameSettingMockApi,
LadderSettingMockApi,
IndexingSettingMockApi,
ReportDailyMockApi, ReportDailyMockApi,
ReportMonthlyMockApi, ReportMonthlyMockApi,
ReportDailyPartnerMockApi, ReportDailyPartnerMockApi,

View File

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

View File

@ -8,8 +8,8 @@ export const branchRoutes: Route[] = [
{ {
path: '', path: '',
component: ListComponent, component: ListComponent,
// resolve: { resolve: {
// // branch: BranchResolver, branch: BranchResolver,
// }, },
}, },
]; ];

View File

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

View File

@ -28,6 +28,8 @@ import {
} from 'rxjs'; } from 'rxjs';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation'; import { FuseConfirmationService } from '@fuse/services/confirmation';
import { MatTableDataSource } from '@angular/material/table';
import { BranchService } from '../services/branch.service';
@Component({ @Component({
selector: 'settings-branch-list', selector: 'settings-branch-list',
@ -62,13 +64,27 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _unsubscribeAll: Subject<any> = new Subject<any>(); 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
*/ */
constructor( constructor(
private _changeDetectorRef: ChangeDetectorRef, private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService, 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 * 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 * After view init

View File

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

View File

@ -14,7 +14,8 @@ import {
FormGroup, FormGroup,
Validators, Validators,
} from '@angular/forms'; } from '@angular/forms';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatTableDataSource } from '@angular/material/table';
import { MatPaginator } from '@angular/material/paginator'; import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort'; import { MatSort } from '@angular/material/sort';
import { import {
@ -28,6 +29,7 @@ import {
} from 'rxjs'; } from 'rxjs';
import { fuseAnimations } from '@fuse/animations'; import { fuseAnimations } from '@fuse/animations';
import { FuseConfirmationService } from '@fuse/services/confirmation'; import { FuseConfirmationService } from '@fuse/services/confirmation';
import { EvoService } from '../services/evo.service';
@Component({ @Component({
selector: 'settings-evo-list', selector: 'settings-evo-list',
@ -60,6 +62,23 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatPaginator) private _paginator!: MatPaginator;
@ViewChild(MatSort) private _sort!: MatSort; @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>(); private _unsubscribeAll: Subject<any> = new Subject<any>();
/** /**
@ -68,7 +87,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
constructor( constructor(
private _changeDetectorRef: ChangeDetectorRef, private _changeDetectorRef: ChangeDetectorRef,
private _fuseConfirmationService: FuseConfirmationService, 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 * 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 * After view init

View File

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

View File

@ -8,8 +8,8 @@ export const evoRoutes: Route[] = [
{ {
path: '', path: '',
component: ListComponent, component: ListComponent,
// resolve: { resolve: {
// evo: EvoResolver, evo: EvoResolver,
// }, },
}, },
]; ];

View File

@ -48,7 +48,7 @@ export class EvoService {
evoSetting: any; evoSetting: any;
}> { }> {
return this._httpClient return this._httpClient
.get<{ evoSetting: any }>('api/apps/settings/ladder') .get<{ evoSetting: any }>('api/apps/settings/evo')
.pipe( .pipe(
tap((response) => { tap((response) => {
this.__evoSetting.next(response.evoSetting); this.__evoSetting.next(response.evoSetting);