From 99888be9482ea7cfb45f53b0f9b60e89484c6ca6 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2026 18:27:57 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/routes/archive.index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/routes/archive.index.tsx b/src/routes/archive.index.tsx index b5d8b1a..4830103 100644 --- a/src/routes/archive.index.tsx +++ b/src/routes/archive.index.tsx @@ -171,6 +171,10 @@ function ArchivePage() { }, [rows]); const deleteRow = async (id: string) => { + if (isLocked) { + toast.error("Tab is locked. Unlock it to delete records."); + return; + } if (!confirm("Delete this record?")) return; const { error } = await supabase.from("archive_records").delete().eq("id", id); if (error) { @@ -184,6 +188,10 @@ function ArchivePage() { const deleteAllInCategory = async () => { if (!activeCategory) return; + if (isLocked) { + toast.error("Tab is locked. Unlock it to clear records."); + return; + } if (!confirm(`Delete ALL ${totalCount} records in "${activeCategory.label}"? This cannot be undone.`)) return; const { error } = await supabase.from("archive_records").delete().eq("category_id", activeCategory.id); if (error) {