Skip to content

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

Fix on-the-fly company creation

François Zaninottoaf5e25a11069
diff --git a/src/components/atomic-crm/companies/AutocompleteCompanyInput.tsx b/src/components/atomic-crm/companies/AutocompleteCompanyInput.tsx
index 13750a3c..a5b6ad2d 100644
--- a/src/components/atomic-crm/companies/AutocompleteCompanyInput.tsx
+++ b/src/components/atomic-crm/companies/AutocompleteCompanyInput.tsx
@@ -33,6 +33,7 @@ export const AutocompleteCompanyInput = () => {
helperText={false}
onCreate={handleCreateCompany}
createItemLabel="Create %{item}"
+ createLabel="Start typing to create a new company"
/>
);
};
diff --git a/src/components/atomic-crm/contacts/ContactInputs.tsx b/src/components/atomic-crm/contacts/ContactInputs.tsx
index 8fe87fe5..787f7808 100644
--- a/src/components/atomic-crm/contacts/ContactInputs.tsx
+++ b/src/components/atomic-crm/contacts/ContactInputs.tsx
@@ -67,7 +67,7 @@ const ContactPositionInputs = () => {
<div className="flex flex-col gap-4">
<h6 className="text-lg font-semibold">Position</h6>
<TextInput source="title" helperText={false} />
- <ReferenceInput source="company_id" reference="companies">
+ <ReferenceInput source="company_id" reference="companies" perPage={10}>
<AutocompleteCompanyInput />
</ReferenceInput>
</div>