Skip to content

The open alternative to Salesforce, designed for AI.

Update company board card link to opportunity show page (#3557)

Thomas Trompettee6f985c681e6
diff --git a/packages/twenty-front/src/modules/companies/__stories__/CompanyChip.stories.tsx b/packages/twenty-front/src/modules/companies/__stories__/CompanyChip.stories.tsx
index 1ca09a54302..34b9e695cf6 100644
--- a/packages/twenty-front/src/modules/companies/__stories__/CompanyChip.stories.tsx
+++ b/packages/twenty-front/src/modules/companies/__stories__/CompanyChip.stories.tsx
@@ -15,16 +15,16 @@ type Story = StoryObj<typeof CompanyChip>;
export const SmallName: Story = {
args: {
- id: 'airbnb',
- name: 'Airbnb',
+ opportunityId: 'airbnb',
+ companyName: 'Airbnb',
avatarUrl: 'https://api.faviconkit.com/airbnb.com/144',
},
};
export const BigName: Story = {
args: {
- id: 'google',
- name: 'Google with a real big name to overflow the cell',
+ opportunityId: 'google',
+ companyName: 'Google with a real big name to overflow the cell',
avatarUrl: 'https://api.faviconkit.com/google.com/144',
},
};
diff --git a/packages/twenty-front/src/modules/companies/components/CompanyBoardCard.tsx b/packages/twenty-front/src/modules/companies/components/CompanyBoardCard.tsx
index e272d9e682b..c7f1d09e0e7 100644
--- a/packages/twenty-front/src/modules/companies/components/CompanyBoardCard.tsx
+++ b/packages/twenty-front/src/modules/companies/components/CompanyBoardCard.tsx
@@ -197,8 +197,8 @@ export const CompanyBoardCard = () => {
>
<StyledBoardCardHeader showCompactView={showCompactView}>
<CompanyChip
- id={company.id}
- name={company.name}
+ opportunityId={opportunity.id}
+ companyName={company.name}
avatarUrl={getLogoUrlFromDomainName(company.domainName)}
variant={EntityChipVariant.Transparent}
/>
diff --git a/packages/twenty-front/src/modules/companies/components/CompanyChip.tsx b/packages/twenty-front/src/modules/companies/components/CompanyChip.tsx
index 53312b75831..3fd8921066a 100644
--- a/packages/twenty-front/src/modules/companies/components/CompanyChip.tsx
+++ b/packages/twenty-front/src/modules/companies/components/CompanyChip.tsx
@@ -4,22 +4,22 @@ import {
} from '@/ui/display/chip/components/EntityChip';
type CompanyChipProps = {
- id: string;
- name: string;
+ opportunityId: string;
+ companyName: string;
avatarUrl?: string;
variant?: EntityChipVariant;
};
export const CompanyChip = ({
- id,
- name,
+ opportunityId,
+ companyName,
avatarUrl,
variant = EntityChipVariant.Regular,
}: CompanyChipProps) => (
<EntityChip
- entityId={id}
- linkToEntity={`/object/company/${id}`}
- name={name}
+ entityId={opportunityId}
+ linkToEntity={`/object/opportunity/${opportunityId}`}
+ name={companyName}
avatarType="squared"
avatarUrl={avatarUrl}
variant={variant}