From c786ddbb82dacfcd5ef5a8aa44889880e104d83f Mon Sep 17 00:00:00 2001 From: Quentin BEY Date: Fri, 9 May 2025 13:30:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20re-enable=20mailbox=20?= =?UTF-8?q?actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code was commented but seems to work properly. --- .../components/panel/MailBoxesListView.tsx | 17 ++++++----- .../components/panel/PanelActions.tsx | 28 ++++++++++++------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/MailBoxesListView.tsx b/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/MailBoxesListView.tsx index e2ebad2..a007531 100644 --- a/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/MailBoxesListView.tsx +++ b/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/MailBoxesListView.tsx @@ -11,7 +11,8 @@ import { import { PAGE_SIZE } from '../../../conf'; import { useMailboxes } from '../../api/useMailboxes'; -// import { PanelActions } from './PanelActions'; + +import { PanelActions } from './PanelActions'; interface MailBoxesListViewProps { mailDomain: MailDomain; @@ -127,14 +128,12 @@ export function MailBoxesListView({ ); }, }, - // { - // id: 'actions', - // renderCell: ({ row }) => ( - // <> - // - // - // ), - // }, + { + id: 'actions', + renderCell: ({ row }) => ( + + ), + }, ]} isLoading={isLoading} /> diff --git a/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/PanelActions.tsx b/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/PanelActions.tsx index 899a770..ecab76c 100644 --- a/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/PanelActions.tsx +++ b/src/frontend/apps/desk/src/features/mail-domains/mailboxes/components/panel/PanelActions.tsx @@ -11,12 +11,12 @@ import { useTranslation } from 'react-i18next'; import { Box, DropButton, IconOptions, Text } from '@/components'; import { MailDomain } from '@/features/mail-domains/domains'; +import { ViewMailbox } from '@/features/mail-domains/mailboxes'; import { useUpdateMailboxStatus } from '../../api/useUpdateMailboxStatus'; -import { MailDomainMailbox } from '../../types'; interface PanelActionsProps { - mailbox: MailDomainMailbox; + mailbox: ViewMailbox; mailDomain: MailDomain; } @@ -92,24 +92,32 @@ export const PanelActions = ({ mailDomain, mailbox }: PanelActionsProps) => { {t('Disable mailbox')}} size={ModalSize.MEDIUM} + leftActions={ + + } rightActions={ - } > - - {t( - 'Are you sure you want to disable this mailbox? This action results in the deletion of the calendar, address book, etc.', - )} - + + + {t( + 'Are you sure you want to disable this mailbox? This action results in the deletion of the calendar, address book, etc.', + )} + + );