관리-수수료설정 팝업생성
This commit is contained in:
parent
f52d6a1a6e
commit
bc2f869bd9
|
@ -93,7 +93,12 @@
|
|||
<button mat-menu-item (click)="__onClickCash($event)">
|
||||
보유금지급/회수
|
||||
</button>
|
||||
<button mat-menu-item>수수료설정</button>
|
||||
<button
|
||||
mat-menu-item
|
||||
(click)="__onClickCommission($event)"
|
||||
>
|
||||
수수료설정
|
||||
</button>
|
||||
<button mat-menu-item>콤프지급/회수</button>
|
||||
<button mat-menu-item>쿠폰머니지급/회수</button>
|
||||
<button mat-menu-item>쪽지보내기</button>
|
||||
|
|
|
@ -34,6 +34,7 @@ import { PartnerService } from '../services/partner.service';
|
|||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { RegistComposeComponent } from '../compose/regist-compose.component';
|
||||
import { CashComposeComponent } from '../compose/cash-compose.component';
|
||||
import { CommissionComposeComponent } from '../compose/commission-compose.component';
|
||||
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { SiteService } from 'app/modules/polyglot/domain/services/site.service';
|
||||
|
@ -256,6 +257,15 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
console.log('Compose dialog was closed!');
|
||||
});
|
||||
}
|
||||
__onClickCommission(event: MouseEvent): void {
|
||||
const dialogRef = this._matDialog.open(CommissionComposeComponent, {
|
||||
data: { price: '', memo: '' },
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((result) => {
|
||||
console.log('Compose dialog was closed!');
|
||||
});
|
||||
}
|
||||
|
||||
__getRateTooltop(): string {
|
||||
const tempRate = 0;
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
<div class="flex flex-col max-w-240 md:min-w-160 max-h-screen -m-6">
|
||||
<!-- Header -->
|
||||
<div
|
||||
class="flex flex-0 items-center justify-between h-16 pr-3 sm:pr-5 pl-6 sm:pl-8 bg-primary text-on-primary"
|
||||
>
|
||||
<div class="text-lg font-medium">수수료 변경</div>
|
||||
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
|
||||
<mat-icon
|
||||
class="text-current"
|
||||
[svgIcon]="'heroicons_outline:x'"
|
||||
></mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Compose form -->
|
||||
<form
|
||||
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
|
||||
[formGroup]="composeForm"
|
||||
>
|
||||
<fieldset>
|
||||
<div class="font-semibold mb-2">카지노 요율</div>
|
||||
<!-- 바카라 -->
|
||||
<mat-form-field style="text-align: center">
|
||||
<mat-label>바카라</mat-label>
|
||||
<input matInput [formControlName]="'bacaraRate'" />2.00
|
||||
</mat-form-field>
|
||||
<span style="float: inherit">%(최소 2 ~ 최대 5)</span
|
||||
>
|
||||
<!-- 룰렛 -->
|
||||
<mat-form-field style="text-align: center">
|
||||
<mat-label>룰렛</mat-label>
|
||||
<input matInput [formControlName]="'rouletteRate'" />2.00
|
||||
</mat-form-field>
|
||||
<span style="float: inherit">%(최소 1.8 ~ 최대 5)</span>
|
||||
<br />
|
||||
<!-- 드레곤타이거 -->
|
||||
<mat-form-field style="text-align: center">
|
||||
<mat-label>드레곤타이거</mat-label>
|
||||
<input matInput [formControlName]="'dragonTigerRate'" />2.00
|
||||
</mat-form-field>
|
||||
<span style="float: inherit">%(최소 1.8 ~ 최대 5)</span
|
||||
>
|
||||
<!-- 기타게임 -->
|
||||
<mat-form-field style="text-align: center">
|
||||
<mat-label>기타게임</mat-label>
|
||||
<input matInput [formControlName]="'otherGameRate'" />2.00
|
||||
</mat-form-field>
|
||||
<span style="float: inherit">%(최소 1.5 ~ 최대 5)</span>
|
||||
</fieldset>
|
||||
<b><mat-divider></mat-divider></b>
|
||||
<!-- 슬롯요율 -->
|
||||
<fieldset>
|
||||
<mat-form-field style="text-align: center">
|
||||
<mat-label>슬롯요율</mat-label>
|
||||
<input matInput [formControlName]="'slotRate'" />5.00
|
||||
</mat-form-field>
|
||||
<span style="float: inherit">%(최소 4 ~ 최대 5)</span>
|
||||
</fieldset>
|
||||
<mat-divider></mat-divider>
|
||||
<fieldset>
|
||||
<!-- 카지노 루징 -->
|
||||
<mat-form-field style="text-align: center">
|
||||
<mat-label>카지노 루징</mat-label>
|
||||
<input matInput [formControlName]="'casinoLoosing'" />50.00
|
||||
</mat-form-field>
|
||||
<span style="float: inherit">%(최소 40 ~ 최대 50)</span>
|
||||
|
||||
<!-- 술롯 루징 -->
|
||||
<mat-form-field style="text-align: center">
|
||||
<mat-label>슬롯 루징</mat-label>
|
||||
<input matInput [formControlName]="'slotLoosing'" />50.00
|
||||
</mat-form-field>
|
||||
<span style="float: inherit">%(최소 40 ~ 최대 50)</span>
|
||||
</fieldset>
|
||||
<!-- Actions -->
|
||||
<div
|
||||
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
|
||||
>
|
||||
<div class="flex items-center mt-4 sm:mt-0">
|
||||
<!-- Send -->
|
||||
<button
|
||||
class="order-first sm:order-last"
|
||||
mat-flat-button
|
||||
[color]="'primary'"
|
||||
(click)="send()"
|
||||
>
|
||||
요율변경
|
||||
</button>
|
||||
<!-- Save as draft -->
|
||||
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
|
||||
<span>닫기</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
|
@ -0,0 +1,99 @@
|
|||
import {
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
Inject,
|
||||
OnInit,
|
||||
ViewEncapsulation,
|
||||
} from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { SiteService } from 'app/modules/polyglot/domain/services/site.service';
|
||||
import { IdentityService } from 'app/modules/polyglot/member/services/identity.service';
|
||||
import { Site } from 'app/modules/protobuf/models/domain/site_pb';
|
||||
|
||||
export interface CommissionComposeData {
|
||||
price: string;
|
||||
memo: string;
|
||||
}
|
||||
export interface CommissionComposeResult {
|
||||
price: string;
|
||||
memo: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-commission-compose',
|
||||
templateUrl: './commission-compose.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class CommissionComposeComponent implements OnInit {
|
||||
composeForm!: FormGroup;
|
||||
sites: any[] = [];
|
||||
// quillModules: any = {
|
||||
// toolbar: [
|
||||
// ['bold', 'italic', 'underline'],
|
||||
// [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }],
|
||||
// ['clean'],
|
||||
// ],
|
||||
// };
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
constructor(
|
||||
public matDialogRef: MatDialogRef<CommissionComposeComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: CommissionComposeData,
|
||||
private _formBuilder: FormBuilder,
|
||||
private _identityService: IdentityService,
|
||||
private _changeDetectorRef: ChangeDetectorRef
|
||||
) {}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Lifecycle hooks
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* On init
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
// Create the form
|
||||
this.composeForm = this._formBuilder.group({
|
||||
bacaraRate: ['', [Validators.required]],
|
||||
rouletteRate: ['', [Validators.required]],
|
||||
dragonTigerRate: ['', [Validators.required]],
|
||||
otherGameRate: ['', [Validators.required]],
|
||||
slotRate: ['', [Validators.required]],
|
||||
casinoLoosing: ['', [Validators.required]],
|
||||
slotLoosing: ['', [Validators.required]],
|
||||
});
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
// @ Public methods
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Save and close
|
||||
*/
|
||||
saveAndClose(): void {
|
||||
// Save the message as a draft
|
||||
this.saveAsDraft();
|
||||
|
||||
// Close the dialog
|
||||
this.matDialogRef.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Discard the message
|
||||
*/
|
||||
discard(): void {}
|
||||
|
||||
/**
|
||||
* Save the message as a draft
|
||||
*/
|
||||
saveAsDraft(): void {}
|
||||
|
||||
/**
|
||||
* Send the message
|
||||
*/
|
||||
send(): void {}
|
||||
}
|
|
@ -1,4 +1,9 @@
|
|||
import { RegistComposeComponent } from './regist-compose.component';
|
||||
import { CashComposeComponent } from './cash-compose.component';
|
||||
import { CommissionComposeComponent } from './commission-compose.component';
|
||||
|
||||
export const COMPOSE = [RegistComposeComponent, CashComposeComponent];
|
||||
export const COMPOSE = [
|
||||
RegistComposeComponent,
|
||||
CashComposeComponent,
|
||||
CommissionComposeComponent,
|
||||
];
|
||||
|
|
|
@ -16,6 +16,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
|||
import { MatGridListModule } from '@angular/material/grid-list';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatRadioModule } from '@angular/material/radio';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
|
||||
import { TranslocoModule } from '@ngneat/transloco';
|
||||
|
||||
|
@ -51,6 +52,7 @@ import { MatDialogModule } from '@angular/material/dialog';
|
|||
MatGridListModule,
|
||||
MatMenuModule,
|
||||
MatRadioModule,
|
||||
MatDividerModule,
|
||||
],
|
||||
})
|
||||
export class PartnerModule {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user