Skip to content

Commit

Permalink
Allowing to open option for an opportunity on company record.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush-23 committed Mar 9, 2024
1 parent 40bea0d commit 8530370
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ export const RecordDetailRelationRecordsListItem = ({
await deleteOneRelationRecord(relationRecord.id);
};

const isOpportunityCompanyRelation =
(objectMetadataNameSingular === CoreObjectNameSingular.Opportunity &&
relationObjectMetadataNameSingular === CoreObjectNameSingular.Company) ||
(objectMetadataNameSingular === CoreObjectNameSingular.Company &&
relationObjectMetadataNameSingular ===
CoreObjectNameSingular.Opportunity);

const isAccountOwnerRelation =
relationObjectMetadataNameSingular ===
CoreObjectNameSingular.WorkspaceMember;
Expand All @@ -118,8 +111,7 @@ export const RecordDetailRelationRecordsListItem = ({
record={relationRecord}
objectNameSingular={relationObjectMetadataItem.nameSingular}
/>
{/* TODO: temporary to prevent removing a company from an opportunity */}
{!isOpportunityCompanyRelation && (
{
<DropdownScope dropdownScopeId={dropdownScopeId}>
<Dropdown
dropdownId={dropdownScopeId}
Expand Down Expand Up @@ -153,7 +145,7 @@ export const RecordDetailRelationRecordsListItem = ({
}}
/>
</DropdownScope>
)}
}
</StyledListItem>
);
};

0 comments on commit 8530370

Please sign in to comment.