diff --git a/src/components/automations/automation-editor-dialog.tsx b/src/components/automations/automation-editor-dialog.tsx index 383f2bf..0c03a39 100644 --- a/src/components/automations/automation-editor-dialog.tsx +++ b/src/components/automations/automation-editor-dialog.tsx @@ -19,6 +19,7 @@ import { Select, SelectContent, SelectEmptyState, SelectItem, SelectTrigger, Sel import { Separator } from "@/components/ui/separator" import { Switch } from "@/components/ui/switch" import { Textarea } from "@/components/ui/textarea" +import { EmailActionConfig } from "@/components/automations/email-action-config" type AutomationRow = { id: Id<"ticketAutomations"> @@ -848,7 +849,19 @@ export function AutomationEditorDialog({
- {actions.map((a) => ( + {actions.map((a) => + a.type === "SEND_EMAIL" ? ( +
+ + setActions((prev) => prev.map((item) => (item.id === a.id ? updated : item))) + } + onRemove={() => handleRemoveAction(a.id)} + agents={(agents ?? []).map((u) => ({ _id: String(u._id), name: u.name }))} + /> +
+ ) : (
@@ -1043,144 +1056,6 @@ export function AutomationEditorDialog({ )} - ) : a.type === "SEND_EMAIL" ? ( -
-
- - - setActions((prev) => prev.map((item) => (item.id === a.id ? { ...item, subject: e.target.value } : item))) - } - placeholder="Ex.: Atualização do chamado #{{ticket.reference}}" - /> -
-
- -