From f841e1ad8bfcfe026efa5813daf969ddc66cb266 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 12 Aug 2022 07:41:33 +0000 Subject: [PATCH] =?UTF-8?q?=EC=A7=84=ED=96=89=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../partner/components/list.component.html | 4 +- .../partner/components/list.component.ts | 10 ++ .../compose/cash-compose.component.html | 88 +++++++++++++++++ .../partner/compose/cash-compose.component.ts | 94 +++++++++++++++++++ .../admin/member/partner/compose/index.ts | 3 +- .../admin/member/partner/partner.module.ts | 2 + 6 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 src/app/modules/admin/member/partner/compose/cash-compose.component.html create mode 100644 src/app/modules/admin/member/partner/compose/cash-compose.component.ts 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 d4e86c4..cdf3d29 100644 --- a/src/app/modules/admin/member/partner/components/list.component.html +++ b/src/app/modules/admin/member/partner/components/list.component.html @@ -90,7 +90,9 @@ 관리 - + 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 a828fd2..0324833 100644 --- a/src/app/modules/admin/member/partner/components/list.component.ts +++ b/src/app/modules/admin/member/partner/components/list.component.ts @@ -34,6 +34,7 @@ import { PartnerPagination } from '../models/partner-pagination'; import { PartnerService } from '../services/partner.service'; import { Router } from '@angular/router'; import { RegistComposeComponent } from '../compose/regist-compose.component'; +import { CashComposeComponent } from '../compose/cash-compose.component'; import { MatDialog } from '@angular/material/dialog'; import { SiteService } from 'app/modules/polyglot/domain/services/site.service'; @@ -226,6 +227,15 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { console.log('Compose dialog was closed!'); }); } + __onClickCash(event: MouseEvent): void { + const dialogRef = this._matDialog.open(CashComposeComponent, { + data: { price: '', memo: '' }, + }); + + dialogRef.afterClosed().subscribe((result) => { + console.log('Compose dialog was closed!'); + }); + } __getRateTooltop(): string { const tempRate = 0; diff --git a/src/app/modules/admin/member/partner/compose/cash-compose.component.html b/src/app/modules/admin/member/partner/compose/cash-compose.component.html new file mode 100644 index 0000000..603d2bb --- /dev/null +++ b/src/app/modules/admin/member/partner/compose/cash-compose.component.html @@ -0,0 +1,88 @@ +
+ +
+
캐쉬 충환전
+ +
+ + +
+
+ 캐쉬구분 + + + 캐쉬 + + +
+
+ 추가/삭제 + + + 지급 + + + 회수 + + +
+ + + 입력금액 + + + + + + + 메모 + + + + + + + +
+
+ + + + +
+
+
+
diff --git a/src/app/modules/admin/member/partner/compose/cash-compose.component.ts b/src/app/modules/admin/member/partner/compose/cash-compose.component.ts new file mode 100644 index 0000000..3771b23 --- /dev/null +++ b/src/app/modules/admin/member/partner/compose/cash-compose.component.ts @@ -0,0 +1,94 @@ +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 CashComposeData { + price: string; + memo: string; +} +export interface RegistComposeResult { + price: string; + memo: string; +} + +@Component({ + selector: 'app-cash-compose', + templateUrl: './cash-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class CashComposeComponent 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: CashComposeData, + private _formBuilder: FormBuilder, + private _identityService: IdentityService, + private _changeDetectorRef: ChangeDetectorRef + ) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Lifecycle hooks + // ----------------------------------------------------------------------------------------------------- + + /** + * On init + */ + ngOnInit(): void { + // Create the form + this.composeForm = this._formBuilder.group({ + price: ['', [Validators.required]], + memo: ['', [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 593e5ce..5ebd8ef 100644 --- a/src/app/modules/admin/member/partner/compose/index.ts +++ b/src/app/modules/admin/member/partner/compose/index.ts @@ -1,3 +1,4 @@ import { RegistComposeComponent } from './regist-compose.component'; +import { CashComposeComponent } from './cash-compose.component'; -export const COMPOSE = [RegistComposeComponent]; +export const COMPOSE = [RegistComposeComponent, CashComposeComponent]; diff --git a/src/app/modules/admin/member/partner/partner.module.ts b/src/app/modules/admin/member/partner/partner.module.ts index 1f83f7d..2c56246 100644 --- a/src/app/modules/admin/member/partner/partner.module.ts +++ b/src/app/modules/admin/member/partner/partner.module.ts @@ -15,6 +15,7 @@ import { MatSelectModule } from '@angular/material/select'; 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 { TranslocoModule } from '@ngneat/transloco'; @@ -47,6 +48,7 @@ import { partnerRoutes } from './partner.routing'; MatTooltipModule, MatGridListModule, MatMenuModule, + MatRadioModule, ], }) export class PartnerModule {}