diff --git a/src/app/mock-api/apps/board/notice/api.ts b/src/app/mock-api/apps/board/notice/api.ts index 5974981..fc51b73 100644 --- a/src/app/mock-api/apps/board/notice/api.ts +++ b/src/app/mock-api/apps/board/notice/api.ts @@ -33,29 +33,13 @@ export class BoardNoticeMockApi { .reply(({ request }) => { // Get available queries const search = request.params.get('search'); - const sort = request.params.get('sort') || 'name'; - const order = request.params.get('order') || 'asc'; + const page = parseInt(request.params.get('page') ?? '1', 10); const size = parseInt(request.params.get('size') ?? '10', 10); // Clone the notices let notices: any[] | null = cloneDeep(this._notices); - // Sort the notices - if (sort === 'sku' || sort === 'name' || sort === 'active') { - notices.sort((a, b) => { - const fieldA = a[sort].toString().toUpperCase(); - const fieldB = b[sort].toString().toUpperCase(); - return order === 'asc' - ? fieldA.localeCompare(fieldB) - : fieldB.localeCompare(fieldA); - }); - } else { - notices.sort((a, b) => - order === 'asc' ? a[sort] - b[sort] : b[sort] - a[sort] - ); - } - // If search exists... if (search) { // Filter the notices diff --git a/src/app/mock-api/apps/board/notice/data.ts b/src/app/mock-api/apps/board/notice/data.ts index f416a0e..8a52f37 100644 --- a/src/app/mock-api/apps/board/notice/data.ts +++ b/src/app/mock-api/apps/board/notice/data.ts @@ -2,6 +2,40 @@ export const notices = [ { + id: '1', + idx: 80, + site: '', + title: + '게임멈춤,튕기는 현상및 계좌문의시 확인및 입금전후 확인사항 대한 공지사항', + writer: '관리자', + writeDate: '2021-10-25 02:25', + views: 136, + state: '노출', + }, + { + id: '2', + idx: 80, + site: '', + title: + '게임멈춤,튕기는 현상및 계좌문의시 확인및 입금전후 확인사항 대한 공지사항', + writer: '관리자', + writeDate: '2021-10-25 02:25', + views: 136, + state: '노출', + }, + { + id: '3', + idx: 80, + site: 'all', + title: + '게임멈춤,튕기는 현상및 계좌문의시 확인및 입금전후 확인사항 대한 공지사항', + writer: '관리자', + writeDate: '2021-10-25 02:25', + views: 136, + state: '노출', + }, + { + id: '4', idx: 80, site: '', title: diff --git a/src/app/modules/admin/board/notice-oneline/components/redit.component.ts b/src/app/modules/admin/board/notice-oneline/components/redit.component.ts index 53ae71c..c0b797b 100644 --- a/src/app/modules/admin/board/notice-oneline/components/redit.component.ts +++ b/src/app/modules/admin/board/notice-oneline/components/redit.component.ts @@ -55,9 +55,9 @@ export class ReditComponent implements OnInit, AfterViewInit, OnDestroy { noticeOnelineForm!: FormGroup; editMode: boolean = false; - noticeType = NOTICE_TYPE; - siteType = SITE_TYPE; - useOrNotType = USE_OR_NOT_TYPE; + noticeType = NOTICE_ONELINE_TYPE; + siteType = SITE_NOTICE_ONELINE_TYPE; + useOrNotType = USE_OR_NOT_NOTICE_ONELINE_TYPE; noticeOneline!: NoticeOneline; @@ -180,21 +180,21 @@ export class ReditComponent implements OnInit, AfterViewInit, OnDestroy { } } -export const NOTICE_TYPE = [ +export const NOTICE_ONELINE_TYPE = [ { key: '0', value: '흐르는공지', }, ]; -export const SITE_TYPE = [ +export const SITE_NOTICE_ONELINE_TYPE = [ { key: '0', value: '--전체--', }, ]; -export const USE_OR_NOT_TYPE = [ +export const USE_OR_NOT_NOTICE_ONELINE_TYPE = [ { key: '0', value: '사용(노출)', diff --git a/src/app/modules/admin/board/notice/components/index.ts b/src/app/modules/admin/board/notice/components/index.ts index 04759eb..d187813 100644 --- a/src/app/modules/admin/board/notice/components/index.ts +++ b/src/app/modules/admin/board/notice/components/index.ts @@ -1,3 +1,4 @@ import { ListComponent } from './list.component'; +import { ReditComponent } from './redit.component'; -export const COMPONENTS = [ListComponent]; +export const COMPONENTS = [ListComponent, ReditComponent]; 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 753facc..c404905 100644 --- a/src/app/modules/admin/board/notice/components/list.component.html +++ b/src/app/modules/admin/board/notice/components/list.component.html @@ -12,132 +12,99 @@
공지사항
-
- - - - - - - 작성자 - 글제목 - 글내용 - - - +
- + +
+
+ + + +
+ +
+ + + +
+ +
+ - + + - +
+ +
+ + + + + +
+
+ +
+ +
+ + +
+ + +
@@ -149,22 +116,28 @@ class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto" > - +
- - - - - - - - + + + + + +
@@ -174,44 +147,44 @@
- -