룰렛쿠폰 컬럼 수정

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

View File

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

View File

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

View File

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

View File

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