diff --git a/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewConversationForm.vue b/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewConversationForm.vue index c9f4db3c4..828669bcf 100644 --- a/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewConversationForm.vue +++ b/app/javascript/dashboard/components-next/NewConversation/components/ComposeNewConversationForm.vue @@ -128,6 +128,8 @@ const newMessagePayload = () => { currentUser: props.currentUser, attachedFiles, directUploadsEnabled: props.isDirectUploadsEnabled, + sendWithSignature: props.sendWithSignature, + messageSignature: props.messageSignature, }); }; diff --git a/app/javascript/dashboard/components-next/NewConversation/helpers/composeConversationHelper.js b/app/javascript/dashboard/components-next/NewConversation/helpers/composeConversationHelper.js index 482988581..0bf542657 100644 --- a/app/javascript/dashboard/components-next/NewConversation/helpers/composeConversationHelper.js +++ b/app/javascript/dashboard/components-next/NewConversation/helpers/composeConversationHelper.js @@ -1,5 +1,6 @@ import { INBOX_TYPES } from 'dashboard/helper/inbox'; import { getInboxIconByType } from 'dashboard/helper/inbox'; +import { appendSignature } from 'dashboard/helper/editorHelper'; import camelcaseKeys from 'camelcase-keys'; import ContactAPI from 'dashboard/api/contacts'; @@ -129,12 +130,29 @@ export const prepareNewMessagePayload = ({ currentUser, attachedFiles = [], directUploadsEnabled = false, + sendWithSignature = false, + messageSignature = '', }) => { + let finalMessage = message; + if (sendWithSignature && messageSignature) { + const { signature_position, signature_separator } = + currentUser?.ui_settings || {}; + const signatureSettings = { + position: signature_position || 'top', + separator: signature_separator || 'blank', + }; + finalMessage = appendSignature( + message, + messageSignature, + signatureSettings + ); + } + const payload = { inboxId: targetInbox.id, sourceId: targetInbox.sourceId, contactId: Number(selectedContact.id), - message: { content: message }, + message: { content: finalMessage }, assigneeId: currentUser.id, }; diff --git a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue index 00a5c201d..7079127d6 100644 --- a/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue +++ b/app/javascript/dashboard/components/widgets/conversation/ReplyBox.vue @@ -1162,21 +1162,6 @@ export default { @play="recordingAudioState = 'playing'" @pause="recordingAudioState = 'paused'" /> -
-
- {{ $t('CONVERSATION.FOOTER.SIGNATURE_LABEL_TOP') }} -
-
-
- {{ signatureSeparator }} -
-
-
-
- {{ $t('CONVERSATION.FOOTER.SIGNATURE_LABEL_BOTTOM') }} -
-
- {{ signatureSeparator }} -
-
-