Skip to content

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

Fix code style

François Zaninottoc0ccef8b42a0
diff --git a/registry.json b/registry.json
index 016c4855..91ec4786 100644
--- a/registry.json
+++ b/registry.json
@@ -256,6 +256,10 @@
"path": "src/components/atomic-crm/providers/fakerest/dataGenerator/companies.ts",
"type": "registry:component"
},
+ {
+ "path": "src/components/atomic-crm/providers/commons/mergeContacts.ts",
+ "type": "registry:component"
+ },
{
"path": "src/components/atomic-crm/providers/commons/getContactAvatar.ts",
"type": "registry:component"
@@ -280,10 +284,6 @@
"path": "src/components/atomic-crm/providers/commons/activity.ts",
"type": "registry:component"
},
- {
- "path": "src/components/atomic-crm/providers/commons/mergeContacts.ts",
- "type": "registry:component"
- },
{
"path": "src/components/atomic-crm/notes/utils.ts",
"type": "registry:component"
diff --git a/src/components/atomic-crm/providers/fakerest/dataProvider.ts b/src/components/atomic-crm/providers/fakerest/dataProvider.ts
index 34fa98df..e60a74a3 100644
--- a/src/components/atomic-crm/providers/fakerest/dataProvider.ts
+++ b/src/components/atomic-crm/providers/fakerest/dataProvider.ts
@@ -139,7 +139,7 @@ const dataProviderWithCustomMethod: CrmDataProvider = {
getActivityLog: async (companyId?: Identifier) => {
return getActivityLog(dataProvider, companyId);
},
- signUp: async({
+ signUp: async ({
email,
password,
first_name,
@@ -158,7 +158,7 @@ const dataProviderWithCustomMethod: CrmDataProvider = {
password,
};
},
- salesCreate: async({ ...data }: SalesFormData): Promise<Sale> => {
+ salesCreate: async ({ ...data }: SalesFormData): Promise<Sale> => {
const user = await dataProvider.create("sales", {
data: {
...data,
@@ -170,7 +170,7 @@ const dataProviderWithCustomMethod: CrmDataProvider = {
...user.data,
};
},
- salesUpdate: async(
+ salesUpdate: async (
id: Identifier,
data: Partial<Omit<SalesFormData, "password">>,
): Promise<Partial<Omit<SalesFormData, "password">>> => {
@@ -189,7 +189,7 @@ const dataProviderWithCustomMethod: CrmDataProvider = {
});
return sale;
},
- isInitialized: async(): Promise<boolean> => {
+ isInitialized: async (): Promise<boolean> => {
const sales = await dataProvider.getList<Sale>("sales", {
filter: {},
pagination: { page: 1, perPage: 1 },
@@ -225,7 +225,7 @@ const dataProviderWithCustomMethod: CrmDataProvider = {
},
mergeContacts: async (sourceId: Identifier, targetId: Identifier) => {
return mergeContacts(sourceId, targetId, baseDataProvider);
- }
+ },
};
async function updateCompany(
diff --git a/src/components/atomic-crm/providers/supabase/dataProvider.ts b/src/components/atomic-crm/providers/supabase/dataProvider.ts
index b4e1bf1c..19909849 100644
--- a/src/components/atomic-crm/providers/supabase/dataProvider.ts
+++ b/src/components/atomic-crm/providers/supabase/dataProvider.ts
@@ -219,7 +219,7 @@ const dataProviderWithCustomMethods = {
async isInitialized() {
return getIsInitialized();
},
- async mergeContacts (sourceId: Identifier, targetId: Identifier) {
+ async mergeContacts(sourceId: Identifier, targetId: Identifier) {
// FIXME this should be done in a lambda function using a transaction instead
return mergeContacts(sourceId, targetId, baseDataProvider);
},