fix: Show WhatsApp templates only for inboxes with templates (#12965)
Fixed the logic to show WhatsApp templates option only for inboxes that have templates available.
This commit is contained in:
@@ -174,7 +174,12 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
showWhatsappTemplates() {
|
showWhatsappTemplates() {
|
||||||
return this.isAWhatsAppCloudChannel && !this.isPrivate;
|
// We support WhatsApp templates for API channels if someone updates templates manually via API
|
||||||
|
// That's why we don't explicitly check for WhatsApp channel type here
|
||||||
|
const templates = this.$store.getters['inboxes/getWhatsAppTemplates'](
|
||||||
|
this.inboxId
|
||||||
|
);
|
||||||
|
return !!(templates && templates.length) && !this.isPrivate;
|
||||||
},
|
},
|
||||||
showContentTemplates() {
|
showContentTemplates() {
|
||||||
return this.isATwilioWhatsAppChannel && !this.isPrivate;
|
return this.isATwilioWhatsAppChannel && !this.isPrivate;
|
||||||
|
|||||||
Reference in New Issue
Block a user