Fixed notes var

This commit is contained in:
2023-02-09 19:18:13 -05:00
parent 1d1ebfe236
commit b788dc0623
+5 -5
View File
@@ -34,7 +34,7 @@ export default function AddEditReminder({ className }) {
const [reminder, setReminder]=useState({
'member_id': localStorage.getItem('member_id'),
description: location.state?.reminder.description || '',
note: location.state?.reminder.note || '',
notes: location.state?.reminder.notes || '',
category: location.state?.reminder.code || '',
mode: location.state?.reminder.code || '',
'start_date': location.state? new Date(location.state?.reminder.start_date) : startDate,
@@ -72,9 +72,9 @@ export default function AddEditReminder({ className }) {
}
setSuccess(true)
setMessage({status: true, message: ''})
let {description, note, category, mode} = reminder
let {description, notes, category, mode} = reminder
//CHECKING IF AN EMPTY FIELD WAS PASSED
if(!description || !note || !category || !mode){
if(!description || !notes || !category || !mode){
setSuccess(false)
setMessage({status: false, message: 'All fields must be filled'})
return
@@ -206,8 +206,8 @@ export default function AddEditReminder({ className }) {
<div className="input-field mt-2">
<div className="input-wrapper w-full ">
<textarea
name='note'
value={reminder.note}
name='notes'
value={reminder.notes}
placeholder="provide a detailed description of your item."
rows="7"
className="w-full h-full px-7 py-4 border border-light-purple dark:border-[#5356fb29] rounded-[20px] text-dark-gray dark:text-white bg-[#FAFAFA] dark:bg-[#11131F] focus:ring-0 focus:outline-none"