Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-19 18:27:57 +00:00
co-authored by renee-png
parent 41d3526b12
commit 99888be948
+8
View File
@@ -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) {