Skip to content

The open alternative to Salesforce, designed for AI.

feat: add Calendar tab to Show Page Activities panel (#4309)

Thaïsa8575fbe2fc4
diff --git a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx
index 8838967446e..678a3b2757a 100644
--- a/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx
+++ b/packages/twenty-front/src/modules/ui/layout/show-page/components/ShowPageRightContainer.tsx
@@ -11,6 +11,7 @@ import { ActivityTargetableObject } from '@/activities/types/ActivityTargetableE
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
import {
+ IconCalendarEvent,
IconCheckbox,
IconMail,
IconNotes,
@@ -20,6 +21,7 @@ import {
import { TabList } from '@/ui/layout/tab/components/TabList';
import { useTabList } from '@/ui/layout/tab/hooks/useTabList';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
+import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
const StyledShowPageRightContainer = styled.div`
display: flex;
@@ -67,6 +69,7 @@ export const ShowPageRightContainer = ({
objectNameSingular: targetableObject.targetObjectNameSingular,
});
+ const shouldDisplayCalendarTab = useIsFeatureEnabled('IS_CALENDAR_ENABLED');
const shouldDisplayEmailsTab =
(emails &&
targetableObject.targetObjectNameSingular ===
@@ -106,6 +109,12 @@ export const ShowPageRightContainer = ({
hide: !shouldDisplayEmailsTab,
hasBetaPill: true,
},
+ {
+ id: 'calendar',
+ title: 'Calendar',
+ Icon: IconCalendarEvent,
+ hide: !shouldDisplayCalendarTab,
+ },
];
return (