고정 보너스 모듈 생성

This commit is contained in:
byung eun park 2019-09-19 18:49:23 +09:00
parent 06a61b20b5
commit 55f84dccba
5 changed files with 100 additions and 4 deletions

View File

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

View 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;
}

View 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
) {}
}

View File

@ -0,0 +1,3 @@
import { FixBonusService } from './fix-bonus.service';
export const FIX_BONUS_SERVICES = [FixBonusService];

View 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]
};
}
}