@daeryun/dr_components 0.2.58 → 0.2.59
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/asset/images/myCaseManage/arrow_2.webp +0 -0
- package/dist/asset/images/myCaseManage/arrow_right.svg +3 -0
- package/dist/asset/images/myCaseManage/background.svg +8 -0
- package/dist/asset/images/myCaseManage/header_arrow.svg +3 -0
- package/dist/asset/images/myCaseManage/home.svg +16 -0
- package/dist/asset/images/myCaseManage/home.webp +0 -0
- package/dist/asset/images/myCaseManage/icon/case_icon1.svg +4 -0
- package/dist/asset/images/myCaseManage/icon/case_icon2.svg +6 -0
- package/dist/asset/images/myCaseManage/icon/case_icon3.svg +3 -0
- package/dist/asset/images/myCaseManage/icon/case_lookup_linkout.svg +5 -0
- package/dist/asset/images/myCaseManage/icon/check_circle.svg +3 -0
- package/dist/asset/images/myCaseManage/icon/check_circle2.svg +3 -0
- package/dist/asset/images/myCaseManage/icon/client.svg +14 -0
- package/dist/asset/images/myCaseManage/icon/daeryun.svg +7 -0
- package/dist/asset/images/myCaseManage/icon/download.svg +3 -0
- package/dist/asset/images/myCaseManage/icon/jpg.svg +15 -0
- package/dist/asset/images/myCaseManage/icon/pdf.svg +9 -0
- package/dist/asset/images/myCaseManage/icon/png.svg +25 -0
- package/dist/asset/images/myCaseManage/icon/word.svg +11 -0
- package/dist/asset/images/myCaseManage/icon/xls.svg +18 -0
- package/dist/asset/images/myCaseManage/nav_arr.webp +0 -0
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/BrochureBtn/BrochureBtn.d.ts +1 -0
- package/dist/components/BrochureBtn/BrochureBtn.stories.d.ts +6 -5
- package/dist/components/BrochureBtn/MedicalBrochureBtn.d.ts +1 -0
- package/dist/components/Fix/Fix.stories.d.ts +3 -2
- package/dist/components/Footer/TopBtn.d.ts +1 -0
- package/dist/components/MapSection/Map.d.ts +1 -0
- package/dist/components/MapSection/MapSection.d.ts +1 -1
- package/dist/components/Mark/Mark.d.ts +1 -0
- package/dist/components/SelectBox/SelectBox.d.ts +8 -8
- package/dist/components/Seo/SeoStrength.stories.d.ts +1 -0
- package/dist/components/ViewMoreSection/SearchIcon.d.ts +1 -0
- package/dist/components/banner/TopBanner.d.ts +1 -0
- package/dist/components/banner/TopBanner.stories.d.ts +1 -0
- package/dist/components/categoryView/CategoryComponent.d.ts +1 -1
- package/dist/components/hook/useElementObserve.d.ts +2 -2
- package/dist/components/myCaseManage/[id]/_component/ContactInfo.d.ts +3 -0
- package/dist/components/myCaseManage/[id]/_component/ContactInfo.jsx +65 -0
- package/dist/components/myCaseManage/[id]/_component/ContactInfo.tsx +76 -0
- package/dist/components/myCaseManage/[id]/_component/DetailInfo.d.ts +7 -0
- package/dist/components/myCaseManage/[id]/_component/DetailInfo.jsx +33 -0
- package/dist/components/myCaseManage/[id]/_component/DetailInfo.tsx +50 -0
- package/dist/components/myCaseManage/[id]/_component/TimeLine.d.ts +7 -0
- package/dist/components/myCaseManage/[id]/_component/TimeLine.jsx +41 -0
- package/dist/components/myCaseManage/[id]/_component/TimeLine.tsx +55 -0
- package/dist/components/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.d.ts +3 -0
- package/dist/components/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.jsx +90 -0
- package/dist/components/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.tsx +143 -0
- package/dist/components/myCaseManage/[id]/_component/_document/Document.d.ts +6 -0
- package/dist/components/myCaseManage/[id]/_component/_document/Document.jsx +41 -0
- package/dist/components/myCaseManage/[id]/_component/_document/Document.tsx +59 -0
- package/dist/components/myCaseManage/[id]/_component/_document/DocumentLine.d.ts +7 -0
- package/dist/components/myCaseManage/[id]/_component/_document/DocumentLine.jsx +55 -0
- package/dist/components/myCaseManage/[id]/_component/_document/DocumentLine.tsx +72 -0
- package/dist/components/myCaseManage/[id]/index.d.ts +3 -0
- package/dist/components/myCaseManage/[id]/index.jsx +44 -0
- package/dist/components/myCaseManage/[id]/index.tsx +85 -0
- package/dist/components/myCaseManage/_actions/action.d.ts +13 -0
- package/dist/components/myCaseManage/_actions/action.js +56 -0
- package/dist/components/myCaseManage/_actions/action.ts +65 -0
- package/dist/components/myCaseManage/_component/CaseContainer.d.ts +3 -0
- package/dist/components/myCaseManage/_component/CaseContainer.jsx +99 -0
- package/dist/components/myCaseManage/_component/CaseContainer.tsx +177 -0
- package/dist/components/myCaseManage/_component/_breadCrumble/CategoryMenu.d.ts +8 -0
- package/dist/components/myCaseManage/_component/_breadCrumble/CategoryMenu.jsx +47 -0
- package/dist/components/myCaseManage/_component/_breadCrumble/CategoryMenu.tsx +76 -0
- package/dist/components/myCaseManage/_component/_button/Badge.d.ts +15 -0
- package/dist/components/myCaseManage/_component/_button/Badge.jsx +16 -0
- package/dist/components/myCaseManage/_component/_button/Badge.tsx +22 -0
- package/dist/components/myCaseManage/_component/_button/SubColor1Button.d.ts +7 -0
- package/dist/components/myCaseManage/_component/_button/SubColor1Button.jsx +6 -0
- package/dist/components/myCaseManage/_component/_button/SubColor1Button.tsx +20 -0
- package/dist/components/myCaseManage/_component/_button/SubMenuButton.d.ts +7 -0
- package/dist/components/myCaseManage/_component/_button/SubMenuButton.jsx +6 -0
- package/dist/components/myCaseManage/_component/_button/SubMenuButton.tsx +12 -0
- package/dist/components/myCaseManage/_component/_empty/EmptyTable.d.ts +6 -0
- package/dist/components/myCaseManage/_component/_empty/EmptyTable.jsx +53 -0
- package/dist/components/myCaseManage/_component/_empty/EmptyTable.tsx +59 -0
- package/dist/components/myCaseManage/_component/_layout/CaseLayout.d.ts +7 -0
- package/dist/components/myCaseManage/_component/_layout/CaseLayout.jsx +8 -0
- package/dist/components/myCaseManage/_component/_layout/CaseLayout.tsx +20 -0
- package/dist/components/myCaseManage/_component/_layout/CaseWrapper.d.ts +11 -0
- package/dist/components/myCaseManage/_component/_layout/CaseWrapper.jsx +24 -0
- package/dist/components/myCaseManage/_component/_layout/CaseWrapper.tsx +36 -0
- package/dist/components/myCaseManage/_component/_layout/HeaderLayout.d.ts +5 -0
- package/dist/components/myCaseManage/_component/_layout/HeaderLayout.jsx +4 -0
- package/dist/components/myCaseManage/_component/_layout/HeaderLayout.tsx +5 -0
- package/dist/components/myCaseManage/_component/_layout/IntroWrapper.d.ts +8 -0
- package/dist/components/myCaseManage/_component/_layout/IntroWrapper.jsx +24 -0
- package/dist/components/myCaseManage/_component/_layout/IntroWrapper.tsx +43 -0
- package/dist/components/myCaseManage/_component/_loading/Loading.d.ts +3 -0
- package/dist/components/myCaseManage/_component/_loading/Loading.jsx +90 -0
- package/dist/components/myCaseManage/_component/_loading/Loading.tsx +94 -0
- package/dist/components/myCaseManage/_component/_pagination/PaginationComponent.d.ts +10 -0
- package/dist/components/myCaseManage/_component/_pagination/PaginationComponent.jsx +75 -0
- package/dist/components/myCaseManage/_component/_pagination/PaginationComponent.tsx +163 -0
- package/dist/components/myCaseManage/_component/_table/CaseTable.d.ts +10 -0
- package/dist/components/myCaseManage/_component/_table/CaseTable.jsx +37 -0
- package/dist/components/myCaseManage/_component/_table/CaseTable.tsx +62 -0
- package/dist/components/myCaseManage/_fetchers/getCase.d.ts +5 -0
- package/dist/components/myCaseManage/_fetchers/getCase.js +30 -0
- package/dist/components/myCaseManage/_fetchers/getCase.ts +21 -0
- package/dist/components/myCaseManage/_fetchers/getCaseList.d.ts +7 -0
- package/dist/components/myCaseManage/_fetchers/getCaseList.js +30 -0
- package/dist/components/myCaseManage/_fetchers/getCaseList.ts +24 -0
- package/dist/components/myCaseManage/_fetchers/getCourtFileList.d.ts +5 -0
- package/dist/components/myCaseManage/_fetchers/getCourtFileList.js +30 -0
- package/dist/components/myCaseManage/_fetchers/getCourtFileList.ts +21 -0
- package/dist/components/myCaseManage/_fetchers/getTimeLine.d.ts +5 -0
- package/dist/components/myCaseManage/_fetchers/getTimeLine.js +30 -0
- package/dist/components/myCaseManage/_fetchers/getTimeLine.ts +21 -0
- package/dist/components/myCaseManage/_lib/catagoryMenuName.d.ts +8 -0
- package/dist/components/myCaseManage/_lib/catagoryMenuName.js +8 -0
- package/dist/components/myCaseManage/_lib/catagoryMenuName.ts +11 -0
- package/dist/components/myCaseManage/_lib/pagination/locale/ko_KR.d.ts +15 -0
- package/dist/components/myCaseManage/_lib/pagination/locale/ko_KR.js +21 -0
- package/dist/components/myCaseManage/_type/type.d.ts +64 -0
- package/dist/components/myCaseManage/_type/type.js +1 -0
- package/dist/components/myCaseManage/_type/type.ts +73 -0
- package/dist/components/myCaseManage/index.d.ts +3 -0
- package/dist/components/myCaseManage/index.jsx +20 -0
- package/dist/components/myCaseManage/index.tsx +30 -0
- package/dist/components/page/Choice/Choice.d.ts +1 -1
- package/dist/components/page/Strength/Strength.d.ts +1 -0
- package/dist/lib/utils.js +4 -4
- package/dist/styles/globals.css +548 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +93 -91
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import Image from 'next/image';
|
|
2
|
+
import CaseLayout from '../../../_component/_layout/CaseLayout';
|
|
3
|
+
import { Question } from '../../../_type/type';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import header_arrow from '../../../../../asset/images/myCaseManage/header_arrow.svg';
|
|
6
|
+
import client from '../../../../../asset/images/myCaseManage/icon/client.svg';
|
|
7
|
+
import daeryun from '../../../../../asset/images/myCaseManage/icon/daeryun.svg';
|
|
8
|
+
const AnswerBox = ({
|
|
9
|
+
item,
|
|
10
|
+
isOpen,
|
|
11
|
+
openId,
|
|
12
|
+
setOpenId
|
|
13
|
+
}: {
|
|
14
|
+
item: Question;
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
openId: string;
|
|
17
|
+
setOpenId: (id: string) => void;
|
|
18
|
+
}) => {
|
|
19
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (isOpen) {
|
|
22
|
+
if (ref.current) {
|
|
23
|
+
ref.current.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, [isOpen]);
|
|
27
|
+
return (
|
|
28
|
+
<div
|
|
29
|
+
ref={ref}
|
|
30
|
+
className={`transition-height duration-300 ${
|
|
31
|
+
item?.answer?.content ? 'cursor-pointer' : ''
|
|
32
|
+
} overflow-hidden`}
|
|
33
|
+
onClick={() => {
|
|
34
|
+
if (item?.answer?.content) {
|
|
35
|
+
if (item?.idx === openId) {
|
|
36
|
+
setOpenId('');
|
|
37
|
+
} else {
|
|
38
|
+
setOpenId(item?.idx);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<div
|
|
44
|
+
className={`bg-grayScale7 flex flex-row px-[48px] py-[36px] ${
|
|
45
|
+
isOpen ? 'rounded-x-[20px] rounded-t-[20px] ' : 'rounded-[20px]'
|
|
46
|
+
}`}
|
|
47
|
+
>
|
|
48
|
+
<Image src={client} alt="client" width={60} height={60} className="mr-[32px] flex-shrink-0" />
|
|
49
|
+
<div className="w-full">
|
|
50
|
+
<p className="body_small2 text-grayScale2">{item.timestamp}</p>
|
|
51
|
+
<p className="body_medium1 mt-[5px] text-black">{item.content}</p>
|
|
52
|
+
<div className={` mt-[20px] flex flex-row items-center justify-between `}>
|
|
53
|
+
<p
|
|
54
|
+
className={`body_small2 ${
|
|
55
|
+
item?.answer?.content ? 'text-subColor04' : 'text-mycaseMainColor'
|
|
56
|
+
}`}
|
|
57
|
+
>
|
|
58
|
+
{item?.answer?.content ? '답변' : '미답변'}
|
|
59
|
+
</p>
|
|
60
|
+
{item?.answer?.content ? (
|
|
61
|
+
<Image
|
|
62
|
+
src={header_arrow}
|
|
63
|
+
alt="arrow"
|
|
64
|
+
width={16.6}
|
|
65
|
+
height={10}
|
|
66
|
+
className={`transition-transform duration-300 ${isOpen ? 'rotate-180' : ''}`}
|
|
67
|
+
/>
|
|
68
|
+
) : (
|
|
69
|
+
<div className="bg-mycaseMainColor h-[2px] w-[20px]"></div>
|
|
70
|
+
)}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div
|
|
76
|
+
className={`border-grayScale7 flex flex-row overflow-hidden rounded-b-[20px] border-x-[2px] border-b-[2px] border-solid transition-all duration-200 ${
|
|
77
|
+
isOpen ? 'h-full px-[48px] py-[36px] opacity-100' : 'h-0 px-[48px] opacity-0'
|
|
78
|
+
}`}
|
|
79
|
+
>
|
|
80
|
+
<div className="mr-[32px] flex flex-shrink-0 flex-col items-center justify-center gap-[12px]">
|
|
81
|
+
<Image src={daeryun} alt="client" width={60} height={60} className=" flex-shrink-0" />
|
|
82
|
+
<p className="body_small2 text-mycaseMainColor">담당자</p>
|
|
83
|
+
</div>
|
|
84
|
+
<div>
|
|
85
|
+
<p className="body_small2 text-grayScale2">{item?.answer?.timestamp}</p>
|
|
86
|
+
<p className="body_medium1 mt-[5px] text-black">{item?.answer?.content}</p>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const CaseInquiry = () => {
|
|
94
|
+
const [openId, setOpenId] = useState('0');
|
|
95
|
+
const data: Question[] = [
|
|
96
|
+
{
|
|
97
|
+
idx: '1',
|
|
98
|
+
timestamp: '2024-12-11 12:30',
|
|
99
|
+
content:
|
|
100
|
+
'제출한 자료 외에 증거가 더 있었어요. 이메일로 보내드렸는데 확인해 주세요!!!제출한 자료 외에 증거가 더 있었어요. 이메일로 보내드렸는데 확인해 주세요!!!제출한 자료 외에 증거가 더 있었어요. 이메일로 보내드렸는데 확인해 주세요!!!제출한 자료 외에 증거가 더 있었어요. 이메일로 보내드렸는데 확인해 주세요!!!제출한 자료 외에 증거가 더 있었어요. 이메일로 보내드렸는데 확인해 주세요!!!제출한 자료 외에 증거가 더 있었어요. 이메일로 보내드렸는데 확인해 주세요!!!제출한 자료 외에 증거가 더 있었어요. 이메일로 보내드렸는데 확인해 주세요!!!'
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
idx: '2',
|
|
104
|
+
timestamp: '2024-12-12 09:15',
|
|
105
|
+
content: '이전 사건과 유사한 판례가 있는지 궁금합니다.',
|
|
106
|
+
answer: {
|
|
107
|
+
timestamp: '2024-12-12 10:00',
|
|
108
|
+
content:
|
|
109
|
+
'관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.관련 판례를 찾아보고 다시 답변드리겠습니다.'
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
idx: '3',
|
|
114
|
+
timestamp: '2024-12-13 15:45',
|
|
115
|
+
content: '계약서 검토 요청드립니다. 첨부파일 확인 부탁드립니다.',
|
|
116
|
+
answer: {
|
|
117
|
+
timestamp: '2024-12-13 16:20',
|
|
118
|
+
content: '계약서 검토 후 수정 의견을 전달드리겠습니다.'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
return (
|
|
124
|
+
<CaseLayout outerClassName="lg:mt-[40px] " innerClassName={'lg:pt-[70px] pb-[80px] px-[60px]'}>
|
|
125
|
+
<div className="flex flex-col gap-[24px]">
|
|
126
|
+
{data?.map((item, index) => (
|
|
127
|
+
<AnswerBox
|
|
128
|
+
key={index}
|
|
129
|
+
item={item}
|
|
130
|
+
isOpen={openId === item.idx}
|
|
131
|
+
openId={openId}
|
|
132
|
+
setOpenId={setOpenId}
|
|
133
|
+
/>
|
|
134
|
+
))}
|
|
135
|
+
</div>
|
|
136
|
+
<div className="mt-[60px]">
|
|
137
|
+
<button></button>
|
|
138
|
+
</div>
|
|
139
|
+
</CaseLayout>
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export default CaseInquiry;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import CaseLayout from '../../../_component/_layout/CaseLayout';
|
|
3
|
+
import DocumentLine from './DocumentLine';
|
|
4
|
+
const Document = ({ courtFileList }) => {
|
|
5
|
+
const [tap, setTap] = useState('my');
|
|
6
|
+
const courtFileList2 = [
|
|
7
|
+
{
|
|
8
|
+
name: '쾌청.jpg',
|
|
9
|
+
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055314299.jpg',
|
|
10
|
+
created_at: '2025-02-19 14:53:14',
|
|
11
|
+
size: '29.5MB'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'Test Image.png',
|
|
15
|
+
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055321289.png',
|
|
16
|
+
created_at: '2025-02-19 14:53:21',
|
|
17
|
+
size: '20.5MB'
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
return (<CaseLayout outerClassName="lg:mt-[40px] " innerClassName={'lg:pt-[60px] pb-[80px] px-[60px]'}>
|
|
21
|
+
<div className="bg-grayScale4 flex w-full overflow-hidden rounded-[12px] lg:h-[60px]">
|
|
22
|
+
<button onClick={() => setTap('my')} className={`h-full w-full transition-all duration-300 ${tap === 'my'
|
|
23
|
+
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
24
|
+
: 'border-grayScale4 border-[4px] border-solid text-white'}`}>
|
|
25
|
+
<p className="body_medium1">나의제출문서</p>
|
|
26
|
+
</button>
|
|
27
|
+
<button onClick={() => setTap('court')} className={`h-full w-full transition-all duration-300 ${tap === 'court'
|
|
28
|
+
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
29
|
+
: 'border-grayScale4 border-[4px] border-solid text-white'}`}>
|
|
30
|
+
<p className="body_medium1">법원제출문서</p>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
<div className="lg:mt-[20px]">
|
|
34
|
+
<p className="body_small2 text-black">최근 제출순으로 조회됩니다.</p>
|
|
35
|
+
</div>
|
|
36
|
+
<div className="mt-[24px] flex flex-col ">
|
|
37
|
+
{courtFileList2.map((item, index) => (<DocumentLine key={index} item={item} index={index}/>))}
|
|
38
|
+
</div>
|
|
39
|
+
</CaseLayout>);
|
|
40
|
+
};
|
|
41
|
+
export default Document;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import CaseLayout from '../../../_component/_layout/CaseLayout';
|
|
3
|
+
import { FileList } from '../../../_type/type';
|
|
4
|
+
import DocumentLine from './DocumentLine';
|
|
5
|
+
|
|
6
|
+
const Document = ({ courtFileList }: { courtFileList: FileList[] }) => {
|
|
7
|
+
const [tap, setTap] = useState('my');
|
|
8
|
+
const courtFileList2 = [
|
|
9
|
+
{
|
|
10
|
+
name: '쾌청.jpg',
|
|
11
|
+
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055314299.jpg',
|
|
12
|
+
created_at: '2025-02-19 14:53:14',
|
|
13
|
+
size: '29.5MB'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Test Image.png',
|
|
17
|
+
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055321289.png',
|
|
18
|
+
created_at: '2025-02-19 14:53:21',
|
|
19
|
+
size: '20.5MB'
|
|
20
|
+
}
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<CaseLayout outerClassName="lg:mt-[40px] " innerClassName={'lg:pt-[60px] pb-[80px] px-[60px]'}>
|
|
25
|
+
<div className="bg-grayScale4 flex w-full overflow-hidden rounded-[12px] lg:h-[60px]">
|
|
26
|
+
<button
|
|
27
|
+
onClick={() => setTap('my')}
|
|
28
|
+
className={`h-full w-full transition-all duration-300 ${
|
|
29
|
+
tap === 'my'
|
|
30
|
+
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
31
|
+
: 'border-grayScale4 border-[4px] border-solid text-white'
|
|
32
|
+
}`}
|
|
33
|
+
>
|
|
34
|
+
<p className="body_medium1">나의제출문서</p>
|
|
35
|
+
</button>
|
|
36
|
+
<button
|
|
37
|
+
onClick={() => setTap('court')}
|
|
38
|
+
className={`h-full w-full transition-all duration-300 ${
|
|
39
|
+
tap === 'court'
|
|
40
|
+
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
41
|
+
: 'border-grayScale4 border-[4px] border-solid text-white'
|
|
42
|
+
}`}
|
|
43
|
+
>
|
|
44
|
+
<p className="body_medium1">법원제출문서</p>
|
|
45
|
+
</button>
|
|
46
|
+
</div>
|
|
47
|
+
<div className="lg:mt-[20px]">
|
|
48
|
+
<p className="body_small2 text-black">최근 제출순으로 조회됩니다.</p>
|
|
49
|
+
</div>
|
|
50
|
+
<div className="mt-[24px] flex flex-col ">
|
|
51
|
+
{courtFileList2.map((item, index) => (
|
|
52
|
+
<DocumentLine key={index} item={item} index={index} />
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
</CaseLayout>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default Document;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import Image from 'next/image';
|
|
11
|
+
import dayjs from 'dayjs';
|
|
12
|
+
import { useEffect, useState } from 'react';
|
|
13
|
+
import download from '../../../../../asset/images/mycaseManage/icon/download.svg';
|
|
14
|
+
import pdf from '../../../../../asset/images/mycaseManage/icon/pdf.svg';
|
|
15
|
+
import word from '../../../../../asset/images/mycaseManage/icon/word.svg';
|
|
16
|
+
import xls from '../../../../../asset/images/mycaseManage/icon/xls.svg';
|
|
17
|
+
import jpg from '../../../../../asset/images/mycaseManage/icon/jpg.svg';
|
|
18
|
+
import png from '../../../../../asset/images/mycaseManage/icon/png.svg';
|
|
19
|
+
const DocumentLine = ({ item, index }) => {
|
|
20
|
+
const [downloadUrl, setDownloadUrl] = useState(null);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const fetchBlob = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
try {
|
|
24
|
+
const res = yield fetch(item.path);
|
|
25
|
+
const blob = yield res.blob();
|
|
26
|
+
const url = window.URL.createObjectURL(blob);
|
|
27
|
+
setDownloadUrl(url);
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.log(error);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
fetchBlob();
|
|
34
|
+
}, [item.path]);
|
|
35
|
+
const imgUrl = {
|
|
36
|
+
png: png,
|
|
37
|
+
jpg: jpg,
|
|
38
|
+
pdf: pdf,
|
|
39
|
+
xls: xls,
|
|
40
|
+
doc: word
|
|
41
|
+
};
|
|
42
|
+
return (<div key={index} className="border-grayScale6 flex flex-row items-center border-b-[2px] border-solid lg:py-[16px]">
|
|
43
|
+
<Image src={imgUrl[item.name.split('.')[1]]} alt="image" width={39} height={48} unoptimized className="flex-shrink-0 lg:mr-[32px] lg:h-[48px] lg:w-[39px]"/>
|
|
44
|
+
<div className="w-full">
|
|
45
|
+
<p className="body_medium2 text-black">{item.name}</p>
|
|
46
|
+
<p className="body_small2 text-grayScale2 mt-[8px]">
|
|
47
|
+
{dayjs(item.created_at).format('YYYY.MM.DD HH:mm')} - {item.size}
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
{downloadUrl && (<a href={downloadUrl} download={item.name}>
|
|
51
|
+
<Image src={download} alt="image" width={28} height={28} className="flex-shrink-0 lg:h-[28px] lg:w-[28px]"/>
|
|
52
|
+
</a>)}
|
|
53
|
+
</div>);
|
|
54
|
+
};
|
|
55
|
+
export default DocumentLine;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import Image from 'next/image';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import { FileList } from '../../../_type/type';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import download from '../../../../../asset/images/mycaseManage/icon/download.svg';
|
|
6
|
+
import pdf from '../../../../../asset/images/mycaseManage/icon/pdf.svg';
|
|
7
|
+
import word from '../../../../../asset/images/mycaseManage/icon/word.svg';
|
|
8
|
+
import xls from '../../../../../asset/images/mycaseManage/icon/xls.svg';
|
|
9
|
+
|
|
10
|
+
import jpg from '../../../../../asset/images/mycaseManage/icon/jpg.svg';
|
|
11
|
+
import png from '../../../../../asset/images/mycaseManage/icon/png.svg';
|
|
12
|
+
|
|
13
|
+
const DocumentLine = ({ item, index }: { item: FileList; index: number }) => {
|
|
14
|
+
const [downloadUrl, setDownloadUrl] = useState<string | null>(null);
|
|
15
|
+
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const fetchBlob = async () => {
|
|
18
|
+
try {
|
|
19
|
+
const res = await fetch(item.path);
|
|
20
|
+
const blob = await res.blob();
|
|
21
|
+
const url = window.URL.createObjectURL(blob);
|
|
22
|
+
|
|
23
|
+
setDownloadUrl(url);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.log(error);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
fetchBlob();
|
|
30
|
+
}, [item.path]);
|
|
31
|
+
const imgUrl = {
|
|
32
|
+
png: png,
|
|
33
|
+
jpg: jpg,
|
|
34
|
+
pdf: pdf,
|
|
35
|
+
xls: xls,
|
|
36
|
+
doc: word
|
|
37
|
+
};
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
key={index}
|
|
41
|
+
className="border-grayScale6 flex flex-row items-center border-b-[2px] border-solid lg:py-[16px]"
|
|
42
|
+
>
|
|
43
|
+
<Image
|
|
44
|
+
src={imgUrl[item.name.split('.')[1] as keyof typeof imgUrl]}
|
|
45
|
+
alt="image"
|
|
46
|
+
width={39}
|
|
47
|
+
height={48}
|
|
48
|
+
unoptimized
|
|
49
|
+
className="flex-shrink-0 lg:mr-[32px] lg:h-[48px] lg:w-[39px]"
|
|
50
|
+
/>
|
|
51
|
+
<div className="w-full">
|
|
52
|
+
<p className="body_medium2 text-black">{item.name}</p>
|
|
53
|
+
<p className="body_small2 text-grayScale2 mt-[8px]">
|
|
54
|
+
{dayjs(item.created_at).format('YYYY.MM.DD HH:mm')} - {item.size}
|
|
55
|
+
</p>
|
|
56
|
+
</div>
|
|
57
|
+
{downloadUrl && (
|
|
58
|
+
<a href={downloadUrl} download={item.name}>
|
|
59
|
+
<Image
|
|
60
|
+
src={download}
|
|
61
|
+
alt="image"
|
|
62
|
+
width={28}
|
|
63
|
+
height={28}
|
|
64
|
+
className="flex-shrink-0 lg:h-[28px] lg:w-[28px]"
|
|
65
|
+
/>
|
|
66
|
+
</a>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default DocumentLine;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'next-i18next';
|
|
3
|
+
import IntroWrapper from '../_component/_layout/IntroWrapper';
|
|
4
|
+
import SubMenuButton from '../_component/_button/SubMenuButton';
|
|
5
|
+
import HeaderLayout from '../_component/_layout/HeaderLayout';
|
|
6
|
+
import DetailInfo from './_component/DetailInfo';
|
|
7
|
+
import { useRouter } from 'next/router';
|
|
8
|
+
import { useActionGetCourtFileList, useActionGetDetailList, useActionGetTimeLine } from '../_actions/action';
|
|
9
|
+
import TimeLine from './_component/TimeLine';
|
|
10
|
+
import Document from './_component/_document/Document';
|
|
11
|
+
import ContactInfo from './_component/ContactInfo';
|
|
12
|
+
import CaseInquiry from './_component/_caseInquiry/CaseInquiry';
|
|
13
|
+
import background from '../../../asset/images/mycaseManage/background.svg';
|
|
14
|
+
const Intro = () => {
|
|
15
|
+
const { t } = useTranslation('common');
|
|
16
|
+
const [selected, setSelected] = useState('사건 정보');
|
|
17
|
+
const router = useRouter();
|
|
18
|
+
const { id } = router.query;
|
|
19
|
+
const { data: detailList, isLoading: detailListLoading } = useActionGetDetailList(id);
|
|
20
|
+
const { data: timeLine, isLoading: timeLineLoading } = useActionGetTimeLine(id);
|
|
21
|
+
const { data: courtFileList, isLoading: courtFileListLoading } = useActionGetCourtFileList(id);
|
|
22
|
+
return (<div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
|
|
23
|
+
<IntroWrapper title={'상세 사건 정보'} subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'} backgroundImage={background} outerClassName="h-[513px]"/>
|
|
24
|
+
|
|
25
|
+
<div className={'relative z-[1] '}>
|
|
26
|
+
{/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
|
|
27
|
+
<HeaderLayout>
|
|
28
|
+
<div className="mt-[302px] flex items-center justify-center gap-[28px]">
|
|
29
|
+
<SubMenuButton title="사건 정보" isSelected={selected === '사건 정보'} onClick={() => setSelected('사건 정보')}/>
|
|
30
|
+
<SubMenuButton title="사건 타임라인" isSelected={selected === '사건 타임라인'} onClick={() => setSelected('사건 타임라인')}/>
|
|
31
|
+
<SubMenuButton title="문서함" isSelected={selected === '문서함'} onClick={() => setSelected('문서함')}/>
|
|
32
|
+
<SubMenuButton title="계약정보" isSelected={selected === '계약정보'} onClick={() => setSelected('계약정보')}/>
|
|
33
|
+
<SubMenuButton title="사건문의" isSelected={selected === '사건문의'} onClick={() => setSelected('사건문의')}/>
|
|
34
|
+
</div>
|
|
35
|
+
{selected === '사건 정보' && (<DetailInfo detailList={detailList === null || detailList === void 0 ? void 0 : detailList.data} isLoading={detailListLoading}/>)}
|
|
36
|
+
{selected === '사건 타임라인' && (<TimeLine timeLine={timeLine === null || timeLine === void 0 ? void 0 : timeLine.list} isLoading={timeLineLoading}/>)}
|
|
37
|
+
{selected === '문서함' && <Document courtFileList={courtFileList === null || courtFileList === void 0 ? void 0 : courtFileList.data}/>}
|
|
38
|
+
{selected === '계약정보' && <ContactInfo />}
|
|
39
|
+
{selected === '사건문의' && <CaseInquiry />}
|
|
40
|
+
</HeaderLayout>
|
|
41
|
+
</div>
|
|
42
|
+
</div>);
|
|
43
|
+
};
|
|
44
|
+
export default Intro;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'next-i18next';
|
|
3
|
+
import IntroWrapper from '../_component/_layout/IntroWrapper';
|
|
4
|
+
import CaseLayout from '../_component/_layout/CaseLayout';
|
|
5
|
+
import SubMenuButton from '../_component/_button/SubMenuButton';
|
|
6
|
+
import HeaderLayout from '../_component/_layout/HeaderLayout';
|
|
7
|
+
import DetailInfo from './_component/DetailInfo';
|
|
8
|
+
import { useRouter } from 'next/router';
|
|
9
|
+
import { useQuery } from 'react-query';
|
|
10
|
+
import getCase from '../_fetchers/getCase';
|
|
11
|
+
import { DetailList, FetchType, FileList, TimeLineType } from '../_type/type';
|
|
12
|
+
import { useActionGetCourtFileList, useActionGetDetailList, useActionGetTimeLine } from '../_actions/action';
|
|
13
|
+
|
|
14
|
+
import TimeLine from './_component/TimeLine';
|
|
15
|
+
import Document from './_component/_document/Document';
|
|
16
|
+
import ContactInfo from './_component/ContactInfo';
|
|
17
|
+
import CaseInquiry from './_component/_caseInquiry/CaseInquiry';
|
|
18
|
+
import background from '../../../asset/images/mycaseManage/background.svg';
|
|
19
|
+
const Intro = () => {
|
|
20
|
+
const { t } = useTranslation('common');
|
|
21
|
+
const [selected, setSelected] = useState<string>('사건 정보');
|
|
22
|
+
const router = useRouter();
|
|
23
|
+
const { id } = router.query;
|
|
24
|
+
|
|
25
|
+
const { data: detailList, isLoading: detailListLoading } = useActionGetDetailList(id as string);
|
|
26
|
+
const { data: timeLine, isLoading: timeLineLoading } = useActionGetTimeLine(id as string);
|
|
27
|
+
const { data: courtFileList, isLoading: courtFileListLoading } = useActionGetCourtFileList(id as string);
|
|
28
|
+
return (
|
|
29
|
+
<div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
|
|
30
|
+
<IntroWrapper
|
|
31
|
+
title={'상세 사건 정보'}
|
|
32
|
+
subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'}
|
|
33
|
+
backgroundImage={background}
|
|
34
|
+
outerClassName="h-[513px]"
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<div className={'relative z-[1] '}>
|
|
38
|
+
{/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
|
|
39
|
+
<HeaderLayout>
|
|
40
|
+
<div className="mt-[302px] flex items-center justify-center gap-[28px]">
|
|
41
|
+
<SubMenuButton
|
|
42
|
+
title="사건 정보"
|
|
43
|
+
isSelected={selected === '사건 정보'}
|
|
44
|
+
onClick={() => setSelected('사건 정보')}
|
|
45
|
+
/>
|
|
46
|
+
<SubMenuButton
|
|
47
|
+
title="사건 타임라인"
|
|
48
|
+
isSelected={selected === '사건 타임라인'}
|
|
49
|
+
onClick={() => setSelected('사건 타임라인')}
|
|
50
|
+
/>
|
|
51
|
+
<SubMenuButton
|
|
52
|
+
title="문서함"
|
|
53
|
+
isSelected={selected === '문서함'}
|
|
54
|
+
onClick={() => setSelected('문서함')}
|
|
55
|
+
/>
|
|
56
|
+
<SubMenuButton
|
|
57
|
+
title="계약정보"
|
|
58
|
+
isSelected={selected === '계약정보'}
|
|
59
|
+
onClick={() => setSelected('계약정보')}
|
|
60
|
+
/>
|
|
61
|
+
<SubMenuButton
|
|
62
|
+
title="사건문의"
|
|
63
|
+
isSelected={selected === '사건문의'}
|
|
64
|
+
onClick={() => setSelected('사건문의')}
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
{selected === '사건 정보' && (
|
|
68
|
+
<DetailInfo detailList={detailList?.data as DetailList} isLoading={detailListLoading} />
|
|
69
|
+
)}
|
|
70
|
+
{selected === '사건 타임라인' && (
|
|
71
|
+
<TimeLine
|
|
72
|
+
timeLine={timeLine?.list as unknown as TimeLineType[][]}
|
|
73
|
+
isLoading={timeLineLoading}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
|
+
{selected === '문서함' && <Document courtFileList={courtFileList?.data as FileList[]} />}
|
|
77
|
+
{selected === '계약정보' && <ContactInfo />}
|
|
78
|
+
{selected === '사건문의' && <CaseInquiry />}
|
|
79
|
+
</HeaderLayout>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default Intro;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FetchType, DetailList, TimeLineType, FileList } from '../_type/type';
|
|
2
|
+
export declare const useActionGetDetailList: (id: string) => {
|
|
3
|
+
data: FetchType<DetailList> | undefined;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const useActionGetTimeLine: (id: string) => {
|
|
7
|
+
data: FetchType<TimeLineType> | undefined;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const useActionGetCourtFileList: (id: string) => {
|
|
11
|
+
data: FetchType<FileList[]> | undefined;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useQuery } from 'react-query';
|
|
2
|
+
import getCase from '../_fetchers/getCase';
|
|
3
|
+
import getTimeLine from '../_fetchers/getTimeLine';
|
|
4
|
+
import getCourtFileList from '../_fetchers/getCourtFileList';
|
|
5
|
+
const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTc0MDAxNDYzOCwiZXhwIjoxNzcxNTcyMjM4fQ.11ra7DkzlOVmBqDjo8SJTQnZDZdRHXjjU3ujK8G3OOY';
|
|
6
|
+
export const useActionGetDetailList = (id) => {
|
|
7
|
+
const { data, isLoading } = useQuery({
|
|
8
|
+
queryKey: ['case', id],
|
|
9
|
+
queryFn: () => getCase({
|
|
10
|
+
jwt: jwt,
|
|
11
|
+
id: id
|
|
12
|
+
}),
|
|
13
|
+
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
14
|
+
refetchOnWindowFocus: false,
|
|
15
|
+
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
16
|
+
cacheTime: 0,
|
|
17
|
+
staleTime: 0,
|
|
18
|
+
onSuccess: res => { },
|
|
19
|
+
onError: error => {
|
|
20
|
+
console.log(error);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return { data, isLoading };
|
|
24
|
+
};
|
|
25
|
+
export const useActionGetTimeLine = (id) => {
|
|
26
|
+
const { data, isLoading } = useQuery({
|
|
27
|
+
queryKey: ['case', 'timeline', id],
|
|
28
|
+
queryFn: () => getTimeLine({
|
|
29
|
+
jwt: jwt,
|
|
30
|
+
id: id
|
|
31
|
+
}),
|
|
32
|
+
cacheTime: 0,
|
|
33
|
+
staleTime: 0,
|
|
34
|
+
onSuccess: res => { },
|
|
35
|
+
onError: error => {
|
|
36
|
+
console.log(error);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return { data, isLoading };
|
|
40
|
+
};
|
|
41
|
+
export const useActionGetCourtFileList = (id) => {
|
|
42
|
+
const { data, isLoading } = useQuery({
|
|
43
|
+
queryKey: ['case', 'courtFileList', id],
|
|
44
|
+
queryFn: () => getCourtFileList({
|
|
45
|
+
jwt: jwt,
|
|
46
|
+
id: id
|
|
47
|
+
}),
|
|
48
|
+
cacheTime: 0,
|
|
49
|
+
staleTime: 0,
|
|
50
|
+
onSuccess: res => { },
|
|
51
|
+
onError: error => {
|
|
52
|
+
console.log(error);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return { data, isLoading };
|
|
56
|
+
};
|