spectial model
This commit is contained in:
parent
4abdaec91a
commit
97776df744
|
@ -295,7 +295,7 @@ export const navigation: FuseNavigation[] = [
|
|||
translate: 'NAV.SITE.ACCOUNT_SEPARATE.TITLE',
|
||||
type: 'item',
|
||||
icon: 'email',
|
||||
url: '/pages/sites/management/bank-info'
|
||||
url: '/pages/sites/management/bank-accounts'
|
||||
},
|
||||
{
|
||||
id: 'set_bet_amount',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div id="bank-info" class="page-layout simple fullwidth" fxLayout="column">
|
||||
<div id="bank-accounts" class="page-layout simple fullwidth" fxLayout="column">
|
||||
<!-- <div id="orders" class="page-layout carded fullwidth inner-scroll"> -->
|
||||
<!-- HEADER -->
|
||||
<div
|
|
@ -1,7 +1,7 @@
|
|||
@import 'src/@fuse/scss/fuse';
|
||||
|
||||
app-page-sites-bank-info-list {
|
||||
#bank-info {
|
||||
app-page-sites-bank-accounts-list {
|
||||
#bank-accounts {
|
||||
.top-bg {
|
||||
@include media-breakpoint('xs') {
|
||||
height: 224px;
|
|
@ -10,8 +10,8 @@ import {
|
|||
|
||||
import { Subject } from 'rxjs';
|
||||
import { fuseAnimations } from 'src/@fuse/animations';
|
||||
import { BankInfoListDataSource } from './bank-info-list.data-source';
|
||||
import { BankInfoService } from 'src/modules/sites/service/bank-info.service';
|
||||
import { BankAccountsListDataSource } from './bank-accounts-list.data-source';
|
||||
import { BankAccountsService } from 'src/modules/sites/service/bank-accounts.service';
|
||||
import {
|
||||
FormGroup,
|
||||
FormBuilder,
|
||||
|
@ -21,15 +21,16 @@ import {
|
|||
} from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-sites-bank-info-list',
|
||||
templateUrl: './bank-info-list.component.html',
|
||||
styleUrls: ['./bank-info-list.component.scss'],
|
||||
selector: 'app-bank-accounts-list',
|
||||
templateUrl: './bank-accounts-list.component.html',
|
||||
styleUrls: ['./bank-accounts-list.component.scss'],
|
||||
animations: fuseAnimations,
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class BankInfoListComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
dataSource: BankInfoListDataSource = new BankInfoListDataSource(
|
||||
this.bankInfoService
|
||||
export class BankAccountsListComponent
|
||||
implements OnInit, OnDestroy, AfterViewInit {
|
||||
dataSource: BankAccountsListDataSource = new BankAccountsListDataSource(
|
||||
this.bankAccountsService
|
||||
);
|
||||
|
||||
displayedColumns = ['id', 'name', 'number', 'holder', 'description'];
|
||||
|
@ -43,7 +44,7 @@ export class BankInfoListComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
private _unsubscribeAll: Subject<any>;
|
||||
|
||||
constructor(
|
||||
private bankInfoService: BankInfoService,
|
||||
private bankAccountsService: BankAccountsService,
|
||||
private fb: FormBuilder
|
||||
) {
|
||||
this._unsubscribeAll = new Subject();
|
|
@ -5,27 +5,27 @@ import { map } from 'rxjs/operators';
|
|||
|
||||
import { CollectionViewer } from '@angular/cdk/collections';
|
||||
|
||||
import { BankInfo } from 'src/modules/sites/model/bank-info.model';
|
||||
import { BankInfoService } from 'src/modules/sites/service/bank-info.service';
|
||||
import { BankAccounts } from 'src/modules/sites/model/bank-accounts.model';
|
||||
import { BankAccountsService } from 'src/modules/sites/service/bank-accounts.service';
|
||||
|
||||
import { FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
|
||||
|
||||
export class BankInfoListDataSource extends DataSource<BankInfo> {
|
||||
private _objectStore: BankInfo[] = [];
|
||||
private _ObjectsSubject$ = new BehaviorSubject<BankInfo[]>([]);
|
||||
export class BankAccountsListDataSource extends DataSource<BankAccounts> {
|
||||
private _objectStore: BankAccounts[] = [];
|
||||
private _ObjectsSubject$ = new BehaviorSubject<BankAccounts[]>([]);
|
||||
private _loadingSubject$ = new BehaviorSubject<boolean>(false);
|
||||
|
||||
public loading$ = this._loadingSubject$.asObservable();
|
||||
public formg: FormGroup;
|
||||
|
||||
constructor(private bankInfoService: BankInfoService) {
|
||||
constructor(private bankAccountsService: BankAccountsService) {
|
||||
super();
|
||||
}
|
||||
|
||||
connect(collectionViewer: CollectionViewer): Observable<BankInfo[]> {
|
||||
return this.bankInfoService.getAllAsFormArray().pipe(
|
||||
connect(collectionViewer: CollectionViewer): Observable<BankAccounts[]> {
|
||||
return this.bankAccountsService.getAllAsFormArray().pipe(
|
||||
map(res => {
|
||||
res.forEach(m => this._objectStore.push(m as BankInfo));
|
||||
res.forEach(m => this._objectStore.push(m as BankAccounts));
|
||||
this._ObjectsSubject$.next(this._objectStore);
|
||||
let fa = <FormArray>this.formg.get('formarray');
|
||||
res.forEach(r => fa.push(this.createRowFormGroup(r)));
|
||||
|
@ -34,7 +34,7 @@ export class BankInfoListDataSource extends DataSource<BankInfo> {
|
|||
);
|
||||
}
|
||||
|
||||
createRowFormGroup(r: BankInfo): FormGroup {
|
||||
createRowFormGroup(r: BankAccounts): FormGroup {
|
||||
let f = new FormGroup({
|
||||
id: this.createNewFormContorl(r, 'id'),
|
||||
name: this.createNewFormContorl(r, 'name'),
|
||||
|
@ -45,7 +45,7 @@ export class BankInfoListDataSource extends DataSource<BankInfo> {
|
|||
return f;
|
||||
}
|
||||
|
||||
createNewFormContorl(r: BankInfo, propName: string): FormControl {
|
||||
createNewFormContorl(r: BankAccounts, propName: string): FormControl {
|
||||
let m = new FormControl(r[propName], Validators.required);
|
||||
m.valueChanges.subscribe(val => {
|
||||
r[propName] = val;
|
|
@ -1,5 +1,5 @@
|
|||
import { DefaultConfigComponent } from './default-config.component';
|
||||
import { BankInfoListComponent } from './bank-info-list.component';
|
||||
import { BankAccountsListComponent } from './bank-accounts-list.component';
|
||||
import { BetAmountComponent } from './bet-amount.component';
|
||||
import { BlockIpComponent } from './block-ip.component';
|
||||
import { AdminIpComponent } from './admin-ip.component';
|
||||
|
@ -7,7 +7,7 @@ import { LevelComponent } from './level.component';
|
|||
|
||||
export const COMPONENTS = [
|
||||
DefaultConfigComponent,
|
||||
BankInfoListComponent,
|
||||
BankAccountsListComponent,
|
||||
BetAmountComponent,
|
||||
BlockIpComponent,
|
||||
AdminIpComponent,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
|
|||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { DefaultConfigComponent } from './component/default-config.component';
|
||||
import { BankInfoListComponent } from './component/bank-info-list.component';
|
||||
import { BankAccountsListComponent } from './component/bank-accounts-list.component';
|
||||
import { BetAmountComponent } from './component/bet-amount.component';
|
||||
import { BlockIpComponent } from './component/block-ip.component';
|
||||
import { AdminIpComponent } from './component/admin-ip.component';
|
||||
|
@ -14,8 +14,8 @@ const routes: Routes = [
|
|||
component: DefaultConfigComponent
|
||||
},
|
||||
{
|
||||
path: 'bank-info',
|
||||
component: BankInfoListComponent
|
||||
path: 'bank-accounts',
|
||||
component: BankAccountsListComponent
|
||||
},
|
||||
{
|
||||
path: 'bet-amount',
|
||||
|
|
|
@ -11,7 +11,7 @@ import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
|
|||
import { fuseAnimations } from 'src/@fuse/animations';
|
||||
import { Subject } from 'rxjs';
|
||||
import { FixBonusDataSource } from './fix-bonus.data-source';
|
||||
import { FixBonusService } from 'src/modules/special/fix-bonus/service/fix-bonus.service';
|
||||
import { FixBonusService } from 'src/modules/special/service/fix-bonus.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-fix-bonus',
|
||||
|
|
|
@ -5,8 +5,8 @@ import { map } from 'rxjs/operators';
|
|||
|
||||
import { CollectionViewer } from '@angular/cdk/collections';
|
||||
|
||||
import { FixBonus } from 'src/modules/special/fix-bonus/model/fix-bonus.model';
|
||||
import { FixBonusService } from 'src/modules/special/fix-bonus/service/fix-bonus.service';
|
||||
import { FixBonus } from 'src/modules/special/model/fix-bonus.model';
|
||||
import { FixBonusService } from 'src/modules/special/service/fix-bonus.service';
|
||||
|
||||
import { FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { FormGroup, FormBuilder, FormArray } from '@angular/forms';
|
|||
import { fuseAnimations } from 'src/@fuse/animations';
|
||||
import { Subject } from 'rxjs';
|
||||
import { RouletteCouponDataSource } from './roulette-coupon.data-source';
|
||||
import { RouletteCouponService } from 'src/modules/special/roulette-coupon/service/roulette-coupon.service';
|
||||
import { RouletteCouponService } from 'src/modules/special/service/roulette-coupon.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-roulette-coupon',
|
||||
|
|
|
@ -5,8 +5,8 @@ import { map } from 'rxjs/operators';
|
|||
|
||||
import { CollectionViewer } from '@angular/cdk/collections';
|
||||
|
||||
import { RouletteCoupon } from 'src/modules/special/roulette-coupon/model/roulette-coupon.model';
|
||||
import { RouletteCouponService } from 'src/modules/special/roulette-coupon/service/roulette-coupon.service';
|
||||
import { RouletteCoupon } from 'src/modules/special/model/roulette-coupon.model';
|
||||
import { RouletteCouponService } from 'src/modules/special/service/roulette-coupon.service';
|
||||
|
||||
import { FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { DateAudit } from 'src/modules/common/data/model/audit';
|
||||
|
||||
export interface BankInfo extends DateAudit {
|
||||
export interface BankAccounts extends DateAudit {
|
||||
id?: number;
|
||||
name?: string;
|
||||
number?: string;
|
|
@ -3,7 +3,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|||
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, takeUntil } from 'rxjs/operators';
|
||||
import { BankInfo } from '../model/bank-info.model';
|
||||
import { BankAccounts } from '../model/bank-accounts.model';
|
||||
import { API_BASE_URL } from 'src/modules/common/type/injection-token.type';
|
||||
import { Page } from 'src/modules/common/data/model/page';
|
||||
import { FormArray } from '@angular/forms';
|
||||
|
@ -11,21 +11,21 @@ import { FormArray } from '@angular/forms';
|
|||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class BankInfoService {
|
||||
export class BankAccountsService {
|
||||
constructor(
|
||||
@Inject(API_BASE_URL) private apiBaseUrl: string,
|
||||
private httpClient: HttpClient
|
||||
) {}
|
||||
|
||||
public getBankInfos(): Observable<Page<BankInfo>> {
|
||||
return this.httpClient.get<Page<BankInfo>>(
|
||||
public getBankInfos(): Observable<Page<BankAccounts>> {
|
||||
return this.httpClient.get<Page<BankAccounts>>(
|
||||
`${this.apiBaseUrl}/bank_info`,
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
public getAllAsFormArray(): Observable<BankInfo[]> {
|
||||
return this.httpClient.get<BankInfo[]>(
|
||||
public getAllAsFormArray(): Observable<BankAccounts[]> {
|
||||
return this.httpClient.get<BankAccounts[]>(
|
||||
`${this.apiBaseUrl}/bank_info/test`,
|
||||
{}
|
||||
);
|
|
@ -1,3 +1,3 @@
|
|||
import { BankInfoService } from './bank-info.service';
|
||||
import { BankAccountsService } from './bank-accounts.service';
|
||||
|
||||
export const SERVICES = [BankInfoService];
|
||||
export const SERVICES = [BankAccountsService];
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
import { FixBonusService } from './fix-bonus.service';
|
||||
|
||||
export const FIX_BONUS_SERVICES = [FixBonusService];
|
10
src/modules/special/model/alert-config.model.ts
Normal file
10
src/modules/special/model/alert-config.model.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
|
||||
import { AlertConfigName } from '../type/alert-config-type';
|
||||
|
||||
export interface AlertConfig extends UserDateAuditEntity {
|
||||
id?: number;
|
||||
name?: string;
|
||||
filePath?: string;
|
||||
fileName?: string;
|
||||
alertType?: AlertConfigName;
|
||||
}
|
7
src/modules/special/model/check-notice.model.ts
Normal file
7
src/modules/special/model/check-notice.model.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
|
||||
|
||||
export interface CheckNotice extends UserDateAuditEntity {
|
||||
id?: number;
|
||||
enable?: boolean;
|
||||
contents?: string;
|
||||
}
|
8
src/modules/special/model/martin-config.model.ts
Normal file
8
src/modules/special/model/martin-config.model.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { UserDateAuditEntity } from 'src/modules/common/data/model/audit';
|
||||
|
||||
export interface MartinConfig extends UserDateAuditEntity {
|
||||
id?: number;
|
||||
name?: string;
|
||||
refEnable?: boolean;
|
||||
bettingOdds?: number;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
import { RouletteCouponService } from './roulette-coupon.service';
|
||||
|
||||
export const ROULETTE_COUPON_SERVICES = [RouletteCouponService];
|
4
src/modules/special/service/index.ts
Normal file
4
src/modules/special/service/index.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
import { RouletteCouponService } from './roulette-coupon.service';
|
||||
import { FixBonusService } from './fix-bonus.service';
|
||||
|
||||
export const SERVICES = [RouletteCouponService, FixBonusService];
|
|
@ -1,7 +1,6 @@
|
|||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FIX_BONUS_SERVICES } from './fix-bonus/service';
|
||||
import { ROULETTE_COUPON_SERVICES } from './roulette-coupon/service';
|
||||
import { SERVICES } from './service';
|
||||
@NgModule({
|
||||
imports: [],
|
||||
exports: []
|
||||
|
@ -17,7 +16,7 @@ export class SpecialModule {
|
|||
public static forRoot(): ModuleWithProviders<SpecialRootModule> {
|
||||
return {
|
||||
ngModule: SpecialRootModule,
|
||||
providers: [FIX_BONUS_SERVICES, ROULETTE_COUPON_SERVICES]
|
||||
providers: [SERVICES]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
12
src/modules/special/type/alert-config-type.ts
Normal file
12
src/modules/special/type/alert-config-type.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
export enum AlertConfigName {
|
||||
DEPOSIT = 'DEPOSIT',
|
||||
WITHDRAW = 'WITHDRAW',
|
||||
QNA_USER = 'QNA_USER',
|
||||
NEW_USER = 'NEW_USER',
|
||||
NEW_BOARD = 'NEW_BOARD',
|
||||
WARNING_BETTING_LIMIT = 'WARNING_BETTING_LIMIT',
|
||||
BETTING = 'BETTING',
|
||||
WATCH_USER = 'WATCH_USER',
|
||||
SEND_MESSAGE = 'SEND_MESSAGE',
|
||||
ANSWER_MESSAGE = 'ANSWER_MESSAGE'
|
||||
}
|
0
src/modules/user/model/commission.model.ts
Normal file
0
src/modules/user/model/commission.model.ts
Normal file
0
src/modules/user/model/connect-history.model.ts
Normal file
0
src/modules/user/model/connect-history.model.ts
Normal file
Loading…
Reference in New Issue
Block a user