에스크로 메일 재전송
This commit is contained in:
@@ -20,17 +20,19 @@ import {
|
||||
InfoSectionKeys,
|
||||
MerchantInfo,
|
||||
AmountInfo,
|
||||
EscrowDeliveryStatus
|
||||
EscrowDeliveryStatus,
|
||||
EscrowMailResendParams,
|
||||
EscrowMailResendResponse
|
||||
} from '@/entities/transaction/model/types';
|
||||
import { useEscrowMailResendMutation } from '@/entities/transaction/api/use-escrow-mail-resend-mutation';
|
||||
import { MerchantInfoSection } from '@/entities/transaction/ui/section/merchant-info-section';
|
||||
import { AmountInfoSection } from '@/entities/transaction/ui/section/amount-info-section';
|
||||
import { DownloadBottomSheet, DownloadSelectedMode } from '@/entities/common/ui/download-bottom-sheet';
|
||||
import { DetailMotionDuration, DetailMotionStyle, DetailMotionVariants } from '@/entities/common/model/constant';
|
||||
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
|
||||
import { checkGrant } from '@/shared/lib/check-grant';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
import { snackBar } from '@/shared/lib';
|
||||
import { EscrowMailResendBottomSheet } from '../escrow-mail-resend-bottom-sheet';
|
||||
|
||||
export interface EscrowDetailProps {
|
||||
detailOn: boolean;
|
||||
@@ -110,16 +112,13 @@ export const EscrowDetail = ({
|
||||
}
|
||||
};
|
||||
|
||||
const callMailResend = (
|
||||
selectedMode: DownloadSelectedMode,
|
||||
userEmail?: string
|
||||
) => {
|
||||
let params = {
|
||||
const callMailResend = () => {
|
||||
let params: EscrowMailResendParams = {
|
||||
orderNumber: orderNumber,
|
||||
tid: tid,
|
||||
};
|
||||
escrowMailResend(params).then((rs: any) => {
|
||||
console.log(rs);
|
||||
escrowMailResend(params).then((rs: EscrowMailResendResponse) => {
|
||||
snackBar('이메일 재전송 요청에 성공하였습니다.');
|
||||
}).catch((e: any) => {
|
||||
if(e.response?.data?.error?.message){
|
||||
snackBar(e.response?.data?.error?.message);
|
||||
@@ -240,13 +239,11 @@ export const EscrowDetail = ({
|
||||
</div>
|
||||
</motion.div>
|
||||
{ !!downloadBottomSheetOn &&
|
||||
<DownloadBottomSheet
|
||||
<EscrowMailResendBottomSheet
|
||||
bottomSheetOn={ downloadBottomSheetOn }
|
||||
setBottomSheetOn={ setDownloadBottomSheetOn }
|
||||
imageMode={ false }
|
||||
emailMode={ true }
|
||||
sendRequest={ callMailResend }
|
||||
></DownloadBottomSheet>
|
||||
callMailResend={ callMailResend }
|
||||
></EscrowMailResendBottomSheet>
|
||||
}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -3,14 +3,14 @@ import { motion } from 'framer-motion';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export interface EscrowMailResendBottomSheetProps {
|
||||
setBottomSheetOn: (bottomSheetOn: boolean) => void;
|
||||
bottomSheetOn: boolean;
|
||||
setBottomSheetOn: (bottomSheetOn: boolean) => void;
|
||||
callMailResend: () => void;
|
||||
};
|
||||
|
||||
export const EscrowMailResendBottomSheet = ({
|
||||
setBottomSheetOn,
|
||||
bottomSheetOn,
|
||||
setBottomSheetOn,
|
||||
callMailResend
|
||||
}: EscrowMailResendBottomSheetProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
Reference in New Issue
Block a user