diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-07 15:34:04 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-07-07 15:34:04 +0530 |
commit | 177427b5821a67e141236e6aeb4db12d76b050a0 (patch) | |
tree | cbc35170fdd2e19b5f844c04486acc9150bf7e85 /src/components/Pages | |
parent | a7965136d75c97bb6e2696c46a7d4a27dc33996c (diff) |
styled and added basic functionality to TransportForm
Diffstat (limited to 'src/components/Pages')
-rw-r--r-- | src/components/Pages/BillingPage.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/Pages/BillingPage.tsx b/src/components/Pages/BillingPage.tsx index 9f98cb9..3949beb 100644 --- a/src/components/Pages/BillingPage.tsx +++ b/src/components/Pages/BillingPage.tsx @@ -9,7 +9,7 @@ import React, { useState, useEffect } from "react"; import axios from "axios"; -import { Item, Person } from "../../interfaces"; +import { Item, Person, Transport } from "../../interfaces"; import AddNewItemForm from "./../Form/Items/AddNewItemForm"; import RegisterItemForm from "./../Form/Items/RegisterItemForm"; @@ -32,6 +32,8 @@ const BillingPage: React.FC = () => { const [items, setItems] = useState<Item[]>([]); const [invoiceNumber, setInvoiceNumber] = useState<number>(1234); // get data from backend const [showTransportForm, setShowTransportForm] = useState<boolean>(false); + const [transporter, setTransporter] = useState<Transport>({Name: "", VehicleNum: "", Method: "", GSTIN: "", Builty: ""}) + console.log(transporter); const getRegisteredItems = () => axios.get(`/api/items/get-all`) @@ -72,9 +74,10 @@ const BillingPage: React.FC = () => { /> } - {showTransportForm && + {showTransportForm && <TransportForm setVisibility={setShowTransportForm} + setTransporter={setTransporter} /> } |