@daeryun/dr_components 1.1.57 → 1.1.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.
Files changed (90) hide show
  1. package/dist/asset/images/myCase/fileViewer/download.webp +0 -0
  2. package/dist/asset/images/myCase/fileViewer/rotate_ccw.webp +0 -0
  3. package/dist/asset/images/myCase/fileViewer/zoom_in.webp +0 -0
  4. package/dist/asset/images/myCase/fileViewer/zoom_out.webp +0 -0
  5. package/dist/asset/images/myCase/icon/arrow.webp +0 -0
  6. package/dist/asset/images/myCase/icon/chat.webp +0 -0
  7. package/dist/asset/images/myCase/icon/check_ok.webp +0 -0
  8. package/dist/asset/images/myCase/icon/search.webp +0 -0
  9. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  10. package/dist/components/page/MyCase/[id]/_component/ContactInfo.jsx +1 -1
  11. package/dist/components/page/MyCase/[id]/_component/ContactInfo.tsx +1 -1
  12. package/dist/components/page/MyCase/[id]/_component/DetailInfo.jsx +1 -1
  13. package/dist/components/page/MyCase/[id]/_component/DetailInfo.tsx +9 -3
  14. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.jsx +35 -14
  15. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.tsx +19 -7
  16. package/dist/components/page/MyCase/[id]/_component/TimeLine.jsx +1 -1
  17. package/dist/components/page/MyCase/[id]/_component/TimeLine.tsx +1 -1
  18. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.d.ts +4 -0
  19. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.jsx +13 -0
  20. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.tsx +18 -0
  21. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +1 -1
  22. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +1 -1
  23. package/dist/components/page/MyCase/[id]/_component/_document/Document.d.ts +2 -1
  24. package/dist/components/page/MyCase/[id]/_component/_document/Document.jsx +63 -21
  25. package/dist/components/page/MyCase/[id]/_component/_document/Document.tsx +97 -17
  26. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.d.ts +2 -1
  27. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.jsx +58 -13
  28. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.tsx +124 -25
  29. package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.jsx +12 -7
  30. package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.tsx +12 -7
  31. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.d.ts +5 -0
  32. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.jsx +27 -0
  33. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.tsx +46 -0
  34. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.d.ts +6 -0
  35. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.jsx +34 -0
  36. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.tsx +65 -0
  37. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.d.ts +5 -0
  38. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.jsx +27 -0
  39. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.tsx +47 -0
  40. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.d.ts +7 -0
  41. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.jsx +95 -0
  42. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.tsx +141 -0
  43. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.d.ts +10 -0
  44. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.jsx +149 -0
  45. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.tsx +212 -0
  46. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.d.ts +3 -4
  47. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.jsx +51 -34
  48. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.tsx +88 -59
  49. package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.jsx +2 -2
  50. package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.tsx +2 -2
  51. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.d.ts +6 -0
  52. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.jsx +154 -0
  53. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.tsx +177 -0
  54. package/dist/components/page/MyCase/_actions/action.d.ts +34 -0
  55. package/dist/components/page/MyCase/_actions/action.js +59 -0
  56. package/dist/components/page/MyCase/_actions/action.ts +79 -0
  57. package/dist/components/page/MyCase/_component/_button/SubMenuButton.jsx +2 -4
  58. package/dist/components/page/MyCase/_component/_button/SubMenuButton.tsx +2 -5
  59. package/dist/components/page/MyCase/_component/_empty/EmptyTable.d.ts +2 -1
  60. package/dist/components/page/MyCase/_component/_empty/EmptyTable.jsx +14 -6
  61. package/dist/components/page/MyCase/_component/_empty/EmptyTable.tsx +34 -6
  62. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.d.ts +14 -0
  63. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.jsx +278 -0
  64. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.tsx +411 -0
  65. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.d.ts +8 -0
  66. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.jsx +56 -0
  67. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.tsx +111 -0
  68. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.d.ts +3 -0
  69. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.jsx +10 -0
  70. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.tsx +10 -0
  71. package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.jsx +8 -3
  72. package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.tsx +3 -4
  73. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.d.ts +7 -0
  74. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.js +34 -0
  75. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.ts +36 -0
  76. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.d.ts +5 -0
  77. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.js +33 -0
  78. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.ts +25 -0
  79. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.d.ts +5 -0
  80. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.js +33 -0
  81. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.ts +25 -0
  82. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.d.ts +4 -0
  83. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.js +33 -0
  84. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.ts +25 -0
  85. package/dist/components/page/MyCase/_type/type.d.ts +3 -1
  86. package/dist/components/page/MyCase/_type/type.ts +3 -1
  87. package/dist/styles/globals.css +501 -94
  88. package/dist/styles/homepage_login.css +3 -3
  89. package/dist/tsconfig.tsbuildinfo +1 -1
  90. package/package.json +6 -2
@@ -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-[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]'}>
40
+ return (<CaseLayout isMobilePadding={false} outerClassName="mt-[20px] sm-top:mt-[20px] lg:mt-[28px] 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-[35px] sm-top:mt-[24px] lg:mt-[40px] mb-[50px] "
61
+ outerClassName="mt-[20px] sm-top:mt-[20px] lg:mt-[28px] 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
  }
@@ -0,0 +1,4 @@
1
+ declare const DocumentBadge: ({ review_status }: {
2
+ review_status: number;
3
+ }) => import("react").JSX.Element;
4
+ export default DocumentBadge;
@@ -0,0 +1,13 @@
1
+ const reviewStatus = {
2
+ [-1]: '보완요청',
3
+ [0]: '승인대기',
4
+ [1]: '승인완료'
5
+ };
6
+ const DocumentBadge = ({ review_status }) => {
7
+ return (<div className={`flex h-[24px] w-fit flex-row items-center rounded-[8px] px-[8px] sm-top:h-[32px] sm-top:px-[12px] lg:h-[35px] lg:px-[12px] ${review_status === -1 ? 'bg-mycaseMainColor' : review_status === 0 ? 'bg-subColor05' : 'bg-subColor04'} `}>
8
+ <p className="label_medium1_mo sm-top:label_medium1_tb lg:label_medium1 leading-none text-grayScale8">
9
+ {reviewStatus === null || reviewStatus === void 0 ? void 0 : reviewStatus[review_status]}
10
+ </p>
11
+ </div>);
12
+ };
13
+ export default DocumentBadge;
@@ -0,0 +1,18 @@
1
+ const reviewStatus: { [key: number]: string } = {
2
+ [-1]: '보완요청',
3
+ [0]: '승인대기',
4
+ [1]: '승인완료'
5
+ };
6
+ const DocumentBadge = ({ review_status }: { review_status: number }) => {
7
+ return (
8
+ <div
9
+ className={`flex h-[24px] w-fit flex-row items-center rounded-[8px] px-[8px] sm-top:h-[32px] sm-top:px-[12px] lg:h-[35px] lg:px-[12px] ${review_status === -1 ? 'bg-mycaseMainColor' : review_status === 0 ? 'bg-subColor05' : 'bg-subColor04'} `}
10
+ >
11
+ <p className="label_medium1_mo sm-top:label_medium1_tb lg:label_medium1 leading-none text-grayScale8">
12
+ {reviewStatus?.[review_status as number]}
13
+ </p>
14
+ </div>
15
+ );
16
+ };
17
+
18
+ export default DocumentBadge;
@@ -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-[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]'}>
69
+ return (<CaseLayout isMobilePadding={false} outerClassName="mt-[20px] sm-top:mt-[20px] lg:mt-[28px] " 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-[35px] sm-top:mt-[24px] lg:mt-[40px] "
148
+ outerClassName="mt-[20px] sm-top:mt-[20px] lg:mt-[28px] "
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,7 +1,8 @@
1
1
  import { FileList } from '../../../_type/type';
2
- declare const Document: ({ courtFileList, myFileList, id, refetch }: {
2
+ declare const Document: ({ courtFileList, myFileList, daeryunFileList, id, refetch }: {
3
3
  courtFileList: FileList[];
4
4
  myFileList: FileList[];
5
+ daeryunFileList: FileList[];
5
6
  id: string;
6
7
  refetch: () => void;
7
8
  }) => import("react").JSX.Element;
@@ -1,33 +1,75 @@
1
- import { useState } from 'react';
1
+ import { useMemo, 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, id, refetch }) => {
6
+ const Document = ({ courtFileList, myFileList, daeryunFileList, id, refetch }) => {
7
7
  const [tap, setTap] = useState('my');
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>
8
+ const [subTab, setSubTab] = useState(null);
9
+ const subTabList = [
10
+ { title: '전체', value: null },
11
+ { title: '승인대기', value: 0 },
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>
12
38
  </button>
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>
39
+ <button onClick={() => setTap('daeryun')} 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]`}>
40
+ <p className={`body_large1_mo sm-top:body_large1_tb lg:body_large1 ${tap === 'daeryun' ? 'text-black' : 'text-grayScale4'}`}>
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>
15
48
  </button>
16
49
  </div>
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>
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>
50
+ {/* <div className="mt-[16px] lg:mt-[20px]">
51
+ <p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 text-black">
52
+ 최근 제출순으로 조회됩니다.
53
+ </p>
54
+ </div> */}
30
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="법원문서"/>)}
72
+ </div>
31
73
  </CaseLayout>);
32
74
  };
33
75
  export default Document;
@@ -1,4 +1,4 @@
1
- import { useState } from 'react';
1
+ import { useMemo, useState } from 'react';
2
2
  import CaseLayout from '../../../_component/_layout/CaseLayout';
3
3
 
4
4
  import { FileList } from '../../../_type/type';
@@ -6,56 +6,136 @@ 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;
9
10
 
11
+ type RawStatus = ReviewStatus | string | number | null | undefined;
10
12
  const Document = ({
11
13
  courtFileList,
12
14
  myFileList,
15
+ daeryunFileList,
13
16
  id,
14
17
  refetch
15
18
  }: {
16
19
  courtFileList: FileList[];
17
20
  myFileList: FileList[];
21
+ daeryunFileList: FileList[];
18
22
  id: string;
19
23
  refetch: () => void;
20
24
  }) => {
21
25
  const [tap, setTap] = useState('my');
22
26
 
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
+
23
48
  return (
24
49
  <CaseLayout
25
50
  isMobilePadding={false}
26
- outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] "
51
+ outerClassName="mt-[20px] sm-top:mt-[14px] lg:mt-[28px] "
27
52
  innerClassName={
28
53
  '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]'
29
54
  }
30
55
  >
31
- <div className="flex h-[48px] w-full overflow-hidden rounded-[12px] bg-grayScale4 sm-top:h-[60px]">
56
+ <div className="flex h-[29px] w-full overflow-hidden sm-top:h-[40px] lg:h-[45px]">
32
57
  <button
33
58
  onClick={() => setTap('my')}
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'}`}
59
+ 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]`}
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]`}
35
70
  >
36
- <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">나의전달문서</p>
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>
37
76
  </button>
38
77
  <button
39
78
  onClick={() => setTap('court')}
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'}`}
79
+ 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]`}
41
80
  >
42
- <p className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1">법원문서</p>
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>
43
86
  </button>
44
87
  </div>
45
- <div className="mt-[16px] lg:mt-[20px]">
88
+ {/* <div className="mt-[16px] lg:mt-[20px]">
46
89
  <p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 text-black">
47
90
  최근 제출순으로 조회됩니다.
48
91
  </p>
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>
92
+ </div> */}
58
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
+ </div>
59
139
  </CaseLayout>
60
140
  );
61
141
  };
@@ -1,6 +1,7 @@
1
1
  import { FileList } from '../../../_type/type';
2
- declare const DocumentLine: ({ item, index }: {
2
+ declare const DocumentLine: ({ item, index, id }: {
3
3
  item: FileList;
4
4
  index: number;
5
+ id: string;
5
6
  }) => import("react").JSX.Element;
6
7
  export default DocumentLine;
@@ -19,6 +19,12 @@ 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';
22
28
  const icon = {
23
29
  hwp: hwp,
24
30
  jpg: jpg,
@@ -42,8 +48,11 @@ const getIcon = (extension) => {
42
48
  return unkown;
43
49
  }
44
50
  };
45
- const DocumentLine = ({ item, index }) => {
51
+ const DocumentLine = ({ item, index, id }) => {
46
52
  const [downloadUrl, setDownloadUrl] = useState(null);
53
+ const [isPreviewOpen, setIsPreviewOpen] = useState(false);
54
+ const [isCaseExamineModalOpen, setIsCaseExamineModalOpen] = useState(null);
55
+ const [isDocumentBadgeOpen, setIsDocumentBadgeOpen] = useState(false);
47
56
  useEffect(() => {
48
57
  const fetchBlob = () => __awaiter(void 0, void 0, void 0, function* () {
49
58
  try {
@@ -58,19 +67,55 @@ const DocumentLine = ({ item, index }) => {
58
67
  });
59
68
  fetchBlob();
60
69
  }, [item.path]);
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>
70
+ return (<div key={index} className="flex flex-col rounded-[12px] border border-solid border-grayScale6 px-[20px] py-[20px] sm-top:px-[28px] sm-top:py-[32px] lg:px-[40px] lg:py-[40px]">
71
+ {item.review_status !== null && item.review_status !== undefined && (<div className="mb-[12px] sm-top:mb-[16px] lg:mb-[20px]">
72
+ <DocumentBadge review_status={item.review_status}/>
73
+ </div>)}
74
+ <div className=" flex flex-row items-center">
75
+ <Image src={getIcon(item.name.split('.').pop())} alt="image" width={39} height={48} unoptimized className=" ml-[4.57px] mr-[4px] h-[37px] w-[32px] flex-shrink-0 sm-top:ml-[6.4px] sm-top:mr-[24.96px] sm-top:h-[41.41px] sm-top:w-[33.64px] lg:ml-[7.38px] lg:mr-[32px] lg:h-[47.69px] lg:w-[38.74px] "/>
76
+ <div className="mr-[8px] flex flex-grow flex-col overflow-hidden">
77
+ <p className="body_large2_mo sm-top:body_large2_tb lg:body_medium2 line-clamp-1 w-full break-all text-black">
78
+ {item.name}
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>
70
97
  </div>
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>)}
98
+
99
+ {item.review_status !== null && item.review_status !== undefined && (<button className={`mt-[8px] flex w-fit flex-row items-center gap-[6px] sm-top:gap-[10px] lg:mt-[10px] lg:gap-[12px]`} onClick={() => setIsDocumentBadgeOpen(true)}>
100
+ <p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 leading-[18px] text-grayScale2 sm-top:leading-[23px] lg:leading-[25px]">
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}/>)}
74
119
  </div>);
75
120
  };
76
121
  export default DocumentLine;