Fixes issue #11679 There were no case of restored so it was defaulting to null thus showing the blank line Handled case for restored so it doesn't default to null Image shows record restored by the user and restored by other user  --------- Co-authored-by: prastoin <paul@twenty.com>
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
@ -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}
|
||||
|
||||
Reference in New Issue
Block a user