From f841e1ad8bfcfe026efa5813daf969ddc66cb266 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 12 Aug 2022 07:41:33 +0000 Subject: [PATCH 1/2] =?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 {} From 27caf1469f73a3f0a95321ca6ea94a227af2c36c Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 12 Aug 2022 07:56:00 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=EA=B4=80=EB=A6=AC-=EB=B3=B4=EC=9C=A0?= =?UTF-8?q?=EA=B8=88=EC=A7=80=EA=B8=89=ED=9A=8C=EC=88=98=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/member/partner/compose/cash-compose.component.ts | 2 +- src/environments/environment.prod.ts | 2 +- src/environments/environment.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 index 3771b23..da7965b 100644 --- a/src/app/modules/admin/member/partner/compose/cash-compose.component.ts +++ b/src/app/modules/admin/member/partner/compose/cash-compose.component.ts @@ -15,7 +15,7 @@ export interface CashComposeData { price: string; memo: string; } -export interface RegistComposeResult { +export interface CashComposeResult { price: string; memo: string; } diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 16298ab..b05c7e4 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -4,7 +4,7 @@ export const environment: Environment = { production: true, nats: { connectionOptions: { - servers: ['ws://192.168.50.200:8088'], + servers: ['ws://192.168.50.208:8088'], }, }, }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ed141e9..f38e7dd 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -8,7 +8,7 @@ export const environment: Environment = { production: false, nats: { connectionOptions: { - servers: ['ws://192.168.50.200:8088'], + servers: ['ws://192.168.50.208:8088'], }, }, };