summary refs log tree commit diff stats
path: root/client/src/components
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-09-26 18:37:24 +0530
committerAndinus <andinus@nand.sh>2021-09-26 18:37:24 +0530
commit0cc2c9004b2361647796b1cb376c408b7778379c (patch)
tree05923724afb7af5803acf97217d58ecf2e1aa6b4 /client/src/components
parentbb9313b142487a7810e8b8e5d53313d146a46b81 (diff)
downloadMyMedMemoir-0cc2c9004b2361647796b1cb376c408b7778379c.tar.gz
Alert on Record saved
Diffstat (limited to 'client/src/components')
-rw-r--r--client/src/components/Records.tsx17
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:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </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: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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:&nbsp;</label>&nbsp;&nbsp;&nbsp;
-          <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>&nbsp; Add Record
               </span>
-            )}   
+            )}
           </button>
           </span>
       </form>