aboutsummaryrefslogtreecommitdiff
path: root/src/components/Pages/BillingPage.tsx
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-08-08 16:11:08 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-08-08 16:11:08 +0530
commit8c906c98b2a2994286731357831ca8005ef0d73f (patch)
treefd4f7a283e230d149099fe285ae7a56cda237e64 /src/components/Pages/BillingPage.tsx
parent0f0e5f7408969fcc4473746919bb0e8aaa89947c (diff)
Added better support for saving client data
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>
</>
);