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] };
|
import { MessageChannel } from './MessageChannel';
|
||||||
type MessageChannelEdge = { node: MessageChannel };
|
|
||||||
|
|
||||||
export type ConnectedAccount = {
|
export type ConnectedAccount = {
|
||||||
id: string;
|
id: string;
|
||||||
@ -12,5 +11,6 @@ export type ConnectedAccount = {
|
|||||||
accountOwnerId: string;
|
accountOwnerId: string;
|
||||||
lastSyncHistoryId: string;
|
lastSyncHistoryId: string;
|
||||||
authFailedAt: Date | null;
|
authFailedAt: Date | null;
|
||||||
messageChannels: MessageChannelConnection;
|
messageChannels: MessageChannel[];
|
||||||
|
calendarChannels: CalendarChannel[];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
import { useNavigate } from 'react-router-dom';
|
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 { ConnectedAccount } from '@/accounts/types/ConnectedAccount';
|
||||||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
||||||
@ -49,7 +55,17 @@ export const SettingsAccountsRowDropdownMenu = ({
|
|||||||
text="Emails settings"
|
text="Emails settings"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate(
|
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();
|
closeDropdown();
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user