@daeryun/dr_components 0.3.35 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.jsx +1 -1
- package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.tsx +1 -0
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.d.ts +2 -1
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +21 -18
- package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +58 -41
- package/dist/components/page/MyCase/_component/CaseContainer.jsx +1 -2
- package/dist/components/page/MyCase/_component/CaseContainer.tsx +1 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -71,7 +71,7 @@ const MyCaseDetailPageContainer = ({ jwt }) => {
|
|
|
71
71
|
/>
|
|
72
72
|
)} */}
|
|
73
73
|
{selected === '계약정보' && <ContactInfo />}
|
|
74
|
-
{selected === '사건문의' && (<CaseInquiry myCaseQuestion={myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.list} id={id} refetch={myCaseQuestionRefetch} pageSize={pageSize} totalLength={(_a = myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.totalLength) !== null && _a !== void 0 ? _a : 0} pageNumber={pageNumber} onChange={() => { }}/>)}
|
|
74
|
+
{selected === '사건문의' && (<CaseInquiry myCaseQuestion={myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.list} isLoading={myCaseQuestionLoading} id={id} refetch={myCaseQuestionRefetch} pageSize={pageSize} totalLength={(_a = myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.totalLength) !== null && _a !== void 0 ? _a : 0} pageNumber={pageNumber} onChange={() => { }}/>)}
|
|
75
75
|
</HeaderLayout>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
@@ -137,6 +137,7 @@ const MyCaseDetailPageContainer = ({ jwt }: { jwt?: string }) => {
|
|
|
137
137
|
{selected === '사건문의' && (
|
|
138
138
|
<CaseInquiry
|
|
139
139
|
myCaseQuestion={myCaseQuestion?.list as unknown as Question[]}
|
|
140
|
+
isLoading={myCaseQuestionLoading}
|
|
140
141
|
id={id as string}
|
|
141
142
|
refetch={myCaseQuestionRefetch}
|
|
142
143
|
pageSize={pageSize}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Question } from '../../../_type/type';
|
|
2
|
-
declare const CaseInquiry: ({ myCaseQuestion, id, refetch, pageSize, totalLength, pageNumber, onChange }: {
|
|
2
|
+
declare const CaseInquiry: ({ myCaseQuestion, isLoading, id, refetch, pageSize, totalLength, pageNumber, onChange }: {
|
|
3
3
|
myCaseQuestion: Question[];
|
|
4
|
+
isLoading: boolean;
|
|
4
5
|
id: string;
|
|
5
6
|
refetch: () => void;
|
|
6
7
|
pageSize: number;
|
|
@@ -9,6 +9,7 @@ import inkPen from '../../../../../../asset/images/myCase/icon/ink_pen.webp';
|
|
|
9
9
|
import client from '../../../../../../asset/images/myCase/icon/client.webp';
|
|
10
10
|
import daeryun from '../../../../../../asset/images/myCase/icon/daeryun.webp';
|
|
11
11
|
import arrowB from '../../../../../../asset/images/myCase/arrow_b.webp';
|
|
12
|
+
import Loading from '../../../_component/_loading/Loading';
|
|
12
13
|
const AnswerBox = ({ item, isOpen, openId, setOpenId }) => {
|
|
13
14
|
const ref = useRef(null);
|
|
14
15
|
return (<div ref={ref} className={`transition-height duration-300 ${(item === null || item === void 0 ? void 0 : item.answer) ? 'cursor-pointer' : ''} overflow-hidden`} onClick={() => {
|
|
@@ -62,27 +63,29 @@ const AnswerBox = ({ item, isOpen, openId, setOpenId }) => {
|
|
|
62
63
|
</div>
|
|
63
64
|
</div>);
|
|
64
65
|
};
|
|
65
|
-
const CaseInquiry = ({ myCaseQuestion, id, refetch, pageSize, totalLength, pageNumber, onChange }) => {
|
|
66
|
+
const CaseInquiry = ({ myCaseQuestion, isLoading, id, refetch, pageSize, totalLength, pageNumber, onChange }) => {
|
|
66
67
|
const [openId, setOpenId] = useState('0');
|
|
67
68
|
const [isOpen, setIsOpen] = useState(false);
|
|
68
69
|
return (<CaseLayout isMobilePadding={false} outerClassName="mt-[35px] sm-top:mt-[24px] lg:mt-[40px] " innerClassName={'pt-[32px] px-[20px] pb-[80px] 2sm:px-[40px] sm-top:pt-[56px] sm-top:px-[50px] sm-top:pb-[60px] lg:pt-[70px] lg:pb-[80px] lg:px-[60px]'}>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
70
|
+
{isLoading ? (<Loading />) : (<>
|
|
71
|
+
<div className="sm-top:gap-[12px] flex flex-col gap-[8px] lg:gap-[24px]">
|
|
72
|
+
{(myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.length) > 0 ? (myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.map((item, index) => (<AnswerBox key={index} item={item} isOpen={openId === item.idx.toString()} openId={openId} setOpenId={setOpenId}/>))) : (<EmptyTable tap="caseInquiry" subTap={0} isMinHeight={false}/>)}
|
|
73
|
+
</div>
|
|
74
|
+
<div className={` flex items-center justify-end ${(myCaseQuestion === null || myCaseQuestion === void 0 ? void 0 : myCaseQuestion.length) > 0
|
|
75
|
+
? 'sm-top:mt-[80px] mt-[40px] lg:mt-[60px] '
|
|
76
|
+
: 'sm-top:mt-[95px] mt-[69px] lg:mt-[112px]'}`}>
|
|
77
|
+
<button onClick={() => setIsOpen(prev => !prev)} className=" bg-mycaseMainColor sm-top:h-[60px] sm-top:w-[188px] sm-top:gap-[23px] sm-top:rounded-[36px] flex h-[48px] w-[132px] items-center justify-center gap-[14px] rounded-[24px] text-white lg:h-[72px] lg:w-[220px] lg:gap-[21px]">
|
|
78
|
+
<Image src={inkPen} alt="ink_pen" width={28.5} height={28.5} className="sm-top:h-[23.75px] sm-top:w-[23.75px] h-[19px] w-[19px] lg:h-[28.5px] lg:w-[28.5px]"/>
|
|
79
|
+
<p className="body_large2_mo sm-top:body_large2_tb lg:body_large2" style={{ color: 'white' }}>
|
|
80
|
+
문의하기
|
|
81
|
+
</p>
|
|
82
|
+
</button>
|
|
83
|
+
</div>
|
|
84
|
+
<CaseInquiryAddModal isOpen={isOpen} onClose={() => setIsOpen(false)} id={id} refetch={refetch}/>
|
|
85
|
+
<Suspense>
|
|
86
|
+
<PaginationComponent pageSize={pageSize} total={totalLength} onChange={onChange} current={pageNumber}/>
|
|
87
|
+
</Suspense>
|
|
88
|
+
</>)}
|
|
86
89
|
</CaseLayout>);
|
|
87
90
|
};
|
|
88
91
|
export default CaseInquiry;
|
|
@@ -10,6 +10,7 @@ import inkPen from '../../../../../../asset/images/myCase/icon/ink_pen.webp';
|
|
|
10
10
|
import client from '../../../../../../asset/images/myCase/icon/client.webp';
|
|
11
11
|
import daeryun from '../../../../../../asset/images/myCase/icon/daeryun.webp';
|
|
12
12
|
import arrowB from '../../../../../../asset/images/myCase/arrow_b.webp';
|
|
13
|
+
import Loading from '../../../_component/_loading/Loading';
|
|
13
14
|
const AnswerBox = ({
|
|
14
15
|
item,
|
|
15
16
|
isOpen,
|
|
@@ -120,6 +121,7 @@ const AnswerBox = ({
|
|
|
120
121
|
|
|
121
122
|
const CaseInquiry = ({
|
|
122
123
|
myCaseQuestion,
|
|
124
|
+
isLoading,
|
|
123
125
|
id,
|
|
124
126
|
refetch,
|
|
125
127
|
pageSize,
|
|
@@ -128,6 +130,7 @@ const CaseInquiry = ({
|
|
|
128
130
|
onChange
|
|
129
131
|
}: {
|
|
130
132
|
myCaseQuestion: Question[];
|
|
133
|
+
isLoading: boolean;
|
|
131
134
|
id: string;
|
|
132
135
|
refetch: () => void;
|
|
133
136
|
pageSize: number;
|
|
@@ -146,48 +149,62 @@ const CaseInquiry = ({
|
|
|
146
149
|
'pt-[32px] px-[20px] pb-[80px] 2sm:px-[40px] sm-top:pt-[56px] sm-top:px-[50px] sm-top:pb-[60px] lg:pt-[70px] lg:pb-[80px] lg:px-[60px]'
|
|
147
150
|
}
|
|
148
151
|
>
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
{isLoading ? (
|
|
153
|
+
<Loading />
|
|
154
|
+
) : (
|
|
155
|
+
<>
|
|
156
|
+
<div className="sm-top:gap-[12px] flex flex-col gap-[8px] lg:gap-[24px]">
|
|
157
|
+
{myCaseQuestion?.length > 0 ? (
|
|
158
|
+
myCaseQuestion?.map((item, index) => (
|
|
159
|
+
<AnswerBox
|
|
160
|
+
key={index}
|
|
161
|
+
item={item}
|
|
162
|
+
isOpen={openId === item.idx.toString()}
|
|
163
|
+
openId={openId}
|
|
164
|
+
setOpenId={setOpenId}
|
|
165
|
+
/>
|
|
166
|
+
))
|
|
167
|
+
) : (
|
|
168
|
+
<EmptyTable tap="caseInquiry" subTap={0} isMinHeight={false} />
|
|
169
|
+
)}
|
|
170
|
+
</div>
|
|
171
|
+
<div
|
|
172
|
+
className={` flex items-center justify-end ${
|
|
173
|
+
myCaseQuestion?.length > 0
|
|
174
|
+
? 'sm-top:mt-[80px] mt-[40px] lg:mt-[60px] '
|
|
175
|
+
: 'sm-top:mt-[95px] mt-[69px] lg:mt-[112px]'
|
|
176
|
+
}`}
|
|
177
|
+
>
|
|
178
|
+
<button
|
|
179
|
+
onClick={() => setIsOpen(prev => !prev)}
|
|
180
|
+
className=" bg-mycaseMainColor sm-top:h-[60px] sm-top:w-[188px] sm-top:gap-[23px] sm-top:rounded-[36px] flex h-[48px] w-[132px] items-center justify-center gap-[14px] rounded-[24px] text-white lg:h-[72px] lg:w-[220px] lg:gap-[21px]"
|
|
181
|
+
>
|
|
182
|
+
<Image
|
|
183
|
+
src={inkPen}
|
|
184
|
+
alt="ink_pen"
|
|
185
|
+
width={28.5}
|
|
186
|
+
height={28.5}
|
|
187
|
+
className="sm-top:h-[23.75px] sm-top:w-[23.75px] h-[19px] w-[19px] lg:h-[28.5px] lg:w-[28.5px]"
|
|
188
|
+
/>
|
|
189
|
+
<p
|
|
190
|
+
className="body_large2_mo sm-top:body_large2_tb lg:body_large2"
|
|
191
|
+
style={{ color: 'white' }}
|
|
192
|
+
>
|
|
193
|
+
문의하기
|
|
194
|
+
</p>
|
|
195
|
+
</button>
|
|
196
|
+
</div>
|
|
197
|
+
<CaseInquiryAddModal isOpen={isOpen} onClose={() => setIsOpen(false)} id={id} refetch={refetch} />
|
|
198
|
+
<Suspense>
|
|
199
|
+
<PaginationComponent
|
|
200
|
+
pageSize={pageSize}
|
|
201
|
+
total={totalLength}
|
|
202
|
+
onChange={onChange}
|
|
203
|
+
current={pageNumber}
|
|
158
204
|
/>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
)}
|
|
163
|
-
</div>
|
|
164
|
-
<div
|
|
165
|
-
className={` flex items-center justify-end ${
|
|
166
|
-
myCaseQuestion?.length > 0
|
|
167
|
-
? 'sm-top:mt-[80px] mt-[40px] lg:mt-[60px] '
|
|
168
|
-
: 'sm-top:mt-[95px] mt-[69px] lg:mt-[112px]'
|
|
169
|
-
}`}
|
|
170
|
-
>
|
|
171
|
-
<button
|
|
172
|
-
onClick={() => setIsOpen(prev => !prev)}
|
|
173
|
-
className=" bg-mycaseMainColor sm-top:h-[60px] sm-top:w-[188px] sm-top:gap-[23px] sm-top:rounded-[36px] flex h-[48px] w-[132px] items-center justify-center gap-[14px] rounded-[24px] text-white lg:h-[72px] lg:w-[220px] lg:gap-[21px]"
|
|
174
|
-
>
|
|
175
|
-
<Image
|
|
176
|
-
src={inkPen}
|
|
177
|
-
alt="ink_pen"
|
|
178
|
-
width={28.5}
|
|
179
|
-
height={28.5}
|
|
180
|
-
className="sm-top:h-[23.75px] sm-top:w-[23.75px] h-[19px] w-[19px] lg:h-[28.5px] lg:w-[28.5px]"
|
|
181
|
-
/>
|
|
182
|
-
<p className="body_large2_mo sm-top:body_large2_tb lg:body_large2" style={{ color: 'white' }}>
|
|
183
|
-
문의하기
|
|
184
|
-
</p>
|
|
185
|
-
</button>
|
|
186
|
-
</div>
|
|
187
|
-
<CaseInquiryAddModal isOpen={isOpen} onClose={() => setIsOpen(false)} id={id} refetch={refetch} />
|
|
188
|
-
<Suspense>
|
|
189
|
-
<PaginationComponent pageSize={pageSize} total={totalLength} onChange={onChange} current={pageNumber} />
|
|
190
|
-
</Suspense>
|
|
205
|
+
</Suspense>
|
|
206
|
+
</>
|
|
207
|
+
)}
|
|
191
208
|
</CaseLayout>
|
|
192
209
|
);
|
|
193
210
|
};
|
|
@@ -24,8 +24,7 @@ const CaseContainer = ({ jwt }) => {
|
|
|
24
24
|
// const [isLoading, setIsLoading] = useState(true);
|
|
25
25
|
const pageNumber = page ? Number(page) : 1;
|
|
26
26
|
const handleOnChange = (pageNum) => {
|
|
27
|
-
|
|
28
|
-
router.push(`/mycase?page=${pageNum}&tap=${tap}&subTap=${subTap}`);
|
|
27
|
+
router.push(`/mycase?page=1&tap=${tap}&subTap=${subTap}`);
|
|
29
28
|
};
|
|
30
29
|
const handleOnTap = (tap) => {
|
|
31
30
|
router.push(`/mycase?page=${page}&tap=${tap}&subTap=${tap === 'ongoing' ? 'ongoing' : 'closed'}`);
|
|
@@ -51,8 +51,7 @@ const CaseContainer = ({ jwt }: { jwt?: string }) => {
|
|
|
51
51
|
const pageNumber = page ? Number(page) : 1;
|
|
52
52
|
|
|
53
53
|
const handleOnChange = (pageNum: number) => {
|
|
54
|
-
|
|
55
|
-
router.push(`/mycase?page=${pageNum}&tap=${tap}&subTap=${subTap}`);
|
|
54
|
+
router.push(`/mycase?page=1&tap=${tap}&subTap=${subTap}`);
|
|
56
55
|
};
|
|
57
56
|
const handleOnTap = (tap: string) => {
|
|
58
57
|
router.push(`/mycase?page=${page}&tap=${tap}&subTap=${tap === 'ongoing' ? 'ongoing' : 'closed'}`);
|