Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-16 22:59:38 +00:00
co-authored by renee-png
parent 3eb2209e3b
commit 758611b1b9
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ function CaseDetail() {
const updateStatus = async (status: string) => {
const { error } = await supabase
.from("cases")
.update({ status, closed_at: status.startsWith("closed") ? new Date().toISOString().slice(0, 10) : null })
.update({ status: status as "active" | "closed" | "closed_lost" | "closed_won" | "intake" | "on_hold", closed_at: status.startsWith("closed") ? new Date().toISOString().slice(0, 10) : null })
.eq("id", caseId);
if (error) toast.error("Could not update", { description: error.message });
else {