This commit is contained in:
이담 정 2022-07-17 05:00:07 +00:00
parent cafcd1e838
commit 0f9d7148d9
12 changed files with 68 additions and 226 deletions

View File

@ -185,7 +185,7 @@ export class BoardNoticeMockApi {
// Update the notice
notices[index] = assign({}, notices[index], notice);
// Store the updated notice
// Store the updated Notice
updatedNotice = notices[index];
}
});

View File

@ -5,19 +5,10 @@ export const notices = [
idx: 80,
site: '',
title:
'**게임멈춤,튕기는 현상및 계좌문의시 확인및 입금전,후 확인사항 대한 공지사항**',
'게임멈춤,튕기는 현상및 계좌문의시 확인및 입금전후 확인사항 대한 공지사항',
writer: '관리자',
writeDate: '2021-10-25 02:25',
views: 135,
state: '노출',
},
{
idx: 99,
site: 'All',
title: '-계좌등록안내-',
writer: '관리자',
writeDate: '2021-06-08 00:46',
views: 7,
views: 136,
state: '노출',
},
];

View File

@ -36,6 +36,43 @@
</mat-form-field> -->
<!-- SelectBox -->
<!-- <mat-form-field>
<mat-select placeholder="리스트수">
<mat-option value="40">40</mat-option>
<mat-option value="60">60</mat-option>
<mat-option value="80">80</mat-option>
<mat-option value="100">100</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="레벨">
<mat-option value="level1">LV.1</mat-option>
<mat-option value="level2">LV.2</mat-option>
<mat-option value="level3">LV.3</mat-option>
<mat-option value="level4">LV.4</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="상태">
<mat-option value="">정상</mat-option>
<mat-option value="">대기</mat-option>
<mat-option value="">탈퇴</mat-option>
<mat-option value="">휴면</mat-option>
<mat-option value="">블랙</mat-option>
<mat-option value="">정지</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="제한">
<mat-option value="">카지노제한</mat-option>
<mat-option value="">슬롯제한</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field>
<mat-select placeholder="입금">
<mat-option value="">계좌입금</mat-option>
</mat-select>
</mat-form-field> -->
<mat-form-field>
<mat-select placeholder="검색어">
<mat-option value="">작성자</mat-option>
@ -139,7 +176,7 @@
>
<!-- 선택 -->
<div class="hidden sm:block truncate">
<mat-checkbox [color]="'primary'"></mat-checkbox>
<mat-checkbox></mat-checkbox>
</div>
<!-- 번호 -->
<div class="hidden sm:block truncate">
@ -169,17 +206,19 @@
<div class="hidden sm:block truncate">
{{ notice.state }}
</div>
<!-- 등록 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">등록</button>
</div>
<!-- 숨김 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'primary'">숨김</button>
</div>
<!-- 완전삭제 -->
<div class="hidden sm:block truncate">
<button mat-flat-button [color]="'warn'">완전삭제</button>
</div>
</div>
<!-- 등록 -->
<button mat-flat-button [color]="'primary'">등록</button>
<!-- 숨김 -->
<button mat-flat-button [color]="'primary'">숨김</button>
<!-- 완전삭제 -->
<button class="-ml-4" mat-button [color]="'warn'">
완전삭제
</button>
</ng-container>
</ng-container>
</div>

View File

@ -32,7 +32,7 @@ import { FuseConfirmationService } from '@fuse/services/confirmation';
import { User } from '../../../member/user/models/user';
import { Notice } from '../models/notice';
import { NoticePagination } from '../models/notice-pagination';
import { NoticeService } from '../service/notice.service';
import { NoticeService } from '../services/notice.service';
import { Router } from '@angular/router';
@Component({

View File

@ -1,2 +0,0 @@
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">공지사항 등록</div>

View File

@ -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: 'notice-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<any> = new Subject<any>();
/**
* 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;
}
}

View File

@ -1,2 +1,2 @@
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">팝업-상세page</div>
<div class="text-4xl font-extrabold tracking-tight">고객센터-상세page</div>

View File

@ -1,4 +1,5 @@
export interface Notice {
id?: string;
idx?: number;
site?: string;
title?: string;

View File

@ -9,7 +9,7 @@ import { catchError, Observable, throwError } from 'rxjs';
import { Notice } from '../models/notice';
import { NoticePagination } from '../models/notice-pagination';
import { NoticeService } from '../service/notice.service';
import { NoticeService } from '../services/notice.service';
@Injectable({
providedIn: 'root',
@ -34,7 +34,7 @@ export class NoticeResolver implements Resolve<any> {
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Observable<Notice | undefined> {
return this._noticeService.getNoticeById(route.paramMap.get('title')).pipe(
return this._noticeService.getNoticeById(route.paramMap.get('id')).pipe(
// Error here means the requested product is not available
catchError((error) => {
// Log the error

View File

@ -104,14 +104,12 @@ export class NoticeService {
/**
* Get product by id
*/
getNoticeById(title: string | null): Observable<Notice> {
getNoticeById(id: string | null): Observable<Notice> {
return this.__notices.pipe(
take(1),
map((notices) => {
// Find the product
const notice =
notices?.find((item) => !!item && !!item.title === !!title) ||
undefined;
const notice = notices?.find((item) => item.id === id) || undefined;
// Update the product
this.__notice.next(notice);
@ -121,9 +119,7 @@ export class NoticeService {
}),
switchMap((product) => {
if (!product) {
return throwError(
'Could not found product with id of ' + title + '!'
);
return throwError('Could not found product with id of ' + id + '!');
}
return of(product);

View File

@ -15,19 +15,19 @@
<div class="flex shrink-0 items-center mt-6 sm:mt-0 sm:ml-4">
<!-- Memo -->
<!-- <mat-form-field>
<ng-container *ngIf="dailys$ | async as dailys">
<ng-container *ngIf="popups$ | async as popups">
<ng-container
*ngFor="let daily of dailys; trackBy: __trackByFn"
*ngFor="let popup of popups; trackBy: __trackByFn"
>
<div
class="inventory-grid grid items-center gap-4 py-3 px-6 md:px-8 border-b"
>
<fieldset>
총 파트너수:{{ daily.totalPartnerCount }} 총 보유머니:{{
daily.totalHoldingMoney
총 파트너수:{{ popup.totalPartnerCount }} 총 보유머니:{{
popup.totalHoldingMoney
}}
총 콤프:{{ daily.totalComp }} 총 합계:{{
daily.total
총 콤프:{{ popup.totalComp }} 총 합계:{{
popup.total
}}
</fieldset>
</div>

View File

@ -1,2 +1,2 @@
<!-- Title -->
<div class="text-4xl font-extrabold tracking-tight">공지사항-상세page</div>
<div class="text-4xl font-extrabold tracking-tight">팝업-상세page</div>