The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix: Restoring record results in blank line in TimelineActivity (#11679) (#11856)
Rohan Hazariee1fe3564a99
diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsxindex 69ca9ec6aff..7e4afb038e8 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsx@@ -3,6 +3,7 @@ import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';import {IconCirclePlus,IconEditCircle,+ IconRestore,IconTrash,useIcons,} from 'twenty-ui/display';@@ -26,6 +27,9 @@ export const EventIconDynamicComponent = ({if (eventAction === 'deleted') {return <IconTrash />;}+ if (eventAction === 'restored') {+ return <IconRestore />;+ }const IconComponent = getIcon(linkedObjectMetadataItem?.icon);diff --git a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsxindex 88b6c4881f4..10127804703 100644--- a/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx+++ b/packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx@@ -5,6 +5,7 @@ import {} from '@/activities/timeline-activities/rows/components/EventRowDynamicComponent';import { EventRowMainObjectUpdated } from '@/activities/timeline-activities/rows/main-object/components/EventRowMainObjectUpdated';import styled from '@emotion/styled';+import { t } from '@lingui/core/macro';import { MOBILE_VIEWPORT } from 'twenty-ui/theme';type EventRowMainObjectProps = EventRowDynamicComponentProps;@@ -57,7 +58,7 @@ export const EventRowMainObject = ({{labelIdentifierValue}</StyledEventRowItemColumn><StyledEventRowItemAction>- was created by+ {t`was created by`}</StyledEventRowItemAction><StyledEventRowItemColumn>{authorFullName}@@ -88,7 +89,27 @@ export const EventRowMainObject = ({{labelIdentifierValue}</StyledEventRowItemColumn><StyledEventRowItemAction>- was deleted by+ {t`was deleted by`}+ </StyledEventRowItemAction>+ <StyledEventRowItemColumn>+ {authorFullName}+ </StyledEventRowItemColumn>+ </StyledRow>+ <StyledItemTitleDate>{createdAt}</StyledItemTitleDate>+ </StyledRowContainer>+ </StyledMainContainer>+ );+ }+ case 'restored': {+ return (+ <StyledMainContainer>+ <StyledRowContainer>+ <StyledRow>+ <StyledEventRowItemColumn>+ {labelIdentifierValue}+ </StyledEventRowItemColumn>+ <StyledEventRowItemAction>+ {t`was restored by`}</StyledEventRowItemAction><StyledEventRowItemColumn>{authorFullName}