고정 보너스 모듈 생성
This commit is contained in:
parent
06a61b20b5
commit
55f84dccba
|
@ -1,12 +1,53 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
ViewEncapsulation,
|
||||
AfterViewInit,
|
||||
ViewChild,
|
||||
ElementRef
|
||||
} from '@angular/core';
|
||||
import {
|
||||
FormControl,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
FormGroup,
|
||||
FormBuilder,
|
||||
Validators,
|
||||
NgControl,
|
||||
NgForm,
|
||||
FormArray
|
||||
} from '@angular/forms';
|
||||
import { fuseAnimations } from 'src/@fuse/animations';
|
||||
import { Observable, of, fromEvent, Subject, BehaviorSubject } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-fix-bonus',
|
||||
templateUrl: './fix-bonus.component.html',
|
||||
styleUrls: ['./fix-bonus.component.scss']
|
||||
styleUrls: ['./fix-bonus.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
animations: fuseAnimations
|
||||
})
|
||||
export class FixBonusComponent implements OnInit {
|
||||
constructor() {}
|
||||
public inputChange$: Subject<string> = new Subject<string>();
|
||||
public ClickedRowIndex: number = -1;
|
||||
// public ClickedRow: cObject; currentRow: cObject;
|
||||
|
||||
ngOnInit() {}
|
||||
public mtformgroup: FormGroup;
|
||||
public mtformarray: FormArray;
|
||||
|
||||
public dataSource;
|
||||
|
||||
@ViewChild('filter', { static: true })
|
||||
filter: ElementRef;
|
||||
|
||||
// Private
|
||||
private _unsubscribeAll: Subject<any>;
|
||||
|
||||
constructor(private fb: FormBuilder) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.mtformarray = this.fb.array([]);
|
||||
this.mtformgroup = this.fb.group({ formarray: this.mtformarray });
|
||||
this.dataSource.formg = this.mtformgroup;
|
||||
}
|
||||
}
|
||||
|
|
11
src/modules/special/fix-bonus/model/fix-bonus.model.ts
Normal file
11
src/modules/special/fix-bonus/model/fix-bonus.model.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { DateAudit } from 'src/modules/common/data/model/audit';
|
||||
|
||||
export interface FixBonus extends DateAudit {
|
||||
id?: number;
|
||||
gameType?: string;
|
||||
gameDescription?: string;
|
||||
userDescription?: string;
|
||||
odds?: string;
|
||||
folder?: number;
|
||||
allow?: boolean;
|
||||
}
|
18
src/modules/special/fix-bonus/service/fix-bonus.service.ts
Normal file
18
src/modules/special/fix-bonus/service/fix-bonus.service.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { Injectable, Inject } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { map, takeUntil } from 'rxjs/operators';
|
||||
import { FixBonus } from '../model/fix-bonus.model';
|
||||
import { API_BASE_URL } from 'src/modules/common/type/injection-token.type';
|
||||
import { FormArray } from '@angular/forms';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FixBonusService {
|
||||
constructor(
|
||||
@Inject(API_BASE_URL) private apiBaseUrl: string,
|
||||
private httpClient: HttpClient
|
||||
) {}
|
||||
}
|
3
src/modules/special/fix-bonus/service/index.ts
Normal file
3
src/modules/special/fix-bonus/service/index.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import { FixBonusService } from './fix-bonus.service';
|
||||
|
||||
export const FIX_BONUS_SERVICES = [FixBonusService];
|
23
src/modules/special/special.module.ts
Normal file
23
src/modules/special/special.module.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FIX_BONUS_SERVICES } from './fix-bonus/service';
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
exports: []
|
||||
})
|
||||
export class SpecialRootModule {}
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [CommonModule],
|
||||
exports: []
|
||||
})
|
||||
export class SpecialModule {
|
||||
public static forRoot(): ModuleWithProviders<SpecialRootModule> {
|
||||
return {
|
||||
ngModule: SpecialRootModule,
|
||||
providers: [FIX_BONUS_SERVICES]
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user