@daeryun/dr_components 0.2.64 → 0.2.66
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/custom.d.ts +8 -8
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/BrochureBtn/BrochureBtn.d.ts +0 -1
- package/dist/components/BrochureBtn/BrochureBtn.stories.d.ts +5 -6
- package/dist/components/BrochureBtn/MedicalBrochureBtn.d.ts +0 -1
- package/dist/components/Fix/Fix.stories.d.ts +2 -3
- package/dist/components/Fix/index.jsx +6 -2
- package/dist/components/Fix/index.tsx +14 -4
- package/dist/components/Footer/TopBtn.d.ts +0 -1
- package/dist/components/Footer/index.jsx +5 -5
- package/dist/components/Footer/index.tsx +9 -5
- package/dist/components/MapSection/Map.d.ts +0 -1
- package/dist/components/MapSection/MapSection.d.ts +1 -1
- package/dist/components/Mark/Mark.d.ts +0 -1
- package/dist/components/SelectBox/SelectBox.d.ts +8 -8
- package/dist/components/Seo/SeoStrength.stories.d.ts +0 -1
- package/dist/components/ViewMoreSection/SearchIcon.d.ts +0 -1
- package/dist/components/banner/TopBanner.d.ts +0 -1
- package/dist/components/banner/TopBanner.stories.d.ts +0 -1
- package/dist/components/categoryView/CategoryComponent.d.ts +1 -1
- package/dist/components/hook/useElementObserve.d.ts +2 -2
- package/dist/components/page/Choice/Choice.d.ts +1 -1
- package/dist/components/page/Strength/Strength.d.ts +0 -1
- package/dist/components/page/index.d.ts +0 -3
- package/dist/components/page/index.js +0 -3
- package/dist/components/page/index.ts +0 -3
- package/dist/lib/utils.js +4 -4
- package/dist/styles/globals.css +2 -548
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/dist/components/page/myCaseManage/[id]/_component/ContactInfo.d.ts +0 -3
- package/dist/components/page/myCaseManage/[id]/_component/ContactInfo.jsx +0 -65
- package/dist/components/page/myCaseManage/[id]/_component/ContactInfo.tsx +0 -76
- package/dist/components/page/myCaseManage/[id]/_component/DetailInfo.d.ts +0 -7
- package/dist/components/page/myCaseManage/[id]/_component/DetailInfo.jsx +0 -33
- package/dist/components/page/myCaseManage/[id]/_component/DetailInfo.tsx +0 -50
- package/dist/components/page/myCaseManage/[id]/_component/TimeLine.d.ts +0 -7
- package/dist/components/page/myCaseManage/[id]/_component/TimeLine.jsx +0 -41
- package/dist/components/page/myCaseManage/[id]/_component/TimeLine.tsx +0 -55
- package/dist/components/page/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.d.ts +0 -3
- package/dist/components/page/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.jsx +0 -90
- package/dist/components/page/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.tsx +0 -143
- package/dist/components/page/myCaseManage/[id]/_component/_document/Document.d.ts +0 -6
- package/dist/components/page/myCaseManage/[id]/_component/_document/Document.jsx +0 -41
- package/dist/components/page/myCaseManage/[id]/_component/_document/Document.tsx +0 -59
- package/dist/components/page/myCaseManage/[id]/_component/_document/DocumentLine.d.ts +0 -7
- package/dist/components/page/myCaseManage/[id]/_component/_document/DocumentLine.jsx +0 -55
- package/dist/components/page/myCaseManage/[id]/_component/_document/DocumentLine.tsx +0 -72
- package/dist/components/page/myCaseManage/[id]/index.d.ts +0 -3
- package/dist/components/page/myCaseManage/[id]/index.jsx +0 -44
- package/dist/components/page/myCaseManage/[id]/index.tsx +0 -85
- package/dist/components/page/myCaseManage/_actions/action.d.ts +0 -13
- package/dist/components/page/myCaseManage/_actions/action.js +0 -56
- package/dist/components/page/myCaseManage/_actions/action.ts +0 -65
- package/dist/components/page/myCaseManage/_component/CaseContainer.d.ts +0 -3
- package/dist/components/page/myCaseManage/_component/CaseContainer.jsx +0 -99
- package/dist/components/page/myCaseManage/_component/CaseContainer.tsx +0 -177
- package/dist/components/page/myCaseManage/_component/_breadCrumble/CategoryMenu.d.ts +0 -8
- package/dist/components/page/myCaseManage/_component/_breadCrumble/CategoryMenu.jsx +0 -47
- package/dist/components/page/myCaseManage/_component/_breadCrumble/CategoryMenu.tsx +0 -76
- package/dist/components/page/myCaseManage/_component/_button/Badge.d.ts +0 -15
- package/dist/components/page/myCaseManage/_component/_button/Badge.jsx +0 -16
- package/dist/components/page/myCaseManage/_component/_button/Badge.tsx +0 -22
- package/dist/components/page/myCaseManage/_component/_button/SubColor1Button.d.ts +0 -7
- package/dist/components/page/myCaseManage/_component/_button/SubColor1Button.jsx +0 -6
- package/dist/components/page/myCaseManage/_component/_button/SubColor1Button.tsx +0 -20
- package/dist/components/page/myCaseManage/_component/_button/SubMenuButton.d.ts +0 -7
- package/dist/components/page/myCaseManage/_component/_button/SubMenuButton.jsx +0 -6
- package/dist/components/page/myCaseManage/_component/_button/SubMenuButton.tsx +0 -12
- package/dist/components/page/myCaseManage/_component/_empty/EmptyTable.d.ts +0 -6
- package/dist/components/page/myCaseManage/_component/_empty/EmptyTable.jsx +0 -53
- package/dist/components/page/myCaseManage/_component/_empty/EmptyTable.tsx +0 -59
- package/dist/components/page/myCaseManage/_component/_layout/CaseLayout.d.ts +0 -7
- package/dist/components/page/myCaseManage/_component/_layout/CaseLayout.jsx +0 -8
- package/dist/components/page/myCaseManage/_component/_layout/CaseLayout.tsx +0 -20
- package/dist/components/page/myCaseManage/_component/_layout/CaseWrapper.d.ts +0 -11
- package/dist/components/page/myCaseManage/_component/_layout/CaseWrapper.jsx +0 -24
- package/dist/components/page/myCaseManage/_component/_layout/CaseWrapper.tsx +0 -36
- package/dist/components/page/myCaseManage/_component/_layout/HeaderLayout.d.ts +0 -5
- package/dist/components/page/myCaseManage/_component/_layout/HeaderLayout.jsx +0 -4
- package/dist/components/page/myCaseManage/_component/_layout/HeaderLayout.tsx +0 -5
- package/dist/components/page/myCaseManage/_component/_layout/IntroWrapper.d.ts +0 -8
- package/dist/components/page/myCaseManage/_component/_layout/IntroWrapper.jsx +0 -24
- package/dist/components/page/myCaseManage/_component/_layout/IntroWrapper.tsx +0 -43
- package/dist/components/page/myCaseManage/_component/_loading/Loading.d.ts +0 -3
- package/dist/components/page/myCaseManage/_component/_loading/Loading.jsx +0 -90
- package/dist/components/page/myCaseManage/_component/_loading/Loading.tsx +0 -94
- package/dist/components/page/myCaseManage/_component/_pagination/PaginationComponent.d.ts +0 -10
- package/dist/components/page/myCaseManage/_component/_pagination/PaginationComponent.jsx +0 -75
- package/dist/components/page/myCaseManage/_component/_pagination/PaginationComponent.tsx +0 -163
- package/dist/components/page/myCaseManage/_component/_table/CaseTable.d.ts +0 -10
- package/dist/components/page/myCaseManage/_component/_table/CaseTable.jsx +0 -37
- package/dist/components/page/myCaseManage/_component/_table/CaseTable.tsx +0 -62
- package/dist/components/page/myCaseManage/_fetchers/getCase.d.ts +0 -5
- package/dist/components/page/myCaseManage/_fetchers/getCase.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getCase.ts +0 -21
- package/dist/components/page/myCaseManage/_fetchers/getCaseList.d.ts +0 -7
- package/dist/components/page/myCaseManage/_fetchers/getCaseList.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getCaseList.ts +0 -24
- package/dist/components/page/myCaseManage/_fetchers/getCourtFileList.d.ts +0 -5
- package/dist/components/page/myCaseManage/_fetchers/getCourtFileList.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getCourtFileList.ts +0 -21
- package/dist/components/page/myCaseManage/_fetchers/getTimeLine.d.ts +0 -5
- package/dist/components/page/myCaseManage/_fetchers/getTimeLine.js +0 -30
- package/dist/components/page/myCaseManage/_fetchers/getTimeLine.ts +0 -21
- package/dist/components/page/myCaseManage/_lib/catagoryMenuName.d.ts +0 -8
- package/dist/components/page/myCaseManage/_lib/catagoryMenuName.js +0 -8
- package/dist/components/page/myCaseManage/_lib/catagoryMenuName.ts +0 -11
- package/dist/components/page/myCaseManage/_lib/pagination/locale/ko_KR.d.ts +0 -15
- package/dist/components/page/myCaseManage/_lib/pagination/locale/ko_KR.js +0 -21
- package/dist/components/page/myCaseManage/_type/type.d.ts +0 -64
- package/dist/components/page/myCaseManage/_type/type.js +0 -1
- package/dist/components/page/myCaseManage/_type/type.ts +0 -73
- package/dist/components/page/myCaseManage/index.d.ts +0 -3
- package/dist/components/page/myCaseManage/index.jsx +0 -20
- package/dist/components/page/myCaseManage/index.tsx +0 -30
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import CaseLayout from '../../../_component/_layout/CaseLayout';
|
|
3
|
-
import DocumentLine from './DocumentLine';
|
|
4
|
-
const Document = ({ courtFileList }) => {
|
|
5
|
-
const [tap, setTap] = useState('my');
|
|
6
|
-
const courtFileList2 = [
|
|
7
|
-
{
|
|
8
|
-
name: '쾌청.jpg',
|
|
9
|
-
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055314299.jpg',
|
|
10
|
-
created_at: '2025-02-19 14:53:14',
|
|
11
|
-
size: '29.5MB'
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: 'Test Image.png',
|
|
15
|
-
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055321289.png',
|
|
16
|
-
created_at: '2025-02-19 14:53:21',
|
|
17
|
-
size: '20.5MB'
|
|
18
|
-
}
|
|
19
|
-
];
|
|
20
|
-
return (<CaseLayout outerClassName="lg:mt-[40px] " innerClassName={'lg:pt-[60px] pb-[80px] px-[60px]'}>
|
|
21
|
-
<div className="bg-grayScale4 flex w-full overflow-hidden rounded-[12px] lg:h-[60px]">
|
|
22
|
-
<button onClick={() => setTap('my')} className={`h-full w-full transition-all duration-300 ${tap === 'my'
|
|
23
|
-
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
24
|
-
: 'border-grayScale4 border-[4px] border-solid text-white'}`}>
|
|
25
|
-
<p className="body_medium1">나의제출문서</p>
|
|
26
|
-
</button>
|
|
27
|
-
<button onClick={() => setTap('court')} className={`h-full w-full transition-all duration-300 ${tap === 'court'
|
|
28
|
-
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
29
|
-
: 'border-grayScale4 border-[4px] border-solid text-white'}`}>
|
|
30
|
-
<p className="body_medium1">법원제출문서</p>
|
|
31
|
-
</button>
|
|
32
|
-
</div>
|
|
33
|
-
<div className="lg:mt-[20px]">
|
|
34
|
-
<p className="body_small2 text-black">최근 제출순으로 조회됩니다.</p>
|
|
35
|
-
</div>
|
|
36
|
-
<div className="mt-[24px] flex flex-col ">
|
|
37
|
-
{courtFileList2.map((item, index) => (<DocumentLine key={index} item={item} index={index}/>))}
|
|
38
|
-
</div>
|
|
39
|
-
</CaseLayout>);
|
|
40
|
-
};
|
|
41
|
-
export default Document;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import CaseLayout from '../../../_component/_layout/CaseLayout';
|
|
3
|
-
import { FileList } from '../../../_type/type';
|
|
4
|
-
import DocumentLine from './DocumentLine';
|
|
5
|
-
|
|
6
|
-
const Document = ({ courtFileList }: { courtFileList: FileList[] }) => {
|
|
7
|
-
const [tap, setTap] = useState('my');
|
|
8
|
-
const courtFileList2 = [
|
|
9
|
-
{
|
|
10
|
-
name: '쾌청.jpg',
|
|
11
|
-
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055314299.jpg',
|
|
12
|
-
created_at: '2025-02-19 14:53:14',
|
|
13
|
-
size: '29.5MB'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
name: 'Test Image.png',
|
|
17
|
-
path: 'https://d6robzfync7d.cloudfront.net/case/15/82/20250219055321289.png',
|
|
18
|
-
created_at: '2025-02-19 14:53:21',
|
|
19
|
-
size: '20.5MB'
|
|
20
|
-
}
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<CaseLayout outerClassName="lg:mt-[40px] " innerClassName={'lg:pt-[60px] pb-[80px] px-[60px]'}>
|
|
25
|
-
<div className="bg-grayScale4 flex w-full overflow-hidden rounded-[12px] lg:h-[60px]">
|
|
26
|
-
<button
|
|
27
|
-
onClick={() => setTap('my')}
|
|
28
|
-
className={`h-full w-full transition-all duration-300 ${
|
|
29
|
-
tap === 'my'
|
|
30
|
-
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
31
|
-
: 'border-grayScale4 border-[4px] border-solid text-white'
|
|
32
|
-
}`}
|
|
33
|
-
>
|
|
34
|
-
<p className="body_medium1">나의제출문서</p>
|
|
35
|
-
</button>
|
|
36
|
-
<button
|
|
37
|
-
onClick={() => setTap('court')}
|
|
38
|
-
className={`h-full w-full transition-all duration-300 ${
|
|
39
|
-
tap === 'court'
|
|
40
|
-
? 'border-grayScale4 rounded-[12px] border-[4px] border-solid bg-white'
|
|
41
|
-
: 'border-grayScale4 border-[4px] border-solid text-white'
|
|
42
|
-
}`}
|
|
43
|
-
>
|
|
44
|
-
<p className="body_medium1">법원제출문서</p>
|
|
45
|
-
</button>
|
|
46
|
-
</div>
|
|
47
|
-
<div className="lg:mt-[20px]">
|
|
48
|
-
<p className="body_small2 text-black">최근 제출순으로 조회됩니다.</p>
|
|
49
|
-
</div>
|
|
50
|
-
<div className="mt-[24px] flex flex-col ">
|
|
51
|
-
{courtFileList2.map((item, index) => (
|
|
52
|
-
<DocumentLine key={index} item={item} index={index} />
|
|
53
|
-
))}
|
|
54
|
-
</div>
|
|
55
|
-
</CaseLayout>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default Document;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import Image from 'next/image';
|
|
11
|
-
import dayjs from 'dayjs';
|
|
12
|
-
import { useEffect, useState } from 'react';
|
|
13
|
-
import download from '../../../../../../asset/images/myCaseManage/icon/download.svg';
|
|
14
|
-
import pdf from '../../../../../../asset/images/myCaseManage/icon/pdf.svg';
|
|
15
|
-
import word from '../../../../../../asset/images/myCaseManage/icon/word.svg';
|
|
16
|
-
import xls from '../../../../../../asset/images/myCaseManage/icon/xls.svg';
|
|
17
|
-
import jpg from '../../../../../../asset/images/myCaseManage/icon/jpg.svg';
|
|
18
|
-
import png from '../../../../../../asset/images/myCaseManage/icon/png.svg';
|
|
19
|
-
const DocumentLine = ({ item, index }) => {
|
|
20
|
-
const [downloadUrl, setDownloadUrl] = useState(null);
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
const fetchBlob = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
-
try {
|
|
24
|
-
const res = yield fetch(item.path);
|
|
25
|
-
const blob = yield res.blob();
|
|
26
|
-
const url = window.URL.createObjectURL(blob);
|
|
27
|
-
setDownloadUrl(url);
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
console.log(error);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
fetchBlob();
|
|
34
|
-
}, [item.path]);
|
|
35
|
-
const imgUrl = {
|
|
36
|
-
png: png,
|
|
37
|
-
jpg: jpg,
|
|
38
|
-
pdf: pdf,
|
|
39
|
-
xls: xls,
|
|
40
|
-
doc: word
|
|
41
|
-
};
|
|
42
|
-
return (<div key={index} className="border-grayScale6 flex flex-row items-center border-b-[2px] border-solid lg:py-[16px]">
|
|
43
|
-
<Image src={imgUrl[item.name.split('.')[1]]} alt="image" width={39} height={48} unoptimized className="flex-shrink-0 lg:mr-[32px] lg:h-[48px] lg:w-[39px]"/>
|
|
44
|
-
<div className="w-full">
|
|
45
|
-
<p className="body_medium2 text-black">{item.name}</p>
|
|
46
|
-
<p className="body_small2 text-grayScale2 mt-[8px]">
|
|
47
|
-
{dayjs(item.created_at).format('YYYY.MM.DD HH:mm')} - {item.size}
|
|
48
|
-
</p>
|
|
49
|
-
</div>
|
|
50
|
-
{downloadUrl && (<a href={downloadUrl} download={item.name}>
|
|
51
|
-
<Image src={download} alt="image" width={28} height={28} className="flex-shrink-0 lg:h-[28px] lg:w-[28px]"/>
|
|
52
|
-
</a>)}
|
|
53
|
-
</div>);
|
|
54
|
-
};
|
|
55
|
-
export default DocumentLine;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import Image from 'next/image';
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
|
-
import { FileList } from '../../../_type/type';
|
|
4
|
-
import { useEffect, useState } from 'react';
|
|
5
|
-
import download from '../../../../../../asset/images/myCaseManage/icon/download.svg';
|
|
6
|
-
import pdf from '../../../../../../asset/images/myCaseManage/icon/pdf.svg';
|
|
7
|
-
import word from '../../../../../../asset/images/myCaseManage/icon/word.svg';
|
|
8
|
-
import xls from '../../../../../../asset/images/myCaseManage/icon/xls.svg';
|
|
9
|
-
|
|
10
|
-
import jpg from '../../../../../../asset/images/myCaseManage/icon/jpg.svg';
|
|
11
|
-
import png from '../../../../../../asset/images/myCaseManage/icon/png.svg';
|
|
12
|
-
|
|
13
|
-
const DocumentLine = ({ item, index }: { item: FileList; index: number }) => {
|
|
14
|
-
const [downloadUrl, setDownloadUrl] = useState<string | null>(null);
|
|
15
|
-
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
const fetchBlob = async () => {
|
|
18
|
-
try {
|
|
19
|
-
const res = await fetch(item.path);
|
|
20
|
-
const blob = await res.blob();
|
|
21
|
-
const url = window.URL.createObjectURL(blob);
|
|
22
|
-
|
|
23
|
-
setDownloadUrl(url);
|
|
24
|
-
} catch (error) {
|
|
25
|
-
console.log(error);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
fetchBlob();
|
|
30
|
-
}, [item.path]);
|
|
31
|
-
const imgUrl = {
|
|
32
|
-
png: png,
|
|
33
|
-
jpg: jpg,
|
|
34
|
-
pdf: pdf,
|
|
35
|
-
xls: xls,
|
|
36
|
-
doc: word
|
|
37
|
-
};
|
|
38
|
-
return (
|
|
39
|
-
<div
|
|
40
|
-
key={index}
|
|
41
|
-
className="border-grayScale6 flex flex-row items-center border-b-[2px] border-solid lg:py-[16px]"
|
|
42
|
-
>
|
|
43
|
-
<Image
|
|
44
|
-
src={imgUrl[item.name.split('.')[1] as keyof typeof imgUrl]}
|
|
45
|
-
alt="image"
|
|
46
|
-
width={39}
|
|
47
|
-
height={48}
|
|
48
|
-
unoptimized
|
|
49
|
-
className="flex-shrink-0 lg:mr-[32px] lg:h-[48px] lg:w-[39px]"
|
|
50
|
-
/>
|
|
51
|
-
<div className="w-full">
|
|
52
|
-
<p className="body_medium2 text-black">{item.name}</p>
|
|
53
|
-
<p className="body_small2 text-grayScale2 mt-[8px]">
|
|
54
|
-
{dayjs(item.created_at).format('YYYY.MM.DD HH:mm')} - {item.size}
|
|
55
|
-
</p>
|
|
56
|
-
</div>
|
|
57
|
-
{downloadUrl && (
|
|
58
|
-
<a href={downloadUrl} download={item.name}>
|
|
59
|
-
<Image
|
|
60
|
-
src={download}
|
|
61
|
-
alt="image"
|
|
62
|
-
width={28}
|
|
63
|
-
height={28}
|
|
64
|
-
className="flex-shrink-0 lg:h-[28px] lg:w-[28px]"
|
|
65
|
-
/>
|
|
66
|
-
</a>
|
|
67
|
-
)}
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default DocumentLine;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { useTranslation } from 'next-i18next';
|
|
3
|
-
import IntroWrapper from '../_component/_layout/IntroWrapper';
|
|
4
|
-
import SubMenuButton from '../_component/_button/SubMenuButton';
|
|
5
|
-
import HeaderLayout from '../_component/_layout/HeaderLayout';
|
|
6
|
-
import DetailInfo from './_component/DetailInfo';
|
|
7
|
-
import { useRouter } from 'next/router';
|
|
8
|
-
import { useActionGetCourtFileList, useActionGetDetailList, useActionGetTimeLine } from '../_actions/action';
|
|
9
|
-
import TimeLine from './_component/TimeLine';
|
|
10
|
-
import Document from './_component/_document/Document';
|
|
11
|
-
import ContactInfo from './_component/ContactInfo';
|
|
12
|
-
import CaseInquiry from './_component/_caseInquiry/CaseInquiry';
|
|
13
|
-
import background from '../../../../asset/images/myCaseManage/background.svg';
|
|
14
|
-
const Intro = () => {
|
|
15
|
-
const { t } = useTranslation('common');
|
|
16
|
-
const [selected, setSelected] = useState('사건 정보');
|
|
17
|
-
const router = useRouter();
|
|
18
|
-
const { id } = router.query;
|
|
19
|
-
const { data: detailList, isLoading: detailListLoading } = useActionGetDetailList(id);
|
|
20
|
-
const { data: timeLine, isLoading: timeLineLoading } = useActionGetTimeLine(id);
|
|
21
|
-
const { data: courtFileList, isLoading: courtFileListLoading } = useActionGetCourtFileList(id);
|
|
22
|
-
return (<div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
|
|
23
|
-
<IntroWrapper title={'상세 사건 정보'} subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'} backgroundImage={background} outerClassName="h-[513px]"/>
|
|
24
|
-
|
|
25
|
-
<div className={'relative z-[1] '}>
|
|
26
|
-
{/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
|
|
27
|
-
<HeaderLayout>
|
|
28
|
-
<div className="mt-[302px] flex items-center justify-center gap-[28px]">
|
|
29
|
-
<SubMenuButton title="사건 정보" isSelected={selected === '사건 정보'} onClick={() => setSelected('사건 정보')}/>
|
|
30
|
-
<SubMenuButton title="사건 타임라인" isSelected={selected === '사건 타임라인'} onClick={() => setSelected('사건 타임라인')}/>
|
|
31
|
-
<SubMenuButton title="문서함" isSelected={selected === '문서함'} onClick={() => setSelected('문서함')}/>
|
|
32
|
-
<SubMenuButton title="계약정보" isSelected={selected === '계약정보'} onClick={() => setSelected('계약정보')}/>
|
|
33
|
-
<SubMenuButton title="사건문의" isSelected={selected === '사건문의'} onClick={() => setSelected('사건문의')}/>
|
|
34
|
-
</div>
|
|
35
|
-
{selected === '사건 정보' && (<DetailInfo detailList={detailList === null || detailList === void 0 ? void 0 : detailList.data} isLoading={detailListLoading}/>)}
|
|
36
|
-
{selected === '사건 타임라인' && (<TimeLine timeLine={timeLine === null || timeLine === void 0 ? void 0 : timeLine.list} isLoading={timeLineLoading}/>)}
|
|
37
|
-
{selected === '문서함' && <Document courtFileList={courtFileList === null || courtFileList === void 0 ? void 0 : courtFileList.data}/>}
|
|
38
|
-
{selected === '계약정보' && <ContactInfo />}
|
|
39
|
-
{selected === '사건문의' && <CaseInquiry />}
|
|
40
|
-
</HeaderLayout>
|
|
41
|
-
</div>
|
|
42
|
-
</div>);
|
|
43
|
-
};
|
|
44
|
-
export default Intro;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { useTranslation } from 'next-i18next';
|
|
3
|
-
import IntroWrapper from '../_component/_layout/IntroWrapper';
|
|
4
|
-
import CaseLayout from '../_component/_layout/CaseLayout';
|
|
5
|
-
import SubMenuButton from '../_component/_button/SubMenuButton';
|
|
6
|
-
import HeaderLayout from '../_component/_layout/HeaderLayout';
|
|
7
|
-
import DetailInfo from './_component/DetailInfo';
|
|
8
|
-
import { useRouter } from 'next/router';
|
|
9
|
-
import { useQuery } from 'react-query';
|
|
10
|
-
import getCase from '../_fetchers/getCase';
|
|
11
|
-
import { DetailList, FetchType, FileList, TimeLineType } from '../_type/type';
|
|
12
|
-
import { useActionGetCourtFileList, useActionGetDetailList, useActionGetTimeLine } from '../_actions/action';
|
|
13
|
-
|
|
14
|
-
import TimeLine from './_component/TimeLine';
|
|
15
|
-
import Document from './_component/_document/Document';
|
|
16
|
-
import ContactInfo from './_component/ContactInfo';
|
|
17
|
-
import CaseInquiry from './_component/_caseInquiry/CaseInquiry';
|
|
18
|
-
import background from '../../../../asset/images/myCaseManage/background.svg';
|
|
19
|
-
const Intro = () => {
|
|
20
|
-
const { t } = useTranslation('common');
|
|
21
|
-
const [selected, setSelected] = useState<string>('사건 정보');
|
|
22
|
-
const router = useRouter();
|
|
23
|
-
const { id } = router.query;
|
|
24
|
-
|
|
25
|
-
const { data: detailList, isLoading: detailListLoading } = useActionGetDetailList(id as string);
|
|
26
|
-
const { data: timeLine, isLoading: timeLineLoading } = useActionGetTimeLine(id as string);
|
|
27
|
-
const { data: courtFileList, isLoading: courtFileListLoading } = useActionGetCourtFileList(id as string);
|
|
28
|
-
return (
|
|
29
|
-
<div className=" mt-[70px] min-h-[800px] md:mt-[78px] md2:mt-[88px]">
|
|
30
|
-
<IntroWrapper
|
|
31
|
-
title={'상세 사건 정보'}
|
|
32
|
-
subTitle={'대륜과 진행하고 있는 나의 사건 현황을 한눈에 확인할 수 있습니다.'}
|
|
33
|
-
backgroundImage={background}
|
|
34
|
-
outerClassName="h-[513px]"
|
|
35
|
-
/>
|
|
36
|
-
|
|
37
|
-
<div className={'relative z-[1] '}>
|
|
38
|
-
{/*header 크기 -> 115px max-lg2:90px max-xs:83px*/}
|
|
39
|
-
<HeaderLayout>
|
|
40
|
-
<div className="mt-[302px] flex items-center justify-center gap-[28px]">
|
|
41
|
-
<SubMenuButton
|
|
42
|
-
title="사건 정보"
|
|
43
|
-
isSelected={selected === '사건 정보'}
|
|
44
|
-
onClick={() => setSelected('사건 정보')}
|
|
45
|
-
/>
|
|
46
|
-
<SubMenuButton
|
|
47
|
-
title="사건 타임라인"
|
|
48
|
-
isSelected={selected === '사건 타임라인'}
|
|
49
|
-
onClick={() => setSelected('사건 타임라인')}
|
|
50
|
-
/>
|
|
51
|
-
<SubMenuButton
|
|
52
|
-
title="문서함"
|
|
53
|
-
isSelected={selected === '문서함'}
|
|
54
|
-
onClick={() => setSelected('문서함')}
|
|
55
|
-
/>
|
|
56
|
-
<SubMenuButton
|
|
57
|
-
title="계약정보"
|
|
58
|
-
isSelected={selected === '계약정보'}
|
|
59
|
-
onClick={() => setSelected('계약정보')}
|
|
60
|
-
/>
|
|
61
|
-
<SubMenuButton
|
|
62
|
-
title="사건문의"
|
|
63
|
-
isSelected={selected === '사건문의'}
|
|
64
|
-
onClick={() => setSelected('사건문의')}
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
{selected === '사건 정보' && (
|
|
68
|
-
<DetailInfo detailList={detailList?.data as DetailList} isLoading={detailListLoading} />
|
|
69
|
-
)}
|
|
70
|
-
{selected === '사건 타임라인' && (
|
|
71
|
-
<TimeLine
|
|
72
|
-
timeLine={timeLine?.list as unknown as TimeLineType[][]}
|
|
73
|
-
isLoading={timeLineLoading}
|
|
74
|
-
/>
|
|
75
|
-
)}
|
|
76
|
-
{selected === '문서함' && <Document courtFileList={courtFileList?.data as FileList[]} />}
|
|
77
|
-
{selected === '계약정보' && <ContactInfo />}
|
|
78
|
-
{selected === '사건문의' && <CaseInquiry />}
|
|
79
|
-
</HeaderLayout>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default Intro;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FetchType, DetailList, TimeLineType, FileList } from '../_type/type';
|
|
2
|
-
export declare const useActionGetDetailList: (id: string) => {
|
|
3
|
-
data: FetchType<DetailList> | undefined;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare const useActionGetTimeLine: (id: string) => {
|
|
7
|
-
data: FetchType<TimeLineType> | undefined;
|
|
8
|
-
isLoading: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare const useActionGetCourtFileList: (id: string) => {
|
|
11
|
-
data: FetchType<FileList[]> | undefined;
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { useQuery } from 'react-query';
|
|
2
|
-
import getCase from '../_fetchers/getCase';
|
|
3
|
-
import getTimeLine from '../_fetchers/getTimeLine';
|
|
4
|
-
import getCourtFileList from '../_fetchers/getCourtFileList';
|
|
5
|
-
const jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTc0MDAxNDYzOCwiZXhwIjoxNzcxNTcyMjM4fQ.11ra7DkzlOVmBqDjo8SJTQnZDZdRHXjjU3ujK8G3OOY';
|
|
6
|
-
export const useActionGetDetailList = (id) => {
|
|
7
|
-
const { data, isLoading } = useQuery({
|
|
8
|
-
queryKey: ['case', id],
|
|
9
|
-
queryFn: () => getCase({
|
|
10
|
-
jwt: jwt,
|
|
11
|
-
id: id
|
|
12
|
-
}),
|
|
13
|
-
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
14
|
-
refetchOnWindowFocus: false,
|
|
15
|
-
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
16
|
-
cacheTime: 0,
|
|
17
|
-
staleTime: 0,
|
|
18
|
-
onSuccess: res => { },
|
|
19
|
-
onError: error => {
|
|
20
|
-
console.log(error);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
return { data, isLoading };
|
|
24
|
-
};
|
|
25
|
-
export const useActionGetTimeLine = (id) => {
|
|
26
|
-
const { data, isLoading } = useQuery({
|
|
27
|
-
queryKey: ['case', 'timeline', id],
|
|
28
|
-
queryFn: () => getTimeLine({
|
|
29
|
-
jwt: jwt,
|
|
30
|
-
id: id
|
|
31
|
-
}),
|
|
32
|
-
cacheTime: 0,
|
|
33
|
-
staleTime: 0,
|
|
34
|
-
onSuccess: res => { },
|
|
35
|
-
onError: error => {
|
|
36
|
-
console.log(error);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
return { data, isLoading };
|
|
40
|
-
};
|
|
41
|
-
export const useActionGetCourtFileList = (id) => {
|
|
42
|
-
const { data, isLoading } = useQuery({
|
|
43
|
-
queryKey: ['case', 'courtFileList', id],
|
|
44
|
-
queryFn: () => getCourtFileList({
|
|
45
|
-
jwt: jwt,
|
|
46
|
-
id: id
|
|
47
|
-
}),
|
|
48
|
-
cacheTime: 0,
|
|
49
|
-
staleTime: 0,
|
|
50
|
-
onSuccess: res => { },
|
|
51
|
-
onError: error => {
|
|
52
|
-
console.log(error);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
return { data, isLoading };
|
|
56
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { useQuery } from 'react-query';
|
|
2
|
-
import { FetchType, DetailList, TimeLineType, FileList } from '../_type/type';
|
|
3
|
-
import getCase from '../_fetchers/getCase';
|
|
4
|
-
import getTimeLine from '../_fetchers/getTimeLine';
|
|
5
|
-
import { t } from 'i18next';
|
|
6
|
-
import getCourtFileList from '../_fetchers/getCourtFileList';
|
|
7
|
-
|
|
8
|
-
const jwt =
|
|
9
|
-
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTc0MDAxNDYzOCwiZXhwIjoxNzcxNTcyMjM4fQ.11ra7DkzlOVmBqDjo8SJTQnZDZdRHXjjU3ujK8G3OOY';
|
|
10
|
-
export const useActionGetDetailList = (id: string) => {
|
|
11
|
-
const { data, isLoading } = useQuery<FetchType<DetailList>>({
|
|
12
|
-
queryKey: ['case', id],
|
|
13
|
-
queryFn: () =>
|
|
14
|
-
getCase({
|
|
15
|
-
jwt: jwt,
|
|
16
|
-
id: id as string
|
|
17
|
-
}),
|
|
18
|
-
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
19
|
-
refetchOnWindowFocus: false,
|
|
20
|
-
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
21
|
-
cacheTime: 0,
|
|
22
|
-
staleTime: 0,
|
|
23
|
-
onSuccess: res => {},
|
|
24
|
-
onError: error => {
|
|
25
|
-
console.log(error);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
return { data, isLoading };
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const useActionGetTimeLine = (id: string) => {
|
|
32
|
-
const { data, isLoading } = useQuery<FetchType<TimeLineType>>({
|
|
33
|
-
queryKey: ['case', 'timeline', id],
|
|
34
|
-
queryFn: () =>
|
|
35
|
-
getTimeLine({
|
|
36
|
-
jwt: jwt,
|
|
37
|
-
id: id as string
|
|
38
|
-
}),
|
|
39
|
-
cacheTime: 0,
|
|
40
|
-
staleTime: 0,
|
|
41
|
-
onSuccess: res => {},
|
|
42
|
-
onError: error => {
|
|
43
|
-
console.log(error);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
return { data, isLoading };
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const useActionGetCourtFileList = (id: string) => {
|
|
50
|
-
const { data, isLoading } = useQuery<FetchType<FileList[]>>({
|
|
51
|
-
queryKey: ['case', 'courtFileList', id],
|
|
52
|
-
queryFn: () =>
|
|
53
|
-
getCourtFileList({
|
|
54
|
-
jwt: jwt,
|
|
55
|
-
id: id as string
|
|
56
|
-
}),
|
|
57
|
-
cacheTime: 0,
|
|
58
|
-
staleTime: 0,
|
|
59
|
-
onSuccess: res => {},
|
|
60
|
-
onError: error => {
|
|
61
|
-
console.log(error);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
return { data, isLoading };
|
|
65
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import CaseLayout from './_layout/CaseLayout';
|
|
3
|
-
import SubColor1Button from './_button/SubColor1Button';
|
|
4
|
-
import { useQuery } from 'react-query';
|
|
5
|
-
import getCaseList from '../_fetchers/getCaseList';
|
|
6
|
-
import CaseTable from './_table/CaseTable';
|
|
7
|
-
import EmptyTable from './_empty/EmptyTable';
|
|
8
|
-
import { useRouter } from 'next/router';
|
|
9
|
-
import Loading from './_loading/Loading';
|
|
10
|
-
const CaseTap = ({ title, type, tap, setTap }) => {
|
|
11
|
-
return (<button onClick={() => {
|
|
12
|
-
if (setTap) {
|
|
13
|
-
setTap(type);
|
|
14
|
-
}
|
|
15
|
-
}} className={`items-top flex h-[45px] w-full justify-center border-b-[2px] border-solid transition-colors duration-300 ${tap === type ? 'border-black text-black' : 'text-grayScale4 border-grayScale4'}`}>
|
|
16
|
-
<p className={'lg:body_large1'}>{title}</p>
|
|
17
|
-
</button>);
|
|
18
|
-
};
|
|
19
|
-
const CaseContainer = () => {
|
|
20
|
-
const router = useRouter();
|
|
21
|
-
const { page, tap, subTap } = router.query;
|
|
22
|
-
const tapState = tap ? tap : 'ongoing';
|
|
23
|
-
const subTapState = subTap ? subTap : tap ? tap : 'ongoing';
|
|
24
|
-
const pageSize = 6;
|
|
25
|
-
const [caseList, setCaseList] = useState([]);
|
|
26
|
-
const [totalLength, setTotalLength] = useState(0);
|
|
27
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
28
|
-
const pageNumber = page ? Number(page) : 1;
|
|
29
|
-
const handleOnChange = (pageNum) => {
|
|
30
|
-
router.push({
|
|
31
|
-
pathname: '/mycase',
|
|
32
|
-
query: { page: pageNum, tap, subTap }
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
const handleOnTap = (tap) => {
|
|
36
|
-
router.push({
|
|
37
|
-
pathname: '/mycase',
|
|
38
|
-
query: { page, tap, subTap: tap === 'ongoing' ? 'ongoing' : 'closed' }
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
const handleOnSubTap = (subTap) => {
|
|
42
|
-
router.push({
|
|
43
|
-
pathname: '/mycase',
|
|
44
|
-
query: { page: 1, tap, subTap }
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
useQuery({
|
|
48
|
-
queryKey: ['case', tapState, subTapState, pageNumber],
|
|
49
|
-
queryFn: () => getCaseList({
|
|
50
|
-
jwt: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTczOTkyNzA5OSwiZXhwIjoxNzM5OTYzMDk5fQ.dFs1DbeGJd3E-FiBKguapDUqTzqT5m1mzparF3SeKB8',
|
|
51
|
-
size: pageSize,
|
|
52
|
-
state: subTapState,
|
|
53
|
-
page: pageNumber
|
|
54
|
-
}),
|
|
55
|
-
//브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
|
|
56
|
-
refetchOnWindowFocus: false,
|
|
57
|
-
//기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
|
|
58
|
-
cacheTime: 0,
|
|
59
|
-
staleTime: 0,
|
|
60
|
-
onSuccess: res => {
|
|
61
|
-
if (res.result) {
|
|
62
|
-
console.log(res);
|
|
63
|
-
setCaseList(res.data.list);
|
|
64
|
-
setTotalLength(res.data.totalLength);
|
|
65
|
-
setIsLoading(false);
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
onError: error => {
|
|
69
|
-
console.log(error);
|
|
70
|
-
setIsLoading(false);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
return (<CaseLayout outerClassName="lg:mt-[294px] " innerClassName={'lg:py-[60px]'}>
|
|
74
|
-
<div className={''}>
|
|
75
|
-
<div className="flex flex-row items-center lg:px-[60px]">
|
|
76
|
-
<CaseTap title="진행중인 사건" type="ongoing" tap={tapState} setTap={handleOnTap}/>
|
|
77
|
-
<CaseTap title="종결된 사건" type="closed" tap={tapState} setTap={handleOnTap}/>
|
|
78
|
-
</div>
|
|
79
|
-
<div className={'my-[20px] flex flex-row gap-[28px] lg:px-[60px]'}>
|
|
80
|
-
{tapState === 'ongoing' ? (<>
|
|
81
|
-
<SubColor1Button title="전체" onClick={() => handleOnSubTap('ongoing')} isSelected={subTapState === 'ongoing'}/>
|
|
82
|
-
|
|
83
|
-
<SubColor1Button title="사건접수" onClick={() => handleOnSubTap('사건접수')} isSelected={subTapState === '사건접수'}/>
|
|
84
|
-
<SubColor1Button title="사건검토" onClick={() => handleOnSubTap('사건검토')} isSelected={subTapState === '사건검토'}/>
|
|
85
|
-
<SubColor1Button title="변호사상담" onClick={() => handleOnSubTap('변호사상담')} isSelected={subTapState === '변호사상담'}/>
|
|
86
|
-
|
|
87
|
-
<SubColor1Button title="소송준비" onClick={() => handleOnSubTap('소송준비')} isSelected={subTapState === '소송준비'}/>
|
|
88
|
-
<SubColor1Button title="소송진행" onClick={() => handleOnSubTap('소송진행')} isSelected={subTapState === '소송진행'}/>
|
|
89
|
-
</>) : (<>
|
|
90
|
-
<SubColor1Button title="전체" onClick={() => handleOnSubTap('closed')} isSelected={subTapState === 'closed'}/>
|
|
91
|
-
<SubColor1Button title="사건종결" onClick={() => handleOnSubTap('사건종결')} isSelected={subTapState === '사건종결'}/>
|
|
92
|
-
<SubColor1Button title="환불" onClick={() => handleOnSubTap('환불')} isSelected={subTapState === '환불'}/>
|
|
93
|
-
</>)}
|
|
94
|
-
</div>
|
|
95
|
-
{isLoading ? (<Loading />) : caseList.length > 0 ? (<CaseTable list={caseList} totalLength={totalLength} pageSize={pageSize} pageNumber={pageNumber} onChange={handleOnChange}/>) : (<EmptyTable tap={tapState} subTap={subTapState === 'ongoing' || subTapState === 'closed' ? 0 : 1}/>)}
|
|
96
|
-
</div>
|
|
97
|
-
</CaseLayout>);
|
|
98
|
-
};
|
|
99
|
-
export default CaseContainer;
|