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