ars sms재전송
This commit is contained in:
@@ -1,6 +1,71 @@
|
|||||||
export const ArsResendSmsBottomSheet = () => {
|
import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from "@/entities/common/model/constant";
|
||||||
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
|
import { motion } from 'framer-motion';
|
||||||
|
export interface ArsResendSmsBottomSheetProps {
|
||||||
|
bottomSheetOn: boolean;
|
||||||
|
setBottomSheetOn: (bottomSheetOn: boolean) => void;
|
||||||
|
phoneNumber?: string;
|
||||||
|
callResendSms: () => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ArsResendSmsBottomSheet = ({
|
||||||
|
bottomSheetOn,
|
||||||
|
setBottomSheetOn,
|
||||||
|
phoneNumber,
|
||||||
|
callResendSms
|
||||||
|
}: ArsResendSmsBottomSheetProps) => {
|
||||||
|
|
||||||
|
const onClickToClose = () => {
|
||||||
|
setBottomSheetOn(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onCliickToResendSms = () => {
|
||||||
|
if(callResendSms){
|
||||||
|
callResendSms();
|
||||||
|
}
|
||||||
|
onClickToClose();
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<></>
|
<>
|
||||||
|
{ (bottomSheetOn) &&
|
||||||
|
<div className="bg-dim"></div>
|
||||||
|
}
|
||||||
|
<motion.div
|
||||||
|
className="bottomsheet"
|
||||||
|
initial="hidden"
|
||||||
|
animate={ (bottomSheetOn)? 'visible': 'hidden' }
|
||||||
|
variants={ BottomSheetMotionVaiants }
|
||||||
|
transition={ BottomSheetMotionDuration }
|
||||||
|
>
|
||||||
|
<div className="bottomsheet-header">
|
||||||
|
<div className="bottomsheet-title">
|
||||||
|
<h2>SMS 재전송</h2>
|
||||||
|
<button
|
||||||
|
className="close-btn"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src={ IMAGE_ROOT + '/ico_close.svg' }
|
||||||
|
alt="닫기"
|
||||||
|
onClick={ () => onClickToClose() }
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="bottomsheet-content">
|
||||||
|
<div className="bottom-section">
|
||||||
|
<p>[01095800212] 번호로 SMS를 재발송 하시겠습니까?</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="bottomsheet-footer">
|
||||||
|
<button
|
||||||
|
className="btn-50 btn-blue flex-1"
|
||||||
|
type="button"
|
||||||
|
onClick={ () => onCliickToResendSms() }
|
||||||
|
>신청</button>
|
||||||
|
</div>
|
||||||
|
</motion.div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1,15 +1,16 @@
|
|||||||
|
import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant';
|
||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
|
|
||||||
export interface CashReceitPurposeUpdateBottomSheetProps {
|
export interface CashReceitPurposeUpdateBottomSheetProps {
|
||||||
setBottomSheetOn: (bottomSheetOn: boolean) => void;
|
|
||||||
bottomSheetOn: boolean;
|
bottomSheetOn: boolean;
|
||||||
|
setBottomSheetOn: (bottomSheetOn: boolean) => void;
|
||||||
callPurposeUpdate: () => void;
|
callPurposeUpdate: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CashReceitPurposeUpdateBottomSheet = ({
|
export const CashReceitPurposeUpdateBottomSheet = ({
|
||||||
setBottomSheetOn,
|
|
||||||
bottomSheetOn,
|
bottomSheetOn,
|
||||||
|
setBottomSheetOn,
|
||||||
callPurposeUpdate
|
callPurposeUpdate
|
||||||
}: CashReceitPurposeUpdateBottomSheetProps) => {
|
}: CashReceitPurposeUpdateBottomSheetProps) => {
|
||||||
|
|
||||||
@@ -20,11 +21,6 @@ export const CashReceitPurposeUpdateBottomSheet = ({
|
|||||||
callPurposeUpdate();
|
callPurposeUpdate();
|
||||||
};
|
};
|
||||||
|
|
||||||
const variants = {
|
|
||||||
hidden: { y: '100%' },
|
|
||||||
visible: { y: '0%' },
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{ (bottomSheetOn) &&
|
{ (bottomSheetOn) &&
|
||||||
@@ -34,12 +30,12 @@ export const CashReceitPurposeUpdateBottomSheet = ({
|
|||||||
className="bottomsheet"
|
className="bottomsheet"
|
||||||
initial="hidden"
|
initial="hidden"
|
||||||
animate={ (bottomSheetOn)? 'visible': 'hidden' }
|
animate={ (bottomSheetOn)? 'visible': 'hidden' }
|
||||||
variants={ variants }
|
variants={ BottomSheetMotionVaiants }
|
||||||
transition={{ duration: 0.5 }}
|
transition={ BottomSheetMotionDuration }
|
||||||
>
|
>
|
||||||
<div className="bottomsheet-header">
|
<div className="bottomsheet-header">
|
||||||
<div className="bottomsheet-title">
|
<div className="bottomsheet-title">
|
||||||
<h2>신청 방법을 선택하세요</h2>
|
<h2>현금영수증 용도 변경 안내</h2>
|
||||||
<button
|
<button
|
||||||
className="close-btn"
|
className="close-btn"
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -13,9 +13,13 @@ import { NumericFormat } from 'react-number-format';
|
|||||||
import { useExtensionArsDetailMutation } from '@/entities/additional-service/api/ars/use-extension-ars-detail-mutation';
|
import { useExtensionArsDetailMutation } from '@/entities/additional-service/api/ars/use-extension-ars-detail-mutation';
|
||||||
import {
|
import {
|
||||||
ExtensionArsDetailParams,
|
ExtensionArsDetailParams,
|
||||||
ExtensionArsDetailResponse
|
ExtensionArsDetailResponse,
|
||||||
|
ExtensionArsResendParams,
|
||||||
|
ExtensionArsResendResponse
|
||||||
} from '@/entities/additional-service/model/ars/types';
|
} from '@/entities/additional-service/model/ars/types';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import { ArsResendSmsBottomSheet } from '@/entities/additional-service/ui/ars/resend-sms-bottom-sheet';
|
||||||
|
import { useExtensionArsResendMutation } from '@/entities/additional-service/api/ars/use-extension-ars-resend-mutation';
|
||||||
|
|
||||||
export const ArsDetailPage = () => {
|
export const ArsDetailPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
@@ -26,8 +30,10 @@ export const ArsDetailPage = () => {
|
|||||||
const amount = location.state.amount;
|
const amount = location.state.amount;
|
||||||
|
|
||||||
const [detail, setDetail] = useState<ExtensionArsDetailResponse>();
|
const [detail, setDetail] = useState<ExtensionArsDetailResponse>();
|
||||||
|
const [bottomSheetOn, setBottomSheetOn] = useState<boolean>(false);
|
||||||
|
|
||||||
const { mutateAsync: extensionArsDetail } = useExtensionArsDetailMutation();
|
const { mutateAsync: extensionArsDetail } = useExtensionArsDetailMutation();
|
||||||
|
const { mutateAsync: extensionArsResend } = useExtensionArsResendMutation();
|
||||||
const callDetail = () => {
|
const callDetail = () => {
|
||||||
let params: ExtensionArsDetailParams = {
|
let params: ExtensionArsDetailParams = {
|
||||||
tid: tid,
|
tid: tid,
|
||||||
@@ -51,13 +57,23 @@ export const ArsDetailPage = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const onClickToOpenResendBottomSheet = () => {
|
const onClickToOpenResendBottomSheet = () => {
|
||||||
|
setBottomSheetOn(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getDate = (date?: string) => {
|
const getDate = (date?: string) => {
|
||||||
return (date)? moment(date.substr(0, 8)).format('YYYY.MM.DD'): '';
|
return (date)? moment(date.substr(0, 8)).format('YYYY.MM.DD'): '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const callResendSms = () => {
|
||||||
|
let params: ExtensionArsResendParams = {
|
||||||
|
mid: mid,
|
||||||
|
tid: tid
|
||||||
|
}
|
||||||
|
extensionArsResend(params).then((rs: ExtensionArsResendResponse) => {
|
||||||
|
console.log(rs);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<main className="full-height">
|
<main className="full-height">
|
||||||
@@ -136,6 +152,13 @@ export const ArsDetailPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<ArsResendSmsBottomSheet
|
||||||
|
setBottomSheetOn={ setBottomSheetOn }
|
||||||
|
bottomSheetOn={ bottomSheetOn }
|
||||||
|
phoneNumber={ detail?.phoneNumber }
|
||||||
|
callResendSms={ callResendSms }
|
||||||
|
></ArsResendSmsBottomSheet>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user