4798-feat(front): Add calendar settings option in settings account dropdown (#4997)
Closes #4798  --------- Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
import { MessageChannel } from './MessageChannel';
|
||||
import { CalendarChannel } from '@/accounts/types/CalendarChannel';
|
||||
|
||||
type MessageChannelConnection = { edges: [MessageChannelEdge] };
|
||||
type MessageChannelEdge = { node: MessageChannel };
|
||||
import { MessageChannel } from './MessageChannel';
|
||||
|
||||
export type ConnectedAccount = {
|
||||
id: string;
|
||||
@ -12,5 +11,6 @@ export type ConnectedAccount = {
|
||||
accountOwnerId: string;
|
||||
lastSyncHistoryId: string;
|
||||
authFailedAt: Date | null;
|
||||
messageChannels: MessageChannelConnection;
|
||||
messageChannels: MessageChannel[];
|
||||
calendarChannels: CalendarChannel[];
|
||||
};
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { IconDotsVertical, IconMail, IconRefresh, IconTrash } from 'twenty-ui';
|
||||
import {
|
||||
IconCalendarEvent,
|
||||
IconDotsVertical,
|
||||
IconMail,
|
||||
IconRefresh,
|
||||
IconTrash,
|
||||
} from 'twenty-ui';
|
||||
|
||||
import { ConnectedAccount } from '@/accounts/types/ConnectedAccount';
|
||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||
@ -49,7 +55,17 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
text="Emails settings"
|
||||
onClick={() => {
|
||||
navigate(
|
||||
`/settings/accounts/emails/${account.messageChannels.edges[0].node.id}`,
|
||||
`/settings/accounts/emails/${account.messageChannels[0].id}`,
|
||||
);
|
||||
closeDropdown();
|
||||
}}
|
||||
/>
|
||||
<MenuItem
|
||||
LeftIcon={IconCalendarEvent}
|
||||
text="Calendar settings"
|
||||
onClick={() => {
|
||||
navigate(
|
||||
`/settings/accounts/calendars/${account.calendarChannels[0].id}`,
|
||||
);
|
||||
closeDropdown();
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user