@daeryun/dr_components 0.2.58 → 0.2.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/asset/images/myCaseManage/arrow_2.webp +0 -0
  2. package/dist/asset/images/myCaseManage/arrow_right.svg +3 -0
  3. package/dist/asset/images/myCaseManage/background.svg +8 -0
  4. package/dist/asset/images/myCaseManage/header_arrow.svg +3 -0
  5. package/dist/asset/images/myCaseManage/home.svg +16 -0
  6. package/dist/asset/images/myCaseManage/home.webp +0 -0
  7. package/dist/asset/images/myCaseManage/icon/case_icon1.svg +4 -0
  8. package/dist/asset/images/myCaseManage/icon/case_icon2.svg +6 -0
  9. package/dist/asset/images/myCaseManage/icon/case_icon3.svg +3 -0
  10. package/dist/asset/images/myCaseManage/icon/case_lookup_linkout.svg +5 -0
  11. package/dist/asset/images/myCaseManage/icon/check_circle.svg +3 -0
  12. package/dist/asset/images/myCaseManage/icon/check_circle2.svg +3 -0
  13. package/dist/asset/images/myCaseManage/icon/client.svg +14 -0
  14. package/dist/asset/images/myCaseManage/icon/daeryun.svg +7 -0
  15. package/dist/asset/images/myCaseManage/icon/download.svg +3 -0
  16. package/dist/asset/images/myCaseManage/icon/jpg.svg +15 -0
  17. package/dist/asset/images/myCaseManage/icon/pdf.svg +9 -0
  18. package/dist/asset/images/myCaseManage/icon/png.svg +25 -0
  19. package/dist/asset/images/myCaseManage/icon/word.svg +11 -0
  20. package/dist/asset/images/myCaseManage/icon/xls.svg +18 -0
  21. package/dist/asset/images/myCaseManage/nav_arr.webp +0 -0
  22. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  23. package/dist/components/BrochureBtn/BrochureBtn.d.ts +1 -0
  24. package/dist/components/BrochureBtn/BrochureBtn.stories.d.ts +6 -5
  25. package/dist/components/BrochureBtn/MedicalBrochureBtn.d.ts +1 -0
  26. package/dist/components/Fix/Fix.stories.d.ts +3 -2
  27. package/dist/components/Footer/TopBtn.d.ts +1 -0
  28. package/dist/components/MapSection/Map.d.ts +1 -0
  29. package/dist/components/MapSection/MapSection.d.ts +1 -1
  30. package/dist/components/Mark/Mark.d.ts +1 -0
  31. package/dist/components/SelectBox/SelectBox.d.ts +8 -8
  32. package/dist/components/Seo/SeoStrength.stories.d.ts +1 -0
  33. package/dist/components/ViewMoreSection/SearchIcon.d.ts +1 -0
  34. package/dist/components/banner/TopBanner.d.ts +1 -0
  35. package/dist/components/banner/TopBanner.stories.d.ts +1 -0
  36. package/dist/components/categoryView/CategoryComponent.d.ts +1 -1
  37. package/dist/components/hook/useElementObserve.d.ts +2 -2
  38. package/dist/components/myCaseManage/[id]/_component/ContactInfo.d.ts +3 -0
  39. package/dist/components/myCaseManage/[id]/_component/ContactInfo.jsx +65 -0
  40. package/dist/components/myCaseManage/[id]/_component/ContactInfo.tsx +76 -0
  41. package/dist/components/myCaseManage/[id]/_component/DetailInfo.d.ts +7 -0
  42. package/dist/components/myCaseManage/[id]/_component/DetailInfo.jsx +33 -0
  43. package/dist/components/myCaseManage/[id]/_component/DetailInfo.tsx +50 -0
  44. package/dist/components/myCaseManage/[id]/_component/TimeLine.d.ts +7 -0
  45. package/dist/components/myCaseManage/[id]/_component/TimeLine.jsx +41 -0
  46. package/dist/components/myCaseManage/[id]/_component/TimeLine.tsx +55 -0
  47. package/dist/components/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.d.ts +3 -0
  48. package/dist/components/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.jsx +90 -0
  49. package/dist/components/myCaseManage/[id]/_component/_caseInquiry/CaseInquiry.tsx +143 -0
  50. package/dist/components/myCaseManage/[id]/_component/_document/Document.d.ts +6 -0
  51. package/dist/components/myCaseManage/[id]/_component/_document/Document.jsx +41 -0
  52. package/dist/components/myCaseManage/[id]/_component/_document/Document.tsx +59 -0
  53. package/dist/components/myCaseManage/[id]/_component/_document/DocumentLine.d.ts +7 -0
  54. package/dist/components/myCaseManage/[id]/_component/_document/DocumentLine.jsx +55 -0
  55. package/dist/components/myCaseManage/[id]/_component/_document/DocumentLine.tsx +72 -0
  56. package/dist/components/myCaseManage/[id]/index.d.ts +3 -0
  57. package/dist/components/myCaseManage/[id]/index.jsx +44 -0
  58. package/dist/components/myCaseManage/[id]/index.tsx +85 -0
  59. package/dist/components/myCaseManage/_actions/action.d.ts +13 -0
  60. package/dist/components/myCaseManage/_actions/action.js +56 -0
  61. package/dist/components/myCaseManage/_actions/action.ts +65 -0
  62. package/dist/components/myCaseManage/_component/CaseContainer.d.ts +3 -0
  63. package/dist/components/myCaseManage/_component/CaseContainer.jsx +99 -0
  64. package/dist/components/myCaseManage/_component/CaseContainer.tsx +177 -0
  65. package/dist/components/myCaseManage/_component/_breadCrumble/CategoryMenu.d.ts +8 -0
  66. package/dist/components/myCaseManage/_component/_breadCrumble/CategoryMenu.jsx +47 -0
  67. package/dist/components/myCaseManage/_component/_breadCrumble/CategoryMenu.tsx +76 -0
  68. package/dist/components/myCaseManage/_component/_button/Badge.d.ts +15 -0
  69. package/dist/components/myCaseManage/_component/_button/Badge.jsx +16 -0
  70. package/dist/components/myCaseManage/_component/_button/Badge.tsx +22 -0
  71. package/dist/components/myCaseManage/_component/_button/SubColor1Button.d.ts +7 -0
  72. package/dist/components/myCaseManage/_component/_button/SubColor1Button.jsx +6 -0
  73. package/dist/components/myCaseManage/_component/_button/SubColor1Button.tsx +20 -0
  74. package/dist/components/myCaseManage/_component/_button/SubMenuButton.d.ts +7 -0
  75. package/dist/components/myCaseManage/_component/_button/SubMenuButton.jsx +6 -0
  76. package/dist/components/myCaseManage/_component/_button/SubMenuButton.tsx +12 -0
  77. package/dist/components/myCaseManage/_component/_empty/EmptyTable.d.ts +6 -0
  78. package/dist/components/myCaseManage/_component/_empty/EmptyTable.jsx +53 -0
  79. package/dist/components/myCaseManage/_component/_empty/EmptyTable.tsx +59 -0
  80. package/dist/components/myCaseManage/_component/_layout/CaseLayout.d.ts +7 -0
  81. package/dist/components/myCaseManage/_component/_layout/CaseLayout.jsx +8 -0
  82. package/dist/components/myCaseManage/_component/_layout/CaseLayout.tsx +20 -0
  83. package/dist/components/myCaseManage/_component/_layout/CaseWrapper.d.ts +11 -0
  84. package/dist/components/myCaseManage/_component/_layout/CaseWrapper.jsx +24 -0
  85. package/dist/components/myCaseManage/_component/_layout/CaseWrapper.tsx +36 -0
  86. package/dist/components/myCaseManage/_component/_layout/HeaderLayout.d.ts +5 -0
  87. package/dist/components/myCaseManage/_component/_layout/HeaderLayout.jsx +4 -0
  88. package/dist/components/myCaseManage/_component/_layout/HeaderLayout.tsx +5 -0
  89. package/dist/components/myCaseManage/_component/_layout/IntroWrapper.d.ts +8 -0
  90. package/dist/components/myCaseManage/_component/_layout/IntroWrapper.jsx +24 -0
  91. package/dist/components/myCaseManage/_component/_layout/IntroWrapper.tsx +43 -0
  92. package/dist/components/myCaseManage/_component/_loading/Loading.d.ts +3 -0
  93. package/dist/components/myCaseManage/_component/_loading/Loading.jsx +90 -0
  94. package/dist/components/myCaseManage/_component/_loading/Loading.tsx +94 -0
  95. package/dist/components/myCaseManage/_component/_pagination/PaginationComponent.d.ts +10 -0
  96. package/dist/components/myCaseManage/_component/_pagination/PaginationComponent.jsx +75 -0
  97. package/dist/components/myCaseManage/_component/_pagination/PaginationComponent.tsx +163 -0
  98. package/dist/components/myCaseManage/_component/_table/CaseTable.d.ts +10 -0
  99. package/dist/components/myCaseManage/_component/_table/CaseTable.jsx +37 -0
  100. package/dist/components/myCaseManage/_component/_table/CaseTable.tsx +62 -0
  101. package/dist/components/myCaseManage/_fetchers/getCase.d.ts +5 -0
  102. package/dist/components/myCaseManage/_fetchers/getCase.js +30 -0
  103. package/dist/components/myCaseManage/_fetchers/getCase.ts +21 -0
  104. package/dist/components/myCaseManage/_fetchers/getCaseList.d.ts +7 -0
  105. package/dist/components/myCaseManage/_fetchers/getCaseList.js +30 -0
  106. package/dist/components/myCaseManage/_fetchers/getCaseList.ts +24 -0
  107. package/dist/components/myCaseManage/_fetchers/getCourtFileList.d.ts +5 -0
  108. package/dist/components/myCaseManage/_fetchers/getCourtFileList.js +30 -0
  109. package/dist/components/myCaseManage/_fetchers/getCourtFileList.ts +21 -0
  110. package/dist/components/myCaseManage/_fetchers/getTimeLine.d.ts +5 -0
  111. package/dist/components/myCaseManage/_fetchers/getTimeLine.js +30 -0
  112. package/dist/components/myCaseManage/_fetchers/getTimeLine.ts +21 -0
  113. package/dist/components/myCaseManage/_lib/catagoryMenuName.d.ts +8 -0
  114. package/dist/components/myCaseManage/_lib/catagoryMenuName.js +8 -0
  115. package/dist/components/myCaseManage/_lib/catagoryMenuName.ts +11 -0
  116. package/dist/components/myCaseManage/_lib/pagination/locale/ko_KR.d.ts +15 -0
  117. package/dist/components/myCaseManage/_lib/pagination/locale/ko_KR.js +21 -0
  118. package/dist/components/myCaseManage/_type/type.d.ts +64 -0
  119. package/dist/components/myCaseManage/_type/type.js +1 -0
  120. package/dist/components/myCaseManage/_type/type.ts +73 -0
  121. package/dist/components/myCaseManage/index.d.ts +3 -0
  122. package/dist/components/myCaseManage/index.jsx +20 -0
  123. package/dist/components/myCaseManage/index.tsx +30 -0
  124. package/dist/components/page/Choice/Choice.d.ts +1 -1
  125. package/dist/components/page/Strength/Strength.d.ts +1 -0
  126. package/dist/lib/utils.js +4 -4
  127. package/dist/styles/globals.css +548 -2
  128. package/dist/tsconfig.tsbuildinfo +1 -1
  129. package/package.json +93 -91
@@ -0,0 +1,65 @@
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
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const CaseContainer: () => import("react").JSX.Element;
3
+ export default CaseContainer;
@@ -0,0 +1,99 @@
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;
@@ -0,0 +1,177 @@
1
+ import { useEffect, 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 { Case } from '../_type/type';
8
+ import EmptyTable from './_empty/EmptyTable';
9
+ import { useRouter } from 'next/router';
10
+ import Loading from './_loading/Loading';
11
+
12
+ const CaseTap = ({
13
+ title,
14
+ type,
15
+ tap,
16
+ setTap
17
+ }: {
18
+ title: string;
19
+ type: string;
20
+ tap: string;
21
+ setTap: (tap: string) => void;
22
+ }) => {
23
+ return (
24
+ <button
25
+ onClick={() => {
26
+ if (setTap) {
27
+ setTap(type);
28
+ }
29
+ }}
30
+ 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'}`}
31
+ >
32
+ <p className={'lg:body_large1'}>{title}</p>
33
+ </button>
34
+ );
35
+ };
36
+
37
+ const CaseContainer = () => {
38
+ const router = useRouter();
39
+ const { page, tap, subTap } = router.query;
40
+ const tapState = tap ? (tap as string) : 'ongoing';
41
+ const subTapState = subTap ? subTap : tap ? (tap as string) : 'ongoing';
42
+ const pageSize = 6;
43
+
44
+ const [caseList, setCaseList] = useState<Case[]>([]);
45
+ const [totalLength, setTotalLength] = useState(0);
46
+ const [isLoading, setIsLoading] = useState(true);
47
+ const pageNumber = page ? Number(page) : 1;
48
+
49
+ const handleOnChange = (pageNum: number) => {
50
+ router.push({
51
+ pathname: '/mycase',
52
+ query: { page: pageNum, tap, subTap }
53
+ });
54
+ };
55
+ const handleOnTap = (tap: string) => {
56
+ router.push({
57
+ pathname: '/mycase',
58
+ query: { page, tap, subTap: tap === 'ongoing' ? 'ongoing' : 'closed' }
59
+ });
60
+ };
61
+ const handleOnSubTap = (subTap: string) => {
62
+ router.push({
63
+ pathname: '/mycase',
64
+ query: { page: 1, tap, subTap }
65
+ });
66
+ };
67
+
68
+ useQuery({
69
+ queryKey: ['case', tapState, subTapState, pageNumber],
70
+ queryFn: () =>
71
+ getCaseList({
72
+ jwt: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZHgiOjIsImlhdCI6MTczOTkyNzA5OSwiZXhwIjoxNzM5OTYzMDk5fQ.dFs1DbeGJd3E-FiBKguapDUqTzqT5m1mzparF3SeKB8',
73
+ size: pageSize,
74
+ state: subTapState as string,
75
+ page: pageNumber
76
+ }),
77
+ //브라우저 화면을 focus할 때 새로 api를 호출할 건지 설정하는 옵션
78
+ refetchOnWindowFocus: false,
79
+ //기본설정 cacheTime:5분, staleTime:0초, 값을 Infinity로 설정할 경우 api return 값이 바뀌지 않는 이상 서버에 새로 요청하지 않고 캐싱된 데이터를 영구적으로 사용하여 api 호출 최적화
80
+ cacheTime: 0,
81
+ staleTime: 0,
82
+ onSuccess: res => {
83
+ if (res.result) {
84
+ console.log(res);
85
+ setCaseList(res.data.list);
86
+ setTotalLength(res.data.totalLength);
87
+ setIsLoading(false);
88
+ }
89
+ },
90
+ onError: error => {
91
+ console.log(error);
92
+ setIsLoading(false);
93
+ }
94
+ });
95
+
96
+ return (
97
+ <CaseLayout outerClassName="lg:mt-[294px] " innerClassName={'lg:py-[60px]'}>
98
+ <div className={''}>
99
+ <div className="flex flex-row items-center lg:px-[60px]">
100
+ <CaseTap title="진행중인 사건" type="ongoing" tap={tapState} setTap={handleOnTap} />
101
+ <CaseTap title="종결된 사건" type="closed" tap={tapState} setTap={handleOnTap} />
102
+ </div>
103
+ <div className={'my-[20px] flex flex-row gap-[28px] lg:px-[60px]'}>
104
+ {tapState === 'ongoing' ? (
105
+ <>
106
+ <SubColor1Button
107
+ title="전체"
108
+ onClick={() => handleOnSubTap('ongoing')}
109
+ isSelected={subTapState === 'ongoing'}
110
+ />
111
+
112
+ <SubColor1Button
113
+ title="사건접수"
114
+ onClick={() => handleOnSubTap('사건접수')}
115
+ isSelected={subTapState === '사건접수'}
116
+ />
117
+ <SubColor1Button
118
+ title="사건검토"
119
+ onClick={() => handleOnSubTap('사건검토')}
120
+ isSelected={subTapState === '사건검토'}
121
+ />
122
+ <SubColor1Button
123
+ title="변호사상담"
124
+ onClick={() => handleOnSubTap('변호사상담')}
125
+ isSelected={subTapState === '변호사상담'}
126
+ />
127
+
128
+ <SubColor1Button
129
+ title="소송준비"
130
+ onClick={() => handleOnSubTap('소송준비')}
131
+ isSelected={subTapState === '소송준비'}
132
+ />
133
+ <SubColor1Button
134
+ title="소송진행"
135
+ onClick={() => handleOnSubTap('소송진행')}
136
+ isSelected={subTapState === '소송진행'}
137
+ />
138
+ </>
139
+ ) : (
140
+ <>
141
+ <SubColor1Button
142
+ title="전체"
143
+ onClick={() => handleOnSubTap('closed')}
144
+ isSelected={subTapState === 'closed'}
145
+ />
146
+ <SubColor1Button
147
+ title="사건종결"
148
+ onClick={() => handleOnSubTap('사건종결')}
149
+ isSelected={subTapState === '사건종결'}
150
+ />
151
+ <SubColor1Button
152
+ title="환불"
153
+ onClick={() => handleOnSubTap('환불')}
154
+ isSelected={subTapState === '환불'}
155
+ />
156
+ </>
157
+ )}
158
+ </div>
159
+ {isLoading ? (
160
+ <Loading />
161
+ ) : caseList.length > 0 ? (
162
+ <CaseTable
163
+ list={caseList}
164
+ totalLength={totalLength}
165
+ pageSize={pageSize}
166
+ pageNumber={pageNumber}
167
+ onChange={handleOnChange}
168
+ />
169
+ ) : (
170
+ <EmptyTable tap={tapState} subTap={subTapState === 'ongoing' || subTapState === 'closed' ? 0 : 1} />
171
+ )}
172
+ </div>
173
+ </CaseLayout>
174
+ );
175
+ };
176
+
177
+ export default CaseContainer;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type CategoryMenuType = {
3
+ t: (key: string) => string;
4
+ isMargin?: boolean;
5
+ isWhite?: boolean;
6
+ };
7
+ declare const CategoryMenu: (props: CategoryMenuType) => React.JSX.Element;
8
+ export default CategoryMenu;
@@ -0,0 +1,47 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { catagoryMenuName } from '../../_lib/catagoryMenuName';
3
+ import { useRouter } from 'next/router';
4
+ import Image from 'next/image';
5
+ import Link from 'next/link';
6
+ import arrow2 from '../../../../asset/images/mycaseManage/arrow_2.webp';
7
+ import nav_arr from '../../../../asset/images/mycaseManage/nav_arr.webp';
8
+ import home from '../../../../asset/images/mycaseManage/home.webp';
9
+ import whiteHome from '../../../../asset/images/mycaseManage/home.svg';
10
+ const CategoryMenu = (props) => {
11
+ const { t, isMargin = true, isWhite = false } = props;
12
+ const router = useRouter();
13
+ const [menu, setMenu] = useState({ title: '', subTitle: '', address: '' });
14
+ //페이지 내부에서 쿼리 파라미터 없이 루트 경로로 돌아갈 때 새로고침
15
+ const reloadUrl = (url) => {
16
+ if (router.pathname === url) {
17
+ router.push(url).then(() => {
18
+ router.reload();
19
+ });
20
+ }
21
+ };
22
+ useEffect(() => {
23
+ setMenu(catagoryMenuName({ url: router.pathname, t }));
24
+ }, [router.pathname, t]);
25
+ const imagePath = isWhite ? whiteHome : home;
26
+ const arrowImage = isWhite ? nav_arr : arrow2;
27
+ const textColor = isWhite ? 'text-[#fff]' : 'text-[#333333]';
28
+ return (<div className={(isMargin ? 'mb-[70px] mr-0 mt-8 lg:mb-[45px] lg:mt-[47px] ' : '') +
29
+ 'relative z-10 flex flex-row font-normal leading-[1] tracking-[-0.32px] ' +
30
+ 'text-[13px] xs:text-[14px] sm:text-[15px] lg:text-[16px] ' +
31
+ 'min-w-[320px] items-center justify-end gap-[10px] lg:w-[100%]'}>
32
+ <Link href="/">
33
+ <Image src={imagePath} alt={'집'} width={15} height={15} className={'mb-[1px] h-auto sm:w-[17px] lg:w-[18px]'}/>
34
+ </Link>
35
+ <Image src={arrowImage} alt={'화살표_1'} width={8} height={13} className={'h-[13px] w-[8px]'}/>
36
+ {menu.title === menu.subTitle ? (<Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
37
+ <div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.title}</div>
38
+ </Link>) : (<>
39
+ <div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.title}</div>
40
+ <Image src={arrowImage} alt={'화살표_2'} width={8} height={13} className={'h-[13px] w-[8px]'}/>
41
+ <Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
42
+ <div className={textColor}>{menu === null || menu === void 0 ? void 0 : menu.subTitle}</div>
43
+ </Link>
44
+ </>)}
45
+ </div>);
46
+ };
47
+ export default CategoryMenu;
@@ -0,0 +1,76 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { catagoryMenuName } from '../../_lib/catagoryMenuName';
3
+ import { useRouter } from 'next/router';
4
+ import Image from 'next/image';
5
+ import Link from 'next/link';
6
+ import arrow2 from '../../../../asset/images/mycaseManage/arrow_2.webp';
7
+ import nav_arr from '../../../../asset/images/mycaseManage/nav_arr.webp';
8
+ import home from '../../../../asset/images/mycaseManage/home.webp';
9
+ import whiteHome from '../../../../asset/images/mycaseManage/home.svg';
10
+
11
+ type CategoryMenuType = {
12
+ t: (key: string) => string;
13
+ isMargin?: boolean;
14
+ isWhite?: boolean;
15
+ };
16
+
17
+ const CategoryMenu = (props: CategoryMenuType) => {
18
+ const { t, isMargin = true, isWhite = false } = props;
19
+ const router = useRouter();
20
+ const [menu, setMenu] = useState({ title: '', subTitle: '', address: '' });
21
+
22
+ //페이지 내부에서 쿼리 파라미터 없이 루트 경로로 돌아갈 때 새로고침
23
+ const reloadUrl = (url: string) => {
24
+ if (router.pathname === url) {
25
+ router.push(url).then(() => {
26
+ router.reload();
27
+ });
28
+ }
29
+ };
30
+ useEffect(() => {
31
+ setMenu(catagoryMenuName({ url: router.pathname, t }));
32
+ }, [router.pathname, t]);
33
+
34
+ const imagePath = isWhite ? whiteHome : home;
35
+
36
+ const arrowImage = isWhite ? nav_arr : arrow2;
37
+
38
+ const textColor = isWhite ? 'text-[#fff]' : 'text-[#333333]';
39
+
40
+ return (
41
+ <div
42
+ className={
43
+ (isMargin ? 'mb-[70px] mr-0 mt-8 lg:mb-[45px] lg:mt-[47px] ' : '') +
44
+ 'relative z-10 flex flex-row font-normal leading-[1] tracking-[-0.32px] ' +
45
+ 'text-[13px] xs:text-[14px] sm:text-[15px] lg:text-[16px] ' +
46
+ 'min-w-[320px] items-center justify-end gap-[10px] lg:w-[100%]'
47
+ }
48
+ >
49
+ <Link href="/">
50
+ <Image
51
+ src={imagePath}
52
+ alt={'집'}
53
+ width={15}
54
+ height={15}
55
+ className={'mb-[1px] h-auto sm:w-[17px] lg:w-[18px]'}
56
+ />
57
+ </Link>
58
+ <Image src={arrowImage} alt={'화살표_1'} width={8} height={13} className={'h-[13px] w-[8px]'} />
59
+ {menu.title === menu.subTitle ? (
60
+ <Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
61
+ <div className={textColor}>{menu?.title}</div>
62
+ </Link>
63
+ ) : (
64
+ <>
65
+ <div className={textColor}>{menu?.title}</div>
66
+ <Image src={arrowImage} alt={'화살표_2'} width={8} height={13} className={'h-[13px] w-[8px]'} />
67
+ <Link href={`/${menu.address}`} onClick={() => reloadUrl(`/${menu.address}`)}>
68
+ <div className={textColor}>{menu?.subTitle}</div>
69
+ </Link>
70
+ </>
71
+ )}
72
+ </div>
73
+ );
74
+ };
75
+
76
+ export default CategoryMenu;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export declare const buttonStyle: {
3
+ 사건접수: string;
4
+ 사건검토: string;
5
+ 변호사상담: string;
6
+ 소송준비: string;
7
+ 소송진행: string;
8
+ 보류: string;
9
+ 사건종결: string;
10
+ 환불: string;
11
+ };
12
+ declare const Badge: ({ title }: {
13
+ title: keyof typeof buttonStyle;
14
+ }) => import("react").JSX.Element;
15
+ export default Badge;
@@ -0,0 +1,16 @@
1
+ export const buttonStyle = {
2
+ 사건접수: 'bg-[#FFDBDB] text-[#5F1A18]',
3
+ 사건검토: 'bg-[#F1DCFF] text-[#511396]',
4
+ 변호사상담: 'bg-[#AEEDE2] text-[#1D4A45]',
5
+ 소송준비: 'bg-[#DED9FF] text-[#1A30AA]',
6
+ 소송진행: 'bg-[#C6F5CA] text-[#315B32]',
7
+ 보류: 'bg-[#FFF3DB] text-[#644F16]',
8
+ 사건종결: 'bg-[#3D3D3D] text-[#FFFFFF]',
9
+ 환불: 'bg-[#DBDBDB] text-[#000000]'
10
+ };
11
+ const Badge = ({ title }) => {
12
+ return (<div className={`flex h-[41px] flex-row items-center justify-center rounded-[20px] lg:px-[20px] ${buttonStyle[title]} w-fit`}>
13
+ <p className={`lg:label_large2 `}>{title}</p>
14
+ </div>);
15
+ };
16
+ export default Badge;
@@ -0,0 +1,22 @@
1
+ export const buttonStyle = {
2
+ 사건접수: 'bg-[#FFDBDB] text-[#5F1A18]',
3
+ 사건검토: 'bg-[#F1DCFF] text-[#511396]',
4
+ 변호사상담: 'bg-[#AEEDE2] text-[#1D4A45]',
5
+ 소송준비: 'bg-[#DED9FF] text-[#1A30AA]',
6
+ 소송진행: 'bg-[#C6F5CA] text-[#315B32]',
7
+ 보류: 'bg-[#FFF3DB] text-[#644F16]',
8
+ 사건종결: 'bg-[#3D3D3D] text-[#FFFFFF]',
9
+ 환불: 'bg-[#DBDBDB] text-[#000000]'
10
+ };
11
+
12
+ const Badge = ({ title }: { title: keyof typeof buttonStyle }) => {
13
+ return (
14
+ <div
15
+ className={`flex h-[41px] flex-row items-center justify-center rounded-[20px] lg:px-[20px] ${buttonStyle[title]} w-fit`}
16
+ >
17
+ <p className={`lg:label_large2 `}>{title}</p>
18
+ </div>
19
+ );
20
+ };
21
+
22
+ export default Badge;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const SubColor1Button: ({ title, onClick, isSelected }: {
3
+ title: string;
4
+ onClick: () => void;
5
+ isSelected: boolean;
6
+ }) => import("react").JSX.Element;
7
+ export default SubColor1Button;
@@ -0,0 +1,6 @@
1
+ const SubColor1Button = ({ title, onClick, isSelected }) => {
2
+ return (<button className={`flex h-[49px] flex-row items-center justify-center rounded-[24px] transition-colors duration-300 lg:px-[12px] xl:px-[20px] ${isSelected ? 'bg-subColor01 text-white' : 'bg-white text-black'}`} onClick={onClick}>
3
+ <p className={'lg:label_large1 lg:text-[18px] xl:text-[20px] '}>{title}</p>
4
+ </button>);
5
+ };
6
+ export default SubColor1Button;
@@ -0,0 +1,20 @@
1
+ const SubColor1Button = ({
2
+ title,
3
+ onClick,
4
+ isSelected
5
+ }: {
6
+ title: string;
7
+ onClick: () => void;
8
+ isSelected: boolean;
9
+ }) => {
10
+ return (
11
+ <button
12
+ className={`flex h-[49px] flex-row items-center justify-center rounded-[24px] transition-colors duration-300 lg:px-[12px] xl:px-[20px] ${isSelected ? 'bg-subColor01 text-white' : 'bg-white text-black'}`}
13
+ onClick={onClick}
14
+ >
15
+ <p className={'lg:label_large1 lg:text-[18px] xl:text-[20px] '}>{title}</p>
16
+ </button>
17
+ );
18
+ };
19
+
20
+ export default SubColor1Button;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const SubMenuButton: ({ onClick, title, isSelected }: {
3
+ onClick: () => void;
4
+ title: string;
5
+ isSelected: boolean;
6
+ }) => import("react").JSX.Element;
7
+ export default SubMenuButton;
@@ -0,0 +1,6 @@
1
+ const SubMenuButton = ({ onClick, title, isSelected }) => {
2
+ return (<button className={`lg:body_medium2 flex items-center justify-center rounded-[20px] transition-all duration-300 lg:h-[41px] lg:px-[20px] ${isSelected ? 'bg-grayScale1' : 'bg-transparent'}`} onClick={onClick}>
3
+ <p className={`lg:label_large2 ${isSelected ? 'text-white' : 'text-black'}`}>{title}</p>
4
+ </button>);
5
+ };
6
+ export default SubMenuButton;
@@ -0,0 +1,12 @@
1
+ const SubMenuButton = ({ onClick, title, isSelected }: { onClick: () => void; title: string; isSelected: boolean }) => {
2
+ return (
3
+ <button
4
+ className={`lg:body_medium2 flex items-center justify-center rounded-[20px] transition-all duration-300 lg:h-[41px] lg:px-[20px] ${isSelected ? 'bg-grayScale1' : 'bg-transparent'}`}
5
+ onClick={onClick}
6
+ >
7
+ <p className={`lg:label_large2 ${isSelected ? 'text-white' : 'text-black'}`}>{title}</p>
8
+ </button>
9
+ );
10
+ };
11
+
12
+ export default SubMenuButton;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const EmptyTable: ({ tap, subTap }: {
3
+ tap: string;
4
+ subTap: number;
5
+ }) => import("react").JSX.Element;
6
+ export default EmptyTable;