@daeryun/dr_components 0.9.13 → 0.9.15
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/Daeryuntalk/ChatObject/ObjectButton.jsx +6 -4
- package/dist/components/Daeryuntalk/ChatObject/ObjectButton.tsx +6 -6
- package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.d.ts +0 -1
- package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.js +2 -2
- package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.ts +2 -2
- package/dist/components/page/Login/LoginComp/SignContainer.jsx +107 -57
- package/dist/components/page/Login/LoginComp/SignContainer.tsx +113 -62
- package/dist/components/page/Login/StepOne.d.ts +3 -0
- package/dist/components/page/Login/StepOne.jsx +209 -0
- package/dist/components/page/Login/StepOne.tsx +300 -0
- package/dist/components/page/Login/StepTwo.d.ts +3 -0
- package/dist/components/page/Login/StepTwo.jsx +515 -0
- package/dist/components/page/Login/StepTwo.tsx +615 -0
- package/dist/styles/globals.css +354 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -117,10 +117,12 @@ const objectListRender = (objectNumber) => {
|
|
|
117
117
|
return (<>
|
|
118
118
|
<span className="font-[700]">채팅 문의</span> 시작하기
|
|
119
119
|
</>);
|
|
120
|
-
case ObjectNumber.ASK_AI:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
// case ObjectNumber.ASK_AI:
|
|
121
|
+
// return (
|
|
122
|
+
// <>
|
|
123
|
+
// <span className="font-[700]">AI 대륜</span>에게 질문하기
|
|
124
|
+
// </>
|
|
125
|
+
// );
|
|
124
126
|
case ObjectNumber.OTHER_RESERVATION:
|
|
125
127
|
return (<>
|
|
126
128
|
다른 <span className="font-[700]">예약 방법</span> 보기
|
|
@@ -159,12 +159,12 @@ const objectListRender = (objectNumber: string) => {
|
|
|
159
159
|
<span className="font-[700]">채팅 문의</span> 시작하기
|
|
160
160
|
</>
|
|
161
161
|
);
|
|
162
|
-
case ObjectNumber.ASK_AI:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
// case ObjectNumber.ASK_AI:
|
|
163
|
+
// return (
|
|
164
|
+
// <>
|
|
165
|
+
// <span className="font-[700]">AI 대륜</span>에게 질문하기
|
|
166
|
+
// </>
|
|
167
|
+
// );
|
|
168
168
|
case ObjectNumber.OTHER_RESERVATION:
|
|
169
169
|
return (
|
|
170
170
|
<>
|
|
@@ -2,7 +2,6 @@ export declare enum ObjectNumber {
|
|
|
2
2
|
FIRST_VISIT = "OB14897658423548P001",
|
|
3
3
|
START_CHAT = "OB14897658423548P002",
|
|
4
4
|
OTHER_RESERVATION = "OB14897658423548P003",
|
|
5
|
-
ASK_AI = "OB14897658423548P004",
|
|
6
5
|
FAQ = "OB14897658423548P005"
|
|
7
6
|
}
|
|
8
7
|
export declare const ObjectNumberMap: Record<ObjectNumber, string>;
|
|
@@ -4,14 +4,14 @@ export var ObjectNumber;
|
|
|
4
4
|
ObjectNumber["FIRST_VISIT"] = "OB14897658423548P001";
|
|
5
5
|
ObjectNumber["START_CHAT"] = "OB14897658423548P002";
|
|
6
6
|
ObjectNumber["OTHER_RESERVATION"] = "OB14897658423548P003";
|
|
7
|
-
|
|
7
|
+
// ASK_AI = 'OB14897658423548P004',
|
|
8
8
|
ObjectNumber["FAQ"] = "OB14897658423548P005";
|
|
9
9
|
})(ObjectNumber || (ObjectNumber = {}));
|
|
10
10
|
export const ObjectNumberMap = {
|
|
11
11
|
[ObjectNumber.FIRST_VISIT]: '대륜에 처음 방문하셨나요?',
|
|
12
12
|
[ObjectNumber.START_CHAT]: '채팅 문의 시작하기',
|
|
13
13
|
[ObjectNumber.OTHER_RESERVATION]: '다른 예약 방법 보기',
|
|
14
|
-
[ObjectNumber.ASK_AI]: 'AI 대륜에게 질문하기',
|
|
14
|
+
// [ObjectNumber.ASK_AI]: 'AI 대륜에게 질문하기',
|
|
15
15
|
[ObjectNumber.FAQ]: '자주 묻는 질문'
|
|
16
16
|
};
|
|
17
17
|
export var WorkFlowButtonUiCode;
|
|
@@ -4,7 +4,7 @@ export enum ObjectNumber {
|
|
|
4
4
|
FIRST_VISIT = 'OB14897658423548P001',
|
|
5
5
|
START_CHAT = 'OB14897658423548P002',
|
|
6
6
|
OTHER_RESERVATION = 'OB14897658423548P003',
|
|
7
|
-
ASK_AI = 'OB14897658423548P004',
|
|
7
|
+
// ASK_AI = 'OB14897658423548P004',
|
|
8
8
|
FAQ = 'OB14897658423548P005'
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ export const ObjectNumberMap: Record<ObjectNumber, string> = {
|
|
|
12
12
|
[ObjectNumber.FIRST_VISIT]: '대륜에 처음 방문하셨나요?',
|
|
13
13
|
[ObjectNumber.START_CHAT]: '채팅 문의 시작하기',
|
|
14
14
|
[ObjectNumber.OTHER_RESERVATION]: '다른 예약 방법 보기',
|
|
15
|
-
[ObjectNumber.ASK_AI]: 'AI 대륜에게 질문하기',
|
|
15
|
+
// [ObjectNumber.ASK_AI]: 'AI 대륜에게 질문하기',
|
|
16
16
|
[ObjectNumber.FAQ]: '자주 묻는 질문'
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -11,11 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
import React, { Suspense, useCallback, useEffect, useRef, useState } from 'react';
|
|
12
12
|
import { useRouter } from 'next/navigation';
|
|
13
13
|
import { formatPhoneNumber, formatTime, getCookie, getNameValue, getPhoneValue, onlyNumberFilter } from '../../../../lib';
|
|
14
|
-
import {
|
|
14
|
+
import { getToken } from '../_api/token';
|
|
15
15
|
import { jwtDecode } from 'jwt-decode';
|
|
16
16
|
import { sendNumber } from '../_api/sendNumber';
|
|
17
17
|
import { confirmNumber } from '../_api/confirmNumber';
|
|
18
|
-
import { completeUserSign } from '../_api/completeUser';
|
|
19
18
|
import PageWrapper from '../../../Layout/PageWrapper';
|
|
20
19
|
import LoginBreadCrumb from './LoginBreadCrumb';
|
|
21
20
|
import ConfirmModal from './Modal/ConfirmModal';
|
|
@@ -27,7 +26,6 @@ import Image from 'next/image';
|
|
|
27
26
|
import { useQuery } from '@tanstack/react-query';
|
|
28
27
|
import Loader from '../../../Loader/Loader';
|
|
29
28
|
import OptionalCheckBox from './Sign/OptionalCheckBox';
|
|
30
|
-
import { optionalTermAgree } from '../_api/optionalTermAgree';
|
|
31
29
|
const SignContainer = ({ layoutClassName = `mt-[47px] py-[128px] max-lg:mt-[40px] max-lg:py-[112px] max-sm:mt-[28px] max-sm:py-[100px]`, setUser }) => {
|
|
32
30
|
var _a, _b;
|
|
33
31
|
const session_key = process.env.NEXT_PUBLIC_USER_SESSION_STORAGE_KEY || 'loginUser';
|
|
@@ -394,61 +392,111 @@ const SignContainer = ({ layoutClassName = `mt-[47px] py-[128px] max-lg:mt-[40px
|
|
|
394
392
|
setIsModal(true);
|
|
395
393
|
}
|
|
396
394
|
});
|
|
397
|
-
const completeUser =
|
|
398
|
-
|
|
395
|
+
// const completeUser = async ({
|
|
396
|
+
// completeBodyData,
|
|
397
|
+
// termBodyData
|
|
398
|
+
// }: {
|
|
399
|
+
// completeBodyData: { name: string; phoneNumber: string; uuid: string };
|
|
400
|
+
// termBodyData: {
|
|
401
|
+
// marketing_agree: number;
|
|
402
|
+
// };
|
|
403
|
+
// }) => {
|
|
404
|
+
// // 이름 설정
|
|
405
|
+
// if (!userValidObj.nameValid) {
|
|
406
|
+
// const { title, subTitle, key } = modalValueSet[modalValueSetKey.nameError];
|
|
407
|
+
// setModalObj({ title: title, subTitle: subTitle, key });
|
|
408
|
+
// setIsModal(true);
|
|
409
|
+
// return;
|
|
410
|
+
// }
|
|
411
|
+
// // 전화번호 인증 완료 여부
|
|
412
|
+
// if (!userValidObj.codeValid || !userObj.uuid) {
|
|
413
|
+
// const { title, subTitle, key } = modalValueSet[modalValueSetKey.sendNumberComplete];
|
|
414
|
+
// setModalObj({ title: title, subTitle: subTitle, key });
|
|
415
|
+
// setIsModal(true);
|
|
416
|
+
// return;
|
|
417
|
+
// }
|
|
418
|
+
// // 약관
|
|
419
|
+
// if (!requiredTermItems.slice(1).every(item => item.checked)) {
|
|
420
|
+
// const { title, subTitle, key } = modalValueSet[modalValueSetKey.termRequiredError];
|
|
421
|
+
// setModalObj({ title: title, subTitle: subTitle, key });
|
|
422
|
+
// setIsModal(true);
|
|
423
|
+
// return;
|
|
424
|
+
// }
|
|
425
|
+
// // 약관 저장
|
|
426
|
+
// const termResult = await optionalTermAgree({
|
|
427
|
+
// bodyData: termBodyData
|
|
428
|
+
// });
|
|
429
|
+
// if (!termResult.result) {
|
|
430
|
+
// // alert('회원가입 실패');
|
|
431
|
+
// return;
|
|
432
|
+
// }
|
|
433
|
+
// // 회원가입 완료
|
|
434
|
+
// const result = await completeUserSign({
|
|
435
|
+
// bodyData: completeBodyData
|
|
436
|
+
// });
|
|
437
|
+
// // 가입 성공여부
|
|
438
|
+
// if (result.result) {
|
|
439
|
+
// setIsUserSignedUp(true);
|
|
440
|
+
// const userData = {
|
|
441
|
+
// email: userJwtObj.email,
|
|
442
|
+
// name: completeBodyData.name,
|
|
443
|
+
// provider: userJwtObj.provider,
|
|
444
|
+
// isLogin: true
|
|
445
|
+
// };
|
|
446
|
+
// setUser && sessionStorage.setItem(session_key || '', JSON.stringify(userData));
|
|
447
|
+
// setUser && setUser(userData);
|
|
448
|
+
// // await signRedirect(redirect);
|
|
449
|
+
// // await createToken(jwtToken);
|
|
450
|
+
// // router.push(redirect);
|
|
451
|
+
// window.location.href = redirect;
|
|
452
|
+
// // window.location.href = `/api/auth/redirect?redirect=${encodeURIComponent(redirect)}`;
|
|
453
|
+
// } else {
|
|
454
|
+
// await deleteToken();
|
|
455
|
+
// }
|
|
456
|
+
// };
|
|
457
|
+
// 다음 버튼 클릭 시 전역변수 설정 및 Step1으로 이동
|
|
458
|
+
const handleNext = () => {
|
|
459
|
+
// 이름 설정 체크
|
|
399
460
|
if (!userValidObj.nameValid) {
|
|
400
461
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.nameError];
|
|
401
462
|
setModalObj({ title: title, subTitle: subTitle, key });
|
|
402
463
|
setIsModal(true);
|
|
403
464
|
return;
|
|
404
465
|
}
|
|
405
|
-
// 전화번호 인증 완료 여부
|
|
466
|
+
// 전화번호 인증 완료 여부 체크
|
|
406
467
|
if (!userValidObj.codeValid || !userObj.uuid) {
|
|
407
468
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.sendNumberComplete];
|
|
408
469
|
setModalObj({ title: title, subTitle: subTitle, key });
|
|
409
470
|
setIsModal(true);
|
|
410
471
|
return;
|
|
411
472
|
}
|
|
412
|
-
// 약관
|
|
473
|
+
// 약관 동의 체크
|
|
413
474
|
if (!requiredTermItems.slice(1).every(item => item.checked)) {
|
|
414
475
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.termRequiredError];
|
|
415
476
|
setModalObj({ title: title, subTitle: subTitle, key });
|
|
416
477
|
setIsModal(true);
|
|
417
478
|
return;
|
|
418
479
|
}
|
|
419
|
-
//
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
};
|
|
440
|
-
setUser && sessionStorage.setItem(session_key || '', JSON.stringify(userData));
|
|
441
|
-
setUser && setUser(userData);
|
|
442
|
-
// await signRedirect(redirect);
|
|
443
|
-
// await createToken(jwtToken);
|
|
444
|
-
// router.push(redirect);
|
|
445
|
-
window.location.href = redirect;
|
|
446
|
-
// window.location.href = `/api/auth/redirect?redirect=${encodeURIComponent(redirect)}`;
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
yield deleteToken();
|
|
450
|
-
}
|
|
451
|
-
});
|
|
480
|
+
// marketing_agree 값 계산
|
|
481
|
+
const marketingAgree = optionalTermItems[0].alarmTypeList
|
|
482
|
+
.filter(item => item.checked)
|
|
483
|
+
.reduce((sum, item) => sum + item.value, 0);
|
|
484
|
+
// setUser를 통해 전역 상태에 저장
|
|
485
|
+
const userData = {
|
|
486
|
+
email: userJwtObj.email,
|
|
487
|
+
name: userObj.name,
|
|
488
|
+
provider: userJwtObj.provider,
|
|
489
|
+
phoneNumber: formatPhoneNumber(userObj.phoneNumber) || '',
|
|
490
|
+
uuid: userObj.uuid,
|
|
491
|
+
marketing_agree: marketingAgree,
|
|
492
|
+
category: [],
|
|
493
|
+
field: [],
|
|
494
|
+
isLogin: true
|
|
495
|
+
};
|
|
496
|
+
setUser && setUser(userData);
|
|
497
|
+
setUser && sessionStorage.setItem(session_key || '', JSON.stringify(userData));
|
|
498
|
+
window.location.href = '/login/sign/step_one';
|
|
499
|
+
};
|
|
452
500
|
const modalHandleClose = () => {
|
|
453
501
|
setIsModal(false);
|
|
454
502
|
setModalObj({ title: '', subTitle: '', key: '' });
|
|
@@ -640,23 +688,25 @@ const SignContainer = ({ layoutClassName = `mt-[47px] py-[128px] max-lg:mt-[40px
|
|
|
640
688
|
<div className={' mt-[80px] flex items-center justify-center ' +
|
|
641
689
|
' max-lg:mt-[72px] ' +
|
|
642
690
|
' max-sm:mt-[40px] '}>
|
|
643
|
-
<button type={'button'}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
691
|
+
<button type={'button'}
|
|
692
|
+
// onClick={async () => {
|
|
693
|
+
// await completeUser({
|
|
694
|
+
// completeBodyData: {
|
|
695
|
+
// name: userObj.name,
|
|
696
|
+
// phoneNumber: formatPhoneNumber(userObj.phoneNumber) || '',
|
|
697
|
+
// uuid: userObj.uuid
|
|
698
|
+
// },
|
|
699
|
+
// termBodyData: {
|
|
700
|
+
// // alert_agree: optionalTermItems[0].alarmTypeList
|
|
701
|
+
// // .filter(item => item.checked)
|
|
702
|
+
// // .reduce((sum, item) => sum + item.value, 0), // checked된 항목들의 value 합산
|
|
703
|
+
// marketing_agree: optionalTermItems[0].alarmTypeList
|
|
704
|
+
// .filter(item => item.checked)
|
|
705
|
+
// .reduce((sum, item) => sum + item.value, 0) // 마케팅 관련 동의 값 합산
|
|
706
|
+
// }
|
|
707
|
+
// });
|
|
708
|
+
// }}
|
|
709
|
+
onClick={handleNext} className={` ${checkAll ? ' bg-[#AE0E36] text-white ' : ' bg-[#EDEDED] text-[#909090] '} ` +
|
|
660
710
|
' title_small h-[72px] w-[740px] rounded-[36px] ' +
|
|
661
711
|
' max-lg:body_medium2 max-lg:h-[60px] max-lg:w-[620px] ' +
|
|
662
712
|
' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-full '}>
|
|
@@ -494,16 +494,78 @@ const SignContainer = ({
|
|
|
494
494
|
}
|
|
495
495
|
};
|
|
496
496
|
|
|
497
|
-
const completeUser = async ({
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}: {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}) => {
|
|
506
|
-
|
|
497
|
+
// const completeUser = async ({
|
|
498
|
+
// completeBodyData,
|
|
499
|
+
// termBodyData
|
|
500
|
+
// }: {
|
|
501
|
+
// completeBodyData: { name: string; phoneNumber: string; uuid: string };
|
|
502
|
+
// termBodyData: {
|
|
503
|
+
// marketing_agree: number;
|
|
504
|
+
// };
|
|
505
|
+
// }) => {
|
|
506
|
+
// // 이름 설정
|
|
507
|
+
// if (!userValidObj.nameValid) {
|
|
508
|
+
// const { title, subTitle, key } = modalValueSet[modalValueSetKey.nameError];
|
|
509
|
+
// setModalObj({ title: title, subTitle: subTitle, key });
|
|
510
|
+
// setIsModal(true);
|
|
511
|
+
// return;
|
|
512
|
+
// }
|
|
513
|
+
|
|
514
|
+
// // 전화번호 인증 완료 여부
|
|
515
|
+
// if (!userValidObj.codeValid || !userObj.uuid) {
|
|
516
|
+
// const { title, subTitle, key } = modalValueSet[modalValueSetKey.sendNumberComplete];
|
|
517
|
+
// setModalObj({ title: title, subTitle: subTitle, key });
|
|
518
|
+
// setIsModal(true);
|
|
519
|
+
// return;
|
|
520
|
+
// }
|
|
521
|
+
|
|
522
|
+
// // 약관
|
|
523
|
+
// if (!requiredTermItems.slice(1).every(item => item.checked)) {
|
|
524
|
+
// const { title, subTitle, key } = modalValueSet[modalValueSetKey.termRequiredError];
|
|
525
|
+
// setModalObj({ title: title, subTitle: subTitle, key });
|
|
526
|
+
// setIsModal(true);
|
|
527
|
+
// return;
|
|
528
|
+
// }
|
|
529
|
+
|
|
530
|
+
// // 약관 저장
|
|
531
|
+
// const termResult = await optionalTermAgree({
|
|
532
|
+
// bodyData: termBodyData
|
|
533
|
+
// });
|
|
534
|
+
// if (!termResult.result) {
|
|
535
|
+
// // alert('회원가입 실패');
|
|
536
|
+
// return;
|
|
537
|
+
// }
|
|
538
|
+
|
|
539
|
+
// // 회원가입 완료
|
|
540
|
+
// const result = await completeUserSign({
|
|
541
|
+
// bodyData: completeBodyData
|
|
542
|
+
// });
|
|
543
|
+
// // 가입 성공여부
|
|
544
|
+
// if (result.result) {
|
|
545
|
+
// setIsUserSignedUp(true);
|
|
546
|
+
|
|
547
|
+
// const userData = {
|
|
548
|
+
// email: userJwtObj.email,
|
|
549
|
+
// name: completeBodyData.name,
|
|
550
|
+
// provider: userJwtObj.provider,
|
|
551
|
+
// isLogin: true
|
|
552
|
+
// };
|
|
553
|
+
// setUser && sessionStorage.setItem(session_key || '', JSON.stringify(userData));
|
|
554
|
+
// setUser && setUser(userData);
|
|
555
|
+
// // await signRedirect(redirect);
|
|
556
|
+
|
|
557
|
+
// // await createToken(jwtToken);
|
|
558
|
+
// // router.push(redirect);
|
|
559
|
+
// window.location.href = redirect;
|
|
560
|
+
// // window.location.href = `/api/auth/redirect?redirect=${encodeURIComponent(redirect)}`;
|
|
561
|
+
// } else {
|
|
562
|
+
// await deleteToken();
|
|
563
|
+
// }
|
|
564
|
+
// };
|
|
565
|
+
|
|
566
|
+
// 다음 버튼 클릭 시 전역변수 설정 및 Step1으로 이동
|
|
567
|
+
const handleNext = () => {
|
|
568
|
+
// 이름 설정 체크
|
|
507
569
|
if (!userValidObj.nameValid) {
|
|
508
570
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.nameError];
|
|
509
571
|
setModalObj({ title: title, subTitle: subTitle, key });
|
|
@@ -511,7 +573,7 @@ const SignContainer = ({
|
|
|
511
573
|
return;
|
|
512
574
|
}
|
|
513
575
|
|
|
514
|
-
// 전화번호 인증 완료 여부
|
|
576
|
+
// 전화번호 인증 완료 여부 체크
|
|
515
577
|
if (!userValidObj.codeValid || !userObj.uuid) {
|
|
516
578
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.sendNumberComplete];
|
|
517
579
|
setModalObj({ title: title, subTitle: subTitle, key });
|
|
@@ -519,7 +581,7 @@ const SignContainer = ({
|
|
|
519
581
|
return;
|
|
520
582
|
}
|
|
521
583
|
|
|
522
|
-
// 약관
|
|
584
|
+
// 약관 동의 체크
|
|
523
585
|
if (!requiredTermItems.slice(1).every(item => item.checked)) {
|
|
524
586
|
const { title, subTitle, key } = modalValueSet[modalValueSetKey.termRequiredError];
|
|
525
587
|
setModalObj({ title: title, subTitle: subTitle, key });
|
|
@@ -527,40 +589,28 @@ const SignContainer = ({
|
|
|
527
589
|
return;
|
|
528
590
|
}
|
|
529
591
|
|
|
530
|
-
//
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
if (!termResult.result) {
|
|
535
|
-
// alert('회원가입 실패');
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
592
|
+
// marketing_agree 값 계산
|
|
593
|
+
const marketingAgree = optionalTermItems[0].alarmTypeList
|
|
594
|
+
.filter(item => item.checked)
|
|
595
|
+
.reduce((sum, item) => sum + item.value, 0);
|
|
538
596
|
|
|
539
|
-
//
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
// await createToken(jwtToken);
|
|
558
|
-
// router.push(redirect);
|
|
559
|
-
window.location.href = redirect;
|
|
560
|
-
// window.location.href = `/api/auth/redirect?redirect=${encodeURIComponent(redirect)}`;
|
|
561
|
-
} else {
|
|
562
|
-
await deleteToken();
|
|
563
|
-
}
|
|
597
|
+
// setUser를 통해 전역 상태에 저장
|
|
598
|
+
const userData = {
|
|
599
|
+
email: userJwtObj.email,
|
|
600
|
+
name: userObj.name,
|
|
601
|
+
provider: userJwtObj.provider,
|
|
602
|
+
phoneNumber: formatPhoneNumber(userObj.phoneNumber) || '',
|
|
603
|
+
uuid: userObj.uuid,
|
|
604
|
+
marketing_agree: marketingAgree,
|
|
605
|
+
category: [],
|
|
606
|
+
field: [],
|
|
607
|
+
isLogin: true
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
setUser && setUser(userData);
|
|
611
|
+
setUser && sessionStorage.setItem(session_key || '', JSON.stringify(userData));
|
|
612
|
+
|
|
613
|
+
window.location.href = '/login/sign/step_one';
|
|
564
614
|
};
|
|
565
615
|
|
|
566
616
|
const modalHandleClose = () => {
|
|
@@ -963,23 +1013,24 @@ const SignContainer = ({
|
|
|
963
1013
|
>
|
|
964
1014
|
<button
|
|
965
1015
|
type={'button'}
|
|
966
|
-
onClick={async () => {
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
}}
|
|
1016
|
+
// onClick={async () => {
|
|
1017
|
+
// await completeUser({
|
|
1018
|
+
// completeBodyData: {
|
|
1019
|
+
// name: userObj.name,
|
|
1020
|
+
// phoneNumber: formatPhoneNumber(userObj.phoneNumber) || '',
|
|
1021
|
+
// uuid: userObj.uuid
|
|
1022
|
+
// },
|
|
1023
|
+
// termBodyData: {
|
|
1024
|
+
// // alert_agree: optionalTermItems[0].alarmTypeList
|
|
1025
|
+
// // .filter(item => item.checked)
|
|
1026
|
+
// // .reduce((sum, item) => sum + item.value, 0), // checked된 항목들의 value 합산
|
|
1027
|
+
// marketing_agree: optionalTermItems[0].alarmTypeList
|
|
1028
|
+
// .filter(item => item.checked)
|
|
1029
|
+
// .reduce((sum, item) => sum + item.value, 0) // 마케팅 관련 동의 값 합산
|
|
1030
|
+
// }
|
|
1031
|
+
// });
|
|
1032
|
+
// }}
|
|
1033
|
+
onClick={handleNext}
|
|
983
1034
|
className={
|
|
984
1035
|
` ${checkAll ? ' bg-[#AE0E36] text-white ' : ' bg-[#EDEDED] text-[#909090] '} ` +
|
|
985
1036
|
' title_small h-[72px] w-[740px] rounded-[36px] ' +
|