From 0b4343bed2cace86552929f25202680c0d99c541 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 10 Oct 2022 22:45:28 +0530 Subject: added ItemTable for the invoice page --- src/views/invoice/new.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/views/invoice/new.js') diff --git a/src/views/invoice/new.js b/src/views/invoice/new.js index 57f3094..70bc545 100644 --- a/src/views/invoice/new.js +++ b/src/views/invoice/new.js @@ -17,6 +17,7 @@ import ClientPicker from '../../components/pickers/client-picker'; import ItemPicker from '../../components/pickers/item-picker'; +import ItemTable from '../../components/tables/invoice-item-table'; import { InvoiceClient } from '../../classes/client'; @@ -25,6 +26,7 @@ import { useState, useEffect } from 'react'; const NewInvoicePage = () => { const [client, setClient] = useState(new InvoiceClient()); const [shippingAddressId, setShippingAddressId] = useState(-1); + const [items, setItems] = useState([]); useEffect(() => { setShippingAddressId(-1); @@ -37,7 +39,12 @@ const NewInvoicePage = () => { setClient={setClient} shippingAddressId={shippingAddressId} setShippingAddressId={setShippingAddressId}/> - + setItems(prev => [...prev, item])} /> + ); } -- cgit v1.2.3