From 0b6a91aadfed61da7eb6bb0b35eff67e613becd0 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 15 Jul 2022 05:36:59 +0000 Subject: [PATCH] =?UTF-8?q?=ED=95=9C=EC=A4=84=EA=B3=B5=EC=A7=80=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20page=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/loginlistbyid.component.html | 4 +- .../components/view.component.html | 2 + .../components/view.component.ts | 183 ++++++++++++++++++ .../components/registration.component.ts | 2 +- 4 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 src/app/modules/admin/board/notice-oneline/components/view.component.html create mode 100644 src/app/modules/admin/board/notice-oneline/components/view.component.ts diff --git a/src/app/modules/admin/board/customer/components/loginlistbyid.component.html b/src/app/modules/admin/board/customer/components/loginlistbyid.component.html index e13f190..ae7ddaa 100644 --- a/src/app/modules/admin/board/customer/components/loginlistbyid.component.html +++ b/src/app/modules/admin/board/customer/components/loginlistbyid.component.html @@ -1,2 +1,4 @@ -
공지사항 등록
+
+ 고객센터-중복로그인 page +
diff --git a/src/app/modules/admin/board/notice-oneline/components/view.component.html b/src/app/modules/admin/board/notice-oneline/components/view.component.html new file mode 100644 index 0000000..79fed21 --- /dev/null +++ b/src/app/modules/admin/board/notice-oneline/components/view.component.html @@ -0,0 +1,2 @@ + +
한줄공지-상세page
diff --git a/src/app/modules/admin/board/notice-oneline/components/view.component.ts b/src/app/modules/admin/board/notice-oneline/components/view.component.ts new file mode 100644 index 0000000..d7f1a89 --- /dev/null +++ b/src/app/modules/admin/board/notice-oneline/components/view.component.ts @@ -0,0 +1,183 @@ +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: 'notice-oneline-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/registration.component.ts b/src/app/modules/admin/board/popup/components/registration.component.ts index a6c0c0c..27b49c9 100644 --- a/src/app/modules/admin/board/popup/components/registration.component.ts +++ b/src/app/modules/admin/board/popup/components/registration.component.ts @@ -33,7 +33,7 @@ import { User } from 'app/modules/admin/member/user/models/user'; import { UserService } from 'app/modules/admin/member/user/services/user.service'; @Component({ - selector: 'notice-registration', + selector: 'popup-registration', templateUrl: './registration.component.html', styles: [ /* language=SCSS */