From ab645e42e249daeb94a1fdc3ee45b918df8cd601 Mon Sep 17 00:00:00 2001 From: JUNG YI DAM Date: Fri, 15 Jul 2022 08:28:09 +0000 Subject: [PATCH] =?UTF-8?q?=ED=95=9C=EC=A4=84=EA=B3=B5=EC=A7=80=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20page=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/board/notice-oneline/data.ts | 34 +--- .../components/list.component.html | 191 +++--------------- .../notice-oneline/models/notice-oneline.ts | 32 +-- .../resolvers/notice-oneline.resolver.ts | 2 +- .../services/notice-oneline.service.ts | 9 +- .../admin/board/notice/models/notice.ts | 2 +- 6 files changed, 45 insertions(+), 225 deletions(-) diff --git a/src/app/mock-api/apps/board/notice-oneline/data.ts b/src/app/mock-api/apps/board/notice-oneline/data.ts index 3b7cabc..d629dc9 100644 --- a/src/app/mock-api/apps/board/notice-oneline/data.ts +++ b/src/app/mock-api/apps/board/notice-oneline/data.ts @@ -2,32 +2,12 @@ export const noticeOnelines = [ { - 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: 25, + site: 'All', + title: '-입금문의안내(필독)-', + writer: '관리자', + writeDate: '2021-06-08 00:43', + views: 65, + state: '노출', }, ]; diff --git a/src/app/modules/admin/board/notice-oneline/components/list.component.html b/src/app/modules/admin/board/notice-oneline/components/list.component.html index c1f0b23..280858f 100644 --- a/src/app/modules/admin/board/notice-oneline/components/list.component.html +++ b/src/app/modules/admin/board/notice-oneline/components/list.component.html @@ -36,7 +36,7 @@ --> - + 아이디 닉네임 이름 사이트 - 파트너수동지급 - - - 가입일 정렬 - 아이디 정렬 - 닉네임 정렬 - 캐쉬 정렬 - 콤프 정렬 - 쿠폰 정렬 - 입금 정렬 - 출금 정렬 - 차익 정렬 - - - - - 내림차순 - 오름차순 - - --> --> 검색하기 - - @@ -160,26 +138,13 @@ matSort matSortDisableClear > - - - - - - - - - - - - - - - - - + + + + + + - - @@ -192,146 +157,38 @@
+ - + - + - + - - - - - - - + - + - - - - - - - - - - - - - - - - - + - - - -
+ + diff --git a/src/app/modules/admin/board/notice-oneline/models/notice-oneline.ts b/src/app/modules/admin/board/notice-oneline/models/notice-oneline.ts index 0bdc5a9..8e8e85d 100644 --- a/src/app/modules/admin/board/notice-oneline/models/notice-oneline.ts +++ b/src/app/modules/admin/board/notice-oneline/models/notice-oneline.ts @@ -1,29 +1,9 @@ export interface NoticeOneline { - 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?: string; + writer?: string; + writeDate?: Date; + views?: number; state?: string; - note?: string; } diff --git a/src/app/modules/admin/board/notice-oneline/resolvers/notice-oneline.resolver.ts b/src/app/modules/admin/board/notice-oneline/resolvers/notice-oneline.resolver.ts index 9cf54c8..4ca837c 100644 --- a/src/app/modules/admin/board/notice-oneline/resolvers/notice-oneline.resolver.ts +++ b/src/app/modules/admin/board/notice-oneline/resolvers/notice-oneline.resolver.ts @@ -38,7 +38,7 @@ export class NoticeOnelineResolver implements Resolve { state: RouterStateSnapshot ): Observable { return this._noticeOnelineService - .getNoticeOnelineById(route.paramMap.get('id')) + .getNoticeOnelineById(route.paramMap.get('title')) .pipe( // Error here means the requested product is not available catchError((error) => { diff --git a/src/app/modules/admin/board/notice-oneline/services/notice-oneline.service.ts b/src/app/modules/admin/board/notice-oneline/services/notice-oneline.service.ts index 611bfbf..232ce19 100644 --- a/src/app/modules/admin/board/notice-oneline/services/notice-oneline.service.ts +++ b/src/app/modules/admin/board/notice-oneline/services/notice-oneline.service.ts @@ -108,13 +108,14 @@ export class NoticeOnelineService { /** * Get product by id */ - getNoticeOnelineById(id: string | null): Observable { + getNoticeOnelineById(title: string | null): Observable { return this.__noticeOnelines.pipe( take(1), map((noticeOnelines) => { // Find the product const noticeOneline = - noticeOnelines?.find((item) => item.id === id) || undefined; + noticeOnelines?.find((item) => !!item && !!item.title === !!title) || + undefined; // Update the product this.__noticeOneline.next(noticeOneline); @@ -124,7 +125,9 @@ export class NoticeOnelineService { }), 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); diff --git a/src/app/modules/admin/board/notice/models/notice.ts b/src/app/modules/admin/board/notice/models/notice.ts index 2e00bf0..c405749 100644 --- a/src/app/modules/admin/board/notice/models/notice.ts +++ b/src/app/modules/admin/board/notice/models/notice.ts @@ -1,7 +1,7 @@ export interface Notice { idx?: number; site?: string; - title?: number; + title?: string; writer?: string; writeDate?: Date; views?: number;