mirror of
https://github.com/rustmailer/rustmailer.git
synced 2026-08-18 16:01:07 +00:00
fix(account): open correct edit modal based on mailer_type (ImapSmtp / GmailApi)
This commit is contained in:
@@ -183,9 +183,10 @@ export function AccountDetailDrawer({ open, onOpenChange, currentRow }: Props) {
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div> : <div className="mt-4 text-muted-foreground">
|
||||
</div> : <div className="mt-48 text-center text-muted-foreground">
|
||||
No IMAP/SMTP configuration required (using {currentRow.mailer_type}).
|
||||
</div>}
|
||||
</div>
|
||||
}
|
||||
</TabsContent>
|
||||
|
||||
{/* Sync Folders Tab */}
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { useAccountContext } from '../context'
|
||||
import { AccountEntity } from '../data/schema'
|
||||
import { AccountEntity, MailerType } from '../data/schema'
|
||||
import { Mailbox, MessageSquareMore } from 'lucide-react'
|
||||
|
||||
interface DataTableRowActionsProps {
|
||||
@@ -42,7 +42,14 @@ export function DataTableRowActions({ row }: DataTableRowActionsProps) {
|
||||
<DropdownMenuItem
|
||||
onClick={() => {
|
||||
setCurrentRow(row.original)
|
||||
setOpen('edit')
|
||||
switch (row.original.mailer_type) {
|
||||
case MailerType.ImapSmtp:
|
||||
setOpen("imap-smtp-edit");
|
||||
break;
|
||||
case MailerType.GmailApi:
|
||||
setOpen("gmail-api-edit");
|
||||
break;
|
||||
}
|
||||
}}
|
||||
>
|
||||
Edit
|
||||
|
||||
Reference in New Issue
Block a user