From de413282b3e64144eb1ef8d042fc481dccd85289 Mon Sep 17 00:00:00 2001 From: Park Byung Eun Date: Wed, 27 Jul 2022 07:03:56 +0000 Subject: [PATCH] =?UTF-8?q?=ED=8C=9D=EC=97=85=EC=B0=BD=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mock-api/apps/board/popup/data.ts | 2 +- .../components/registration.component.html | 2 - .../components/registration.component.ts | 183 --------- .../components/view.component.html | 4 - .../components/view.component.ts | 183 --------- .../popup/components/edit.component.html | 2 - .../popup/components/list.component.html | 373 ++++++------------ .../board/popup/components/list.component.ts | 29 +- .../popup/components/redit.component.html | 83 ++++ .../{edit.component.ts => redit.component.ts} | 77 ++-- .../components/registration.component.html | 2 - .../components/registration.component.ts | 183 --------- .../popup/components/view.component.html | 2 - .../board/popup/components/view.component.ts | 183 --------- .../modules/admin/board/popup/models/popup.ts | 4 +- .../modules/admin/board/popup/popup.module.ts | 8 +- 16 files changed, 274 insertions(+), 1046 deletions(-) delete mode 100644 src/app/modules/admin/board/customer-template/components/registration.component.html delete mode 100644 src/app/modules/admin/board/customer-template/components/registration.component.ts delete mode 100644 src/app/modules/admin/board/customer-template/components/view.component.html delete mode 100644 src/app/modules/admin/board/customer-template/components/view.component.ts delete mode 100644 src/app/modules/admin/board/popup/components/edit.component.html create mode 100644 src/app/modules/admin/board/popup/components/redit.component.html rename src/app/modules/admin/board/popup/components/{edit.component.ts => redit.component.ts} (70%) delete mode 100644 src/app/modules/admin/board/popup/components/registration.component.html delete mode 100644 src/app/modules/admin/board/popup/components/registration.component.ts delete mode 100644 src/app/modules/admin/board/popup/components/view.component.html delete mode 100644 src/app/modules/admin/board/popup/components/view.component.ts diff --git a/src/app/mock-api/apps/board/popup/data.ts b/src/app/mock-api/apps/board/popup/data.ts index 9d88864..05cfd91 100644 --- a/src/app/mock-api/apps/board/popup/data.ts +++ b/src/app/mock-api/apps/board/popup/data.ts @@ -5,7 +5,7 @@ export const popups = [ index: 10, title: '악성배팅 제제 안내', widthSize: 500, - verticalSize: 830, + heightSize: 830, topMargin: 100, leftMargin: 100, site: 'all', diff --git a/src/app/modules/admin/board/customer-template/components/registration.component.html b/src/app/modules/admin/board/customer-template/components/registration.component.html deleted file mode 100644 index 49fa156..0000000 --- a/src/app/modules/admin/board/customer-template/components/registration.component.html +++ /dev/null @@ -1,2 +0,0 @@ - -
고객센터 템플릿 등록
diff --git a/src/app/modules/admin/board/customer-template/components/registration.component.ts b/src/app/modules/admin/board/customer-template/components/registration.component.ts deleted file mode 100644 index 645b6d8..0000000 --- a/src/app/modules/admin/board/customer-template/components/registration.component.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - OnDestroy, - OnInit, - ViewChild, - ViewEncapsulation, -} from '@angular/core'; -import { - FormBuilder, - FormControl, - FormGroup, - Validators, -} from '@angular/forms'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatSort } from '@angular/material/sort'; -import { - debounceTime, - map, - merge, - Observable, - Subject, - switchMap, - takeUntil, -} from 'rxjs'; -import { fuseAnimations } from '@fuse/animations'; -import { FuseConfirmationService } from '@fuse/services/confirmation'; - -import { User } from 'app/modules/admin/member/user/models/user'; -import { UserService } from 'app/modules/admin/member/user/services/user.service'; - -@Component({ - selector: 'customer-template-registration', - templateUrl: './registration.component.html', - styles: [ - /* language=SCSS */ - ` - .inventory-grid { - grid-template-columns: 48px auto 40px; - - @screen sm { - grid-template-columns: 48px auto 112px 72px; - } - - @screen md { - grid-template-columns: 48px 112px auto 112px 72px; - } - - @screen lg { - grid-template-columns: 48px 112px auto 112px 96px 96px 72px; - } - } - `, - ], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - animations: fuseAnimations, -}) -export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { - @ViewChild(MatPaginator) private _paginator!: MatPaginator; - @ViewChild(MatSort) private _sort!: MatSort; - - isLoading = false; - searchInputControl = new FormControl(); - selectedProductForm!: FormGroup; - selectedUser?: User; - - private _unsubscribeAll: Subject = new Subject(); - - /** - * Constructor - */ - constructor( - private _changeDetectorRef: ChangeDetectorRef, - private _fuseConfirmationService: FuseConfirmationService, - private _formBuilder: FormBuilder, - private _userService: UserService - ) {} - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void { - this.selectedProductForm = this._formBuilder.group({ - id: [''], - signinId: [{ value: '', disabled: true }], - signinPw: [{ value: '' }], - exchangePw: [''], - description: [''], - tags: [[]], - nickname: [{ value: '', disabled: true }], - ownCash: [''], - phoneNumber: [''], - level: [''], - status: [''], - isExcahngeMoney: [''], - bankname: [''], - accountNumber: [''], - accountHolder: [''], - comp: [''], - coupon: [''], - recommender: [{ value: '', disabled: true }], - changeSite: [''], - recommendCount: [''], - hodingGameMoney: [{ value: '0', disabled: true }], - memo: [''], - bacaraRate: [], - rulletRate: [], - dragonRate: [], - etcRate: [], - slotRate: [], - casinoRusingRate: [], - slotRusingRate: [], - }); - - // Get the User - this._userService.user$ - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((user: User | undefined) => { - if (!user) { - return; - } - this.selectedUser = user; - - this.selectedProductForm.patchValue(user); - // Mark for check - this._changeDetectorRef.markForCheck(); - }); - - /* this.user$ = this._userService.user$; */ - } - - /** - * After view init - */ - ngAfterViewInit(): void {} - - /** - * On destroy - */ - ngOnDestroy(): void { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(null); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - // ----------------------------------------------------------------------------------------------------- - // @ Private methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Create product - */ - __createProduct(): void {} - - /** - * Toggle product details - * - * @param productId - */ - __toggleDetails(productId: string): void {} - - /** - * Track by function for ngFor loops - * - * @param index - * @param item - */ - __trackByFn(index: number, item: any): any { - return item.id || index; - } -} diff --git a/src/app/modules/admin/board/customer-template/components/view.component.html b/src/app/modules/admin/board/customer-template/components/view.component.html deleted file mode 100644 index 17da861..0000000 --- a/src/app/modules/admin/board/customer-template/components/view.component.html +++ /dev/null @@ -1,4 +0,0 @@ - -
- 고객센터템플릿-상세페이지 -
diff --git a/src/app/modules/admin/board/customer-template/components/view.component.ts b/src/app/modules/admin/board/customer-template/components/view.component.ts deleted file mode 100644 index c5563d4..0000000 --- a/src/app/modules/admin/board/customer-template/components/view.component.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - OnDestroy, - OnInit, - ViewChild, - ViewEncapsulation, -} from '@angular/core'; -import { - FormBuilder, - FormControl, - FormGroup, - Validators, -} from '@angular/forms'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatSort } from '@angular/material/sort'; -import { - debounceTime, - map, - merge, - Observable, - Subject, - switchMap, - takeUntil, -} from 'rxjs'; -import { fuseAnimations } from '@fuse/animations'; -import { FuseConfirmationService } from '@fuse/services/confirmation'; - -import { User } from 'app/modules/admin/member/user/models/user'; -import { UserService } from 'app/modules/admin/member/user/services/user.service'; - -@Component({ - selector: 'customer-template-view', - templateUrl: './view.component.html', - styles: [ - /* language=SCSS */ - ` - .inventory-grid { - grid-template-columns: 48px auto 40px; - - @screen sm { - grid-template-columns: 48px auto 112px 72px; - } - - @screen md { - grid-template-columns: 48px 112px auto 112px 72px; - } - - @screen lg { - grid-template-columns: 48px 112px auto 112px 96px 96px 72px; - } - } - `, - ], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - animations: fuseAnimations, -}) -export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { - @ViewChild(MatPaginator) private _paginator!: MatPaginator; - @ViewChild(MatSort) private _sort!: MatSort; - - isLoading = false; - searchInputControl = new FormControl(); - selectedProductForm!: FormGroup; - selectedUser?: User; - - private _unsubscribeAll: Subject = new Subject(); - - /** - * Constructor - */ - constructor( - private _changeDetectorRef: ChangeDetectorRef, - private _fuseConfirmationService: FuseConfirmationService, - private _formBuilder: FormBuilder, - private _userService: UserService - ) {} - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void { - this.selectedProductForm = this._formBuilder.group({ - id: [''], - signinId: [{ value: '', disabled: true }], - signinPw: [{ value: '' }], - exchangePw: [''], - description: [''], - tags: [[]], - nickname: [{ value: '', disabled: true }], - ownCash: [''], - phoneNumber: [''], - level: [''], - status: [''], - isExcahngeMoney: [''], - bankname: [''], - accountNumber: [''], - accountHolder: [''], - comp: [''], - coupon: [''], - recommender: [{ value: '', disabled: true }], - changeSite: [''], - recommendCount: [''], - hodingGameMoney: [{ value: '0', disabled: true }], - memo: [''], - bacaraRate: [], - rulletRate: [], - dragonRate: [], - etcRate: [], - slotRate: [], - casinoRusingRate: [], - slotRusingRate: [], - }); - - // Get the User - this._userService.user$ - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((user: User | undefined) => { - if (!user) { - return; - } - this.selectedUser = user; - - this.selectedProductForm.patchValue(user); - // Mark for check - this._changeDetectorRef.markForCheck(); - }); - - /* this.user$ = this._userService.user$; */ - } - - /** - * After view init - */ - ngAfterViewInit(): void {} - - /** - * On destroy - */ - ngOnDestroy(): void { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(null); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - // ----------------------------------------------------------------------------------------------------- - // @ Private methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Create product - */ - __createProduct(): void {} - - /** - * Toggle product details - * - * @param productId - */ - __toggleDetails(productId: string): void {} - - /** - * Track by function for ngFor loops - * - * @param index - * @param item - */ - __trackByFn(index: number, item: any): any { - return item.id || index; - } -} diff --git a/src/app/modules/admin/board/popup/components/edit.component.html b/src/app/modules/admin/board/popup/components/edit.component.html deleted file mode 100644 index 2f11788..0000000 --- a/src/app/modules/admin/board/popup/components/edit.component.html +++ /dev/null @@ -1,2 +0,0 @@ - -
팝업 수정
diff --git a/src/app/modules/admin/board/popup/components/list.component.html b/src/app/modules/admin/board/popup/components/list.component.html index 8787ded..d300d76 100644 --- a/src/app/modules/admin/board/popup/components/list.component.html +++ b/src/app/modules/admin/board/popup/components/list.component.html @@ -1,249 +1,136 @@ -
- -
- -
- -
- -
팝업
- -
- - - - - - - - - - - - - - -
- +
+
+
+
+
- - -
- -
- - - - - - - - - -
- - - -
- - - - - - - - - - - - - - - - - - -
-
-
- -
- - -
-
- - -
+ 팝업 관리 +
+
+ - There are no popups! - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호 + + {{ info.index }} + + 제목 + + {{ info.title }} + + 가로 + {{ + info.widthSize + }} + 세로 + {{ + info.heightSize + }} + 위에서부터 + {{ + info.topMargin + }} + 왼쪽에서부터 + {{ + info.leftMargin + }} + 사이트 + {{ info.site }} + 사용여부 + {{ + info.useOrNot + }} + 비고 +
+ + +
+
+
+ +
+
+
diff --git a/src/app/modules/admin/board/popup/components/list.component.ts b/src/app/modules/admin/board/popup/components/list.component.ts index 9effff6..8180d66 100644 --- a/src/app/modules/admin/board/popup/components/list.component.ts +++ b/src/app/modules/admin/board/popup/components/list.component.ts @@ -34,6 +34,7 @@ import { Popup } from '../models/popup'; import { PopupPagination } from '../models/popup-pagination'; import { PopupService } from '../services/popup.service'; import { Router } from '@angular/router'; +import { MatTableDataSource } from '@angular/material/table'; @Component({ selector: 'popup-list', @@ -76,6 +77,20 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { private _unsubscribeAll: Subject = new Subject(); + popupTableColumns: string[] = [ + 'index', + 'title', + 'widthSize', + 'heightSize', + 'topMargin', + 'leftMargin', + 'site', + 'useOrNot', + 'btn', + ]; + + popupDataSource: MatTableDataSource = new MatTableDataSource(); + /** * Constructor */ @@ -95,19 +110,17 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { * On init */ ngOnInit(): void { - // Get the pagination - this._popupService.pagination$ + this._popupService.popups$ .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((pagination: PopupPagination | undefined) => { - // Update the pagination - this.pagination = pagination; + .subscribe((popups: Popup[] | undefined) => { + if (!popups) { + return; + } + this.popupDataSource.data = popups; // Mark for check this._changeDetectorRef.markForCheck(); }); - - // Get the products - this.popups$ = this._popupService.popups$; } /** diff --git a/src/app/modules/admin/board/popup/components/redit.component.html b/src/app/modules/admin/board/popup/components/redit.component.html new file mode 100644 index 0000000..eb397d8 --- /dev/null +++ b/src/app/modules/admin/board/popup/components/redit.component.html @@ -0,0 +1,83 @@ +
+
+
+
+ +
+
+ 고객센터템플릿 {{ !targetTemplate ? "등록" : "수정" }} +
+
+
+ + + +
+ + 제목 + + +
+ + +
+ + 순번 + + +
+ + + + + 내용 + +
+
+ +
+
+ + + + +
+
+
+
+
+
+
diff --git a/src/app/modules/admin/board/popup/components/edit.component.ts b/src/app/modules/admin/board/popup/components/redit.component.ts similarity index 70% rename from src/app/modules/admin/board/popup/components/edit.component.ts rename to src/app/modules/admin/board/popup/components/redit.component.ts index 22434a3..0816d2f 100644 --- a/src/app/modules/admin/board/popup/components/edit.component.ts +++ b/src/app/modules/admin/board/popup/components/redit.component.ts @@ -31,10 +31,13 @@ import { FuseConfirmationService } from '@fuse/services/confirmation'; import { User } from 'app/modules/admin/member/user/models/user'; import { UserService } from 'app/modules/admin/member/user/services/user.service'; +import { ActivatedRoute, Router } from '@angular/router'; +import { CustomerTemplateService } from '../services/customer-template.service'; +import { CustomerTemplate } from '../models/ customer-template'; @Component({ - selector: 'popup-edit', - templateUrl: './edit.component.html', + selector: 'customer-template-redit', + templateUrl: './redit.component.html', styles: [ /* language=SCSS */ ` @@ -59,15 +62,17 @@ import { UserService } from 'app/modules/admin/member/user/services/user.service changeDetection: ChangeDetectionStrategy.OnPush, animations: fuseAnimations, }) -export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { +export class ReditComponent implements OnInit, AfterViewInit, OnDestroy { @ViewChild(MatPaginator) private _paginator!: MatPaginator; @ViewChild(MatSort) private _sort!: MatSort; isLoading = false; searchInputControl = new FormControl(); - selectedProductForm!: FormGroup; + targetTemplateForm!: FormGroup; selectedUser?: User; + targetTemplate?: CustomerTemplate | undefined; + private _unsubscribeAll: Subject = new Subject(); /** @@ -77,7 +82,10 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { private _changeDetectorRef: ChangeDetectorRef, private _fuseConfirmationService: FuseConfirmationService, private _formBuilder: FormBuilder, - private _userService: UserService + private _customerTemplateService: CustomerTemplateService, + private _userService: UserService, + private _route: ActivatedRoute, + private _router: Router ) {} // ----------------------------------------------------------------------------------------------------- @@ -88,53 +96,31 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { * On init */ ngOnInit(): void { - this.selectedProductForm = this._formBuilder.group({ - id: [''], - signinId: [{ value: '', disabled: true }], - signinPw: [{ value: '' }], - exchangePw: [''], - description: [''], - tags: [[]], - nickname: [{ value: '', disabled: true }], - ownCash: [''], - phoneNumber: [''], - level: [''], - status: [''], - isExcahngeMoney: [''], - bankname: [''], - accountNumber: [''], - accountHolder: [''], - comp: [''], - coupon: [''], - recommender: [{ value: '', disabled: true }], - changeSite: [''], - recommendCount: [''], - hodingGameMoney: [{ value: '0', disabled: true }], - memo: [''], - bacaraRate: [], - rulletRate: [], - dragonRate: [], - etcRate: [], - slotRate: [], - casinoRusingRate: [], - slotRusingRate: [], + this.targetTemplateForm = this._formBuilder.group({ + title: [''], + order: [''], + content: [''], }); + const idx = this._route.snapshot.params['id']; // Get the User - this._userService.user$ + this._customerTemplateService.customerTemplate$ .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((user: User | undefined) => { - if (!user) { + .subscribe((targetTemplate: CustomerTemplate | undefined) => { + this.targetTemplate = targetTemplate; + + if (!this.targetTemplate) { return; } - this.selectedUser = user; - this.selectedProductForm.patchValue(user); + this.targetTemplateForm.patchValue({ + title: this.targetTemplate.title, + content: this.targetTemplate.content, + order: this.targetTemplate.order, + }); // Mark for check this._changeDetectorRef.markForCheck(); }); - - /* this.user$ = this._userService.user$; */ } /** @@ -170,6 +156,13 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { * @param productId */ __toggleDetails(productId: string): void {} + __onClickeCancel(): void { + let url: string = 'board/customer-template/'; + this._router.navigateByUrl(url); + } + __onClickReditBtn(targetTemplate: CustomerTemplate | undefined): void { + console.log('click: ', targetTemplate?.id); + } /** * Track by function for ngFor loops diff --git a/src/app/modules/admin/board/popup/components/registration.component.html b/src/app/modules/admin/board/popup/components/registration.component.html deleted file mode 100644 index b489bd2..0000000 --- a/src/app/modules/admin/board/popup/components/registration.component.html +++ /dev/null @@ -1,2 +0,0 @@ - -
팝업-등록 page
diff --git a/src/app/modules/admin/board/popup/components/registration.component.ts b/src/app/modules/admin/board/popup/components/registration.component.ts deleted file mode 100644 index 27b49c9..0000000 --- a/src/app/modules/admin/board/popup/components/registration.component.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - OnDestroy, - OnInit, - ViewChild, - ViewEncapsulation, -} from '@angular/core'; -import { - FormBuilder, - FormControl, - FormGroup, - Validators, -} from '@angular/forms'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatSort } from '@angular/material/sort'; -import { - debounceTime, - map, - merge, - Observable, - Subject, - switchMap, - takeUntil, -} from 'rxjs'; -import { fuseAnimations } from '@fuse/animations'; -import { FuseConfirmationService } from '@fuse/services/confirmation'; - -import { User } from 'app/modules/admin/member/user/models/user'; -import { UserService } from 'app/modules/admin/member/user/services/user.service'; - -@Component({ - selector: 'popup-registration', - templateUrl: './registration.component.html', - styles: [ - /* language=SCSS */ - ` - .inventory-grid { - grid-template-columns: 48px auto 40px; - - @screen sm { - grid-template-columns: 48px auto 112px 72px; - } - - @screen md { - grid-template-columns: 48px 112px auto 112px 72px; - } - - @screen lg { - grid-template-columns: 48px 112px auto 112px 96px 96px 72px; - } - } - `, - ], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - animations: fuseAnimations, -}) -export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { - @ViewChild(MatPaginator) private _paginator!: MatPaginator; - @ViewChild(MatSort) private _sort!: MatSort; - - isLoading = false; - searchInputControl = new FormControl(); - selectedProductForm!: FormGroup; - selectedUser?: User; - - private _unsubscribeAll: Subject = new Subject(); - - /** - * Constructor - */ - constructor( - private _changeDetectorRef: ChangeDetectorRef, - private _fuseConfirmationService: FuseConfirmationService, - private _formBuilder: FormBuilder, - private _userService: UserService - ) {} - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void { - this.selectedProductForm = this._formBuilder.group({ - id: [''], - signinId: [{ value: '', disabled: true }], - signinPw: [{ value: '' }], - exchangePw: [''], - description: [''], - tags: [[]], - nickname: [{ value: '', disabled: true }], - ownCash: [''], - phoneNumber: [''], - level: [''], - status: [''], - isExcahngeMoney: [''], - bankname: [''], - accountNumber: [''], - accountHolder: [''], - comp: [''], - coupon: [''], - recommender: [{ value: '', disabled: true }], - changeSite: [''], - recommendCount: [''], - hodingGameMoney: [{ value: '0', disabled: true }], - memo: [''], - bacaraRate: [], - rulletRate: [], - dragonRate: [], - etcRate: [], - slotRate: [], - casinoRusingRate: [], - slotRusingRate: [], - }); - - // Get the User - this._userService.user$ - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((user: User | undefined) => { - if (!user) { - return; - } - this.selectedUser = user; - - this.selectedProductForm.patchValue(user); - // Mark for check - this._changeDetectorRef.markForCheck(); - }); - - /* this.user$ = this._userService.user$; */ - } - - /** - * After view init - */ - ngAfterViewInit(): void {} - - /** - * On destroy - */ - ngOnDestroy(): void { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(null); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - // ----------------------------------------------------------------------------------------------------- - // @ Private methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Create product - */ - __createProduct(): void {} - - /** - * Toggle product details - * - * @param productId - */ - __toggleDetails(productId: string): void {} - - /** - * Track by function for ngFor loops - * - * @param index - * @param item - */ - __trackByFn(index: number, item: any): any { - return item.id || index; - } -} diff --git a/src/app/modules/admin/board/popup/components/view.component.html b/src/app/modules/admin/board/popup/components/view.component.html deleted file mode 100644 index 4e4f148..0000000 --- a/src/app/modules/admin/board/popup/components/view.component.html +++ /dev/null @@ -1,2 +0,0 @@ - -
팝업-상세page
diff --git a/src/app/modules/admin/board/popup/components/view.component.ts b/src/app/modules/admin/board/popup/components/view.component.ts deleted file mode 100644 index 53a6e2d..0000000 --- a/src/app/modules/admin/board/popup/components/view.component.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - OnDestroy, - OnInit, - ViewChild, - ViewEncapsulation, -} from '@angular/core'; -import { - FormBuilder, - FormControl, - FormGroup, - Validators, -} from '@angular/forms'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatPaginator } from '@angular/material/paginator'; -import { MatSort } from '@angular/material/sort'; -import { - debounceTime, - map, - merge, - Observable, - Subject, - switchMap, - takeUntil, -} from 'rxjs'; -import { fuseAnimations } from '@fuse/animations'; -import { FuseConfirmationService } from '@fuse/services/confirmation'; - -import { User } from 'app/modules/admin/member/user/models/user'; -import { UserService } from 'app/modules/admin/member/user/services/user.service'; - -@Component({ - selector: 'popup-view', - templateUrl: './view.component.html', - styles: [ - /* language=SCSS */ - ` - .inventory-grid { - grid-template-columns: 48px auto 40px; - - @screen sm { - grid-template-columns: 48px auto 112px 72px; - } - - @screen md { - grid-template-columns: 48px 112px auto 112px 72px; - } - - @screen lg { - grid-template-columns: 48px 112px auto 112px 96px 96px 72px; - } - } - `, - ], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - animations: fuseAnimations, -}) -export class ViewComponent implements OnInit, AfterViewInit, OnDestroy { - @ViewChild(MatPaginator) private _paginator!: MatPaginator; - @ViewChild(MatSort) private _sort!: MatSort; - - isLoading = false; - searchInputControl = new FormControl(); - selectedProductForm!: FormGroup; - selectedUser?: User; - - private _unsubscribeAll: Subject = new Subject(); - - /** - * Constructor - */ - constructor( - private _changeDetectorRef: ChangeDetectorRef, - private _fuseConfirmationService: FuseConfirmationService, - private _formBuilder: FormBuilder, - private _userService: UserService - ) {} - - // ----------------------------------------------------------------------------------------------------- - // @ Lifecycle hooks - // ----------------------------------------------------------------------------------------------------- - - /** - * On init - */ - ngOnInit(): void { - this.selectedProductForm = this._formBuilder.group({ - id: [''], - signinId: [{ value: '', disabled: true }], - signinPw: [{ value: '' }], - exchangePw: [''], - description: [''], - tags: [[]], - nickname: [{ value: '', disabled: true }], - ownCash: [''], - phoneNumber: [''], - level: [''], - status: [''], - isExcahngeMoney: [''], - bankname: [''], - accountNumber: [''], - accountHolder: [''], - comp: [''], - coupon: [''], - recommender: [{ value: '', disabled: true }], - changeSite: [''], - recommendCount: [''], - hodingGameMoney: [{ value: '0', disabled: true }], - memo: [''], - bacaraRate: [], - rulletRate: [], - dragonRate: [], - etcRate: [], - slotRate: [], - casinoRusingRate: [], - slotRusingRate: [], - }); - - // Get the User - this._userService.user$ - .pipe(takeUntil(this._unsubscribeAll)) - .subscribe((user: User | undefined) => { - if (!user) { - return; - } - this.selectedUser = user; - - this.selectedProductForm.patchValue(user); - // Mark for check - this._changeDetectorRef.markForCheck(); - }); - - /* this.user$ = this._userService.user$; */ - } - - /** - * After view init - */ - ngAfterViewInit(): void {} - - /** - * On destroy - */ - ngOnDestroy(): void { - // Unsubscribe from all subscriptions - this._unsubscribeAll.next(null); - this._unsubscribeAll.complete(); - } - - // ----------------------------------------------------------------------------------------------------- - // @ Public methods - // ----------------------------------------------------------------------------------------------------- - - // ----------------------------------------------------------------------------------------------------- - // @ Private methods - // ----------------------------------------------------------------------------------------------------- - - /** - * Create product - */ - __createProduct(): void {} - - /** - * Toggle product details - * - * @param productId - */ - __toggleDetails(productId: string): void {} - - /** - * Track by function for ngFor loops - * - * @param index - * @param item - */ - __trackByFn(index: number, item: any): any { - return item.id || index; - } -} diff --git a/src/app/modules/admin/board/popup/models/popup.ts b/src/app/modules/admin/board/popup/models/popup.ts index d49a9b3..7c342ce 100644 --- a/src/app/modules/admin/board/popup/models/popup.ts +++ b/src/app/modules/admin/board/popup/models/popup.ts @@ -3,9 +3,9 @@ export interface Popup { index?: number; title?: string; widthSize?: number; - verticalSize?: number; + heightSize?: number; topMargin?: number; leftMargin?: number; - Site?: string; + site?: string; useOrNot?: string; } diff --git a/src/app/modules/admin/board/popup/popup.module.ts b/src/app/modules/admin/board/popup/popup.module.ts index 0691ccc..619b1ac 100644 --- a/src/app/modules/admin/board/popup/popup.module.ts +++ b/src/app/modules/admin/board/popup/popup.module.ts @@ -11,10 +11,8 @@ import { MatRippleModule } from '@angular/material/core'; 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'; +import { MatTableModule } from '@angular/material/table'; import { TranslocoModule } from '@ngneat/transloco'; @@ -41,10 +39,8 @@ import { popupRoutes } from './popup.routing'; MatSortModule, MatSelectModule, MatTooltipModule, - MatGridListModule, - MatSlideToggleModule, - MatRadioModule, MatCheckboxModule, + MatTableModule, ], }) export class PopupModule {}