@daeryun/dr_components 1.1.60 → 1.1.62

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 (80) hide show
  1. package/dist/components/page/MyCase/[id]/_component/ContactInfo.jsx +1 -1
  2. package/dist/components/page/MyCase/[id]/_component/ContactInfo.tsx +1 -1
  3. package/dist/components/page/MyCase/[id]/_component/DetailInfo.jsx +1 -1
  4. package/dist/components/page/MyCase/[id]/_component/DetailInfo.tsx +3 -9
  5. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.jsx +14 -35
  6. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.tsx +7 -19
  7. package/dist/components/page/MyCase/[id]/_component/TimeLine.jsx +1 -1
  8. package/dist/components/page/MyCase/[id]/_component/TimeLine.tsx +1 -1
  9. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +1 -1
  10. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +1 -1
  11. package/dist/components/page/MyCase/[id]/_component/_document/Document.d.ts +1 -2
  12. package/dist/components/page/MyCase/[id]/_component/_document/Document.jsx +21 -63
  13. package/dist/components/page/MyCase/[id]/_component/_document/Document.tsx +17 -97
  14. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.d.ts +1 -2
  15. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.jsx +13 -58
  16. package/dist/components/page/MyCase/[id]/_component/_document/DocumentLine.tsx +25 -124
  17. package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.jsx +7 -12
  18. package/dist/components/page/MyCase/[id]/_component/_document/FileDropZone.tsx +7 -12
  19. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.d.ts +4 -3
  20. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.jsx +34 -51
  21. package/dist/components/page/MyCase/[id]/_component/_modal/ContractModal.tsx +59 -88
  22. package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.jsx +2 -2
  23. package/dist/components/page/MyCase/[id]/_component/_modal/FileSuccessModal.tsx +2 -2
  24. package/dist/components/page/MyCase/_actions/action.d.ts +0 -34
  25. package/dist/components/page/MyCase/_actions/action.js +0 -59
  26. package/dist/components/page/MyCase/_actions/action.ts +0 -79
  27. package/dist/components/page/MyCase/_component/_button/SubMenuButton.jsx +4 -2
  28. package/dist/components/page/MyCase/_component/_button/SubMenuButton.tsx +5 -2
  29. package/dist/components/page/MyCase/_component/_empty/EmptyTable.d.ts +1 -2
  30. package/dist/components/page/MyCase/_component/_empty/EmptyTable.jsx +6 -14
  31. package/dist/components/page/MyCase/_component/_empty/EmptyTable.tsx +6 -34
  32. package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.jsx +3 -8
  33. package/dist/components/page/MyCase/_component/_table/CaseTabSwiper.tsx +4 -3
  34. package/dist/components/page/MyCase/_type/type.d.ts +1 -3
  35. package/dist/components/page/MyCase/_type/type.ts +1 -3
  36. package/dist/styles/globals.css +94 -501
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +1 -1
  39. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.d.ts +0 -4
  40. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.jsx +0 -13
  41. package/dist/components/page/MyCase/[id]/_component/_badge/DocumentBadge.tsx +0 -18
  42. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.d.ts +0 -5
  43. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.jsx +0 -27
  44. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineAskSuccessModal.tsx +0 -46
  45. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.d.ts +0 -6
  46. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.jsx +0 -34
  47. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineStopModal.tsx +0 -65
  48. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.d.ts +0 -5
  49. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.jsx +0 -27
  50. package/dist/components/page/MyCase/[id]/_component/_modal/CaeeExamineSuccessModal.tsx +0 -47
  51. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.d.ts +0 -7
  52. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.jsx +0 -93
  53. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineDocumentModal.tsx +0 -139
  54. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.d.ts +0 -10
  55. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.jsx +0 -149
  56. package/dist/components/page/MyCase/[id]/_component/_modal/CaseExamineModal.tsx +0 -212
  57. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.d.ts +0 -6
  58. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.jsx +0 -154
  59. package/dist/components/page/MyCase/[id]/_component/_pdf/PdfInlineViewer.tsx +0 -177
  60. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.d.ts +0 -14
  61. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.jsx +0 -278
  62. package/dist/components/page/MyCase/_component/_fileView/FilePreViewer.tsx +0 -411
  63. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.d.ts +0 -8
  64. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.jsx +0 -56
  65. package/dist/components/page/MyCase/_component/_fileView/HwpViewer.tsx +0 -111
  66. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.d.ts +0 -3
  67. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.jsx +0 -10
  68. package/dist/components/page/MyCase/_component/_fileView/TopOverlay.tsx +0 -10
  69. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.d.ts +0 -7
  70. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.js +0 -34
  71. package/dist/components/page/MyCase/_fetchers/addMyCaseExamine.ts +0 -36
  72. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.d.ts +0 -5
  73. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.js +0 -33
  74. package/dist/components/page/MyCase/_fetchers/getDaeryunFileList.ts +0 -25
  75. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.d.ts +0 -5
  76. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.js +0 -33
  77. package/dist/components/page/MyCase/_fetchers/getDocumentExamineHistory.ts +0 -25
  78. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.d.ts +0 -4
  79. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.js +0 -33
  80. package/dist/components/page/MyCase/_fetchers/getHwpToPdfFile.ts +0 -25
@@ -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, id }) => {
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-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>
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
- {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}/>)}
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;
@@ -11,12 +11,6 @@ import word from '../../../../../../asset/images/myCase/icon/word.webp';
11
11
  import xls from '../../../../../../asset/images/myCase/icon/xls.webp';
12
12
  import unkown from '../../../../../../asset/images/myCase/icon/defaultIcon.webp';
13
13
  import download from '../../../../../../asset/images/myCase/icon/download.webp';
14
- import search from '../../../../../../asset/images/myCase/icon/search.webp';
15
- import arrow_2 from '../../../../../../asset/images/myCase/icon/arrow.webp';
16
- import DocumentBadge from '../_badge/DocumentBadge';
17
- import FilePreViewer from '../../../_component/_fileView/FilePreViewer';
18
- import CaseExamineModal from '../_modal/CaseExamineModal';
19
- import CaseExamineDocumentModal from '../_modal/CaseExamineDocumentModal';
20
14
 
21
15
  const icon = {
22
16
  hwp: hwp,
@@ -43,14 +37,9 @@ const getIcon = (extension: string) => {
43
37
  }
44
38
  };
45
39
 
46
- const DocumentLine = ({ item, index, id }: { item: FileList; index: number; id: string }) => {
40
+ const DocumentLine = ({ item, index }: { item: FileList; index: number }) => {
47
41
  const [downloadUrl, setDownloadUrl] = useState<string | null>(null);
48
42
 
49
- const [isPreviewOpen, setIsPreviewOpen] = useState(false);
50
-
51
- const [isCaseExamineModalOpen, setIsCaseExamineModalOpen] = useState<null | 'approve' | 'ask'>(null);
52
- const [isDocumentBadgeOpen, setIsDocumentBadgeOpen] = useState(false);
53
-
54
43
  useEffect(() => {
55
44
  const fetchBlob = async () => {
56
45
  try {
@@ -70,122 +59,34 @@ const DocumentLine = ({ item, index, id }: { item: FileList; index: number; id:
70
59
  return (
71
60
  <div
72
61
  key={index}
73
- 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]"
62
+ className="flex flex-row items-center border-b-[2px] border-solid border-grayScale6 py-[16px] pb-[20px]"
74
63
  >
75
- {item.review_status !== null && item.review_status !== undefined && (
76
- <div className="mb-[12px] sm-top:mb-[16px] lg:mb-[20px]">
77
- <DocumentBadge review_status={item.review_status} />
78
- </div>
79
- )}
80
- <div className=" flex flex-row items-center">
81
- <Image
82
- src={getIcon(item.name.split('.').pop() as string)}
83
- alt="image"
84
- width={39}
85
- height={48}
86
- unoptimized
87
- 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] "
88
- />
89
- <div className="mr-[8px] flex flex-grow flex-col overflow-hidden">
90
- <p className="body_large2_mo sm-top:body_large2_tb lg:body_medium2 line-clamp-1 w-full break-all text-black">
91
- {item.name}
92
- </p>
93
- <p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 mt-[6px] text-grayScale3 sm-top:mt-[8px]">
94
- {dayjs(item.created_at).format('YYYY.MM.DD')} | 용량 {Math.round(Number(item.size))}KB
95
- </p>
96
- </div>
97
-
98
- <div className="flex flex-shrink-0 flex-row items-center gap-[16px] sm-top:gap-[24px] lg:gap-[28px]">
99
- {isPreviewOpen && downloadUrl && (
100
- <FilePreViewer
101
- fileUrl={item.path}
102
- fileName={item.name}
103
- fileIdx={item.idx}
104
- // convertedPath={doc.converted_path}
105
- onClose={() => setIsPreviewOpen(false)}
106
- // fn={() => handleFileDownload(doc)}
107
- />
108
- )}
109
- {downloadUrl && (
110
- <button onClick={() => setIsPreviewOpen(true)}>
111
- <Image
112
- src={search}
113
- alt="image"
114
- width={28}
115
- height={28}
116
- className="h-[20px] w-[20px] flex-shrink-0 sm-top:h-[24px] sm-top:w-[24px] lg:h-[28px] lg:w-[28px] "
117
- />
118
- </button>
119
- )}
120
-
121
- {downloadUrl && (
122
- <a href={downloadUrl} download={item.name} className="flex-shrink-0">
123
- <Image
124
- src={download}
125
- alt="image"
126
- width={28}
127
- height={28}
128
- className="h-[20px] w-[20px] flex-shrink-0 sm-top:h-[24px] sm-top:w-[24px] lg:h-[28px] lg:w-[28px] "
129
- />
130
- </a>
131
- )}
132
- </div>
64
+ <Image
65
+ src={getIcon(item.name.split('.').pop() as string)}
66
+ alt="image"
67
+ width={39}
68
+ height={48}
69
+ unoptimized
70
+ 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] "
71
+ />
72
+ <div className="mr-[10px] flex flex-grow flex-col overflow-hidden">
73
+ <p className="body_medium1_mo sm-top:body_medium2_tb lg:body_medium2 line-clamp-1 w-full text-black">
74
+ {item.name}
75
+ </p>
76
+ <p className="body_small1_mo sm-top:body_small2_tb lg:body_small2 mt-[4px] text-grayScale2 sm-top:mt-[8px]">
77
+ {dayjs(item.created_at).format('YYYY.MM.DD HH:mm')} - {Math.round(Number(item.size) / 1024)}MB
78
+ </p>
133
79
  </div>
134
-
135
- {item.review_status !== null && item.review_status !== undefined && (
136
- <button
137
- className={`mt-[8px] flex w-fit flex-row items-center gap-[6px] sm-top:gap-[10px] lg:mt-[10px] lg:gap-[12px]`}
138
- onClick={() => setIsDocumentBadgeOpen(true)}
139
- >
140
- <p className="body_small2_mo sm-top:body_small2_tb lg:body_small2 leading-[18px] text-grayScale2 sm-top:leading-[23px] lg:leading-[25px]">
141
- 문서 검토 내역
142
- </p>
80
+ {downloadUrl && (
81
+ <a href={downloadUrl} download={item.name} className="flex-shrink-0">
143
82
  <Image
144
- src={arrow_2}
145
- alt="arrow_2"
146
- width={24}
147
- height={24}
148
- className="h-[10px] w-[6px] flex-shrink-0 sm-top:h-[13.33px] sm-top:w-[8px] lg:h-[16.67px] lg:w-[10px]"
83
+ src={download}
84
+ alt="image"
85
+ width={28}
86
+ height={28}
87
+ className="h-[20px] w-[20px] flex-shrink-0 sm-top:h-[24px] sm-top:w-[24px] lg:h-[28px] lg:w-[28px] "
149
88
  />
150
- </button>
151
- )}
152
- {item.review_status === 0 && (
153
- <div
154
- 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] `}
155
- >
156
- <button
157
- onClick={() => setIsCaseExamineModalOpen('ask')}
158
- 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]"
159
- >
160
- <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-center text-grayScale8">
161
- 보완요청
162
- </p>
163
- </button>
164
- <button
165
- onClick={() => setIsCaseExamineModalOpen('approve')}
166
- 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]"
167
- >
168
- <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-center text-grayScale8">
169
- 승인
170
- </p>
171
- </button>
172
- </div>
173
- )}
174
- {isCaseExamineModalOpen && (
175
- <CaseExamineModal
176
- openState={isCaseExamineModalOpen}
177
- onClose={() => setIsCaseExamineModalOpen(null)}
178
- item={item}
179
- id={id}
180
- />
181
- )}
182
- {isDocumentBadgeOpen && (
183
- <CaseExamineDocumentModal
184
- isOpen={isDocumentBadgeOpen}
185
- item={item}
186
- onClose={() => setIsDocumentBadgeOpen(false)}
187
- caseIdx={id}
188
- />
89
+ </a>
189
90
  )}
190
91
  </div>
191
92
  );
@@ -8,22 +8,17 @@ const FileDropZone = ({ id, refetch }) => {
8
8
  const [isOpen, setIsOpen] = useState(false);
9
9
  const saved = localStorage.getItem('isFileUploadModalCheck');
10
10
  const { getRootProps, getInputProps, isSuccess, setIsSuccess } = FileUpload({ id, refetch });
11
- return (<div className=" mt-[20px] flex w-full items-end justify-end sm-top:mt-[22px] lg:mt-[22px]">
11
+ return (<div className="mb-[80px] mt-[60px] flex w-full items-end justify-end">
12
12
  {/* saved가 true일 때만 Dropzone 적용 */}
13
13
  {saved ? (<div {...getRootProps()}>
14
14
  <input {...getInputProps()}/>
15
- <button className="flex h-[31px] items-center justify-center gap-[8px] rounded-[6px] bg-mycaseMainColor px-[12px] sm-top:h-[42px] sm-top:gap-[10px] sm-top:rounded-[8px] sm-top:px-[16px] lg:h-[51px] lg:gap-[12px] lg:px-[20px]">
16
- <Image src={upload} alt="file_upload" width={48} height={48} className="block h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "/>
17
- <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 leading-[23px] text-white sm-top:leading-[30px] lg:leading-[35px]">
18
- 파일 제출
19
- </p>
15
+ <button className="flex h-[48px] items-center justify-center gap-[16px] rounded-[24px] bg-mycaseMainColor px-[16px] sm-top:h-[60px] sm-top:gap-[28px] sm-top:rounded-[36px] sm-top:px-[26px] lg:gap-[24px] lg:px-[36px]">
16
+ <Image src={upload} alt="file_upload" width={48} height={48} className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "/>
17
+ <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-white">파일 제출</p>
20
18
  </button>
21
- </div>) : (<button className="flex h-[31px] items-center justify-center gap-[8px] rounded-[6px] bg-mycaseMainColor px-[12px] sm-top:h-[42px] sm-top:gap-[10px] sm-top:rounded-[8px] sm-top:px-[16px] lg:h-[51px] lg:gap-[12px] lg:px-[20px]" onClick={() => setIsOpen(true)}>
22
- <Image src={upload} alt="file_upload" width={48} height={48} className="block h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "/>
23
-
24
- <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 leading-[23px] text-white sm-top:leading-[30px] lg:leading-[35px]">
25
- 파일 제출
26
- </p>
19
+ </div>) : (<button className="flex h-[48px] items-center justify-center gap-[16px] rounded-[24px] bg-mycaseMainColor px-[16px] sm-top:h-[60px] sm-top:gap-[28px] sm-top:rounded-[36px] sm-top:px-[26px] lg:gap-[24px] lg:px-[36px]" onClick={() => setIsOpen(true)}>
20
+ <Image src={upload} alt="file_upload" width={48} height={48} className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "/>
21
+ <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-white">파일 제출</p>
27
22
  </button>)}
28
23
 
29
24
  {/* 모달 */}
@@ -12,27 +12,25 @@ const FileDropZone = ({ id, refetch }: { id: string; refetch: () => void }) => {
12
12
  const { getRootProps, getInputProps, isSuccess, setIsSuccess } = FileUpload({ id, refetch });
13
13
 
14
14
  return (
15
- <div className=" mt-[20px] flex w-full items-end justify-end sm-top:mt-[22px] lg:mt-[22px]">
15
+ <div className="mb-[80px] mt-[60px] flex w-full items-end justify-end">
16
16
  {/* saved가 true일 때만 Dropzone 적용 */}
17
17
  {saved ? (
18
18
  <div {...getRootProps()}>
19
19
  <input {...getInputProps()} />
20
- <button className="flex h-[31px] items-center justify-center gap-[8px] rounded-[6px] bg-mycaseMainColor px-[12px] sm-top:h-[42px] sm-top:gap-[10px] sm-top:rounded-[8px] sm-top:px-[16px] lg:h-[51px] lg:gap-[12px] lg:px-[20px]">
20
+ <button className="flex h-[48px] items-center justify-center gap-[16px] rounded-[24px] bg-mycaseMainColor px-[16px] sm-top:h-[60px] sm-top:gap-[28px] sm-top:rounded-[36px] sm-top:px-[26px] lg:gap-[24px] lg:px-[36px]">
21
21
  <Image
22
22
  src={upload}
23
23
  alt="file_upload"
24
24
  width={48}
25
25
  height={48}
26
- className="block h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "
26
+ className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "
27
27
  />
28
- <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 leading-[23px] text-white sm-top:leading-[30px] lg:leading-[35px]">
29
- 파일 제출
30
- </p>
28
+ <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-white">파일 제출</p>
31
29
  </button>
32
30
  </div>
33
31
  ) : (
34
32
  <button
35
- className="flex h-[31px] items-center justify-center gap-[8px] rounded-[6px] bg-mycaseMainColor px-[12px] sm-top:h-[42px] sm-top:gap-[10px] sm-top:rounded-[8px] sm-top:px-[16px] lg:h-[51px] lg:gap-[12px] lg:px-[20px]"
33
+ className="flex h-[48px] items-center justify-center gap-[16px] rounded-[24px] bg-mycaseMainColor px-[16px] sm-top:h-[60px] sm-top:gap-[28px] sm-top:rounded-[36px] sm-top:px-[26px] lg:gap-[24px] lg:px-[36px]"
36
34
  onClick={() => setIsOpen(true)}
37
35
  >
38
36
  <Image
@@ -40,12 +38,9 @@ const FileDropZone = ({ id, refetch }: { id: string; refetch: () => void }) => {
40
38
  alt="file_upload"
41
39
  width={48}
42
40
  height={48}
43
- className="block h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "
41
+ className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px] "
44
42
  />
45
-
46
- <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 leading-[23px] text-white sm-top:leading-[30px] lg:leading-[35px]">
47
- 파일 제출
48
- </p>
43
+ <p className="body_large2_mo sm-top:body_large2_tb lg:body_large2 text-white">파일 제출</p>
49
44
  </button>
50
45
  )}
51
46
 
@@ -1,6 +1,7 @@
1
- import type { ContractImage } from '../../../_type/type';
2
- export default function ContractModal({ isOpen, onClose, data }: {
1
+ import { ContractImage } from '../../../_type/type';
2
+ declare const ContractModal: ({ isOpen, onClose, data }: {
3
3
  isOpen: boolean;
4
4
  onClose: () => void;
5
5
  data: ContractImage[];
6
- }): import("react").JSX.Element;
6
+ }) => import("react").JSX.Element;
7
+ export default ContractModal;
@@ -1,56 +1,39 @@
1
- 'use client';
2
1
  import Image from 'next/image';
3
2
  import ModalContainer from './ModalCotainer';
3
+ import { useState } from 'react';
4
4
  import close from '../../../../../../asset/images/myCase/icon/close.webp';
5
- import PdfInlineViewer from '../_pdf/PdfInlineViewer';
6
- // pdfjs로 전체 펼쳐 렌더
7
- const getExt = (name) => ((name === null || name === void 0 ? void 0 : name.split('.').pop()) || '').toLowerCase();
8
- const isPdf = (name) => getExt(name) === 'pdf';
9
- const isHwp = (name) => {
10
- const ext = getExt(name);
11
- return ext === 'hwp' || ext === 'hwpx';
12
- };
13
- export default function ContractModal({ isOpen, onClose, data }) {
14
- return (<ModalContainer isOpen={isOpen} onClose={onClose}>
15
- {/* 모달 전체가 스크롤(콘텐츠 섹션엔 고정 height/overflow 넣지 않음) */}
16
- <div className="absolute flex h-full w-full flex-col overflow-y-auto rounded-[16px] border border-solid border-grayScale4 bg-grayScale8 pb-[32px]
17
- sm-top:rounded-[32px] sm-top:pb-[52px]
18
- lg:h-full lg:max-h-[800px] lg:w-full lg:max-w-[1000px]" onClick={e => e.stopPropagation()}>
19
- <div className="sticky top-0 z-10 flex flex-row items-center justify-between bg-grayScale8/95 px-[32px] pb-[8px] pt-[40px] backdrop-blur sm-top:px-[52px] sm-top:pt-[40px]">
20
- <p className="title_medium_mo sm-top:title_medium_tb lg:title_medium text-black">내 약정서</p>
21
- <Image src={close} alt="close" width={24} height={24} onClick={onClose} className="h-[16px] w-[16px] cursor-pointer sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px]"/>
22
- </div>
23
-
24
- <div className="mx-auto mt-[12px] w-full max-w-[calc(100%-64px)] rounded-[8px] border border-solid border-grayScale1 p-0 sm-top:mt-[20px] sm-top:max-w-[calc(100%-104px)]">
25
- <div className="space-y-6 p-3">
26
- {data === null || data === void 0 ? void 0 : data.map((item, index) => {
27
- var _a;
28
- const key = `${item.path}-${index}`;
29
- if (isPdf(item.name)) {
30
- // ✅ PDF: 페이지가 캔버스로 “쭉 펼쳐짐”
31
- return <PdfInlineViewer key={key} url={item.path} name={item.name}/>;
32
- }
33
- if (isHwp(item.name)) {
34
- return (<div key={key} className="w-full overflow-hidden rounded-lg border border-dashed border-gray-300">
35
- <div className="flex items-center justify-between px-3 py-2 text-sm">
36
- <span className="truncate">{item.name}</span>
37
- <a href={item.path} download className="underline">
38
- 다운로드
39
- </a>
40
- </div>
41
- <div className="px-3 pb-4 text-sm text-gray-600">
42
- 이 형식(HWP/HWXP)은 웹 미리보기를 지원하지 않습니다. PDF/이미지 변환 또는
43
- 한컴 웹 뷰어가 필요합니다.
44
- </div>
45
- </div>);
46
- }
47
- // 이미지 그대로
48
- return (<div key={key} className="w-full overflow-hidden rounded-lg">
49
- <Image src={item.path} alt={(_a = item.name) !== null && _a !== void 0 ? _a : 'image'} width={3000} height={3000} unoptimized className="block h-auto w-full"/>
50
- </div>);
51
- })}
5
+ const ContractModal = ({ isOpen, onClose, data }) => {
6
+ // const [value, setValue] = useState('');
7
+ // const [isCheck, setIsCheck] = useState(false);
8
+ const [isOpenConfirm, setIsOpenConfirm] = useState(false);
9
+ // const { mutateAsync, isLoading } = actionPostMyCaseQuestion(id, value);
10
+ // console.log(isLoading);
11
+ return (<>
12
+ <ModalContainer isOpen={isOpen} onClose={() => {
13
+ onClose();
14
+ }}>
15
+ <div className="absolute flex h-full w-full flex-col overflow-y-hidden rounded-[16px] border border-solid border-grayScale4 bg-grayScale8 p-[32px] sm-top:rounded-[32px] sm-top:p-[52px] lg:h-full lg:max-h-[800px] lg:w-full lg:max-w-[1000px] " onClick={e => e.stopPropagation()}>
16
+ <div className="flex flex-row items-center justify-between">
17
+ <p className="title_medium_mo sm-top:title_medium_tb lg:title_medium text-black">내 약정서</p>
18
+ <Image src={close} alt="close" width={24} height={24} onClick={() => {
19
+ onClose();
20
+ }} className="h-[16px] w-[16px] cursor-pointer sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px]"/>
52
21
  </div>
53
- </div>
22
+ <div className="mt-[12px] h-[453px] w-full overflow-y-auto rounded-[8px] border border-solid border-grayScale1 sm-top:mt-[20px] sm-top:h-[605px] lg:h-[calc(100%-62px)]">
23
+ {data === null || data === void 0 ? void 0 : data.map((item, index) => (<div key={index}>
24
+ <Image src={item.path} alt={item.name} width={3000} height={3000} unoptimized className="h-auto w-full"/>
25
+ </div>))}
26
+ </div>
27
+
28
+ {/* {isLoading ? (
29
+ <div className="absolute top-[0] flex h-full w-full items-center justify-center">
30
+ <Loading />
54
31
  </div>
55
- </ModalContainer>);
56
- }
32
+ ) : (
33
+ <></>
34
+ )} */}
35
+ </div>
36
+ </ModalContainer>
37
+ </>);
38
+ };
39
+ export default ContractModal;
@@ -1,98 +1,69 @@
1
- 'use client';
2
-
3
1
  import Image from 'next/image';
4
-
5
2
  import ModalContainer from './ModalCotainer';
6
- import close from '../../../../../../asset/images/myCase/icon/close.webp';
7
- import type { ContractImage } from '../../../_type/type';
8
- import PdfInlineViewer from '../_pdf/PdfInlineViewer';
9
3
 
10
- // pdfjs로 전체 펼쳐 렌더
4
+ import { useState } from 'react';
11
5
 
12
- const getExt = (name?: string) => (name?.split('.').pop() || '').toLowerCase();
13
- const isPdf = (name?: string) => getExt(name) === 'pdf';
14
- const isHwp = (name?: string) => {
15
- const ext = getExt(name);
16
- return ext === 'hwp' || ext === 'hwpx';
17
- };
6
+ import close from '../../../../../../asset/images/myCase/icon/close.webp';
7
+ import { ContractImage } from '../../../_type/type';
8
+
9
+ const ContractModal = ({ isOpen, onClose, data }: { isOpen: boolean; onClose: () => void; data: ContractImage[] }) => {
10
+ // const [value, setValue] = useState('');
11
+ // const [isCheck, setIsCheck] = useState(false);
12
+ const [isOpenConfirm, setIsOpenConfirm] = useState(false);
18
13
 
19
- export default function ContractModal({
20
- isOpen,
21
- onClose,
22
- data
23
- }: {
24
- isOpen: boolean;
25
- onClose: () => void;
26
- data: ContractImage[];
27
- }) {
14
+ // const { mutateAsync, isLoading } = actionPostMyCaseQuestion(id, value);
15
+ // console.log(isLoading);
28
16
  return (
29
- <ModalContainer isOpen={isOpen} onClose={onClose}>
30
- {/* 모달 전체가 스크롤(콘텐츠 섹션엔 고정 height/overflow 넣지 않음) */}
31
- <div
32
- className="absolute flex h-full w-full flex-col overflow-y-auto rounded-[16px] border border-solid border-grayScale4 bg-grayScale8 pb-[32px]
33
- sm-top:rounded-[32px] sm-top:pb-[52px]
34
- lg:h-full lg:max-h-[800px] lg:w-full lg:max-w-[1000px]"
35
- onClick={e => e.stopPropagation()}
17
+ <>
18
+ <ModalContainer
19
+ isOpen={isOpen}
20
+ onClose={() => {
21
+ onClose();
22
+ }}
36
23
  >
37
- <div className="sticky top-0 z-10 flex flex-row items-center justify-between bg-grayScale8/95 px-[32px] pb-[8px] pt-[40px] backdrop-blur sm-top:px-[52px] sm-top:pt-[40px]">
38
- <p className="title_medium_mo sm-top:title_medium_tb lg:title_medium text-black">내 약정서</p>
39
- <Image
40
- src={close}
41
- alt="close"
42
- width={24}
43
- height={24}
44
- onClick={onClose}
45
- className="h-[16px] w-[16px] cursor-pointer sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px]"
46
- />
47
- </div>
48
-
49
- <div className="mx-auto mt-[12px] w-full max-w-[calc(100%-64px)] rounded-[8px] border border-solid border-grayScale1 p-0 sm-top:mt-[20px] sm-top:max-w-[calc(100%-104px)]">
50
- <div className="space-y-6 p-3">
51
- {data?.map((item, index) => {
52
- const key = `${item.path}-${index}`;
53
-
54
- if (isPdf(item.name)) {
55
- // ✅ PDF: 페이지가 캔버스로 “쭉 펼쳐짐”
56
- return <PdfInlineViewer key={key} url={item.path} name={item.name} />;
57
- }
58
-
59
- if (isHwp(item.name)) {
60
- return (
61
- <div
62
- key={key}
63
- className="w-full overflow-hidden rounded-lg border border-dashed border-gray-300"
64
- >
65
- <div className="flex items-center justify-between px-3 py-2 text-sm">
66
- <span className="truncate">{item.name}</span>
67
- <a href={item.path} download className="underline">
68
- 다운로드
69
- </a>
70
- </div>
71
- <div className="px-3 pb-4 text-sm text-gray-600">
72
- 이 형식(HWP/HWXP)은 웹 미리보기를 지원하지 않습니다. PDF/이미지 변환 또는
73
- 한컴 웹 뷰어가 필요합니다.
74
- </div>
75
- </div>
76
- );
77
- }
78
-
79
- // 이미지 그대로
80
- return (
81
- <div key={key} className="w-full overflow-hidden rounded-lg">
82
- <Image
83
- src={item.path}
84
- alt={item.name ?? 'image'}
85
- width={3000}
86
- height={3000}
87
- unoptimized
88
- className="block h-auto w-full"
89
- />
90
- </div>
91
- );
92
- })}
24
+ <div
25
+ className="absolute flex h-full w-full flex-col overflow-y-hidden rounded-[16px] border border-solid border-grayScale4 bg-grayScale8 p-[32px] sm-top:rounded-[32px] sm-top:p-[52px] lg:h-full lg:max-h-[800px] lg:w-full lg:max-w-[1000px] "
26
+ onClick={e => e.stopPropagation()}
27
+ >
28
+ <div className="flex flex-row items-center justify-between">
29
+ <p className="title_medium_mo sm-top:title_medium_tb lg:title_medium text-black">내 약정서</p>
30
+ <Image
31
+ src={close}
32
+ alt="close"
33
+ width={24}
34
+ height={24}
35
+ onClick={() => {
36
+ onClose();
37
+ }}
38
+ className="h-[16px] w-[16px] cursor-pointer sm-top:h-[20px] sm-top:w-[20px] lg:h-[24px] lg:w-[24px]"
39
+ />
40
+ </div>
41
+ <div className="mt-[12px] h-[453px] w-full overflow-y-auto rounded-[8px] border border-solid border-grayScale1 sm-top:mt-[20px] sm-top:h-[605px] lg:h-[calc(100%-62px)]">
42
+ {data?.map((item, index) => (
43
+ <div key={index}>
44
+ <Image
45
+ src={item.path}
46
+ alt={item.name}
47
+ width={3000}
48
+ height={3000}
49
+ unoptimized
50
+ className="h-auto w-full"
51
+ />
52
+ </div>
53
+ ))}
93
54
  </div>
55
+
56
+ {/* {isLoading ? (
57
+ <div className="absolute top-[0] flex h-full w-full items-center justify-center">
58
+ <Loading />
59
+ </div>
60
+ ) : (
61
+ <></>
62
+ )} */}
94
63
  </div>
95
- </div>
96
- </ModalContainer>
64
+ </ModalContainer>
65
+ </>
97
66
  );
98
- }
67
+ };
68
+
69
+ export default ContractModal;