From b2642dee763627b6889aadc4bbfcd201abbdd498 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Tue, 31 Aug 2021 13:12:47 +0530 Subject: Added half support to add different shipping address --- src/components/Form/People/RegisterPersonForm.tsx | 121 ++++++++++++++++++---- 1 file changed, 98 insertions(+), 23 deletions(-) (limited to 'src/components/Form/People/RegisterPersonForm.tsx') diff --git a/src/components/Form/People/RegisterPersonForm.tsx b/src/components/Form/People/RegisterPersonForm.tsx index dedc45a..3fc8b32 100644 --- a/src/components/Form/People/RegisterPersonForm.tsx +++ b/src/components/Form/People/RegisterPersonForm.tsx @@ -21,12 +21,15 @@ const RegisterPersonForm: React.FC = (props) => { const [newPersonPhone, setNewPersonPhone] = useState(""); const [newPersonEmail, setNewPersonEmail] = useState(""); + const [shipToBillAddress, setShipToBillAddress] = useState(true); + const [newPersonBillAddressLine, setNewPersonBillAddressLine] = useState(""); const [newPersonBillCity, setNewPersonBillCity] = useState(""); const [newPersonBillState, setNewPersonBillState] = useState(""); const [newPersonBillPINCode, setNewPersonBillPINCode] = useState(""); const [newPersonBillCountry, setNewPersonBillCountry] = useState(""); + const hideSelf = () => props.setVisibility(false); const closeOnBGClicked = (event: any) => @@ -80,29 +83,32 @@ const RegisterPersonForm: React.FC = (props) => {
- - - - - +

Client Details

+
+ + + + + +
@@ -149,6 +155,75 @@ const RegisterPersonForm: React.FC = (props) => {
+ {shipToBillAddress || // TODO: Make it store different data + // TODO: maybe move it to its own prop +
+

Shipping Address

+ + + + + + + + + + +
+ } + +
+ + + +
+
hideSelf()} /> -- cgit v1.2.3