Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
f17cd022f6
commit
952009ceff
@@ -35,7 +35,7 @@ export function CaseStatusTab({ caseId }: { caseId: string }) {
|
||||
|
||||
const submit = async (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
if (!form.title.trim() || !form.body.trim()) { toast.error("Title and body required"); return; }
|
||||
if (!form.title.trim() || !form.body.trim()) { toast.error("Date/time and details required"); return; }
|
||||
setSubmitting(true);
|
||||
const { error } = await supabase.from("status_updates").insert({
|
||||
case_id: caseId,
|
||||
@@ -45,7 +45,7 @@ export function CaseStatusTab({ caseId }: { caseId: string }) {
|
||||
});
|
||||
setSubmitting(false);
|
||||
if (error) toast.error(error.message);
|
||||
else { toast.success("Update logged"); setShowForm(false); setForm({ title: "", body: "" }); load(); }
|
||||
else { toast.success("Update logged"); setShowForm(false); setForm({ title: nowLocal(), body: "" }); load(); }
|
||||
};
|
||||
|
||||
const del = async (item: any) => {
|
||||
|
||||
Reference in New Issue
Block a user