@daeryun/dr_components 1.1.27 → 1.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/page/Broadcast/BroadcastList.jsx +2 -2
- package/dist/components/page/Broadcast/BroadcastList.tsx +2 -2
- package/dist/components/page/Notice/NoticeList.d.ts +50 -0
- package/dist/components/page/Notice/NoticeList.jsx +125 -0
- package/dist/components/page/Notice/NoticeList.stories.d.ts +9 -0
- package/dist/components/page/Notice/NoticeList.stories.jsx +259 -0
- package/dist/components/page/Notice/NoticeList.stories.tsx +277 -0
- package/dist/components/page/Notice/NoticeList.tsx +265 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/index.js +1 -0
- package/dist/components/page/index.ts +1 -0
- package/dist/styles/globals.css +79 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -52,9 +52,9 @@ const BroadcastList = ({ search, page, count, size, broadcastList }) => {
|
|
|
52
52
|
</div>
|
|
53
53
|
</Link>
|
|
54
54
|
|
|
55
|
-
{/*웹환경*/}
|
|
56
55
|
<Link href={{
|
|
57
|
-
pathname: '/broadcast/' + item.id
|
|
56
|
+
pathname: '/broadcast/' + item.id,
|
|
57
|
+
query: { page: page, search: search }
|
|
58
58
|
}} className={'mb-10 mt-8 hidden w-full items-center justify-center bg-[#FAFAFA] px-[1em] py-[2em] lg:flex lg:flex-col '} key={item.id}>
|
|
59
59
|
<div className={'mb-4 flex w-[100%] flex-row items-center justify-start gap-4'}>
|
|
60
60
|
<div className={'text-[12px] font-medium text-[#023059] lg:text-[19px]'}>
|
|
@@ -118,10 +118,10 @@ const BroadcastList = ({
|
|
|
118
118
|
</div>
|
|
119
119
|
</Link>
|
|
120
120
|
|
|
121
|
-
{/*웹환경*/}
|
|
122
121
|
<Link
|
|
123
122
|
href={{
|
|
124
|
-
pathname: '/broadcast/' + item.id
|
|
123
|
+
pathname: '/broadcast/' + item.id,
|
|
124
|
+
query: { page: page, search: search }
|
|
125
125
|
}}
|
|
126
126
|
className={
|
|
127
127
|
'mb-10 mt-8 hidden w-full items-center justify-center bg-[#FAFAFA] px-[1em] py-[2em] lg:flex lg:flex-col '
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
next?: {
|
|
5
|
+
router?: any;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
interface INoticeTypes {
|
|
10
|
+
id: number;
|
|
11
|
+
title: string;
|
|
12
|
+
summary: string;
|
|
13
|
+
code_name: string;
|
|
14
|
+
top_count?: number;
|
|
15
|
+
timestamp?: string;
|
|
16
|
+
}
|
|
17
|
+
interface ISearchBarProps {
|
|
18
|
+
handleInputChange: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
19
|
+
handleSearch: () => void;
|
|
20
|
+
searchInput: string;
|
|
21
|
+
}
|
|
22
|
+
interface IPaginationProps {
|
|
23
|
+
onPaginationChange: (pageNum: number) => void;
|
|
24
|
+
currentPage: number;
|
|
25
|
+
totalCount: number;
|
|
26
|
+
}
|
|
27
|
+
interface NoticeListProps {
|
|
28
|
+
SearchBarProps: ISearchBarProps;
|
|
29
|
+
PaginationProps: IPaginationProps;
|
|
30
|
+
noticeName: {
|
|
31
|
+
code: string;
|
|
32
|
+
code_name: string | null;
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}[];
|
|
35
|
+
noticeList: INoticeTypes[];
|
|
36
|
+
currentCodeDesc?: string;
|
|
37
|
+
isUseHeaderComponent?: boolean;
|
|
38
|
+
nameFilter: {
|
|
39
|
+
code_name: string;
|
|
40
|
+
code: string;
|
|
41
|
+
};
|
|
42
|
+
search: string;
|
|
43
|
+
indexOfFirstPost: number;
|
|
44
|
+
indexOfLastPost: number;
|
|
45
|
+
postPerPage: number;
|
|
46
|
+
currentPage: number;
|
|
47
|
+
router: any;
|
|
48
|
+
}
|
|
49
|
+
declare const NoticeList: ({ SearchBarProps, PaginationProps, noticeName, noticeList, currentCodeDesc, isUseHeaderComponent, nameFilter, search, indexOfFirstPost, indexOfLastPost, postPerPage, currentPage, router }: NoticeListProps) => React.JSX.Element;
|
|
50
|
+
export default NoticeList;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import PageWrapper from '../../Layout/PageWrapper';
|
|
5
|
+
import SearchBar from '../../SearchBar/SearchBar';
|
|
6
|
+
import Pagination from '../../Pagination/Pagination';
|
|
7
|
+
const NoticeList = ({ SearchBarProps, PaginationProps, noticeName, noticeList, currentCodeDesc, isUseHeaderComponent, nameFilter, search, indexOfFirstPost, indexOfLastPost, postPerPage, currentPage, router }) => {
|
|
8
|
+
return (<>
|
|
9
|
+
<PageWrapper>
|
|
10
|
+
<SearchBar label={'검색어를 입력해주세요.'} onChange={SearchBarProps.handleInputChange} onClick={SearchBarProps.handleSearch} search={SearchBarProps.searchInput} placeholder={'검색어를 입력해주세요.'} isKeyPress={true} marginTop={[70, 50, 50]}/>
|
|
11
|
+
<div className={'mb-10 flex w-full cursor-pointer border-[1px] border-solid border-[#DBDBDB] text-center '}>
|
|
12
|
+
<div tabIndex={0} className={`${nameFilter.code_name === '전체'
|
|
13
|
+
? 'bg-[#285FA7] text-[#fff]'
|
|
14
|
+
: "after:absolute after:right-[-1px] after:z-[-1] after:h-[45%] after:w-[1px] after:bg-[#DBDBDB] after:content-['']"} relative w-[20%] py-3 text-[13px] 2xs:text-[16px] xs:py-4 sm:text-[22px]`} onClick={() => {
|
|
15
|
+
router.push({
|
|
16
|
+
pathname: '/notice',
|
|
17
|
+
query: search
|
|
18
|
+
? { page: 1, search: search, nameFilter: '전체' }
|
|
19
|
+
: { page: 1, nameFilter: '전체' }
|
|
20
|
+
});
|
|
21
|
+
}} onKeyDown={(e) => {
|
|
22
|
+
if (e.key === 'Enter') {
|
|
23
|
+
router.push({
|
|
24
|
+
pathname: '/notice',
|
|
25
|
+
query: search
|
|
26
|
+
? { page: 1, search: search, nameFilter: '전체' }
|
|
27
|
+
: { page: 1, nameFilter: '전체' }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}}>
|
|
31
|
+
전체
|
|
32
|
+
</div>
|
|
33
|
+
{noticeName.map((item, index) => (<div tabIndex={0} key={index} className={`${nameFilter.code_name === item.code_name
|
|
34
|
+
? 'bg-[#285FA7] text-[#fff] '
|
|
35
|
+
: "after:absolute after:right-[-1px] after:z-[-1] after:h-[45%] after:w-[1px] after:bg-[#DBDBDB] after:content-['']"} relative w-[20%] py-3 text-[13px] 2xs:text-[16px] xs:py-4 sm:text-[22px]`} onClick={() => {
|
|
36
|
+
router.push({
|
|
37
|
+
pathname: '/notice',
|
|
38
|
+
query: search
|
|
39
|
+
? { page: 1, search: search, nameFilter: item.code_name }
|
|
40
|
+
: { page: 1, nameFilter: item.code_name }
|
|
41
|
+
});
|
|
42
|
+
}} onKeyDown={(e) => {
|
|
43
|
+
if (e.key === 'Enter') {
|
|
44
|
+
router.push({
|
|
45
|
+
pathname: '/notice',
|
|
46
|
+
query: search
|
|
47
|
+
? { page: 1, search: search, nameFilter: item.code_name }
|
|
48
|
+
: { page: 1, nameFilter: item.code_name }
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}}>
|
|
52
|
+
{item.code_name}
|
|
53
|
+
</div>))}
|
|
54
|
+
</div>
|
|
55
|
+
<div className={'m-auto h-[100%] '}>
|
|
56
|
+
<table className={'w-[100%] table-fixed border-t-[2px] border-solid border-[#999] text-[12px]'}>
|
|
57
|
+
<colgroup className={''}>
|
|
58
|
+
<col className={'sm:w-[10%]'}/>
|
|
59
|
+
<col width="55" className={'w-[75%] max-xs:w-[70%]'}/>
|
|
60
|
+
{/* <col className={'w-[15%] max-xs:w-[20%]'} /> */}
|
|
61
|
+
</colgroup>
|
|
62
|
+
|
|
63
|
+
<thead>
|
|
64
|
+
<tr className={'border-t-[3px] border-solid border-[#515151] bg-[#FAFAFA]'}>
|
|
65
|
+
<th scope="col" className={'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-[16px] font-[800] max-sm:text-xs'}>
|
|
66
|
+
No
|
|
67
|
+
</th>
|
|
68
|
+
<th scope="col" className={'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-[16px] font-[800] max-sm:text-xs'}>
|
|
69
|
+
제목
|
|
70
|
+
</th>
|
|
71
|
+
{/* <th
|
|
72
|
+
scope="col"
|
|
73
|
+
className={
|
|
74
|
+
'py-[15px] border-b-[1px] border-[#d2d2d2] border-solid text-[16px] font-[800] max-sm:text-xs'
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
작성일
|
|
78
|
+
</th> */}
|
|
79
|
+
</tr>
|
|
80
|
+
</thead>
|
|
81
|
+
|
|
82
|
+
<tbody>
|
|
83
|
+
{noticeList.length > 0 && noticeList.slice(indexOfFirstPost, indexOfLastPost).length > 0 ? (noticeList.slice(indexOfFirstPost, indexOfLastPost).map((item, index) => (<tr key={item.id} className={''}>
|
|
84
|
+
<td className={'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-center sm:text-[16px]'}>
|
|
85
|
+
{noticeList.length -
|
|
86
|
+
(index + 1 + currentPage * postPerPage) +
|
|
87
|
+
postPerPage +
|
|
88
|
+
1}
|
|
89
|
+
</td>
|
|
90
|
+
<td className={'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] sm:text-[16px]'}>
|
|
91
|
+
<Link href={'/notice/' + item.id}>
|
|
92
|
+
<div>
|
|
93
|
+
<div className={'truncate'}>{item.title}</div>
|
|
94
|
+
</div>
|
|
95
|
+
</Link>
|
|
96
|
+
</td>
|
|
97
|
+
{/* <td
|
|
98
|
+
className={
|
|
99
|
+
'text-center py-[15px] border-b-[1px] border-[#d2d2d2] border-solid sm:text-[16px] tracking-[-1px]'
|
|
100
|
+
}
|
|
101
|
+
>
|
|
102
|
+
{item.timestamp}
|
|
103
|
+
</td> */}
|
|
104
|
+
</tr>))) : noticeList.length < 1 ? (<tr>
|
|
105
|
+
<td colSpan={2} className={'border-b-[1px] border-[#d2d2d2] py-[15px] ' +
|
|
106
|
+
'order-solid text-[16px] font-[400]'}>
|
|
107
|
+
<div className={'text-center'}>
|
|
108
|
+
<p>검색 결과가 없습니다.</p>
|
|
109
|
+
</div>
|
|
110
|
+
</td>
|
|
111
|
+
</tr>) : (<tr>
|
|
112
|
+
<td colSpan={2} className={'border-b-[1px] border-solid border-[#d2d2d2] py-[15px] text-[16px] font-[400]'}>
|
|
113
|
+
<div className={'text-center'}>
|
|
114
|
+
<p>정보 조회 중입니다.</p>
|
|
115
|
+
</div>
|
|
116
|
+
</td>
|
|
117
|
+
</tr>)}
|
|
118
|
+
</tbody>
|
|
119
|
+
</table>
|
|
120
|
+
{noticeList && noticeList.length > 0 ? (<Pagination currentPage={PaginationProps.currentPage} onPageChange={PaginationProps.onPaginationChange} totalPages={Math.ceil(PaginationProps.totalCount / 9)}/>) : (<></>)}
|
|
121
|
+
</div>
|
|
122
|
+
</PageWrapper>
|
|
123
|
+
</>);
|
|
124
|
+
};
|
|
125
|
+
export default NoticeList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import NoticeList from './NoticeList';
|
|
3
|
+
declare const meta: Meta<typeof NoticeList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithSearch: Story;
|
|
8
|
+
export declare const WithFilter: Story;
|
|
9
|
+
export declare const EmptyList: Story;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import NoticeList from './NoticeList';
|
|
2
|
+
const mockRouter = {
|
|
3
|
+
push: (url) => {
|
|
4
|
+
console.log('Router push:', url);
|
|
5
|
+
return Promise.resolve(true);
|
|
6
|
+
},
|
|
7
|
+
pathname: '/notice',
|
|
8
|
+
query: {},
|
|
9
|
+
asPath: '/notice'
|
|
10
|
+
};
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'NoticeList',
|
|
13
|
+
component: NoticeList,
|
|
14
|
+
argTypes: {
|
|
15
|
+
SearchBarProps: {
|
|
16
|
+
description: '검색바 관련 props'
|
|
17
|
+
},
|
|
18
|
+
PaginationProps: {
|
|
19
|
+
description: '페이지네이션 관련 props'
|
|
20
|
+
},
|
|
21
|
+
noticeName: {
|
|
22
|
+
description: '공지사항 카테고리 목록'
|
|
23
|
+
},
|
|
24
|
+
noticeList: {
|
|
25
|
+
description: '공지사항 목록 데이터'
|
|
26
|
+
},
|
|
27
|
+
nameFilter: {
|
|
28
|
+
description: '현재 선택된 필터'
|
|
29
|
+
},
|
|
30
|
+
search: {
|
|
31
|
+
description: '현재 검색어'
|
|
32
|
+
},
|
|
33
|
+
indexOfFirstPost: {
|
|
34
|
+
description: '현재 페이지의 첫 번째 게시물 인덱스'
|
|
35
|
+
},
|
|
36
|
+
indexOfLastPost: {
|
|
37
|
+
description: '현재 페이지의 마지막 게시물 인덱스'
|
|
38
|
+
},
|
|
39
|
+
postPerPage: {
|
|
40
|
+
description: '페이지당 게시물 수'
|
|
41
|
+
},
|
|
42
|
+
currentPage: {
|
|
43
|
+
description: '현재 페이지 번호'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export default meta;
|
|
48
|
+
// Mock 데이터
|
|
49
|
+
const mockNoticeName = [
|
|
50
|
+
{
|
|
51
|
+
code: 'N0001',
|
|
52
|
+
code_name: '사무소안내',
|
|
53
|
+
code_desc: null,
|
|
54
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
55
|
+
creator: 'jeonghansol',
|
|
56
|
+
en_name: null,
|
|
57
|
+
etc: null,
|
|
58
|
+
etc2: null,
|
|
59
|
+
g_sorting: null,
|
|
60
|
+
gubun: null,
|
|
61
|
+
i_sorting: null,
|
|
62
|
+
kr_name: null,
|
|
63
|
+
modified_at: null,
|
|
64
|
+
modifier: null,
|
|
65
|
+
parent_code: 'notice',
|
|
66
|
+
sorting: 1,
|
|
67
|
+
use_bool: true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
code: 'N0002',
|
|
71
|
+
code_name: '인사/동정',
|
|
72
|
+
code_desc: null,
|
|
73
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
74
|
+
creator: 'jeonghansol',
|
|
75
|
+
en_name: null,
|
|
76
|
+
etc: null,
|
|
77
|
+
etc2: null,
|
|
78
|
+
g_sorting: null,
|
|
79
|
+
gubun: null,
|
|
80
|
+
i_sorting: null,
|
|
81
|
+
kr_name: null,
|
|
82
|
+
modified_at: null,
|
|
83
|
+
modifier: null,
|
|
84
|
+
parent_code: 'notice',
|
|
85
|
+
sorting: 2,
|
|
86
|
+
use_bool: true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
code: 'N0003',
|
|
90
|
+
code_name: '업무협약',
|
|
91
|
+
code_desc: null,
|
|
92
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
93
|
+
creator: 'jeonghansol',
|
|
94
|
+
en_name: null,
|
|
95
|
+
etc: null,
|
|
96
|
+
etc2: null,
|
|
97
|
+
g_sorting: null,
|
|
98
|
+
gubun: null,
|
|
99
|
+
i_sorting: null,
|
|
100
|
+
kr_name: null,
|
|
101
|
+
modified_at: null,
|
|
102
|
+
modifier: null,
|
|
103
|
+
parent_code: 'notice',
|
|
104
|
+
sorting: 3,
|
|
105
|
+
use_bool: true
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
code: 'N0004',
|
|
109
|
+
code_name: '기타소식',
|
|
110
|
+
code_desc: null,
|
|
111
|
+
created_at: '2024-03-04T16:42:25.730Z',
|
|
112
|
+
creator: 'jeonghansol',
|
|
113
|
+
en_name: null,
|
|
114
|
+
etc: null,
|
|
115
|
+
etc2: null,
|
|
116
|
+
g_sorting: null,
|
|
117
|
+
gubun: null,
|
|
118
|
+
i_sorting: null,
|
|
119
|
+
kr_name: null,
|
|
120
|
+
modified_at: null,
|
|
121
|
+
modifier: null,
|
|
122
|
+
parent_code: 'notice',
|
|
123
|
+
sorting: 4,
|
|
124
|
+
use_bool: true
|
|
125
|
+
}
|
|
126
|
+
];
|
|
127
|
+
const mockNoticeList = [
|
|
128
|
+
{
|
|
129
|
+
id: 5734,
|
|
130
|
+
title: '10월 3일~9일 연휴 법률상담 정상운영 공지',
|
|
131
|
+
summary: '안녕하세요, 법무법인(유한) 대륜입니다.대륜은 개천절, 추석, 한글날에도 아래 일정과 같이…무소 운영으로 접근성 제고 📞아래 이미지를 클릭하시면 법률상담 접수페이지로 이동합니다.',
|
|
132
|
+
code_name: '기타소식',
|
|
133
|
+
top_count: 0
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 5703,
|
|
137
|
+
title: '법무법인 대륜 변관훈변호사, 대한변호사협회 형사전문변호사에 이어 민사전문변호사 등록',
|
|
138
|
+
summary: '대한변호사협회 등록 민사전문변호사… 솔루션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
|
|
139
|
+
code_name: '인사/동정',
|
|
140
|
+
top_count: 0
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
id: 5702,
|
|
144
|
+
title: '법무법인 대륜 변관훈변호사 대한변호사협회 형사전문변호사 등록',
|
|
145
|
+
summary: '대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
|
|
146
|
+
code_name: '인사/동정',
|
|
147
|
+
top_count: 0
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: 5688,
|
|
151
|
+
title: '법무법인 대륜 이동근변호사 대한변호사협회 형사전문변호사 등록',
|
|
152
|
+
summary: '대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
|
|
153
|
+
code_name: '인사/동정',
|
|
154
|
+
top_count: 0
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: 5687,
|
|
158
|
+
title: '이동근 前 경찰 영입',
|
|
159
|
+
summary: '경찰 경력 이동근 책임총괄변호사 영입…울산지방경찰청 경위울산남부경찰서 경위경찰교육원하나은행한국어린이집총연합회 사내변호사',
|
|
160
|
+
code_name: '인사/동정',
|
|
161
|
+
top_count: 0
|
|
162
|
+
}
|
|
163
|
+
];
|
|
164
|
+
// 기본 스토리
|
|
165
|
+
export const Default = {
|
|
166
|
+
args: {
|
|
167
|
+
SearchBarProps: {
|
|
168
|
+
searchInput: '',
|
|
169
|
+
handleSearch: () => console.log('검색 실행'),
|
|
170
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
171
|
+
},
|
|
172
|
+
PaginationProps: {
|
|
173
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
174
|
+
totalCount: mockNoticeList.length,
|
|
175
|
+
currentPage: 1
|
|
176
|
+
},
|
|
177
|
+
noticeName: mockNoticeName,
|
|
178
|
+
noticeList: mockNoticeList,
|
|
179
|
+
nameFilter: { code_name: '전체', code: '' },
|
|
180
|
+
search: '',
|
|
181
|
+
indexOfFirstPost: 1,
|
|
182
|
+
indexOfLastPost: 10,
|
|
183
|
+
postPerPage: 10,
|
|
184
|
+
currentPage: 1,
|
|
185
|
+
router: mockRouter
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
// 검색어가 있는 상태
|
|
189
|
+
export const WithSearch = {
|
|
190
|
+
args: {
|
|
191
|
+
SearchBarProps: {
|
|
192
|
+
searchInput: '법무법인',
|
|
193
|
+
handleSearch: () => console.log('검색 실행'),
|
|
194
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
195
|
+
},
|
|
196
|
+
PaginationProps: {
|
|
197
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
198
|
+
totalCount: mockNoticeList.length,
|
|
199
|
+
currentPage: 1
|
|
200
|
+
},
|
|
201
|
+
noticeName: mockNoticeName,
|
|
202
|
+
noticeList: mockNoticeList,
|
|
203
|
+
nameFilter: { code_name: '전체', code: '' },
|
|
204
|
+
search: '법무법인',
|
|
205
|
+
indexOfFirstPost: 1,
|
|
206
|
+
indexOfLastPost: 10,
|
|
207
|
+
postPerPage: 10,
|
|
208
|
+
currentPage: 1,
|
|
209
|
+
router: mockRouter
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
// 필터가 선택된 상태
|
|
213
|
+
export const WithFilter = {
|
|
214
|
+
args: {
|
|
215
|
+
SearchBarProps: {
|
|
216
|
+
searchInput: '',
|
|
217
|
+
handleSearch: () => console.log('검색 실행'),
|
|
218
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
219
|
+
},
|
|
220
|
+
PaginationProps: {
|
|
221
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
222
|
+
totalCount: mockNoticeList.length,
|
|
223
|
+
currentPage: 1
|
|
224
|
+
},
|
|
225
|
+
noticeName: mockNoticeName,
|
|
226
|
+
noticeList: mockNoticeList,
|
|
227
|
+
nameFilter: { code_name: '사무소안내', code: 'N0001' },
|
|
228
|
+
search: '',
|
|
229
|
+
indexOfFirstPost: 1,
|
|
230
|
+
indexOfLastPost: 10,
|
|
231
|
+
postPerPage: 10,
|
|
232
|
+
currentPage: 1,
|
|
233
|
+
router: mockRouter
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
// 빈 목록 상태
|
|
237
|
+
export const EmptyList = {
|
|
238
|
+
args: {
|
|
239
|
+
SearchBarProps: {
|
|
240
|
+
searchInput: '',
|
|
241
|
+
handleSearch: () => console.log('검색 실행'),
|
|
242
|
+
handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
|
|
243
|
+
},
|
|
244
|
+
PaginationProps: {
|
|
245
|
+
onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
|
|
246
|
+
totalCount: 0,
|
|
247
|
+
currentPage: 1
|
|
248
|
+
},
|
|
249
|
+
noticeName: mockNoticeName,
|
|
250
|
+
noticeList: [],
|
|
251
|
+
nameFilter: { code_name: '전체', code: '' },
|
|
252
|
+
search: '',
|
|
253
|
+
indexOfFirstPost: 1,
|
|
254
|
+
indexOfLastPost: 10,
|
|
255
|
+
postPerPage: 10,
|
|
256
|
+
currentPage: 1,
|
|
257
|
+
router: mockRouter
|
|
258
|
+
}
|
|
259
|
+
};
|