diff options
author | Andinus <andinus@nand.sh> | 2021-09-26 18:37:24 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-09-26 18:37:24 +0530 |
commit | 0cc2c9004b2361647796b1cb376c408b7778379c (patch) | |
tree | 05923724afb7af5803acf97217d58ecf2e1aa6b4 /client/src/components | |
parent | bb9313b142487a7810e8b8e5d53313d146a46b81 (diff) | |
download | MyMedMemoir-0cc2c9004b2361647796b1cb376c408b7778379c.tar.gz |
Alert on Record saved
Diffstat (limited to 'client/src/components')
-rw-r--r-- | client/src/components/Records.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/client/src/components/Records.tsx b/client/src/components/Records.tsx index 54dc946..68006da 100644 --- a/client/src/components/Records.tsx +++ b/client/src/components/Records.tsx @@ -39,6 +39,7 @@ const Records = ({ contract, setUserBalance, Tezos, userAddress, setStorage }: R const newStorage: any = await contract.storage(); if (newStorage) setStorage(newStorage); setUserBalance(await Tezos.tz.getBalance(userAddress)); + alert("Record Saved."); } catch (error) { console.log(error); } finally { @@ -51,26 +52,26 @@ const Records = ({ contract, setUserBalance, Tezos, userAddress, setStorage }: R <div> <form action="" method="get" className="form-apna"> <label className="labelIska">Doctor: </label> - <input type="text" className="formFields" id="form-name" + <input type="text" className="formFields" id="form-name" onChange={event => setName(event.target.value)} required/> <br/> <label className="labelIska">Date: </label> - <input type="date" className="formFields" id="form-date" + <input type="date" className="formFields" id="form-date" onChange={event => setDate(event.target.value)} required/><br/> <label className="labelIska">Age: </label> - <input type="number" className="formFields" id="form-age" + <input type="number" className="formFields" id="form-age" onChange={event => setAge(event.target.value)} required/><br/> <label className="labelIska">Height: </label> - <input type="number" className="formFields" id="form-height" + <input type="number" className="formFields" id="form-height" onChange={event => setHeight(event.target.value)} required/><br/> <label className="labelIska">Weight: </label> - <input type="number" className="formFields" id="form-date" + <input type="number" className="formFields" id="form-date" onChange={event => setWeight(event.target.value)} required/><br/> <label className="labelIska">Hospital: </label> - <input type="text" className="formFields" id="form-hospital" + <input type="text" className="formFields" id="form-hospital" onChange={event => setHospital(event.target.value)} required/><br/> <br/> - <label className="labelIska">Presciption: </label><br/> + <label className="labelIska">Prescription: </label><br/> <textarea className="formFields" id="form-prescription" onChange={event => setPrescription(event.target.value)}/><br/> <span id="form-ka-button"> @@ -83,7 +84,7 @@ const Records = ({ contract, setUserBalance, Tezos, userAddress, setStorage }: R <span> <i className="fas fa-plus"></i> Add Record </span> - )} + )} </button> </span> </form> |