@daeryun/dr_components 1.1.61 → 1.1.63
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/index.js +31 -1
- package/dist/components/index.ts +31 -1
- package/dist/components/page/MyCase/[id]/_component/ContactInfo.jsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/ContactInfo.tsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/DetailInfo.jsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/DetailInfo.tsx +3 -9
- package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.jsx +14 -35
- package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.tsx +7 -19
- package/dist/components/page/MyCase/[id]/_component/TimeLine.jsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/TimeLine.tsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/_document/Document.d.ts +1 -2
- package/dist/components/page/MyCase/[id]/_component/_document/Document.jsx +21 -63
- package/dist/components/page/MyCase/[id]/_component/_document/Document.tsx +17 -97
- package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.d.ts +1 -2
- package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.jsx +13 -58
- package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.tsx +25 -124
- package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.jsx +7 -12
- package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.tsx +7 -12
- package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.d.ts +4 -3
- package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.jsx +34 -51
- package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.tsx +59 -88
- package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.jsx +2 -2
- package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.tsx +2 -2
- package/dist/components/page/MyCase/_actions/action.d.ts +0 -34
- package/dist/components/page/MyCase/_actions/action.js +0 -59
- package/dist/components/page/MyCase/_actions/action.ts +0 -79
- package/dist/components/page/MyCase/_component/_button/SubMenuButton.jsx +4 -2
- package/dist/components/page/MyCase/_component/_button/SubMenuButton.tsx +5 -2
- package/dist/components/page/MyCase/_component/_empty/EmptyTable.d.ts +1 -2
- package/dist/components/page/MyCase/_component/_empty/EmptyTable.jsx +6 -14
- package/dist/components/page/MyCase/_component/_empty/EmptyTable.tsx +6 -34
- package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.jsx +3 -8
- package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.tsx +4 -3
- package/dist/components/page/MyCase/_type/type.d.ts +1 -3
- package/dist/components/page/MyCase/_type/type.ts +1 -3
- package/dist/styles/globals.css +93 -520
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.d.ts +0 -4
- package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.jsx +0 -13
- package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.tsx +0 -18
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.d.ts +0 -5
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.jsx +0 -27
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.tsx +0 -46
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.d.ts +0 -6
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.jsx +0 -34
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.tsx +0 -65
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.d.ts +0 -5
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.jsx +0 -27
- package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.tsx +0 -47
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.d.ts +0 -7
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.jsx +0 -93
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.tsx +0 -139
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.d.ts +0 -10
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.jsx +0 -149
- package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.tsx +0 -212
- package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.d.ts +0 -6
- package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.jsx +0 -154
- package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.tsx +0 -177
- package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.d.ts +0 -14
- package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.jsx +0 -278
- package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.tsx +0 -411
- package/dist/components/page/MyCase/_component/_fileView/HwpViewer.d.ts +0 -8
- package/dist/components/page/MyCase/_component/_fileView/HwpViewer.jsx +0 -56
- package/dist/components/page/MyCase/_component/_fileView/HwpViewer.tsx +0 -111
- package/dist/components/page/MyCase/_component/_fileView/TopOverlay.d.ts +0 -3
- package/dist/components/page/MyCase/_component/_fileView/TopOverlay.jsx +0 -10
- package/dist/components/page/MyCase/_component/_fileView/TopOverlay.tsx +0 -10
- package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.d.ts +0 -7
- package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.js +0 -34
- package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.ts +0 -36
- package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.d.ts +0 -5
- package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.js +0 -33
- package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.ts +0 -25
- package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.d.ts +0 -5
- package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.js +0 -33
- package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.ts +0 -25
- package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.d.ts +0 -4
- package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.js +0 -33
- package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.ts +0 -25
|
@@ -10,7 +10,6 @@ import { DetailList, FileList, Question, TimeLineData } from '../../_type/type';
|
|
|
10
10
|
import {
|
|
11
11
|
useActionGetCourtFileList,
|
|
12
12
|
useActionGetDetailList,
|
|
13
|
-
useActionGetDaeryunFileList,
|
|
14
13
|
useActionGetMyCaseQuestion,
|
|
15
14
|
useActionGetMyFileList,
|
|
16
15
|
useActionGetTimeLine
|
|
@@ -49,12 +48,6 @@ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
|
|
|
49
48
|
refetch: myFileListRefetch
|
|
50
49
|
} = useActionGetMyFileList(id as string, jwt);
|
|
51
50
|
|
|
52
|
-
const {
|
|
53
|
-
data: daeryunFileList,
|
|
54
|
-
isLoading: daeryunFileListLoading,
|
|
55
|
-
refetch: daeryunFileListRefetch
|
|
56
|
-
} = useActionGetDaeryunFileList(id as string, jwt, !!id);
|
|
57
|
-
|
|
58
51
|
const {
|
|
59
52
|
data: myCaseQuestion,
|
|
60
53
|
isLoading: myCaseQuestionLoading,
|
|
@@ -74,7 +67,7 @@ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
|
|
|
74
67
|
}
|
|
75
68
|
return (
|
|
76
69
|
<Suspense>
|
|
77
|
-
<div className=" relative mt-[
|
|
70
|
+
<div className=" relative mt-[126px] min-h-[700px] md:mt-[78px] md2:mt-[88px]">
|
|
78
71
|
<IntroWrapper
|
|
79
72
|
title={'상세 사건 정보'}
|
|
80
73
|
subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'}
|
|
@@ -87,8 +80,8 @@ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
|
|
|
87
80
|
<div className={'relative z-[1] '}>
|
|
88
81
|
{/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
|
|
89
82
|
<HeaderLayout>
|
|
90
|
-
<div className="
|
|
91
|
-
|
|
83
|
+
<div className="mt-[210px] sm-top:mt-[283px] lg:mt-[302px] ">
|
|
84
|
+
<div className="flex items-center justify-center gap-[16px] max-[500px]:hidden sm-top:gap-[32px] lg:gap-[28px]">
|
|
92
85
|
<SubMenuButton
|
|
93
86
|
title="사건 기본정보"
|
|
94
87
|
isSelected={selected === '사건 정보'}
|
|
@@ -114,18 +107,14 @@ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
|
|
|
114
107
|
isSelected={selected === '사건문의'}
|
|
115
108
|
onClick={() => setSelected('사건문의')}
|
|
116
109
|
/>
|
|
117
|
-
</div>
|
|
118
|
-
<div className="
|
|
119
|
-
<CaseTabSwiper
|
|
120
|
-
id="case-tab-swiper3"
|
|
121
|
-
scrollClassName=""
|
|
122
|
-
containerClassName="!py-[5px] sm-top:!py-[6px] lg:py-[6px]"
|
|
123
|
-
>
|
|
110
|
+
</div>
|
|
111
|
+
<div className="hidden max-[500px]:block 2sm:pl-[40px]">
|
|
112
|
+
<CaseTabSwiper id="case-tab-swiper3" scrollClassName="max-[500px]:!block">
|
|
124
113
|
<SubMenuButton
|
|
125
114
|
title="사건 기본정보"
|
|
126
115
|
isSelected={selected === '사건 정보'}
|
|
127
116
|
onClick={() => setSelected('사건 정보')}
|
|
128
|
-
outerClassName="ml-[20px]
|
|
117
|
+
outerClassName="ml-[20px] swiper-slide"
|
|
129
118
|
/>
|
|
130
119
|
<SubMenuButton
|
|
131
120
|
title="사건 타임라인"
|
|
@@ -167,7 +156,6 @@ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
|
|
|
167
156
|
<Document
|
|
168
157
|
courtFileList={courtFileList?.data as FileList[]}
|
|
169
158
|
myFileList={myFileList?.data as FileList[]}
|
|
170
|
-
daeryunFileList={daeryunFileList?.data as FileList[]}
|
|
171
159
|
id={id as string}
|
|
172
160
|
refetch={myFileListRefetch}
|
|
173
161
|
/>
|
|
@@ -37,7 +37,7 @@ const TimeContainer = ({ list, isFirst }) => {
|
|
|
37
37
|
</>);
|
|
38
38
|
};
|
|
39
39
|
const TimeLine = ({ timeLine, isLoading }) => {
|
|
40
|
-
return (<CaseLayout isMobilePadding={false} outerClassName="mt-[
|
|
40
|
+
return (<CaseLayout isMobilePadding={false} outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] mb-[50px] " innerClassName={'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:px-[50px] sm-top:pt-[56px] sm-top:pb-[80px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'}>
|
|
41
41
|
<div className="flex flex-col gap-[16px]">
|
|
42
42
|
{timeLine.length > 0 ? (timeLine === null || timeLine === void 0 ? void 0 : timeLine.map((list, index) => {
|
|
43
43
|
return <TimeContainer key={index} list={list} isFirst={index === timeLine.length - 1}/>;
|
|
@@ -58,7 +58,7 @@ const TimeLine = ({ timeLine, isLoading }: { timeLine: TimeLineData; isLoading:
|
|
|
58
58
|
return (
|
|
59
59
|
<CaseLayout
|
|
60
60
|
isMobilePadding={false}
|
|
61
|
-
outerClassName="mt-[
|
|
61
|
+
outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] mb-[50px] "
|
|
62
62
|
innerClassName={
|
|
63
63
|
'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:px-[50px] sm-top:pt-[56px] sm-top:pb-[80px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'
|
|
64
64
|
}
|
|
@@ -66,7 +66,7 @@ const AnswerBox = ({ item, isOpen, openId, setOpenId }) => {
|
|
|
66
66
|
const CaseInquiry = ({ myCaseQuestion, isLoading, id, refetch, pageSize, totalLength, pageNumber, onChange }) => {
|
|
67
67
|
const [openId, setOpenId] = useState('0');
|
|
68
68
|
const [isOpen, setIsOpen] = useState(false);
|
|
69
|
-
return (<CaseLayout isMobilePadding={false} outerClassName="mt-[
|
|
69
|
+
return (<CaseLayout isMobilePadding={false} outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] " innerClassName={'pt-[32px] px-[20px] pb-[80px] 2sm:px-[40px] sm-top:pt-[56px] sm-top:px-[50px] sm-top:pb-[60px] lg:pt-[70px] lg:pb-[80px] lg:px-[60px]'}>
|
|
70
70
|
{isLoading ? (<Loading />) : (<>
|
|
71
71
|
<div className="flex flex-col gap-[8px] sm-top:gap-[12px] lg:gap-[24px]">
|
|
72
72
|
{(myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.length) > 0 ? (myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.map((item, index) => (<AnswerBox key={index} item={item} isOpen={openId === item.idx.toString()} openId={openId} setOpenId={setOpenId}/>))) : (<EmptyTable tap="caseInquiry" subTap={0} isMinHeight={false}/>)}
|
|
@@ -145,7 +145,7 @@ const CaseInquiry = ({
|
|
|
145
145
|
return (
|
|
146
146
|
<CaseLayout
|
|
147
147
|
isMobilePadding={false}
|
|
148
|
-
outerClassName="mt-[
|
|
148
|
+
outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] "
|
|
149
149
|
innerClassName={
|
|
150
150
|
'pt-[32px] px-[20px] pb-[80px] 2sm:px-[40px] sm-top:pt-[56px] sm-top:px-[50px] sm-top:pb-[60px] lg:pt-[70px] lg:pb-[80px] lg:px-[60px]'
|
|
151
151
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FileList } from '../../../_type/type';
|
|
2
|
-
declare const Document: ({ courtFileList, myFileList,
|
|
2
|
+
declare const Document: ({ courtFileList, myFileList, id, refetch }: {
|
|
3
3
|
courtFileList: FileList[];
|
|
4
4
|
myFileList: FileList[];
|
|
5
|
-
daeryunFileList: FileList[];
|
|
6
5
|
id: string;
|
|
7
6
|
refetch: () => void;
|
|
8
7
|
}) => import("react").JSX.Element;
|
|
@@ -1,75 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
import CaseLayout from '../../../_component/_layout/CaseLayout';
|
|
3
3
|
import DocumentLine from './DocumentLine';
|
|
4
4
|
import EmptyTable from '../../../_component/_empty/EmptyTable';
|
|
5
5
|
import FileDropZone from './FileDropZone';
|
|
6
|
-
const Document = ({ courtFileList, myFileList,
|
|
6
|
+
const Document = ({ courtFileList, myFileList, id, refetch }) => {
|
|
7
7
|
const [tap, setTap] = useState('my');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{ title: '보완요청', value: -1 },
|
|
13
|
-
{ title: '완료', value: 1 }
|
|
14
|
-
];
|
|
15
|
-
const coerceStatus = (v) => {
|
|
16
|
-
if (v === null || v === undefined || v === '')
|
|
17
|
-
return 1; // ✅ null은 완료로
|
|
18
|
-
if (v === -1 || v === 0 || v === 1)
|
|
19
|
-
return v;
|
|
20
|
-
const n = typeof v === 'string' ? Number.parseInt(v, 10) : Number(v);
|
|
21
|
-
if (n === -1 || n === 0 || n === 1)
|
|
22
|
-
return n;
|
|
23
|
-
return undefined; // 알 수 없는 값은 매칭 제외
|
|
24
|
-
};
|
|
25
|
-
const filteredDaeryun = useMemo(() => {
|
|
26
|
-
if (!daeryunFileList)
|
|
27
|
-
return [];
|
|
28
|
-
if (subTab === null)
|
|
29
|
-
return daeryunFileList; // 전체
|
|
30
|
-
return daeryunFileList.filter(it => coerceStatus(it.review_status) === subTab);
|
|
31
|
-
}, [daeryunFileList, subTab]);
|
|
32
|
-
return (<CaseLayout isMobilePadding={false} outerClassName="mt-[20px] sm-top:mt-[14px] lg:mt-[28px] " innerClassName={'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:pt-[56px] sm-top:px-[50px] sm-top:pb-[60px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'}>
|
|
33
|
-
<div className="flex h-[29px] w-full overflow-hidden sm-top:h-[40px] lg:h-[45px]">
|
|
34
|
-
<button onClick={() => setTap('my')} className={`h-full w-full border-b-[1px] transition-all duration-300 ${tap === 'my' ? 'border-black' : 'border-grayScale4'} pb-[6px] sm-top:pb-[10px] lg:pb-[8px]`}>
|
|
35
|
-
<p className={`body_large1_mo sm-top:body_large1_tb lg:body_large1 ${tap === 'my' ? 'text-black' : 'text-grayScale4'}`}>
|
|
36
|
-
나의전달문서
|
|
37
|
-
</p>
|
|
8
|
+
return (<CaseLayout isMobilePadding={false} outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] " innerClassName={'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:pt-[56px] sm-top:px-[50px] sm-top:pb-[60px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'}>
|
|
9
|
+
<div className="flex h-[48px] w-full overflow-hidden rounded-[12px] bg-grayScale4 sm-top:h-[60px]">
|
|
10
|
+
<button onClick={() => setTap('my')} className={`h-full w-full transition-all duration-300 ${tap === 'my' ? 'rounded-[12px] border-[2px] border-solid border-grayScale4 bg-white sm-top:border-[3px] lg:border-[4px]' : 'border-[4px] border-solid border-grayScale4 text-white'}`}>
|
|
11
|
+
<p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">나의전달문서</p>
|
|
38
12
|
</button>
|
|
39
|
-
<button onClick={() => setTap('
|
|
40
|
-
<p className=
|
|
41
|
-
대륜전달문서
|
|
42
|
-
</p>
|
|
43
|
-
</button>
|
|
44
|
-
<button onClick={() => setTap('court')} className={`h-full w-full border-b-[1px] transition-all duration-300 ${tap === 'court' ? 'border-black' : 'border-grayScale4'} pb-[6px] sm-top:pb-[10px] lg:pb-[8px]`}>
|
|
45
|
-
<p className={`body_large1_mo sm-top:body_large1_tb lg:body_large1 ${tap === 'court' ? 'text-black' : 'text-grayScale4'}`}>
|
|
46
|
-
법원문서
|
|
47
|
-
</p>
|
|
13
|
+
<button onClick={() => setTap('court')} className={`h-full w-full transition-all duration-300 ${tap === 'court' ? 'rounded-[12px] border-[2px] border-solid border-grayScale4 bg-white sm-top:border-[3px] lg:border-[4px]' : 'border-[4px] border-solid border-grayScale4 text-white'}`}>
|
|
14
|
+
<p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">법원문서</p>
|
|
48
15
|
</button>
|
|
49
16
|
</div>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</div> */}
|
|
55
|
-
{tap === 'my' && <FileDropZone id={id} refetch={refetch}/>}
|
|
56
|
-
<div className={` flex flex-col ${tap === 'daeryun' ? 'mt-[20px] sm-top:mt-[22px] lg:mt-[28px]' : 'mt-[30px] lg:mt-[38px] '}`}>
|
|
57
|
-
{tap === 'daeryun' && (<div className=" mb-[30px] flex items-center gap-[8px] sm-top:gap-[12px] lg:mb-[38px] lg:gap-[16px]">
|
|
58
|
-
{subTabList.map(title => (<button key={title.value} onClick={() => setSubTab(title.value)} className={`label_large2_mo sm-top:label_large2_tb lg:label_large2 flex h-[26px] items-center rounded-[20px] px-[12px] leading-none sm-top:h-[35px] sm-top:px-[14px] lg:h-[41px] lg:px-[28px] ${subTab === title.value ? 'border border-solid border-grayScale1 bg-grayScale1 text-white' : 'border border-solid border-grayScale3 bg-white text-grayScale3'}`}>
|
|
59
|
-
{title.title}
|
|
60
|
-
</button>))}
|
|
61
|
-
</div>)}
|
|
62
|
-
{tap === 'my' && (myFileList === null || myFileList === void 0 ? void 0 : myFileList.length) > 0 ? (<div className="flex flex-col gap-[12px] sm-top:gap-[20px] lg:gap-[28px]">
|
|
63
|
-
{myFileList.map((item, index) => (<DocumentLine item={item} index={index} key={index} id={id}/>))}
|
|
64
|
-
</div>) : (tap === 'my' && <EmptyTable tap="file" subTap={0} titleLabel="나의전달문서"/>)}
|
|
65
|
-
|
|
66
|
-
{tap === 'daeryun' && (filteredDaeryun === null || filteredDaeryun === void 0 ? void 0 : filteredDaeryun.length) > 0 ? (<div className="mb-[80px] flex flex-col gap-[12px] sm-top:gap-[20px] lg:gap-[28px]">
|
|
67
|
-
{filteredDaeryun.map((item, index) => (<DocumentLine item={item} index={index} key={index} id={id}/>))}
|
|
68
|
-
</div>) : (tap === 'daeryun' && <EmptyTable tap="file" subTap={0} titleLabel="대륜전달문서"/>)}
|
|
69
|
-
{tap === 'court' && (courtFileList === null || courtFileList === void 0 ? void 0 : courtFileList.length) > 0 ? (<div className="mb-[80px] flex flex-col gap-[12px] sm-top:gap-[20px] lg:gap-[28px]">
|
|
70
|
-
{courtFileList.map((item, index) => (<DocumentLine item={item} index={index} key={index} id={id}/>))}
|
|
71
|
-
</div>) : (tap === 'court' && <EmptyTable tap="file" subTap={0} titleLabel="법원문서"/>)}
|
|
17
|
+
<div className="mt-[16px] lg:mt-[20px]">
|
|
18
|
+
<p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 text-black">
|
|
19
|
+
최근 제출순으로 조회됩니다.
|
|
20
|
+
</p>
|
|
72
21
|
</div>
|
|
22
|
+
<div className="mt-[20px] flex flex-col lg:mt-[24px] ">
|
|
23
|
+
{tap === 'my' && (myFileList === null || myFileList === void 0 ? void 0 : myFileList.length) > 0
|
|
24
|
+
? myFileList.map((item, index) => <DocumentLine item={item} index={index} key={index}/>)
|
|
25
|
+
: tap === 'my' && <EmptyTable tap="file" subTap={0}/>}
|
|
26
|
+
{tap === 'court' && (courtFileList === null || courtFileList === void 0 ? void 0 : courtFileList.length) > 0
|
|
27
|
+
? courtFileList.map((item, index) => <DocumentLine item={item} index={index} key={index}/>)
|
|
28
|
+
: tap === 'court' && <EmptyTable tap="file" subTap={0}/>}
|
|
29
|
+
</div>
|
|
30
|
+
{tap === 'my' && <FileDropZone id={id} refetch={refetch}/>}
|
|
73
31
|
</CaseLayout>);
|
|
74
32
|
};
|
|
75
33
|
export default Document;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
import CaseLayout from '../../../_component/_layout/CaseLayout';
|
|
3
3
|
|
|
4
4
|
import { FileList } from '../../../_type/type';
|
|
@@ -6,136 +6,56 @@ import { FileList } from '../../../_type/type';
|
|
|
6
6
|
import DocumentLine from './DocumentLine';
|
|
7
7
|
import EmptyTable from '../../../_component/_empty/EmptyTable';
|
|
8
8
|
import FileDropZone from './FileDropZone';
|
|
9
|
-
type ReviewStatus = -1 | 0 | 1;
|
|
10
9
|
|
|
11
|
-
type RawStatus = ReviewStatus | string | number | null | undefined;
|
|
12
10
|
const Document = ({
|
|
13
11
|
courtFileList,
|
|
14
12
|
myFileList,
|
|
15
|
-
daeryunFileList,
|
|
16
13
|
id,
|
|
17
14
|
refetch
|
|
18
15
|
}: {
|
|
19
16
|
courtFileList: FileList[];
|
|
20
17
|
myFileList: FileList[];
|
|
21
|
-
daeryunFileList: FileList[];
|
|
22
18
|
id: string;
|
|
23
19
|
refetch: () => void;
|
|
24
20
|
}) => {
|
|
25
21
|
const [tap, setTap] = useState('my');
|
|
26
22
|
|
|
27
|
-
const [subTab, setSubTab] = useState<number | null>(null);
|
|
28
|
-
const subTabList = [
|
|
29
|
-
{ title: '전체', value: null },
|
|
30
|
-
{ title: '승인대기', value: 0 },
|
|
31
|
-
{ title: '보완요청', value: -1 },
|
|
32
|
-
{ title: '완료', value: 1 }
|
|
33
|
-
];
|
|
34
|
-
const coerceStatus = (v: RawStatus): ReviewStatus | undefined => {
|
|
35
|
-
if (v === null || v === undefined || v === '') return 1; // ✅ null은 완료로
|
|
36
|
-
if (v === -1 || v === 0 || v === 1) return v;
|
|
37
|
-
const n = typeof v === 'string' ? Number.parseInt(v, 10) : Number(v);
|
|
38
|
-
if (n === -1 || n === 0 || n === 1) return n as ReviewStatus;
|
|
39
|
-
return undefined; // 알 수 없는 값은 매칭 제외
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const filteredDaeryun = useMemo(() => {
|
|
43
|
-
if (!daeryunFileList) return [];
|
|
44
|
-
if (subTab === null) return daeryunFileList; // 전체
|
|
45
|
-
return daeryunFileList.filter(it => coerceStatus(it.review_status) === subTab);
|
|
46
|
-
}, [daeryunFileList, subTab]);
|
|
47
|
-
|
|
48
23
|
return (
|
|
49
24
|
<CaseLayout
|
|
50
25
|
isMobilePadding={false}
|
|
51
|
-
outerClassName="mt-[
|
|
26
|
+
outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] "
|
|
52
27
|
innerClassName={
|
|
53
28
|
'pt-[32px] px-[20px] 2sm:px-[40px] sm-top:pt-[56px] sm-top:px-[50px] sm-top:pb-[60px] lg:pt-[60px] lg:pb-[80px] lg:px-[60px]'
|
|
54
29
|
}
|
|
55
30
|
>
|
|
56
|
-
<div className="flex h-[
|
|
31
|
+
<div className="flex h-[48px] w-full overflow-hidden rounded-[12px] bg-grayScale4 sm-top:h-[60px]">
|
|
57
32
|
<button
|
|
58
33
|
onClick={() => setTap('my')}
|
|
59
|
-
className={`h-full w-full
|
|
60
|
-
>
|
|
61
|
-
<p
|
|
62
|
-
className={`body_large1_mo sm-top:body_large1_tb lg:body_large1 ${tap === 'my' ? 'text-black' : 'text-grayScale4'}`}
|
|
63
|
-
>
|
|
64
|
-
나의전달문서
|
|
65
|
-
</p>
|
|
66
|
-
</button>
|
|
67
|
-
<button
|
|
68
|
-
onClick={() => setTap('daeryun')}
|
|
69
|
-
className={`h-full w-full border-b-[1px] transition-all duration-300 ${tap === 'daeryun' ? 'border-black' : 'border-grayScale4'} pb-[6px] sm-top:pb-[10px] lg:pb-[8px]`}
|
|
34
|
+
className={`h-full w-full transition-all duration-300 ${tap === 'my' ? 'rounded-[12px] border-[2px] border-solid border-grayScale4 bg-white sm-top:border-[3px] lg:border-[4px]' : 'border-[4px] border-solid border-grayScale4 text-white'}`}
|
|
70
35
|
>
|
|
71
|
-
<p
|
|
72
|
-
className={`body_large1_mo sm-top:body_large1_tb lg:body_large1 ${tap === 'daeryun' ? 'text-black' : 'text-grayScale4'}`}
|
|
73
|
-
>
|
|
74
|
-
대륜전달문서
|
|
75
|
-
</p>
|
|
36
|
+
<p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">나의전달문서</p>
|
|
76
37
|
</button>
|
|
77
38
|
<button
|
|
78
39
|
onClick={() => setTap('court')}
|
|
79
|
-
className={`h-full w-full
|
|
40
|
+
className={`h-full w-full transition-all duration-300 ${tap === 'court' ? 'rounded-[12px] border-[2px] border-solid border-grayScale4 bg-white sm-top:border-[3px] lg:border-[4px]' : 'border-[4px] border-solid border-grayScale4 text-white'}`}
|
|
80
41
|
>
|
|
81
|
-
<p
|
|
82
|
-
className={`body_large1_mo sm-top:body_large1_tb lg:body_large1 ${tap === 'court' ? 'text-black' : 'text-grayScale4'}`}
|
|
83
|
-
>
|
|
84
|
-
법원문서
|
|
85
|
-
</p>
|
|
42
|
+
<p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">법원문서</p>
|
|
86
43
|
</button>
|
|
87
44
|
</div>
|
|
88
|
-
|
|
45
|
+
<div className="mt-[16px] lg:mt-[20px]">
|
|
89
46
|
<p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 text-black">
|
|
90
47
|
최근 제출순으로 조회됩니다.
|
|
91
48
|
</p>
|
|
92
|
-
</div> */}
|
|
93
|
-
{tap === 'my' && <FileDropZone id={id} refetch={refetch} />}
|
|
94
|
-
<div
|
|
95
|
-
className={` flex flex-col ${tap === 'daeryun' ? 'mt-[20px] sm-top:mt-[22px] lg:mt-[28px]' : 'mt-[30px] lg:mt-[38px] '}`}
|
|
96
|
-
>
|
|
97
|
-
{tap === 'daeryun' && (
|
|
98
|
-
<div className=" mb-[30px] flex items-center gap-[8px] sm-top:gap-[12px] lg:mb-[38px] lg:gap-[16px]">
|
|
99
|
-
{subTabList.map(title => (
|
|
100
|
-
<button
|
|
101
|
-
key={title.value}
|
|
102
|
-
onClick={() => setSubTab(title.value as number | null)}
|
|
103
|
-
className={`label_large2_mo sm-top:label_large2_tb lg:label_large2 flex h-[26px] items-center rounded-[20px] px-[12px] leading-none sm-top:h-[35px] sm-top:px-[14px] lg:h-[41px] lg:px-[28px] ${subTab === title.value ? 'border border-solid border-grayScale1 bg-grayScale1 text-white' : 'border border-solid border-grayScale3 bg-white text-grayScale3'}`}
|
|
104
|
-
>
|
|
105
|
-
{title.title}
|
|
106
|
-
</button>
|
|
107
|
-
))}
|
|
108
|
-
</div>
|
|
109
|
-
)}
|
|
110
|
-
{tap === 'my' && myFileList?.length > 0 ? (
|
|
111
|
-
<div className="flex flex-col gap-[12px] sm-top:gap-[20px] lg:gap-[28px]">
|
|
112
|
-
{myFileList.map((item, index) => (
|
|
113
|
-
<DocumentLine item={item} index={index} key={index} id={id} />
|
|
114
|
-
))}
|
|
115
|
-
</div>
|
|
116
|
-
) : (
|
|
117
|
-
tap === 'my' && <EmptyTable tap="file" subTap={0} titleLabel="나의전달문서" />
|
|
118
|
-
)}
|
|
119
|
-
|
|
120
|
-
{tap === 'daeryun' && filteredDaeryun?.length > 0 ? (
|
|
121
|
-
<div className="mb-[80px] flex flex-col gap-[12px] sm-top:gap-[20px] lg:gap-[28px]">
|
|
122
|
-
{filteredDaeryun.map((item, index) => (
|
|
123
|
-
<DocumentLine item={item} index={index} key={index} id={id} />
|
|
124
|
-
))}
|
|
125
|
-
</div>
|
|
126
|
-
) : (
|
|
127
|
-
tap === 'daeryun' && <EmptyTable tap="file" subTap={0} titleLabel="대륜전달문서" />
|
|
128
|
-
)}
|
|
129
|
-
{tap === 'court' && courtFileList?.length > 0 ? (
|
|
130
|
-
<div className="mb-[80px] flex flex-col gap-[12px] sm-top:gap-[20px] lg:gap-[28px]">
|
|
131
|
-
{courtFileList.map((item, index) => (
|
|
132
|
-
<DocumentLine item={item} index={index} key={index} id={id} />
|
|
133
|
-
))}
|
|
134
|
-
</div>
|
|
135
|
-
) : (
|
|
136
|
-
tap === 'court' && <EmptyTable tap="file" subTap={0} titleLabel="법원문서" />
|
|
137
|
-
)}
|
|
138
49
|
</div>
|
|
50
|
+
<div className="mt-[20px] flex flex-col lg:mt-[24px] ">
|
|
51
|
+
{tap === 'my' && myFileList?.length > 0
|
|
52
|
+
? myFileList.map((item, index) => <DocumentLine item={item} index={index} key={index} />)
|
|
53
|
+
: tap === 'my' && <EmptyTable tap="file" subTap={0} />}
|
|
54
|
+
{tap === 'court' && courtFileList?.length > 0
|
|
55
|
+
? courtFileList.map((item, index) => <DocumentLine item={item} index={index} key={index} />)
|
|
56
|
+
: tap === 'court' && <EmptyTable tap="file" subTap={0} />}
|
|
57
|
+
</div>
|
|
58
|
+
{tap === 'my' && <FileDropZone id={id} refetch={refetch} />}
|
|
139
59
|
</CaseLayout>
|
|
140
60
|
);
|
|
141
61
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FileList } from '../../../_type/type';
|
|
2
|
-
declare const DocumentLine: ({ item, index
|
|
2
|
+
declare const DocumentLine: ({ item, index }: {
|
|
3
3
|
item: FileList;
|
|
4
4
|
index: number;
|
|
5
|
-
id: string;
|
|
6
5
|
}) => import("react").JSX.Element;
|
|
7
6
|
export default DocumentLine;
|
|
@@ -19,12 +19,6 @@ import word from '../../../../../../asset/images/myCase/icon/word.webp';
|
|
|
19
19
|
import xls from '../../../../../../asset/images/myCase/icon/xls.webp';
|
|
20
20
|
import unkown from '../../../../../../asset/images/myCase/icon/defaultIcon.webp';
|
|
21
21
|
import download from '../../../../../../asset/images/myCase/icon/download.webp';
|
|
22
|
-
import search from '../../../../../../asset/images/myCase/icon/search.webp';
|
|
23
|
-
import arrow_2 from '../../../../../../asset/images/myCase/icon/arrow.webp';
|
|
24
|
-
import DocumentBadge from '../_badge/DocumentBadge';
|
|
25
|
-
import FilePreViewer from '../../../_component/_fileView/FilePreViewer';
|
|
26
|
-
import CaseExamineModal from '../_modal/CaseExamineModal';
|
|
27
|
-
import CaseExamineDocumentModal from '../_modal/CaseExamineDocumentModal';
|
|
28
22
|
const icon = {
|
|
29
23
|
hwp: hwp,
|
|
30
24
|
jpg: jpg,
|
|
@@ -48,11 +42,8 @@ const getIcon = (extension) => {
|
|
|
48
42
|
return unkown;
|
|
49
43
|
}
|
|
50
44
|
};
|
|
51
|
-
const DocumentLine = ({ item, index
|
|
45
|
+
const DocumentLine = ({ item, index }) => {
|
|
52
46
|
const [downloadUrl, setDownloadUrl] = useState(null);
|
|
53
|
-
const [isPreviewOpen, setIsPreviewOpen] = useState(false);
|
|
54
|
-
const [isCaseExamineModalOpen, setIsCaseExamineModalOpen] = useState(null);
|
|
55
|
-
const [isDocumentBadgeOpen, setIsDocumentBadgeOpen] = useState(false);
|
|
56
47
|
useEffect(() => {
|
|
57
48
|
const fetchBlob = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
49
|
try {
|
|
@@ -67,55 +58,19 @@ const DocumentLine = ({ item, index, id }) => {
|
|
|
67
58
|
});
|
|
68
59
|
fetchBlob();
|
|
69
60
|
}, [item.path]);
|
|
70
|
-
return (<div key={index} className="flex flex-
|
|
71
|
-
{item.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</p>
|
|
80
|
-
<p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 mt-[6px] text-grayScale3 sm-top:mt-[8px]">
|
|
81
|
-
{dayjs(item.created_at).format('YYYY.MM.DD')} | 용량 {Math.round(Number(item.size))}KB
|
|
82
|
-
</p>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div className="flex flex-shrink-0 flex-row items-center gap-[16px] sm-top:gap-[24px] lg:gap-[28px]">
|
|
86
|
-
{isPreviewOpen && downloadUrl && (<FilePreViewer fileUrl={item.path} fileName={item.name} fileIdx={item.idx}
|
|
87
|
-
// convertedPath={doc.converted_path}
|
|
88
|
-
onClose={() => setIsPreviewOpen(false)}/>)}
|
|
89
|
-
{downloadUrl && (<button onClick={() => setIsPreviewOpen(true)}>
|
|
90
|
-
<Image src={search} alt="image" width={28} height={28} className="h-[20px] w-[20px] flex-shrink-0 sm-top:h-[24px] sm-top:w-[24px] lg:h-[28px] lg:w-[28px] "/>
|
|
91
|
-
</button>)}
|
|
92
|
-
|
|
93
|
-
{downloadUrl && (<a href={downloadUrl} download={item.name} className="flex-shrink-0">
|
|
94
|
-
<Image src={download} alt="image" width={28} height={28} className="h-[20px] w-[20px] flex-shrink-0 sm-top:h-[24px] sm-top:w-[24px] lg:h-[28px] lg:w-[28px] "/>
|
|
95
|
-
</a>)}
|
|
96
|
-
</div>
|
|
61
|
+
return (<div key={index} className="flex flex-row items-center border-b-[2px] border-solid border-grayScale6 py-[16px] pb-[20px]">
|
|
62
|
+
<Image src={getIcon(item.name.split('.').pop())} alt="image" width={39} height={48} unoptimized className="ml-[5.08px] mr-[12.22px] h-[32.86px] w-[26.7px] flex-shrink-0 sm-top:ml-0 sm-top:mr-[29.6px] sm-top:h-[43.81px] sm-top:w-[35.5px] lg:mr-[32px] lg:h-[48px] lg:w-[39px] "/>
|
|
63
|
+
<div className="mr-[10px] flex flex-grow flex-col overflow-hidden">
|
|
64
|
+
<p className="body_medium1_mo sm-top:body_medium2_tb lg:body_medium2 line-clamp-1 w-full text-black">
|
|
65
|
+
{item.name}
|
|
66
|
+
</p>
|
|
67
|
+
<p className="body_small1_mo sm-top:body_small2_tb lg:body_small2 mt-[4px] text-grayScale2 sm-top:mt-[8px]">
|
|
68
|
+
{dayjs(item.created_at).format('YYYY.MM.DD HH:mm')} - {Math.round(Number(item.size) / 1024)}MB
|
|
69
|
+
</p>
|
|
97
70
|
</div>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
문서 검토 내역
|
|
102
|
-
</p>
|
|
103
|
-
<Image src={arrow_2} alt="arrow_2" width={24} height={24} className="h-[10px] w-[6px] flex-shrink-0 sm-top:h-[13.33px] sm-top:w-[8px] lg:h-[16.67px] lg:w-[10px]"/>
|
|
104
|
-
</button>)}
|
|
105
|
-
{item.review_status === 0 && (<div className={`mt-[20px] flex w-full flex-row items-center gap-[4px] sm-top:mt-[24px] sm-top:gap-[8px] lg:mt-[32px] lg:gap-[22px] `}>
|
|
106
|
-
<button onClick={() => setIsCaseExamineModalOpen('ask')} className="flex h-[40px] flex-1 flex-row items-center justify-center rounded-[4px] bg-grayScale2 sm-top:h-[60px] sm-top:rounded-[8px] lg:h-[72px] lg:rounded-[16px]">
|
|
107
|
-
<p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-center text-grayScale8">
|
|
108
|
-
보완요청
|
|
109
|
-
</p>
|
|
110
|
-
</button>
|
|
111
|
-
<button onClick={() => setIsCaseExamineModalOpen('approve')} className="flex h-[40px] flex-1 flex-row items-center justify-center rounded-[4px] bg-mycaseMainColor sm-top:h-[60px] sm-top:rounded-[8px] lg:h-[72px] lg:rounded-[16px]">
|
|
112
|
-
<p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-center text-grayScale8">
|
|
113
|
-
승인
|
|
114
|
-
</p>
|
|
115
|
-
</button>
|
|
116
|
-
</div>)}
|
|
117
|
-
{isCaseExamineModalOpen && (<CaseExamineModal openState={isCaseExamineModalOpen} onClose={() => setIsCaseExamineModalOpen(null)} item={item} id={id}/>)}
|
|
118
|
-
{isDocumentBadgeOpen && (<CaseExamineDocumentModal isOpen={isDocumentBadgeOpen} item={item} onClose={() => setIsDocumentBadgeOpen(false)} caseIdx={id}/>)}
|
|
71
|
+
{downloadUrl && (<a href={downloadUrl} download={item.name} className="flex-shrink-0">
|
|
72
|
+
<Image src={download} alt="image" width={28} height={28} className="h-[20px] w-[20px] flex-shrink-0 sm-top:h-[24px] sm-top:w-[24px] lg:h-[28px] lg:w-[28px] "/>
|
|
73
|
+
</a>)}
|
|
119
74
|
</div>);
|
|
120
75
|
};
|
|
121
76
|
export default DocumentLine;
|