aboutsummaryrefslogtreecommitdiff
path: root/src/components/Pages/BillingPage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Pages/BillingPage.tsx')
-rw-r--r--src/components/Pages/BillingPage.tsx15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/components/Pages/BillingPage.tsx b/src/components/Pages/BillingPage.tsx
index 58fdd40..9dcb485 100644
--- a/src/components/Pages/BillingPage.tsx
+++ b/src/components/Pages/BillingPage.tsx
@@ -56,13 +56,6 @@ const BillingPage: React.FC = () => {
// update the items from AddNewItemForm
const getItems = (item: Item) => setItems([...items, item]);
- const handleSubmit = () => {
- setShowSubmitMenu(true);
- axios.post(`/api/invoices/preview`, {ID: 1010, Items: items, Transporter: transporter})
- .then(() => alert("yay"))
- .catch(() => alert("nay"));
- }
-
return (
<>
{registerItemFormVisibility &&
@@ -83,8 +76,8 @@ const BillingPage: React.FC = () => {
{showTransportForm &&
<TransportForm
setVisibility={setShowTransportForm}
- currentTransporter={transporter}
setTransporter={setTransporter}
+ currentTransporter={transporter}
/>
}
@@ -119,8 +112,12 @@ const BillingPage: React.FC = () => {
<InvoiceInfoMenu
setShowTransportForm={setShowTransportForm}
/>
+
+ <button onClick={() => setShowSubmitMenu(true)}>
+ post (experimental)
+ </button>
+
<SummaryDisplay items={items}/>
- <button onClick={handleSubmit}>post (experimental)</button>
</div>
</>
);