fix: Remove media template filtering from Vuex store getter

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 <noreply@anthropic.com>
This commit is contained in:
Sojan Jose
2025-07-21 17:40:59 +04:00
co-authored by Claude
parent 16011b06a3
commit 9329813ff5
@@ -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 [];
},