From 10fe518b39274d12019de6c0cea326c27167e447 Mon Sep 17 00:00:00 2001 From: Muhsin Date: Sun, 2 Nov 2025 14:24:22 +0530 Subject: [PATCH] chore: csat text --- .../dashboard/i18n/locale/en/inboxMgmt.json | 6 ++-- .../settingsPage/CustomerSatisfactionPage.vue | 29 ++++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json index 188153e58..7ea8b7cb7 100644 --- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json @@ -802,8 +802,9 @@ }, "TEMPLATE_STATUS": { "APPROVED": "Approved by WhatsApp", - "PENDING": "Needs WhatsApp approval", - "REJECTED": "Rejected by WhatsApp" + "PENDING": "Pending WhatsApp approval", + "REJECTED": "Meta rejected the template", + "DEFAULT": "Needs WhatsApp approval" }, "TEMPLATE_CREATION": { "SUCCESS_MESSAGE": "WhatsApp template created successfully and sent for approval", @@ -820,6 +821,7 @@ "SELECT_PLACEHOLDER": "select labels" }, "NOTE": "Note: CSAT surveys are sent only once per conversation", + "WHATSAPP_NOTE": "Note: We will create a template and send it for WhatsApp approval. After being approved, surveys will be sent only once per conversation as per the survey rule.", "API": { "SUCCESS_MESSAGE": "CSAT settings updated successfully", "ERROR_MESSAGE": "We couldn't update CSAT settings. Please try again later." diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/CustomerSatisfactionPage.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/CustomerSatisfactionPage.vue index 232ad483a..c53a17596 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/CustomerSatisfactionPage.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/settingsPage/CustomerSatisfactionPage.vue @@ -74,13 +74,19 @@ const messagePreviewData = computed(() => ({ })); const templateApprovalStatus = computed(() => { - if (!templateStatus.value) return null; + if (!templateStatus.value || !templateStatus.value.template_exists) { + return { + text: t('INBOX_MGMT.CSAT.TEMPLATE_STATUS.DEFAULT'), + icon: 'i-lucide-stamp', + color: 'text-gray-600', + }; + } switch (templateStatus.value.status) { case 'APPROVED': return { text: t('INBOX_MGMT.CSAT.TEMPLATE_STATUS.APPROVED'), - icon: 'i-lucide-check-circle', + icon: 'i-lucide-circle-check', color: 'text-green-600', }; case 'PENDING': @@ -92,14 +98,14 @@ const templateApprovalStatus = computed(() => { case 'REJECTED': return { text: t('INBOX_MGMT.CSAT.TEMPLATE_STATUS.REJECTED'), - icon: 'i-lucide-x-circle', + icon: 'i-lucide-circle-x', color: 'text-red-600', }; default: return { - text: t('INBOX_MGMT.CSAT.TEMPLATE_STATUS.PENDING'), - icon: 'i-lucide-clock', - color: 'text-yellow-600', + text: t('INBOX_MGMT.CSAT.TEMPLATE_STATUS.DEFAULT'), + icon: 'i-lucide-stamp', + color: 'text-gray-600', }; } }); @@ -305,7 +311,10 @@ const saveSettings = async () => { /> -
+
{

- {{ $t('INBOX_MGMT.CSAT.NOTE') }} + {{ + isWhatsAppChannel + ? $t('INBOX_MGMT.CSAT.WHATSAPP_NOTE') + : $t('INBOX_MGMT.CSAT.NOTE') + }}