|
|
@@ -40,6 +40,7 @@ const Index = () => { |
|
|
|
const [paymentData, setPaymentData] = React.useState({}); |
|
|
|
const [itemList, setItemList] = React.useState([]); |
|
|
|
// const [paymentId, setPaymentId] = React.useState(""); |
|
|
|
const [onDownload, setOnDownload] = React.useState(false); |
|
|
|
|
|
|
|
const [transactionData, setTransactionData] = React.useState({}); |
|
|
|
// const [transactionDate, setTransactionDate] = React.useState(""); |
|
|
@@ -144,8 +145,15 @@ const Index = () => { |
|
|
|
|
|
|
|
const doPrint = () => { |
|
|
|
// window.print(); |
|
|
|
setOnDownload(true) |
|
|
|
HttpUtils.fileDownload({ |
|
|
|
url: UrlUtils.GEN_PAYMENT_RECEIPT+"/"+localStorage.getItem("paymentId"), |
|
|
|
onResponse:()=>{ |
|
|
|
setOnDownload(false) |
|
|
|
}, |
|
|
|
onError:()=>{ |
|
|
|
setOnDownload(false) |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
@@ -184,6 +192,7 @@ const Index = () => { |
|
|
|
<PaymentDetails |
|
|
|
formData={paymentData} |
|
|
|
doPrint={doPrint} |
|
|
|
onDownload={onDownload} |
|
|
|
style={{ |
|
|
|
display: "flex", |
|
|
|
height: "100%", |
|
|
|