diff --git a/src/app/modules/admin/member/partner/components/list.component.html b/src/app/modules/admin/member/partner/components/list.component.html
index ba78492..94d8247 100644
--- a/src/app/modules/admin/member/partner/components/list.component.html
+++ b/src/app/modules/admin/member/partner/components/list.component.html
@@ -93,7 +93,12 @@
-
+
diff --git a/src/app/modules/admin/member/partner/components/list.component.ts b/src/app/modules/admin/member/partner/components/list.component.ts
index 584b05c..fddc3fe 100644
--- a/src/app/modules/admin/member/partner/components/list.component.ts
+++ b/src/app/modules/admin/member/partner/components/list.component.ts
@@ -22,6 +22,7 @@ import {
startWith,
Subject,
switchMap,
+ take,
takeUntil,
timer,
} from 'rxjs';
@@ -32,8 +33,12 @@ import { Partner } from '../models/partner';
import { PartnerPagination } from '../models/partner-pagination';
import { PartnerService } from '../services/partner.service';
import { ActivatedRoute, Router } from '@angular/router';
-import { RegistComposeComponent } from '../compose/regist-compose.component';
+import {
+ RegistComposeComponent,
+ RegistComposeResult,
+} 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';
@@ -240,15 +245,27 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
__onClickRegist(event: MouseEvent, partner: MemberModel): void {
const dialogRef = this._matDialog.open(RegistComposeComponent, {
- data: { title: '대본 등록하기', parent: partner, sites: this.sites },
+ data: { title: '대본 등록', parent: partner, sites: this.sites },
+ });
+
+ dialogRef
+ .afterClosed()
+ .pipe(take(1))
+ .subscribe((result: RegistComposeResult) => {
+ console.log('Compose dialog was closed: ', result);
+ });
+ }
+ __onClickCash(event: MouseEvent): void {
+ const dialogRef = this._matDialog.open(CashComposeComponent, {
+ data: { price: '', memo: '' },
});
dialogRef.afterClosed().subscribe((result) => {
console.log('Compose dialog was closed!');
});
}
- __onClickCash(event: MouseEvent): void {
- const dialogRef = this._matDialog.open(CashComposeComponent, {
+ __onClickCommission(event: MouseEvent): void {
+ const dialogRef = this._matDialog.open(CommissionComposeComponent, {
data: { price: '', memo: '' },
});
diff --git a/src/app/modules/admin/member/partner/compose/commission-compose.component.html b/src/app/modules/admin/member/partner/compose/commission-compose.component.html
new file mode 100644
index 0000000..3c40fc8
--- /dev/null
+++ b/src/app/modules/admin/member/partner/compose/commission-compose.component.html
@@ -0,0 +1,96 @@
+
diff --git a/src/app/modules/admin/member/partner/compose/commission-compose.component.ts b/src/app/modules/admin/member/partner/compose/commission-compose.component.ts
new file mode 100644
index 0000000..02c47df
--- /dev/null
+++ b/src/app/modules/admin/member/partner/compose/commission-compose.component.ts
@@ -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,
+ @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 {}
+}
diff --git a/src/app/modules/admin/member/partner/compose/index.ts b/src/app/modules/admin/member/partner/compose/index.ts
index 5ebd8ef..9c9216f 100644
--- a/src/app/modules/admin/member/partner/compose/index.ts
+++ b/src/app/modules/admin/member/partner/compose/index.ts
@@ -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,
+];
diff --git a/src/app/modules/admin/member/partner/compose/regist-compose.component.html b/src/app/modules/admin/member/partner/compose/regist-compose.component.html
index bc2548e..12b7408 100644
--- a/src/app/modules/admin/member/partner/compose/regist-compose.component.html
+++ b/src/app/modules/admin/member/partner/compose/regist-compose.component.html
@@ -3,7 +3,7 @@
-
{{ data.title }} 등록
+
{{ data.title }}
+
+ {{ alert.message }}
+
+