Skip to content

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

Fix tags import

Gildas Garcia6216391c3a24
diff --git a/src/components/atomic-crm/layout/useImportFromJson.ts b/src/components/atomic-crm/layout/useImportFromJson.ts
index bd112d3b..97af9f78 100644
--- a/src/components/atomic-crm/layout/useImportFromJson.ts
+++ b/src/components/atomic-crm/layout/useImportFromJson.ts
@@ -167,6 +167,7 @@ export const useImportFromJson = (): [ImportFromJsonState, ImportFunction] => {
color: colors[Math.floor(Math.random() * colors.length)],
},
});
+ idsMaps.tags[tag] = data.id;
return data.id;
}),
);
diff --git a/src/components/atomic-crm/types.ts b/src/components/atomic-crm/types.ts
index dc398d2d..7cd2284c 100644
--- a/src/components/atomic-crm/types.ts
+++ b/src/components/atomic-crm/types.ts
@@ -139,9 +139,10 @@ export type DealNote = {
} & Pick<RaRecord, "id">;
export type Tag = {
+ id: number;
name: string;
color: string;
-} & Pick<RaRecord, "id">;
+};
export type Task = {
contact_id: Identifier;