빌키 에스크로 추가 api 연ㄱㅕㄹ
This commit is contained in:
@@ -28,6 +28,8 @@ import {
|
||||
useSetHeaderType,
|
||||
useSetFooterMode
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { EscrowMailResendBottomSheet } from '@/entities/transaction/ui/escrow-mail-resend-bottom-sheet';
|
||||
import { useEscrowMailResendMutation } from '@/entities/transaction/api/use-escrow-mail-resend-mutation';
|
||||
|
||||
export const EscrowDetailPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -45,7 +47,10 @@ export const EscrowDetailPage = () => {
|
||||
const [showPaymentInfo, setShowPaymentInfo] = useState<boolean>(false);
|
||||
const [showTransactionInfo, setShowTransactionInfo] = useState<boolean>(false);
|
||||
const [showSettlementInfo, setShowSettlementInfo] = useState<boolean>(false);
|
||||
|
||||
const [bottomSheetOn, setBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
const [orderNumber, setOrderNumber] = useState<string>();
|
||||
const [tid, setTid] = useState<string>();
|
||||
|
||||
useSetHeaderTitle('에스크로 상세');
|
||||
useSetHeaderType(HeaderType.RightClose);
|
||||
@@ -54,23 +59,41 @@ export const EscrowDetailPage = () => {
|
||||
});
|
||||
useSetFooterMode(false);
|
||||
|
||||
const { mutateAsync: escroDetail } = useEscrowDetailMutation();
|
||||
const { mutateAsync: escrowDetail } = useEscrowDetailMutation();
|
||||
const { mutateAsync: escrowMailResend } = useEscrowMailResendMutation()
|
||||
|
||||
const callDetail = () => {
|
||||
let escroDetailParams: EscrowDetailParams = {
|
||||
issueNumber: location?.state.issueNumber,
|
||||
};
|
||||
escroDetail(escroDetailParams).then((rs: DetailResponse) => {
|
||||
escrowDetail(escroDetailParams).then((rs: DetailResponse) => {
|
||||
setImportantInfo(rs.importantInfo);
|
||||
setEscrowInfo(rs.escrowInfo);
|
||||
setPaymentInfo(rs.paymentInfo);
|
||||
setTransactionInfo(rs.transactionInfo);
|
||||
setSettlementInfo(rs.settlementInfo);
|
||||
|
||||
setOrderNumber(rs.importantInfo?.ordNo);
|
||||
setTid(rs.importantInfo?.tid);
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
callDetail();
|
||||
}, []);
|
||||
|
||||
const onClickToShowMailResend = () => {
|
||||
setBottomSheetOn(true);
|
||||
};
|
||||
|
||||
const callMailResend = () => {
|
||||
let params = {
|
||||
orderNumber: orderNumber,
|
||||
tid: tid,
|
||||
};
|
||||
escrowMailResend(params).then((rs: any) => {
|
||||
console.log(rs);
|
||||
});
|
||||
};
|
||||
|
||||
const onClickToShowInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||
if(infoWrapKey === InfoWrapKeys.Amount){
|
||||
@@ -136,9 +159,20 @@ export const EscrowDetailPage = () => {
|
||||
<div className="txn-divider"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ () => onClickToShowMailResend() }
|
||||
>메일 재발송</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<EscrowMailResendBottomSheet
|
||||
setBottomSheetOn={ setBottomSheetOn }
|
||||
bottomSheetOn={ bottomSheetOn }
|
||||
callMailResend={ callMailResend }
|
||||
></EscrowMailResendBottomSheet>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user