@daeryun/dr_components 0.3.69 → 0.3.71
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/page/Login/LoginComp/Sign/RequiredCheckBox.jsx +8 -8
- package/dist/components/page/Login/LoginComp/Sign/RequiredCheckBox.tsx +81 -81
- package/dist/components/page/Login/LoginComp/SignContainer.d.ts +0 -14
- package/dist/components/page/Login/LoginComp/SignContainer.jsx +53 -93
- package/dist/components/page/Login/LoginComp/SignContainer.tsx +61 -142
- package/dist/components/page/Login/Personal.d.ts +0 -6
- package/dist/components/page/Login/Personal.jsx +2 -122
- package/dist/components/page/Login/Personal.tsx +2 -179
- package/dist/components/page/Login/_types/termType.d.ts +16 -0
- package/dist/components/page/Login/_types/termType.js +1 -0
- package/dist/components/page/Login/_types/termType.ts +16 -0
- package/dist/components/page/MyCase/_fetchers/addMyCaseQuestion.js +1 -1
- package/dist/components/page/MyCase/_fetchers/addMyCaseQuestion.ts +1 -1
- package/dist/components/page/MyCase/_fetchers/getCaseList.js +1 -1
- package/dist/components/page/MyCase/_fetchers/getCaseList.ts +1 -1
- package/dist/components/page/MyCase/_fetchers/getCourtFileList.js +1 -1
- package/dist/components/page/MyCase/_fetchers/getCourtFileList.ts +1 -1
- package/dist/components/page/MyCase/_fetchers/getMyCaseQuestion.js +1 -1
- package/dist/components/page/MyCase/_fetchers/getMyCaseQuestion.ts +1 -1
- package/dist/components/page/MyCase/_fetchers/getMyFileList.js +1 -1
- package/dist/components/page/MyCase/_fetchers/getMyFileList.ts +1 -1
- package/dist/components/page/MyCase/_fetchers/getTimeLine.js +1 -1
- package/dist/components/page/MyCase/_fetchers/getTimeLine.ts +1 -1
- package/dist/styles/globals.css +0 -187
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/components/page/Login/LoginComp/Sign/OptionalCheckBox.d.ts +0 -14
- package/dist/components/page/Login/LoginComp/Sign/OptionalCheckBox.jsx +0 -61
- package/dist/components/page/Login/LoginComp/Sign/OptionalCheckBox.tsx +0 -160
- package/dist/components/page/Login/LoginComp/Update/MyPageOptionalCheckBox.d.ts +0 -14
- package/dist/components/page/Login/LoginComp/Update/MyPageOptionalCheckBox.jsx +0 -88
- package/dist/components/page/Login/LoginComp/Update/MyPageOptionalCheckBox.tsx +0 -223
|
@@ -16,7 +16,6 @@ import Image from 'next/image';
|
|
|
16
16
|
import { Loader } from '../../index';
|
|
17
17
|
import { QueryClient } from 'react-query';
|
|
18
18
|
import { formatPhoneNumber, formatTime, getNameValue, getPhoneValue, onlyNumberFilter } from '../../../lib';
|
|
19
|
-
import { optionalTermAgree } from './_api/optionalTermAgree';
|
|
20
19
|
import { updateUserInfo } from './_api/updateUserInfo';
|
|
21
20
|
import { confirmNumber } from './_api/confirmNumber';
|
|
22
21
|
import { sendNumber } from './_api/sendNumber';
|
|
@@ -28,9 +27,7 @@ import LInput from './LoginComp/Linput';
|
|
|
28
27
|
import LButton from './LoginComp/LButton';
|
|
29
28
|
import TermModal from './LoginComp/Modal/TermModal';
|
|
30
29
|
import ConfirmModal from './LoginComp/Modal/ConfirmModal';
|
|
31
|
-
import MyPageOptionalCheckBox from './LoginComp/Update/MyPageOptionalCheckBox';
|
|
32
30
|
const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] max-lg:py-[112px] max-sm:mt-[28px] max-sm:py-[100px] `, resetUser }) => {
|
|
33
|
-
var _a, _b;
|
|
34
31
|
const router = useRouter();
|
|
35
32
|
const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
|
|
36
33
|
const { data: userData, status: userDataStatus } = useQuery({
|
|
@@ -42,14 +39,6 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
42
39
|
},
|
|
43
40
|
staleTime: 1000 * 60 * 5
|
|
44
41
|
});
|
|
45
|
-
const { data: userAgree, status: userAgreeStatus } = useQuery({
|
|
46
|
-
queryKey: ['user'],
|
|
47
|
-
queryFn: () => {
|
|
48
|
-
return Fetch(`/api/lawfirm/app/user/agree`, {
|
|
49
|
-
method: 'GET'
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
42
|
const [userObj, setUserObj] = useState({
|
|
54
43
|
name: '',
|
|
55
44
|
phoneNumber: '',
|
|
@@ -71,34 +60,6 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
71
60
|
subTitle: '',
|
|
72
61
|
key: ''
|
|
73
62
|
});
|
|
74
|
-
const [optionalTermItems, setOptionalTermItems] = useState([
|
|
75
|
-
{
|
|
76
|
-
title: '사건관련 알림 수신 동의 (선택)',
|
|
77
|
-
checked: false,
|
|
78
|
-
isContent: true,
|
|
79
|
-
cautionTitle: '*사건관련 알림을 수신할 채널을 선택해 주세요.',
|
|
80
|
-
name: 'optionalMain',
|
|
81
|
-
alarmTypeList: [
|
|
82
|
-
{ title: '푸시알림', name: 'optionalSelect', checked: false, value: 1 },
|
|
83
|
-
{ title: '카카오알림톡', name: 'optionalSelect', checked: false, value: 2 },
|
|
84
|
-
{ title: 'SMS', name: 'optionalSelect', checked: false, value: 4 },
|
|
85
|
-
{ title: '이메일', name: 'optionalSelect', checked: false, value: 8 }
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
title: '마케팅 정보 수신 동의 (선택)',
|
|
90
|
-
checked: false,
|
|
91
|
-
isContent: true,
|
|
92
|
-
cautionTitle: '*마케팅 정보를 수신할 채널을 선택해 주세요.',
|
|
93
|
-
name: 'optionalMain',
|
|
94
|
-
alarmTypeList: [
|
|
95
|
-
{ title: '푸시알림', name: 'optionalSelect', checked: false, value: 1 },
|
|
96
|
-
{ title: '카카오알림톡', name: 'optionalSelect', checked: false, value: 2 },
|
|
97
|
-
{ title: 'SMS', name: 'optionalSelect', checked: false, value: 4 },
|
|
98
|
-
{ title: '이메일', name: 'optionalSelect', checked: false, value: 8 }
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
]);
|
|
102
63
|
const modalValueSetKey = {
|
|
103
64
|
nameError: 'nameError',
|
|
104
65
|
phoneNumberError: 'phoneNumberError',
|
|
@@ -158,22 +119,7 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
158
119
|
codeValid: false
|
|
159
120
|
});
|
|
160
121
|
// 이름이 바꼈거나 , 휴대전화 인증을 다시 완료했거나 , 약관 총합 값이 바꼈거나
|
|
161
|
-
const isAll = ((userData === null || userData === void 0 ? void 0 : userData.data.name) !== (userObj === null || userObj === void 0 ? void 0 : userObj.name) && (userValidObj === null || userValidObj === void 0 ? void 0 : userValidObj.nameValid)) ||
|
|
162
|
-
userValidObj.codeValid ||
|
|
163
|
-
((_a = userAgree === null || userAgree === void 0 ? void 0 : userAgree.data) === null || _a === void 0 ? void 0 : _a.alert_agree) !==
|
|
164
|
-
optionalTermItems[0].alarmTypeList
|
|
165
|
-
.filter(item => item.checked)
|
|
166
|
-
.reduce((sum, item) => sum + item.value, 0) ||
|
|
167
|
-
((_b = userAgree === null || userAgree === void 0 ? void 0 : userAgree.data) === null || _b === void 0 ? void 0 : _b.marketing_agree) !==
|
|
168
|
-
optionalTermItems[1].alarmTypeList.filter(item => item.checked).reduce((sum, item) => sum + item.value, 0);
|
|
169
|
-
const updateOptionalTermItems = (alertAgree, marketingAgree) => {
|
|
170
|
-
setOptionalTermItems(prevItems => prevItems.map((item, index) => {
|
|
171
|
-
// alertAgree는 첫 번째 항목, marketingAgree는 두 번째 항목을 업데이트
|
|
172
|
-
const agreeValue = index === 0 ? alertAgree : marketingAgree;
|
|
173
|
-
//15면 체크
|
|
174
|
-
return Object.assign(Object.assign({}, item), { checked: index === 0 ? alertAgree === 15 : marketingAgree === 15, alarmTypeList: item.alarmTypeList.map(alarm => (Object.assign(Object.assign({}, alarm), { checked: (agreeValue & alarm.value) !== 0 }))) });
|
|
175
|
-
}));
|
|
176
|
-
};
|
|
122
|
+
const isAll = ((userData === null || userData === void 0 ? void 0 : userData.data.name) !== (userObj === null || userObj === void 0 ? void 0 : userObj.name) && (userValidObj === null || userValidObj === void 0 ? void 0 : userValidObj.nameValid)) || userValidObj.codeValid;
|
|
177
123
|
useEffect(() => {
|
|
178
124
|
return () => {
|
|
179
125
|
if (timerRef.current) {
|
|
@@ -181,11 +127,6 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
181
127
|
}
|
|
182
128
|
};
|
|
183
129
|
}, []);
|
|
184
|
-
useEffect(() => {
|
|
185
|
-
if (userAgree) {
|
|
186
|
-
updateOptionalTermItems(userAgree.data.alert_agree, userAgree.data.marketing_agree);
|
|
187
|
-
}
|
|
188
|
-
}, [userAgree]);
|
|
189
130
|
useEffect(() => {
|
|
190
131
|
if (userData) {
|
|
191
132
|
setUserObj(prev => (Object.assign(Object.assign({}, prev), { email: userData.data.email, name: userData.data.name, provider: userData.data.provider, phoneNumber: onlyNumberFilter(userData.data.phone_number) })));
|
|
@@ -265,32 +206,6 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
265
206
|
}
|
|
266
207
|
}
|
|
267
208
|
});
|
|
268
|
-
const handleCheckBox = (e) => {
|
|
269
|
-
const { name, dataset } = e.currentTarget;
|
|
270
|
-
const parentIdx = Number(dataset.parentidx);
|
|
271
|
-
const index = Number(dataset.idx);
|
|
272
|
-
const newOptionalTermItems = [...optionalTermItems];
|
|
273
|
-
if (name === 'all') {
|
|
274
|
-
newOptionalTermItems[index].checked = true;
|
|
275
|
-
newOptionalTermItems[index].alarmTypeList.forEach(item => {
|
|
276
|
-
item.checked = true;
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
else if (name === 'notall') {
|
|
280
|
-
newOptionalTermItems[index].checked = false;
|
|
281
|
-
newOptionalTermItems[index].alarmTypeList.forEach(item => {
|
|
282
|
-
item.checked = false;
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
else if (name === 'optionalSelect') {
|
|
286
|
-
// 선택된 체크
|
|
287
|
-
newOptionalTermItems[parentIdx].alarmTypeList[index].checked =
|
|
288
|
-
!newOptionalTermItems[parentIdx].alarmTypeList[index].checked;
|
|
289
|
-
// 전부 체크인지 확인
|
|
290
|
-
newOptionalTermItems[parentIdx].checked = newOptionalTermItems[parentIdx].alarmTypeList.some(item => item.checked);
|
|
291
|
-
}
|
|
292
|
-
setOptionalTermItems(newOptionalTermItems);
|
|
293
|
-
};
|
|
294
209
|
const verify = (code) => __awaiter(void 0, void 0, void 0, function* () {
|
|
295
210
|
if (!userValidObj.phoneSendValid) {
|
|
296
211
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.timeLeftError];
|
|
@@ -342,14 +257,6 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
342
257
|
}
|
|
343
258
|
const nameCheck = userData.data.name !== userObj.name && userValidObj.nameValid;
|
|
344
259
|
const phoneCheck = userValidObj.codeValid;
|
|
345
|
-
const termCheck = userAgree.data.alert_agree !==
|
|
346
|
-
optionalTermItems[0].alarmTypeList
|
|
347
|
-
.filter(item => item.checked)
|
|
348
|
-
.reduce((sum, item) => sum + item.value, 0) ||
|
|
349
|
-
userAgree.data.marketing_agree !==
|
|
350
|
-
optionalTermItems[1].alarmTypeList
|
|
351
|
-
.filter(item => item.checked)
|
|
352
|
-
.reduce((sum, item) => sum + item.value, 0);
|
|
353
260
|
let result = true;
|
|
354
261
|
if (nameCheck || phoneCheck) {
|
|
355
262
|
result = yield updateUserInfo({
|
|
@@ -357,18 +264,6 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
357
264
|
)
|
|
358
265
|
}).then(obj => obj.result);
|
|
359
266
|
}
|
|
360
|
-
if (termCheck) {
|
|
361
|
-
result = yield optionalTermAgree({
|
|
362
|
-
bodyData: {
|
|
363
|
-
alert_agree: optionalTermItems[0].alarmTypeList
|
|
364
|
-
.filter(item => item.checked)
|
|
365
|
-
.reduce((sum, item) => sum + item.value, 0), // checked된 항목들의 value 합산
|
|
366
|
-
marketing_agree: optionalTermItems[1].alarmTypeList
|
|
367
|
-
.filter(item => item.checked)
|
|
368
|
-
.reduce((sum, item) => sum + item.value, 0) // 마케팅 관련 동의 값 합산
|
|
369
|
-
}
|
|
370
|
-
}).then(obj => obj.result);
|
|
371
|
-
}
|
|
372
267
|
if (result) {
|
|
373
268
|
setIsModalUpdate(false);
|
|
374
269
|
const queryClient = new QueryClient();
|
|
@@ -380,7 +275,7 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
380
275
|
return;
|
|
381
276
|
}
|
|
382
277
|
});
|
|
383
|
-
if (userDataStatus !== 'success'
|
|
278
|
+
if (userDataStatus !== 'success') {
|
|
384
279
|
return <Loader fullScreen/>;
|
|
385
280
|
}
|
|
386
281
|
return (<section className={layoutClassName}>
|
|
@@ -539,21 +434,6 @@ const Personal = ({ layoutClassName = ` mt-[47px] py-[128px] max-lg:mt-[40px] m
|
|
|
539
434
|
</div>)}
|
|
540
435
|
</div>
|
|
541
436
|
</div>
|
|
542
|
-
|
|
543
|
-
<div className={' mt-[80px] ' + ' max-lg:mt-[60px] ' + ' max-sm:mt-[60px] '}>
|
|
544
|
-
<div className={' body_large1 text-[#000000] ' + ' max-lg:body_large1_tb ' + ' max-sm:body_large1_mo '}>
|
|
545
|
-
정보 수신 동의
|
|
546
|
-
</div>
|
|
547
|
-
<div className={' mt-[52px] flex flex-col gap-[59px] ' +
|
|
548
|
-
' max-lg:mt-[40px] max-lg:gap-[50px] ' +
|
|
549
|
-
' max-sm:mt-[32px] max-sm:gap-[40px] '}>
|
|
550
|
-
{optionalTermItems.map((item, index) => {
|
|
551
|
-
return (<MyPageOptionalCheckBox key={`option-${index}`} name={item.name} checked={item.checked} title={item.title} isContent={true} setModal={() => {
|
|
552
|
-
setIsTermModal(true);
|
|
553
|
-
}} cautionTitle={item.cautionTitle} parentIndex={index} optionalItemList={item.alarmTypeList} handleButton={handleCheckBox}/>);
|
|
554
|
-
})}
|
|
555
|
-
</div>
|
|
556
|
-
</div>
|
|
557
437
|
<div className={'mt-[80px] flex items-center justify-center' + ' max-lg:mt-[78px] ' + ' max-sm:mt-[40px] '}>
|
|
558
438
|
<button type={'button'} onClick={isAll
|
|
559
439
|
? () => {
|
|
@@ -7,12 +7,9 @@ import Image from 'next/image';
|
|
|
7
7
|
import { Loader } from '../../index';
|
|
8
8
|
import { QueryClient } from 'react-query';
|
|
9
9
|
import { formatPhoneNumber, formatTime, getNameValue, getPhoneValue, onlyNumberFilter } from '../../../lib';
|
|
10
|
-
import { optionalTermAgree } from './_api/optionalTermAgree';
|
|
11
10
|
import { updateUserInfo } from './_api/updateUserInfo';
|
|
12
11
|
import { confirmNumber } from './_api/confirmNumber';
|
|
13
12
|
import { sendNumber } from './_api/sendNumber';
|
|
14
|
-
import { RecoilState } from 'recoil';
|
|
15
|
-
import { ILoginInfo } from './_types/login';
|
|
16
13
|
import { useLogout } from './_hooks/useLogout';
|
|
17
14
|
import AlertConfirmModal from './LoginComp/Modal/AlertConfirmModal';
|
|
18
15
|
import PageWrapper from '../../Layout/PageWrapper';
|
|
@@ -21,23 +18,6 @@ import LInput from './LoginComp/Linput';
|
|
|
21
18
|
import LButton from './LoginComp/LButton';
|
|
22
19
|
import TermModal from './LoginComp/Modal/TermModal';
|
|
23
20
|
import ConfirmModal from './LoginComp/Modal/ConfirmModal';
|
|
24
|
-
import MyPageOptionalCheckBox from './LoginComp/Update/MyPageOptionalCheckBox';
|
|
25
|
-
|
|
26
|
-
interface IOptionalCheckItem {
|
|
27
|
-
title: string;
|
|
28
|
-
checked: boolean;
|
|
29
|
-
name: string;
|
|
30
|
-
isContent: boolean;
|
|
31
|
-
cautionTitle: string;
|
|
32
|
-
alarmTypeList: IOptionalCheckAlarm[];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface IOptionalCheckAlarm {
|
|
36
|
-
title: string;
|
|
37
|
-
checked: boolean;
|
|
38
|
-
name: string;
|
|
39
|
-
value: number;
|
|
40
|
-
}
|
|
41
21
|
|
|
42
22
|
interface IUser {
|
|
43
23
|
name: string;
|
|
@@ -76,15 +56,6 @@ const Personal = ({
|
|
|
76
56
|
staleTime: 1000 * 60 * 5
|
|
77
57
|
});
|
|
78
58
|
|
|
79
|
-
const { data: userAgree, status: userAgreeStatus } = useQuery({
|
|
80
|
-
queryKey: ['user'],
|
|
81
|
-
queryFn: () => {
|
|
82
|
-
return Fetch(`/api/lawfirm/app/user/agree`, {
|
|
83
|
-
method: 'GET'
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
|
|
88
59
|
const [userObj, setUserObj] = useState<IUser>({
|
|
89
60
|
name: '',
|
|
90
61
|
phoneNumber: '',
|
|
@@ -111,35 +82,6 @@ const Personal = ({
|
|
|
111
82
|
key: ''
|
|
112
83
|
});
|
|
113
84
|
|
|
114
|
-
const [optionalTermItems, setOptionalTermItems] = useState<IOptionalCheckItem[]>([
|
|
115
|
-
{
|
|
116
|
-
title: '사건관련 알림 수신 동의 (선택)',
|
|
117
|
-
checked: false,
|
|
118
|
-
isContent: true,
|
|
119
|
-
cautionTitle: '*사건관련 알림을 수신할 채널을 선택해 주세요.',
|
|
120
|
-
name: 'optionalMain',
|
|
121
|
-
alarmTypeList: [
|
|
122
|
-
{ title: '푸시알림', name: 'optionalSelect', checked: false, value: 1 },
|
|
123
|
-
{ title: '카카오알림톡', name: 'optionalSelect', checked: false, value: 2 },
|
|
124
|
-
{ title: 'SMS', name: 'optionalSelect', checked: false, value: 4 },
|
|
125
|
-
{ title: '이메일', name: 'optionalSelect', checked: false, value: 8 }
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
title: '마케팅 정보 수신 동의 (선택)',
|
|
130
|
-
checked: false,
|
|
131
|
-
isContent: true,
|
|
132
|
-
cautionTitle: '*마케팅 정보를 수신할 채널을 선택해 주세요.',
|
|
133
|
-
name: 'optionalMain',
|
|
134
|
-
alarmTypeList: [
|
|
135
|
-
{ title: '푸시알림', name: 'optionalSelect', checked: false, value: 1 },
|
|
136
|
-
{ title: '카카오알림톡', name: 'optionalSelect', checked: false, value: 2 },
|
|
137
|
-
{ title: 'SMS', name: 'optionalSelect', checked: false, value: 4 },
|
|
138
|
-
{ title: '이메일', name: 'optionalSelect', checked: false, value: 8 }
|
|
139
|
-
]
|
|
140
|
-
}
|
|
141
|
-
]);
|
|
142
|
-
|
|
143
85
|
const modalValueSetKey: {
|
|
144
86
|
nameError: 'nameError';
|
|
145
87
|
phoneNumberError: 'phoneNumberError';
|
|
@@ -210,34 +152,7 @@ const Personal = ({
|
|
|
210
152
|
});
|
|
211
153
|
|
|
212
154
|
// 이름이 바꼈거나 , 휴대전화 인증을 다시 완료했거나 , 약관 총합 값이 바꼈거나
|
|
213
|
-
const isAll =
|
|
214
|
-
(userData?.data.name !== userObj?.name && userValidObj?.nameValid) ||
|
|
215
|
-
userValidObj.codeValid ||
|
|
216
|
-
userAgree?.data?.alert_agree !==
|
|
217
|
-
optionalTermItems[0].alarmTypeList
|
|
218
|
-
.filter(item => item.checked)
|
|
219
|
-
.reduce((sum, item) => sum + item.value, 0) ||
|
|
220
|
-
userAgree?.data?.marketing_agree !==
|
|
221
|
-
optionalTermItems[1].alarmTypeList.filter(item => item.checked).reduce((sum, item) => sum + item.value, 0);
|
|
222
|
-
|
|
223
|
-
const updateOptionalTermItems = (alertAgree: number, marketingAgree: number) => {
|
|
224
|
-
setOptionalTermItems(prevItems =>
|
|
225
|
-
prevItems.map((item, index) => {
|
|
226
|
-
// alertAgree는 첫 번째 항목, marketingAgree는 두 번째 항목을 업데이트
|
|
227
|
-
const agreeValue = index === 0 ? alertAgree : marketingAgree;
|
|
228
|
-
//15면 체크
|
|
229
|
-
|
|
230
|
-
return {
|
|
231
|
-
...item,
|
|
232
|
-
checked: index === 0 ? alertAgree === 15 : marketingAgree === 15,
|
|
233
|
-
alarmTypeList: item.alarmTypeList.map(alarm => ({
|
|
234
|
-
...alarm,
|
|
235
|
-
checked: (agreeValue & alarm.value) !== 0
|
|
236
|
-
}))
|
|
237
|
-
};
|
|
238
|
-
})
|
|
239
|
-
);
|
|
240
|
-
};
|
|
155
|
+
const isAll = (userData?.data.name !== userObj?.name && userValidObj?.nameValid) || userValidObj.codeValid;
|
|
241
156
|
|
|
242
157
|
useEffect(() => {
|
|
243
158
|
return () => {
|
|
@@ -247,12 +162,6 @@ const Personal = ({
|
|
|
247
162
|
};
|
|
248
163
|
}, []);
|
|
249
164
|
|
|
250
|
-
useEffect(() => {
|
|
251
|
-
if (userAgree) {
|
|
252
|
-
updateOptionalTermItems(userAgree.data.alert_agree, userAgree.data.marketing_agree);
|
|
253
|
-
}
|
|
254
|
-
}, [userAgree]);
|
|
255
|
-
|
|
256
165
|
useEffect(() => {
|
|
257
166
|
if (userData) {
|
|
258
167
|
setUserObj(prev => ({
|
|
@@ -350,34 +259,6 @@ const Personal = ({
|
|
|
350
259
|
}
|
|
351
260
|
};
|
|
352
261
|
|
|
353
|
-
const handleCheckBox = (e: React.FormEvent<HTMLButtonElement>) => {
|
|
354
|
-
const { name, dataset } = e.currentTarget;
|
|
355
|
-
const parentIdx = Number(dataset.parentidx);
|
|
356
|
-
const index = Number(dataset.idx);
|
|
357
|
-
|
|
358
|
-
const newOptionalTermItems = [...optionalTermItems];
|
|
359
|
-
if (name === 'all') {
|
|
360
|
-
newOptionalTermItems[index].checked = true;
|
|
361
|
-
newOptionalTermItems[index].alarmTypeList.forEach(item => {
|
|
362
|
-
item.checked = true;
|
|
363
|
-
});
|
|
364
|
-
} else if (name === 'notall') {
|
|
365
|
-
newOptionalTermItems[index].checked = false;
|
|
366
|
-
newOptionalTermItems[index].alarmTypeList.forEach(item => {
|
|
367
|
-
item.checked = false;
|
|
368
|
-
});
|
|
369
|
-
} else if (name === 'optionalSelect') {
|
|
370
|
-
// 선택된 체크
|
|
371
|
-
newOptionalTermItems[parentIdx].alarmTypeList[index].checked =
|
|
372
|
-
!newOptionalTermItems[parentIdx].alarmTypeList[index].checked;
|
|
373
|
-
// 전부 체크인지 확인
|
|
374
|
-
newOptionalTermItems[parentIdx].checked = newOptionalTermItems[parentIdx].alarmTypeList.some(
|
|
375
|
-
item => item.checked
|
|
376
|
-
);
|
|
377
|
-
}
|
|
378
|
-
setOptionalTermItems(newOptionalTermItems);
|
|
379
|
-
};
|
|
380
|
-
|
|
381
262
|
const verify = async (code: string) => {
|
|
382
263
|
if (!userValidObj.phoneSendValid) {
|
|
383
264
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.timeLeftError];
|
|
@@ -433,15 +314,6 @@ const Personal = ({
|
|
|
433
314
|
|
|
434
315
|
const nameCheck = userData.data.name !== userObj.name && userValidObj.nameValid;
|
|
435
316
|
const phoneCheck = userValidObj.codeValid;
|
|
436
|
-
const termCheck =
|
|
437
|
-
userAgree.data.alert_agree !==
|
|
438
|
-
optionalTermItems[0].alarmTypeList
|
|
439
|
-
.filter(item => item.checked)
|
|
440
|
-
.reduce((sum, item) => sum + item.value, 0) ||
|
|
441
|
-
userAgree.data.marketing_agree !==
|
|
442
|
-
optionalTermItems[1].alarmTypeList
|
|
443
|
-
.filter(item => item.checked)
|
|
444
|
-
.reduce((sum, item) => sum + item.value, 0);
|
|
445
317
|
|
|
446
318
|
let result = true;
|
|
447
319
|
if (nameCheck || phoneCheck) {
|
|
@@ -452,19 +324,6 @@ const Personal = ({
|
|
|
452
324
|
}
|
|
453
325
|
}).then(obj => obj.result);
|
|
454
326
|
}
|
|
455
|
-
if (termCheck) {
|
|
456
|
-
result = await optionalTermAgree({
|
|
457
|
-
bodyData: {
|
|
458
|
-
alert_agree: optionalTermItems[0].alarmTypeList
|
|
459
|
-
.filter(item => item.checked)
|
|
460
|
-
.reduce((sum, item) => sum + item.value, 0), // checked된 항목들의 value 합산
|
|
461
|
-
|
|
462
|
-
marketing_agree: optionalTermItems[1].alarmTypeList
|
|
463
|
-
.filter(item => item.checked)
|
|
464
|
-
.reduce((sum, item) => sum + item.value, 0) // 마케팅 관련 동의 값 합산
|
|
465
|
-
}
|
|
466
|
-
}).then(obj => obj.result);
|
|
467
|
-
}
|
|
468
327
|
if (result) {
|
|
469
328
|
setIsModalUpdate(false);
|
|
470
329
|
const queryClient = new QueryClient();
|
|
@@ -476,7 +335,7 @@ const Personal = ({
|
|
|
476
335
|
}
|
|
477
336
|
};
|
|
478
337
|
|
|
479
|
-
if (userDataStatus !== 'success'
|
|
338
|
+
if (userDataStatus !== 'success') {
|
|
480
339
|
return <Loader fullScreen />;
|
|
481
340
|
}
|
|
482
341
|
|
|
@@ -802,42 +661,6 @@ const Personal = ({
|
|
|
802
661
|
)}
|
|
803
662
|
</div>
|
|
804
663
|
</div>
|
|
805
|
-
|
|
806
|
-
<div className={' mt-[80px] ' + ' max-lg:mt-[60px] ' + ' max-sm:mt-[60px] '}>
|
|
807
|
-
<div
|
|
808
|
-
className={
|
|
809
|
-
' body_large1 text-[#000000] ' + ' max-lg:body_large1_tb ' + ' max-sm:body_large1_mo '
|
|
810
|
-
}
|
|
811
|
-
>
|
|
812
|
-
정보 수신 동의
|
|
813
|
-
</div>
|
|
814
|
-
<div
|
|
815
|
-
className={
|
|
816
|
-
' mt-[52px] flex flex-col gap-[59px] ' +
|
|
817
|
-
' max-lg:mt-[40px] max-lg:gap-[50px] ' +
|
|
818
|
-
' max-sm:mt-[32px] max-sm:gap-[40px] '
|
|
819
|
-
}
|
|
820
|
-
>
|
|
821
|
-
{optionalTermItems.map((item: IOptionalCheckItem, index: number) => {
|
|
822
|
-
return (
|
|
823
|
-
<MyPageOptionalCheckBox
|
|
824
|
-
key={`option-${index}`}
|
|
825
|
-
name={item.name}
|
|
826
|
-
checked={item.checked}
|
|
827
|
-
title={item.title}
|
|
828
|
-
isContent={true}
|
|
829
|
-
setModal={() => {
|
|
830
|
-
setIsTermModal(true);
|
|
831
|
-
}}
|
|
832
|
-
cautionTitle={item.cautionTitle}
|
|
833
|
-
parentIndex={index}
|
|
834
|
-
optionalItemList={item.alarmTypeList}
|
|
835
|
-
handleButton={handleCheckBox}
|
|
836
|
-
/>
|
|
837
|
-
);
|
|
838
|
-
})}
|
|
839
|
-
</div>
|
|
840
|
-
</div>
|
|
841
664
|
<div
|
|
842
665
|
className={
|
|
843
666
|
'mt-[80px] flex items-center justify-center' + ' max-lg:mt-[78px] ' + ' max-sm:mt-[40px] '
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ITermType {
|
|
2
|
+
idx: number;
|
|
3
|
+
version: string;
|
|
4
|
+
contents: string;
|
|
5
|
+
created_at: Date;
|
|
6
|
+
created_by: string;
|
|
7
|
+
updated_at: Date | null;
|
|
8
|
+
updated_by: string | null;
|
|
9
|
+
deleted_at: Date | null;
|
|
10
|
+
deleted_by: string | null;
|
|
11
|
+
is_use: boolean;
|
|
12
|
+
title: string;
|
|
13
|
+
terms_code: string | null;
|
|
14
|
+
code_name: string;
|
|
15
|
+
rn: number | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ITermType {
|
|
2
|
+
idx: number;
|
|
3
|
+
version: string;
|
|
4
|
+
contents: string;
|
|
5
|
+
created_at: Date;
|
|
6
|
+
created_by: string;
|
|
7
|
+
updated_at: Date | null;
|
|
8
|
+
updated_by: string | null;
|
|
9
|
+
deleted_at: Date | null;
|
|
10
|
+
deleted_by: string | null;
|
|
11
|
+
is_use: boolean;
|
|
12
|
+
title: string;
|
|
13
|
+
terms_code: string | null;
|
|
14
|
+
code_name: string;
|
|
15
|
+
rn: number | null;
|
|
16
|
+
}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
const addMyCaseQuestion = (_a) => __awaiter(void 0, [_a], void 0, function* ({ jwt, id, content }) {
|
|
11
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case/${id}/inquiry`;
|
|
11
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/inquiry`;
|
|
12
12
|
const url = `/api/lawfirm/app/case/${id}/inquiry`;
|
|
13
13
|
try {
|
|
14
14
|
const response = yield fetch(fullUrl, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const addMyCaseQuestion = async ({ jwt, id, content }: { jwt: string; id: string; content: string }) => {
|
|
2
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case/${id}/inquiry`;
|
|
2
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/inquiry`;
|
|
3
3
|
const url = `/api/lawfirm/app/case/${id}/inquiry`;
|
|
4
4
|
try {
|
|
5
5
|
const response = await fetch(fullUrl, {
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
const getCaseList = (_a) => __awaiter(void 0, [_a], void 0, function* ({ jwt, size, page, state }) {
|
|
11
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case?size=${size}&page=${page}&state=${state}`;
|
|
11
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case?size=${size}&page=${page}&state=${state}`;
|
|
12
12
|
const url = `/api/lawfirm/app/case?size=${size}&page=${page}&state=${state}`;
|
|
13
13
|
try {
|
|
14
14
|
const response = yield fetch(fullUrl, {
|
|
@@ -9,7 +9,7 @@ const getCaseList = async ({
|
|
|
9
9
|
page: number;
|
|
10
10
|
state: 'ongoing' | 'closed';
|
|
11
11
|
}) => {
|
|
12
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case?size=${size}&page=${page}&state=${state}`;
|
|
12
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case?size=${size}&page=${page}&state=${state}`;
|
|
13
13
|
const url = `/api/lawfirm/app/case?size=${size}&page=${page}&state=${state}`;
|
|
14
14
|
try {
|
|
15
15
|
const response = await fetch(fullUrl, {
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
const getCourtFileList = (_a) => __awaiter(void 0, [_a], void 0, function* ({ jwt, id }) {
|
|
11
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case/${id}/docs/court`;
|
|
11
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/docs/court`;
|
|
12
12
|
const url = `/api/lawfirm/app/case/${id}/docs/court`;
|
|
13
13
|
try {
|
|
14
14
|
const response = yield fetch(fullUrl, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const getCourtFileList = async ({ jwt, id }: { jwt: string; id: string }) => {
|
|
2
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case/${id}/docs/court`;
|
|
2
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/docs/court`;
|
|
3
3
|
const url = `/api/lawfirm/app/case/${id}/docs/court`;
|
|
4
4
|
try {
|
|
5
5
|
const response = await fetch(fullUrl, {
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
const getMyCaseQuestion = (_a) => __awaiter(void 0, [_a], void 0, function* ({ jwt, id, page, size }) {
|
|
11
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case/${id}/inquiry?page=${page}&size=${size}`;
|
|
11
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/inquiry?page=${page}&size=${size}`;
|
|
12
12
|
const url = `/api/lawfirm/app/case/${id}/inquiry?page=${page}&size=${size}`;
|
|
13
13
|
try {
|
|
14
14
|
const response = yield fetch(fullUrl, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const getMyCaseQuestion = async ({ jwt, id, page, size }: { jwt: string; id: string; page: number; size: number }) => {
|
|
2
|
-
const fullUrl = `https://aegis.daeryunlaw.com/api/app/case/${id}/inquiry?page=${page}&size=${size}`;
|
|
2
|
+
const fullUrl = `https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/inquiry?page=${page}&size=${size}`;
|
|
3
3
|
const url = `/api/lawfirm/app/case/${id}/inquiry?page=${page}&size=${size}`;
|
|
4
4
|
try {
|
|
5
5
|
const response = await fetch(fullUrl, {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
const getMyFileList = (_a) => __awaiter(void 0, [_a], void 0, function* ({ jwt, id }) {
|
|
11
11
|
try {
|
|
12
|
-
const response = yield fetch(`https://aegis.daeryunlaw.com/api/app/case/${id}/docs/my`, {
|
|
12
|
+
const response = yield fetch(`https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/docs/my`, {
|
|
13
13
|
method: 'GET',
|
|
14
14
|
headers: {
|
|
15
15
|
// 'Content-Type': 'application/json',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const getMyFileList = async ({ jwt, id }: { jwt: string; id: string }) => {
|
|
2
2
|
try {
|
|
3
|
-
const response = await fetch(`https://aegis.daeryunlaw.com/api/app/case/${id}/docs/my`, {
|
|
3
|
+
const response = await fetch(`https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/docs/my`, {
|
|
4
4
|
method: 'GET',
|
|
5
5
|
headers: {
|
|
6
6
|
// 'Content-Type': 'application/json',
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
const getTimeLine = (_a) => __awaiter(void 0, [_a], void 0, function* ({ jwt, id }) {
|
|
11
11
|
try {
|
|
12
|
-
const response = yield fetch(`https://aegis.daeryunlaw.com/api/app/case/${id}/progress`, {
|
|
12
|
+
const response = yield fetch(`https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/progress`, {
|
|
13
13
|
method: 'GET',
|
|
14
14
|
headers: {
|
|
15
15
|
// 'Content-Type': 'application/json',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const getTimeLine = async ({ jwt, id }: { jwt: string; id: string }) => {
|
|
2
2
|
try {
|
|
3
|
-
const response = await fetch(`https://aegis.daeryunlaw.com/api/app/case/${id}/progress`, {
|
|
3
|
+
const response = await fetch(`https://aegis.daeryunlaw.com/api/lawfirm/app/case/${id}/progress`, {
|
|
4
4
|
method: 'GET',
|
|
5
5
|
headers: {
|
|
6
6
|
// 'Content-Type': 'application/json',
|