From 2ae4c91494e3c2b00604cc473bfb2f8b6b2140cf Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 15 Jul 2022 07:59:11 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EB=A6=AC=EC=8A=A4=ED=8A=B8=20page=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mock-api/apps/board/notice/data.ts | 44 ++-- .../notice/components/list.component.html | 219 +++--------------- .../admin/board/notice/models/notice.ts | 32 +-- .../board/notice/resolvers/notice.resolver.ts | 2 +- .../board/notice/service/notice.service.ts | 10 +- 5 files changed, 67 insertions(+), 240 deletions(-) diff --git a/src/app/mock-api/apps/board/notice/data.ts b/src/app/mock-api/apps/board/notice/data.ts index 85b9f0a..599fae5 100644 --- a/src/app/mock-api/apps/board/notice/data.ts +++ b/src/app/mock-api/apps/board/notice/data.ts @@ -2,32 +2,22 @@ export const notices = [ { - id: 'on00', - totalPartnerCount: '5', - totalHoldingMoney: 303675, - totalComp: 108933, - total: 412608, - branchCount: 1, - divisionCount: 1, - officeCount: 1, - storeCount: 1, - memberCount: 1, - nickname: 'on00', - accountHolder: '11', - phoneNumber: '010-1111-1111', - calculateType: '롤링', - ownCash: 50000, - ownComp: 1711, - ownCoupon: 50000, - gameMoney: 0, - todayComp: 0, - totalDeposit: 0, - totalWithdraw: 0, - balance: 0, - registDate: '2022-06-12 15:38', - finalSigninDate: '', - ip: '', - state: '정상', - note: '', + 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, + state: '노출', }, ]; diff --git a/src/app/modules/admin/board/notice/components/list.component.html b/src/app/modules/admin/board/notice/components/list.component.html index 4918cb5..d857c70 100644 --- a/src/app/modules/admin/board/notice/components/list.component.html +++ b/src/app/modules/admin/board/notice/components/list.component.html @@ -37,48 +37,10 @@ - - 40 - 60 - 80 - 100 - - - - - LV.1 - LV.2 - LV.3 - LV.4 - - - - - 정상 - 대기 - 탈퇴 - 휴면 - 블랙 - 정지 - - - - - 카지노제한 - 슬롯제한 - - - - - 계좌입금 - - - - - 카지노콤프 - 슬롯콤프 - 배팅콤프 - 첫충콤프 + + 작성자 + 글제목 + 글내용 검색하기 - - @@ -160,26 +120,14 @@ matSort matSortDisableClear > - - - - - - - - - - - - - - - - - + + + + + + + - - @@ -189,144 +137,49 @@
+ - + - + - + - - - - - - - + - + - + - - - - - - - - - - - - - - - + - - - -
+ + + + + + + +
diff --git a/src/app/modules/admin/board/notice/models/notice.ts b/src/app/modules/admin/board/notice/models/notice.ts index d88ca9e..2e00bf0 100644 --- a/src/app/modules/admin/board/notice/models/notice.ts +++ b/src/app/modules/admin/board/notice/models/notice.ts @@ -1,29 +1,9 @@ export interface Notice { - id?: string; - totalPartnerCount?: number; - totalHoldingMoney?: number; - totalComp?: number; - total?: number; - branchCount?: number; - divisionCount?: number; - officeCount?: number; - storeCount?: number; - memberCount?: number; - nickname?: string; - accountHolder?: string; - phoneNumber?: string; - calculateType?: string; - ownCash?: number; - ownComp?: number; - ownCoupon?: number; - gameMoney?: number; - todayComp?: number; - totalDeposit?: number; - totalWithdraw?: number; - balance?: number; - registDate?: string; - finalSigninDate?: string; - ip?: string; + idx?: number; + site?: string; + title?: number; + writer?: string; + writeDate?: Date; + views?: number; state?: string; - note?: string; } diff --git a/src/app/modules/admin/board/notice/resolvers/notice.resolver.ts b/src/app/modules/admin/board/notice/resolvers/notice.resolver.ts index ec3dbc5..02c519f 100644 --- a/src/app/modules/admin/board/notice/resolvers/notice.resolver.ts +++ b/src/app/modules/admin/board/notice/resolvers/notice.resolver.ts @@ -34,7 +34,7 @@ export class NoticeResolver implements Resolve { route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable { - return this._noticeService.getNoticeById(route.paramMap.get('id')).pipe( + return this._noticeService.getNoticeById(route.paramMap.get('title')).pipe( // Error here means the requested product is not available catchError((error) => { // Log the error diff --git a/src/app/modules/admin/board/notice/service/notice.service.ts b/src/app/modules/admin/board/notice/service/notice.service.ts index a8a52a8..b873a5a 100644 --- a/src/app/modules/admin/board/notice/service/notice.service.ts +++ b/src/app/modules/admin/board/notice/service/notice.service.ts @@ -104,12 +104,14 @@ export class NoticeService { /** * Get product by id */ - getNoticeById(id: string | null): Observable { + getNoticeById(title: string | null): Observable { return this.__notices.pipe( take(1), map((notices) => { // Find the product - const notice = notices?.find((item) => item.id === id) || undefined; + const notice = + notices?.find((item) => !!item && !!item.title === !!title) || + undefined; // Update the product this.__notice.next(notice); @@ -119,7 +121,9 @@ export class NoticeService { }), switchMap((product) => { if (!product) { - return throwError('Could not found product with id of ' + id + '!'); + return throwError( + 'Could not found product with id of ' + title + '!' + ); } return of(product);