Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Fix import

React-Admin CI83895856e4e7
diff --git a/src/components/atomic-crm/misc/useImportFromJson.ts b/src/components/atomic-crm/misc/useImportFromJson.ts
index 562ad258..b2dcb107 100644
--- a/src/components/atomic-crm/misc/useImportFromJson.ts
+++ b/src/components/atomic-crm/misc/useImportFromJson.ts
@@ -229,7 +229,6 @@ export const useImportFromJson = (): [
? idsMaps.sales[dataToImport.sales_id]
: currentSale.id,
created_at: dataToImport.created_at,
- updated_at: dataToImport.updated_at,
},
});
@@ -314,8 +313,6 @@ export const useImportFromJson = (): [
? idsMaps.sales[dataToImport.sales_id]
: currentSale.id,
tags: tagsIds,
- created_at: dataToImport.created_at,
- updated_at: dataToImport.updated_at,
last_seen: dataToImport.updated_at,
},
});
@@ -403,8 +400,6 @@ export const useImportFromJson = (): [
text: dataToImport.text,
date: dataToImport.date,
attachments,
- created_at: dataToImport.created_at,
- updated_at: dataToImport.updated_at,
},
});
setState((old) => ({
@@ -471,8 +466,6 @@ export const useImportFromJson = (): [
text: dataToImport.text,
due_date: dataToImport.due_date || undefined,
done_date: dataToImport.done_date || undefined,
- created_at: dataToImport.created_at,
- updated_at: dataToImport.updated_at,
},
});
setState((old) => ({
diff --git a/supabase/migrations/20260129161921_contact_last_seen_from_notes.sql b/supabase/migrations/20260129161921_contact_last_seen_from_notes.sql
index 900158b0..b07f15e5 100644
--- a/supabase/migrations/20260129161921_contact_last_seen_from_notes.sql
+++ b/supabase/migrations/20260129161921_contact_last_seen_from_notes.sql
@@ -7,12 +7,10 @@ CREATE OR REPLACE FUNCTION public.handle_contact_note_created_or_updated()
SET search_path TO ''
AS $function$
begin
- update public.contacts set public.contacts.last_seen = new.updated_at where public.contacts.id = new.date;
+ update public.contacts set public.contacts.last_seen = new.date where public.contacts.id = new.contact_id;
return new;
end;
$function$
;
CREATE TRIGGER on_public_contact_notes_created_or_updated AFTER INSERT ON public.contact_notes FOR EACH ROW EXECUTE FUNCTION public.handle_contact_note_created_or_updated();
-
-