diff --git a/frontend/src/components/Activities.vue b/frontend/src/components/Activities.vue index 5b7befc4..9ec46bd5 100644 --- a/frontend/src/components/Activities.vue +++ b/frontend/src/components/Activities.vue @@ -370,10 +370,17 @@ +
@@ -689,6 +696,7 @@ import EmailAtIcon from '@/components/Icons/EmailAtIcon.vue' import InboundCallIcon from '@/components/Icons/InboundCallIcon.vue' import OutboundCallIcon from '@/components/Icons/OutboundCallIcon.vue' import ReplyIcon from '@/components/Icons/ReplyIcon.vue' +import ReplyAllIcon from '@/components/Icons/ReplyAllIcon.vue' import AttachmentItem from '@/components/AttachmentItem.vue' import CommunicationArea from '@/components/CommunicationArea.vue' import NoteModal from '@/components/Modals/NoteModal.vue' @@ -1007,10 +1015,26 @@ function updateTaskStatus(status, task) { } // Email -function reply(message) { +function reply(email, reply_all = false) { emailBox.value.show = true - let editor = emailBox.value.editor.editor - editor + let editor = emailBox.value.editor + let message = email.content + let recipients = email.recipients.split(',').map((r) => r.trim()) + editor.toEmails = recipients + editor.cc = editor.bcc = false + + if (reply_all) { + let cc = email.cc?.split(',').map((r) => r.trim()) + let bcc = email.bcc?.split(',').map((r) => r.trim()) + + editor.cc = cc ? true : false + editor.bcc = bcc ? true : false + + editor.ccEmails = cc + editor.bccEmails = bcc + } + + editor.editor .chain() .clearContent() .insertContent(message) diff --git a/frontend/src/components/Icons/ReplyAllIcon.vue b/frontend/src/components/Icons/ReplyAllIcon.vue new file mode 100644 index 00000000..d42e807f --- /dev/null +++ b/frontend/src/components/Icons/ReplyAllIcon.vue @@ -0,0 +1,16 @@ +