From 9329813ff519cf83bfd15a8ef44f20b622573a3e Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Mon, 21 Jul 2025 17:40:59 +0400 Subject: [PATCH] fix: Remove media template filtering from Vuex store getter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root cause of media header templates not appearing was in the Vuex store getter `getWhatsAppTemplates` which was explicitly filtering out templates with IMAGE and VIDEO components. This fix removes the media filtering logic to allow all approved WhatsApp templates to be available in the template selector, including those with: - IMAGE headers - VIDEO headers - DOCUMENT headers Now the `order_confirmation` template and other media templates will appear in the template picker as expected. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app/javascript/dashboard/store/modules/inboxes.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/javascript/dashboard/store/modules/inboxes.js b/app/javascript/dashboard/store/modules/inboxes.js index 14bd4c2a9..e642ce5c5 100644 --- a/app/javascript/dashboard/store/modules/inboxes.js +++ b/app/javascript/dashboard/store/modules/inboxes.js @@ -44,13 +44,9 @@ export const getters = { const messagesTemplates = whatsAppMessageTemplates || apiInboxMessageTemplates; - // filtering out the whatsapp templates with media + // Return all WhatsApp templates including media templates if (messagesTemplates instanceof Array) { - return messagesTemplates.filter(template => { - return !template.components.some( - i => i.format === 'IMAGE' || i.format === 'VIDEO' - ); - }); + return messagesTemplates; } return []; },