룰렛쿠폰 컬럼 수정

This commit is contained in:
byung eun park 2019-09-20 22:25:15 +09:00
parent afefbcf699
commit 03e923fed5
5 changed files with 76 additions and 200 deletions

View File

@ -1,4 +1,8 @@
<div id="fix-bonus" class="page-layout simple fullwidth" fxLayout="column"> <div
id="roulette-coupon"
class="page-layout simple fullwidth"
fxLayout="column"
>
<!-- <div id="orders" class="page-layout carded fullwidth inner-scroll"> --> <!-- <div id="orders" class="page-layout carded fullwidth inner-scroll"> -->
<!-- HEADER --> <!-- HEADER -->
<div <div
@ -20,7 +24,7 @@
<!-- CONTENT --> <!-- CONTENT -->
<div class="content p-24"> <div class="content p-24">
<div class="h1"> <div class="h1">
고정보너스 룰렛 금액관리
</div> </div>
<div <div
@ -35,13 +39,13 @@
fxLayout="column" fxLayout="column"
> >
<form <form
name="fixBonusForm" name="rouletteCouponForm"
[formGroup]="mtformgroup" [formGroup]="mtformgroup"
(ngSubmit)="fixBonusUpdate()" (ngSubmit)="rouletteCouponUpdate()"
novalidate novalidate
> >
<mat-table <mat-table
class="fix-bonus-table" class="roulette-coupon-table"
#table #table
[dataSource]="dataSource" [dataSource]="dataSource"
[@animateStagger]="{ value: '50' }" [@animateStagger]="{ value: '50' }"
@ -49,93 +53,64 @@
formArrayName="formarray" formArrayName="formarray"
> >
<!-- Game Type Column [formGroupName] --> <!-- Game Type Column [formGroupName] -->
<ng-container matColumnDef="gameType"> <ng-container matColumnDef="id">
<mat-header-cell *matHeaderCellDef>타입</mat-header-cell> <mat-header-cell *matHeaderCellDef>순위</mat-header-cell>
<mat-cell <mat-cell
*matCellDef="let fixBonus; let i = index" *matCellDef="let rouletteCoupon; let i = index"
[formGroupName]="i" [formGroupName]="i"
>{{ fixBonus.gameType }}</mat-cell >{{ rouletteCoupon.id }}</mat-cell
> >
</ng-container> </ng-container>
<!-- Game Description Column --> <!-- Game Description Column -->
<ng-container matColumnDef="gameDescription"> <ng-container matColumnDef="price">
<mat-header-cell *matHeaderCellDef>설명</mat-header-cell> <mat-header-cell *matHeaderCellDef>금액</mat-header-cell>
<mat-cell <mat-cell
*matCellDef="let fixBonus; let i = index" *matCellDef="let rouletteCoupon; let i = index"
[formGroupName]="i" [formGroupName]="i"
> >
{{ fixBonus.gameDescription }} <mat-form-field appearance="outline">
<input
name="inputUserPrice={{ rouletteCoupon.price }}"
matInput
type="text"
formControlName="price"
/>
</mat-form-field>
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<!-- User Description Column --> <!-- User Description Column -->
<ng-container matColumnDef="userDescription"> <ng-container matColumnDef="rate">
<mat-header-cell *matHeaderCellDef>설명</mat-header-cell> <mat-header-cell *matHeaderCellDef>확률</mat-header-cell>
<mat-cell <mat-cell
*matCellDef="let fixBonus; let i = index" *matCellDef="let rouletteCoupon; let i = index"
[formGroupName]="i" [formGroupName]="i"
> >
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<input <input
name="inputUserDescription={{ fixBonus.userDescription }}" name="inputRate={{ rouletteCoupon.rate }}"
matInput matInput
type="text" type="text"
formControlName="userDescription" formControlName="rate"
/> /> </mat-form-field
</mat-form-field> >%
</mat-cell> </mat-cell>
</ng-container> </ng-container>
<!-- Odds Column --> <!-- Odds Column -->
<ng-container matColumnDef="odds"> <ng-container matColumnDef="priceWon">
<mat-header-cell *matHeaderCellDef>배당설정</mat-header-cell> <mat-header-cell *matHeaderCellDef>배당설정</mat-header-cell>
<mat-cell <mat-cell
*matCellDef="let fixBonus; let i = index" *matCellDef="let rouletteCoupon; let i = index"
[formGroupName]="i" [formGroupName]="i"
> >
<mat-form-field appearance="outline"> <mat-form-field appearance="outline">
<input <input
name="inputHolder={{ fixBonus.odds }}" name="inputHolder={{ rouletteCoupon.priceWon }}"
matInput matInput
type="text" type="text"
formControlName="odds" formControlName="priceWon"
/>
</mat-form-field>
</mat-cell>
</ng-container>
<!-- Folder Column -->
<ng-container matColumnDef="folder">
<mat-header-cell *matHeaderCellDef>폴더설정</mat-header-cell>
<mat-cell
*matCellDef="let fixBonus; let i = index"
[formGroupName]="i"
>
<mat-form-field appearance="outline">
<input
name="inputFolder={{ fixBonus.folder }}"
matInput
type="text"
formControlName="folder"
/>
</mat-form-field>
</mat-cell>
</ng-container>
<!-- Allow Column -->
<ng-container matColumnDef="allow">
<mat-header-cell *matHeaderCellDef>허용불가</mat-header-cell>
<mat-cell
*matCellDef="let fixBonus; let i = index"
[formGroupName]="i"
>
<mat-form-field appearance="outline">
<input
name="inputFolder={{ fixBonus.allow }}"
matInput
type="text"
formControlName="allow"
/> />
</mat-form-field> </mat-form-field>
</mat-cell> </mat-cell>
@ -146,7 +121,7 @@
></mat-header-row> ></mat-header-row>
<mat-row <mat-row
*matRowDef="let row; columns: displayedColumns" *matRowDef="let row; columns: displayedColumns"
class="fix-bonus" class="roulette-coupon"
matRipple matRipple
></mat-row> ></mat-row>
</mat-table> </mat-table>

View File

@ -1,7 +1,7 @@
@import 'src/@fuse/scss/fuse'; @import 'src/@fuse/scss/fuse';
app-fix-bonus { app-roulette-coupon {
#fix-bonus { #roulette-coupon {
.top-bg { .top-bg {
@include media-breakpoint('xs') { @include media-breakpoint('xs') {
height: 224px; height: 224px;
@ -48,14 +48,14 @@ app-fix-bonus {
} }
} }
.fix-bonus-table { .roulette-coupon-table {
color: black; color: black;
flex: 1 1 auto; flex: 1 1 auto;
border-bottom: 1px solid rgba(0, 0, 0, 0.301); border-bottom: 1px solid rgba(0, 0, 0, 0.301);
overflow: auto; overflow: auto;
// -webkit-overflow-scrolling: touch; // -webkit-overflow-scrolling: touch;
.fix-bonus { .roulette-coupon {
position: relative; position: relative;
cursor: pointer; cursor: pointer;
// height: 84px; // height: 84px;

View File

@ -23,14 +23,7 @@ import { RouletteCouponService } from 'src/modules/special/roulette-coupon/servi
}) })
export class RouletteCouponComponent export class RouletteCouponComponent
implements OnInit, OnDestroy, AfterViewInit { implements OnInit, OnDestroy, AfterViewInit {
displayedColumns = [ displayedColumns = ['id', 'price', 'rate', 'priceWon'];
'gameType',
'gameDescription',
'userDescription',
'odds',
'folder',
'allow'
];
constructor( constructor(
private fb: FormBuilder, private fb: FormBuilder,
private rouletteCouponService: RouletteCouponService private rouletteCouponService: RouletteCouponService

View File

@ -12,145 +12,58 @@ import { FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
const ELEMENT_DATA: RouletteCoupon[] = [ const ELEMENT_DATA: RouletteCoupon[] = [
{ {
gameType: 'gameType1', id: 1,
gameDescription: '크로스', price: '10,000',
userDescription: rate: '5',
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정', priceWon: '10,000원',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null, createdAt: null,
updatedAt: null updatedAt: null
}, },
{ {
gameType: 'gameType2', id: 2,
gameDescription: '크로스', price: '5,000',
userDescription: rate: '20',
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정', priceWon: '5,000원',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null, createdAt: null,
updatedAt: null updatedAt: null
}, },
{ {
gameType: 'gameType3', id: 3,
gameDescription: '크로스', price: '100,000',
userDescription: rate: '0',
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정', priceWon: '100,000원',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null, createdAt: null,
updatedAt: null updatedAt: null
}, },
{ {
gameType: 'gameType4', id: 4,
gameDescription: '가상축구', price: '10,000',
userDescription: rate: '5',
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정', priceWon: '10,000원',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null, createdAt: null,
updatedAt: null updatedAt: null
}, },
{ {
gameType: 'gameType5', id: 5,
gameDescription: '가상축구', price: '5,000',
userDescription: rate: '20',
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정', priceWon: '5,000원',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null, createdAt: null,
updatedAt: null updatedAt: null
}, },
{ {
gameType: 'gameType6', id: 6,
gameDescription: '가상축구', price: '300,000',
userDescription: rate: '0',
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정', priceWon: '300,000원',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null, createdAt: null,
updatedAt: null updatedAt: null
}, },
{ {
gameType: 'gameType7', id: 7,
gameDescription: '스페셜', price: '10,000',
userDescription: rate: '5',
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정', priceWon: '10,000원',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null,
updatedAt: null
},
{
gameType: 'gameType8',
gameDescription: '스페셜',
userDescription:
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null,
updatedAt: null
},
{
gameType: 'gameType9',
gameDescription: '스페셜',
userDescription:
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null,
updatedAt: null
},
{
gameType: 'gameType10',
gameDescription: '실시간',
userDescription:
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null,
updatedAt: null
},
{
gameType: 'gameType11',
gameDescription: '실시간',
userDescription:
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null,
updatedAt: null
},
{
gameType: 'gameType12',
gameDescription: '실시간',
userDescription:
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null,
updatedAt: null
},
{
gameType: 'gameType13',
gameDescription: '개경주',
userDescription:
'[ 3폴더 ] 이상 조합가능 보너스 ㅡㅡㅡ 1.2배당 이상경기만 인정',
odds: '1.03',
folder: 3,
allow: false,
createdAt: null, createdAt: null,
updatedAt: null updatedAt: null
} }
@ -191,12 +104,10 @@ export class RouletteCouponDataSource extends DataSource<RouletteCoupon> {
createRowFormGroup(r: RouletteCoupon): FormGroup { createRowFormGroup(r: RouletteCoupon): FormGroup {
let f = new FormGroup({ let f = new FormGroup({
gameType: this.createNewFormContorl(r, 'gameType'), id: this.createNewFormContorl(r, 'id'),
gameDescription: this.createNewFormContorl(r, 'gameDescription'), price: this.createNewFormContorl(r, 'price'),
userDescription: this.createNewFormContorl(r, 'userDescription'), rate: this.createNewFormContorl(r, 'rate'),
odds: this.createNewFormContorl(r, 'odds'), priceWon: this.createNewFormContorl(r, 'priceWon')
folder: this.createNewFormContorl(r, 'folder'),
allow: this.createNewFormContorl(r, 'allow')
}); });
return f; return f;
} }

View File

@ -2,10 +2,7 @@ import { DateAudit } from 'src/modules/common/data/model/audit';
export interface RouletteCoupon extends DateAudit { export interface RouletteCoupon extends DateAudit {
id?: number; id?: number;
gameType?: string; price?: string;
gameDescription?: string; rate?: string;
userDescription?: string; priceWon?: string;
odds?: string;
folder?: number;
allow?: boolean;
} }