diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue index 78b637e65..df0602a49 100644 --- a/app/javascript/dashboard/components-next/message/Message.vue +++ b/app/javascript/dashboard/components-next/message/Message.vue @@ -34,6 +34,8 @@ import UnsupportedBubble from './bubbles/Unsupported.vue'; import ContactBubble from './bubbles/Contact.vue'; import DyteBubble from './bubbles/Dyte.vue'; import LocationBubble from './bubbles/Location.vue'; +import CSATBubble from './bubbles/CSAT.vue'; +import FormBubble from './bubbles/Form.vue'; import MessageError from './MessageError.vue'; import ContextMenu from 'dashboard/modules/conversations/components/MessageContextMenu.vue'; @@ -260,6 +262,16 @@ const componentToRender = computed(() => { if (emailInboxTypes.includes(props.messageType)) return EmailBubble; } + if (props.contentType === CONTENT_TYPES.INPUT_CSAT) { + return CSATBubble; + } + + if ( + [CONTENT_TYPES.INPUT_SELECT, CONTENT_TYPES.FORM].includes(props.contentType) + ) { + return FormBubble; + } + if (props.contentType === CONTENT_TYPES.INCOMING_EMAIL) { return EmailBubble; } diff --git a/app/javascript/dashboard/components-next/message/bubbles/CSAT.vue b/app/javascript/dashboard/components-next/message/bubbles/CSAT.vue new file mode 100644 index 000000000..211840944 --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/CSAT.vue @@ -0,0 +1,45 @@ + + + + + {{ t('CONVERSATION.CSAT_REPLY_MESSAGE') }} + + + {{ t('CONVERSATION.RATING_TITLE') }} + + {{ t(rating.translationKey) }} + + + {{ t('CONVERSATION.FEEDBACK_TITLE') }} + + {{ response.feedbackMessage }} + + + diff --git a/app/javascript/dashboard/components-next/message/bubbles/Form.vue b/app/javascript/dashboard/components-next/message/bubbles/Form.vue new file mode 100644 index 000000000..0bf92a07b --- /dev/null +++ b/app/javascript/dashboard/components-next/message/bubbles/Form.vue @@ -0,0 +1,62 @@ + + + + + + + + + {{ item.label || t('CONVERSATION.RESPONSE') }} + + {{ item.title }} + + + + {{ t('CONVERSATION.NO_RESPONSE') }} + + + diff --git a/app/javascript/dashboard/i18n/locale/en/conversation.json b/app/javascript/dashboard/i18n/locale/en/conversation.json index 6e17875b0..994bc8609 100644 --- a/app/javascript/dashboard/i18n/locale/en/conversation.json +++ b/app/javascript/dashboard/i18n/locale/en/conversation.json @@ -54,6 +54,7 @@ "SUCCESS_DELETE_MESSAGE": "Message deleted successfully", "FAIL_DELETE_MESSSAGE": "Couldn't delete message! Try again", "NO_RESPONSE": "No response", + "RESPONSE": "Response", "RATING_TITLE": "Rating", "FEEDBACK_TITLE": "Feedback", "REPLY_MESSAGE_NOT_FOUND": "Message not available",