From 09be02ab5205d45d6e33f3cdf49ddfa9f03942dd Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 19 Aug 2022 05:39:24 +0000 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EC=B2=9C=EC=9D=B8=EB=93=B1=EB=A1=9D?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=8B=A4=EC=9D=B4=EC=96=BC=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/list.component.html | 14 ++- .../components/list.component.ts | 16 ++++ .../compose/add-compose.component.html | 38 ++++++++ .../compose/add-compose.component.ts | 94 +++++++++++++++++++ .../compose/delete-compose.component.html | 38 ++++++++ .../compose/delete-compose.component.ts | 94 +++++++++++++++++++ .../partner-recommendation/compose/index.ts | 8 +- .../partner-recommendation.module.ts | 2 - 8 files changed, 299 insertions(+), 5 deletions(-) create mode 100644 src/app/modules/admin/member/partner-recommendation/compose/add-compose.component.html create mode 100644 src/app/modules/admin/member/partner-recommendation/compose/add-compose.component.ts create mode 100644 src/app/modules/admin/member/partner-recommendation/compose/delete-compose.component.html create mode 100644 src/app/modules/admin/member/partner-recommendation/compose/delete-compose.component.ts diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.html b/src/app/modules/admin/member/partner-recommendation/components/list.component.html index 5c226da..5e8aaec 100644 --- a/src/app/modules/admin/member/partner-recommendation/components/list.component.html +++ b/src/app/modules/admin/member/partner-recommendation/components/list.component.html @@ -149,7 +149,12 @@
-
@@ -295,7 +300,12 @@
-
diff --git a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts b/src/app/modules/admin/member/partner-recommendation/components/list.component.ts index 51da2e6..b2549a0 100644 --- a/src/app/modules/admin/member/partner-recommendation/components/list.component.ts +++ b/src/app/modules/admin/member/partner-recommendation/components/list.component.ts @@ -37,6 +37,8 @@ import { Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { RegistComposeComponent } from '../compose/regist-compose.component'; +import { AddComposeComponent } from '../compose/add-compose.component'; +import { DeleteComposeComponent } from '../compose/delete-compose.component'; @Component({ selector: 'partner-recommendation-list', templateUrl: './list.component.html', @@ -219,6 +221,20 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { __onClickRegist(event: MouseEvent): void { const dialogRef = this._matDialog.open(RegistComposeComponent); + dialogRef.afterClosed().subscribe((result) => { + console.log('Compose dialog was closed!'); + }); + } + __onClickAdd(event: MouseEvent): void { + const dialogRef = this._matDialog.open(AddComposeComponent); + + dialogRef.afterClosed().subscribe((result) => { + console.log('Compose dialog was closed!'); + }); + } + __onClickDelete(event: MouseEvent): void { + const dialogRef = this._matDialog.open(DeleteComposeComponent); + dialogRef.afterClosed().subscribe((result) => { console.log('Compose dialog was closed!'); }); diff --git a/src/app/modules/admin/member/partner-recommendation/compose/add-compose.component.html b/src/app/modules/admin/member/partner-recommendation/compose/add-compose.component.html new file mode 100644 index 0000000..8f0872a --- /dev/null +++ b/src/app/modules/admin/member/partner-recommendation/compose/add-compose.component.html @@ -0,0 +1,38 @@ +
+ +
+
알림
+ +
+ + +
+
+ 추천인으로 추가하시겠습니까? +
+
+
+ + + + +
+
+
+
diff --git a/src/app/modules/admin/member/partner-recommendation/compose/add-compose.component.ts b/src/app/modules/admin/member/partner-recommendation/compose/add-compose.component.ts new file mode 100644 index 0000000..e10f63e --- /dev/null +++ b/src/app/modules/admin/member/partner-recommendation/compose/add-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/site/services/site.service'; +import { IdentityService } from 'app/modules/polyglot/identity/services/identity.service'; +import { Site } from 'app/modules/proto/models/site_pb'; + +export interface AddComposeData { + price: string; + memo: string; +} +export interface AddComposeResult { + price: string; + memo: string; +} + +@Component({ + selector: 'app-add-compose', + templateUrl: './add-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class AddComposeComponent 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: AddComposeData, + 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-recommendation/compose/delete-compose.component.html b/src/app/modules/admin/member/partner-recommendation/compose/delete-compose.component.html new file mode 100644 index 0000000..da265cc --- /dev/null +++ b/src/app/modules/admin/member/partner-recommendation/compose/delete-compose.component.html @@ -0,0 +1,38 @@ +
+ +
+
알림
+ +
+ + +
+
+ 삭제하시겠습니까? +
+
+
+ + + + +
+
+
+
diff --git a/src/app/modules/admin/member/partner-recommendation/compose/delete-compose.component.ts b/src/app/modules/admin/member/partner-recommendation/compose/delete-compose.component.ts new file mode 100644 index 0000000..549f127 --- /dev/null +++ b/src/app/modules/admin/member/partner-recommendation/compose/delete-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/site/services/site.service'; +import { IdentityService } from 'app/modules/polyglot/identity/services/identity.service'; +import { Site } from 'app/modules/proto/models/site_pb'; + +export interface DeleteComposeData { + price: string; + memo: string; +} +export interface DeleteComposeResult { + price: string; + memo: string; +} + +@Component({ + selector: 'app-delete-compose', + templateUrl: './delete-compose.component.html', + encapsulation: ViewEncapsulation.None, +}) +export class DeleteComposeComponent 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: DeleteComposeData, + 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-recommendation/compose/index.ts b/src/app/modules/admin/member/partner-recommendation/compose/index.ts index 593e5ce..2198b77 100644 --- a/src/app/modules/admin/member/partner-recommendation/compose/index.ts +++ b/src/app/modules/admin/member/partner-recommendation/compose/index.ts @@ -1,3 +1,9 @@ import { RegistComposeComponent } from './regist-compose.component'; +import { AddComposeComponent } from './add-compose.component'; +import { DeleteComposeComponent } from './delete-compose.component'; -export const COMPOSE = [RegistComposeComponent]; +export const COMPOSE = [ + RegistComposeComponent, + AddComposeComponent, + DeleteComposeComponent, +]; diff --git a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts b/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts index 3729997..6e3bed1 100644 --- a/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts +++ b/src/app/modules/admin/member/partner-recommendation/partner-recommendation.module.ts @@ -12,7 +12,6 @@ import { MatSortModule } from '@angular/material/sort'; import { MatSelectModule } from '@angular/material/select'; import { MatTooltipModule } from '@angular/material/tooltip'; import { MatGridListModule } from '@angular/material/grid-list'; -import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatRadioModule } from '@angular/material/radio'; import { MatCheckboxModule } from '@angular/material/checkbox'; @@ -43,7 +42,6 @@ import { partnerRecommendationRoutes } from './partner-recommendation.routing'; MatSelectModule, MatTooltipModule, MatGridListModule, - MatSlideToggleModule, MatRadioModule, MatCheckboxModule, ],