이미지 다운로드 부분 수정
This commit is contained in:
@@ -204,34 +204,36 @@ export const AmountInfoSection = ({
|
||||
userEmail?: string
|
||||
) => {
|
||||
if(!!tid){
|
||||
let params: CashReceiptReceiptDownloadParams = {
|
||||
tid: tid
|
||||
};
|
||||
cashReceiptReceiptDownload(params).then((rs: CashReceiptReceiptDownloadResponse) => {
|
||||
/*
|
||||
if(rs?.merchantInfo){
|
||||
rs.merchantInfo.merchantName = '나이스페이먼츠';
|
||||
}
|
||||
*/
|
||||
setReceiptIssueInfo(rs?.issueInfo);
|
||||
setReceiptMerchantInfo(rs?.merchantInfo);
|
||||
setReceiptTransactionInfo(rs?.transactionInfo);
|
||||
setReceiptAmountInfo(rs?.amountInfo);
|
||||
setReceiptCustomerInfo(rs?.customerInfo);
|
||||
setReceiptProductInfo(rs?.productInfo);
|
||||
if(selectedMode === DownloadSelectedMode.IMAGE){
|
||||
if(selectedMode === DownloadSelectedMode.EMAIL
|
||||
&& !!userEmail
|
||||
){
|
||||
// 추가 api 필요
|
||||
}
|
||||
else if(selectedMode === DownloadSelectedMode.IMAGE){
|
||||
let params: CashReceiptReceiptDownloadParams = {
|
||||
tid: tid
|
||||
};
|
||||
cashReceiptReceiptDownload(params).then((rs: CashReceiptReceiptDownloadResponse) => {
|
||||
/*
|
||||
if(rs?.merchantInfo){
|
||||
rs.merchantInfo.merchantName = '나이스페이먼츠';
|
||||
}
|
||||
*/
|
||||
setReceiptIssueInfo(rs?.issueInfo);
|
||||
setReceiptMerchantInfo(rs?.merchantInfo);
|
||||
setReceiptTransactionInfo(rs?.transactionInfo);
|
||||
setReceiptAmountInfo(rs?.amountInfo);
|
||||
setReceiptCustomerInfo(rs?.customerInfo);
|
||||
setReceiptProductInfo(rs?.productInfo);
|
||||
setCashReceiptSampleOn(true);
|
||||
}
|
||||
else if(selectedMode === DownloadSelectedMode.EMAIL){
|
||||
snackBar('거래확인서 다운 성공');
|
||||
}
|
||||
|
||||
}).catch((e: any) => {
|
||||
if(e.response?.data?.error?.message){
|
||||
snackBar(e.response?.data?.error?.message);
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
}).catch((e: any) => {
|
||||
if(e.response?.data?.error?.message){
|
||||
snackBar(e.response?.data?.error?.message);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user