From 8c906c98b2a2994286731357831ca8005ef0d73f Mon Sep 17 00:00:00 2001
From: MikunoNaka <bokuwakanojogahoshii@yahoo.com>
Date: Sun, 8 Aug 2021 16:11:08 +0530
Subject: Added better support for saving client data

---
 src/components/Form/Document/DocumentInfoForm.tsx | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

(limited to 'src/components/Form/Document/DocumentInfoForm.tsx')

diff --git a/src/components/Form/Document/DocumentInfoForm.tsx b/src/components/Form/Document/DocumentInfoForm.tsx
index 6135b33..2d7dcd9 100644
--- a/src/components/Form/Document/DocumentInfoForm.tsx
+++ b/src/components/Form/Document/DocumentInfoForm.tsx
@@ -25,12 +25,31 @@ interface Props {
 }
 
 const DocumentInfoForm: React.FC<Props> = (props) => {
+  const dummyPerson: Person = {
+    Name: "",
+    Address: "",
+    Phone: "",
+    Email: "",
+    
+    BillAddress: {
+      AddressLine: "",
+      City: "",
+      State: "",
+      PINCode: "",
+      Country: "India" // TODO: Get default from server
+    }
+  }
+
   const [invoiceNumber, setInvoiceNumber] = useState<number>(props.invoiceNumber);
   const [invoiceDate, setInvoiceDate] = useState(new Date());
+  const [selectedClient, setSelectedClient] = useState<Person>(dummyPerson);
+
   return (
     <div className={"DocumentInfoForm"}>
       <SelectClientForm 
         savedPeople={props.savedPeople}
+        selectedClient={selectedClient}
+        setSelectedClient={setSelectedClient}
       />
 
       <div className={"documentInfoChild"}>
-- 
cgit v1.2.3

