diff --git a/client/src/components/Canvas/views/AdminTabs/MEDataEntry.jsx b/client/src/components/Canvas/views/AdminTabs/MEDataEntry.jsx index 18ed766..f0f5b21 100644 --- a/client/src/components/Canvas/views/AdminTabs/MEDataEntry.jsx +++ b/client/src/components/Canvas/views/AdminTabs/MEDataEntry.jsx @@ -116,12 +116,29 @@ const items = [ export function MEDataEntry() { const [value, setValue] = useState(""); const [selection, setSelection] = useState([]); + const { register, handleSubmit, + reset, watch, formState: { errors }, - } = useForm(); + } = useForm({ + defaultValues: { + id: "", + section: "", + volcano: "", + country: "", + start: "", + end: "", + type: "", + vpi10: "", + downstream: 0, + male: 0, + female: 0, + total: 0, + } + }); const onSubmit = (data) => { console.log("Form submitted:", data); @@ -184,34 +201,36 @@ export function MEDataEntry() { - + Number of people benefitting from VDAP activities, disaggregate by sex - - - - - {/* padding for checkboxes */} - Section - Volcano - Country - Start Date of Assistance - End Date of Assistance - Assistance Type - VPI10 - Downstream Population - Male - Female - Total - - + {/* */} + + + + + {/* padding for checkboxes */} + Section + Volcano + Country + Start Date of Assistance + End Date of Assistance + Assistance Type + VPI10 + Downstream Population + Male + Female + Total + + - - {rows} - - - + + {rows} + + + + {/* */} {/* Row actions aligned right */} @@ -223,8 +242,13 @@ export function MEDataEntry() { {/* Form Section */} - - + + Fill in Form @@ -237,7 +261,7 @@ export function MEDataEntry() { Start Date of Assistance: - + @@ -254,29 +278,29 @@ export function MEDataEntry() { End Date of Assistance: - + Downstream Affected Population: - + Male Population: - + Female Population: - + Total Population: - + @@ -290,7 +314,7 @@ export function MEDataEntry() { -