The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Clarify non-implemented calendar layouts (#16937)
Weikoe83b9c9eb6fa
diff --git a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsx b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsxindex 94c1e217c72..4275b505f6b 100644--- a/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsx+++ b/packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownCalendarViewContent.tsx@@ -12,6 +12,7 @@ import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hoimport { useUpdateCurrentView } from '@/views/hooks/useUpdateCurrentView';import { t } from '@lingui/core/macro';import { useRecoilValue, useSetRecoilState } from 'recoil';+import { Pill } from 'twenty-ui/components';import {IconCalendarMonth,IconCalendarWeek,@@ -81,6 +82,8 @@ export const ObjectOptionsDropdownCalendarViewContent = () => {text={t`Week`}selected={recordIndexCalendarLayout === ViewCalendarLayout.WEEK}focused={selectedItemId === ViewCalendarLayout.WEEK}+ contextualText={<Pill label={t`Soon`} />}+ contextualTextPosition="right"disabled/></SelectableListItem>@@ -105,6 +108,8 @@ export const ObjectOptionsDropdownCalendarViewContent = () => {text={t`Timeline`}selected={recordIndexCalendarLayout === ViewCalendarLayout.DAY}focused={selectedItemId === ViewCalendarLayout.DAY}+ contextualText={<Pill label={t`Soon`} />}+ contextualTextPosition="right"disabled/></SelectableListItem>diff --git a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsxindex 1826e7d8afa..01b58b1fb79 100644--- a/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx+++ b/packages/twenty-front/src/modules/object-record/record-calendar/components/RecordCalendarTopBar.tsx@@ -1,9 +1,7 @@import { RecordCalendarComponentInstanceContext } from '@/object-record/record-calendar/states/contexts/RecordCalendarComponentInstanceContext';import { recordCalendarSelectedDateComponentState } from '@/object-record/record-calendar/states/recordCalendarSelectedDateComponentState';-import { recordIndexCalendarLayoutState } from '@/object-record/record-index/states/recordIndexCalendarLayoutState';import { DatePickerWithoutCalendar } from '@/ui/input/components/internal/date/components/DatePickerWithoutCalendar';import { TimeZoneAbbreviation } from '@/ui/input/components/internal/date/components/TimeZoneAbbreviation';-import { Select } from '@/ui/input/components/Select';import { SelectControl } from '@/ui/input/components/SelectControl';import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';@@ -14,7 +12,6 @@ import { useRecoilComponentState } from '@/ui/utilities/state/component-state/hoimport styled from '@emotion/styled';import { t } from '@lingui/core/macro';import { format } from 'date-fns';-import { useRecoilValue } from 'recoil';import { Temporal } from 'temporal-polyfill';import { type Nullable } from 'twenty-shared/types';import {@@ -23,7 +20,6 @@ import {} from 'twenty-shared/utils';import { IconChevronLeft, IconChevronRight } from 'twenty-ui/display';import { Button } from 'twenty-ui/input';-import { ViewCalendarLayout } from '~/generated/graphql';const StyledContainer = styled.div`align-items: center;@@ -55,10 +51,6 @@ export const RecordCalendarTopBar = () => {RecordCalendarComponentInstanceContext,);- const recordIndexCalendarLayout = useRecoilValue(- recordIndexCalendarLayoutState,- );-const [recordCalendarSelectedDate, setRecordCalendarSelectedDate] =useRecoilComponentState(recordCalendarSelectedDateComponentState);@@ -98,27 +90,6 @@ export const RecordCalendarTopBar = () => {return (<StyledContainer><StyledLeftSection>- <Select- dropdownId={`record-calendar-top-bar-layout-select-${recordCalendarId}`}- selectSizeVariant="small"- options={[- {- label: t`Month`,- value: ViewCalendarLayout.MONTH,- },- {- label: t`Week`,- value: ViewCalendarLayout.WEEK,- },- {- label: t`Timeline`,- value: ViewCalendarLayout.DAY,- },- ]}- disabled- value={recordIndexCalendarLayout}- onChange={() => {}}- /><DropdowndropdownId={datePickerDropdownId}clickableComponent={