-
- {{ whatsapp.reaction }}
-
-
-
-
-
![]()
openFileInAnotherTab(whatsapp.attach)"
- />
+
-
-
openFileInAnotherTab(whatsapp.attach)"
- />
- Document
-
-
-
-
+ class="absolute -right-0.5 -top-0.5 flex cursor-pointer gap-1 rounded-full bg-white pb-2 pl-2 pr-1.5 pt-1.5 opacity-0 group-hover/message:opacity-100"
+ :style="{
+ background:
+ 'radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 35%, rgba(238, 130, 238, 0) 100%)',
+ }"
+ >
+
+
+
+
-
-
-
-
- {{ dateFormat(whatsapp.creation, 'hh:mm a') }}
+ class="absolute -bottom-5 flex gap-1 rounded-full border bg-white p-1 pb-[3px] shadow-sm"
+ v-if="whatsapp.reaction"
+ >
+
+ {{ whatsapp.reaction }}
-
-
-
+
+
+
![]()
openFileInAnotherTab(whatsapp.attach)"
/>
-
+
+
openFileInAnotherTab(whatsapp.attach)"
+ />
+ Document
+
+
+
+
+
+
+ {{ dateFormat(whatsapp.creation, 'hh:mm a') }}
+
+
+
+
+
+
+
{
+ replyMode.value = true
+ reply.value = message
+ },
+ },
+ // {
+ // label: 'Forward',
+ // onClick: () => console.log('Forward'),
+ // },
+ // {
+ // label: 'Delete',
+ // onClick: () => console.log('Delete'),
+ // },
+ ]
+}
diff --git a/frontend/src/components/WhatsAppBox.vue b/frontend/src/components/WhatsAppBox.vue
index 2da9fdf4..7966bf75 100644
--- a/frontend/src/components/WhatsAppBox.vue
+++ b/frontend/src/components/WhatsAppBox.vue
@@ -1,4 +1,12 @@
+
+
+ {{ reply.message }}
+
+
+
uploadFile(file)">
@@ -28,7 +36,7 @@
>
@@ -68,6 +76,7 @@ const props = defineProps({
const doc = defineModel()
const whatsapp = defineModel('whatsapp')
+const reply = defineModel('reply')
const rows = ref(1)
const textarea = ref(null)
const emoji = ref('')
@@ -104,12 +113,14 @@ async function sendWhatsAppMessage() {
message: content.value,
to: doc.value.data.mobile_no,
attach: whatsapp.value.attach || '',
+ reply_to: reply.value?.name || '',
content_type: whatsapp.value.content_type,
}
content.value = ''
fileType.value = ''
whatsapp.value.attach = ''
whatsapp.value.content_type = 'text'
+ reply.value = {}
createResource({
url: 'crm.api.whatsapp.create_whatsapp_message',
params: args,