chore: hide webhook details for ES

This commit is contained in:
Muhsin Keloth
2025-06-12 11:27:52 +05:30
parent a1a3f62d1b
commit d32d47b41b
2 changed files with 15 additions and 11 deletions
@@ -267,7 +267,6 @@
"API_CALLBACK": {
"TITLE": "Callback URL",
"SUBTITLE": "You have to configure the webhook URL and the verification token in the Facebook Developer portal with the values shown below.",
"SUBTITLE_EMBEDDED": "We have configured the webhook URL and the verification token in the Facebook Developer portal with the values shown below.",
"WEBHOOK_URL": "Webhook URL",
"WEBHOOK_VERIFICATION_TOKEN": "Webhook Verification Token"
},
@@ -47,6 +47,13 @@ export default {
this.currentInbox.provider === 'whatsapp_cloud'
);
},
// If the inbox is a whatsapp cloud inbox and the source is not embedded signup, then show the webhook details
shouldShowWhatsAppWebhookDetails() {
return (
this.isWhatsAppCloudInbox &&
this.currentInbox.provider_config?.source !== 'embedded_signup'
);
},
message() {
if (this.isATwilioInbox) {
return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t(
@@ -66,15 +73,10 @@ export default {
)}`;
}
if (this.isWhatsAppCloudInbox) {
const isEmbeddedSignup =
this.currentInbox.provider_config?.source === 'embedded_signup';
const subtitleKey = isEmbeddedSignup
? 'INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.SUBTITLE_EMBEDDED'
: 'INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.SUBTITLE';
return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t(subtitleKey)}`;
if (this.isWhatsAppCloudInbox && this.shouldShowWhatsAppWebhookDetails) {
return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t(
'INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.SUBTITLE'
)}`;
}
if (this.isAEmailInbox && !this.currentInbox.provider) {
@@ -118,7 +120,10 @@ export default {
:script="currentInbox.callback_webhook_url"
/>
</div>
<div v-if="isWhatsAppCloudInbox" class="w-[50%] max-w-[50%] ml-[25%]">
<div
v-if="shouldShowWhatsAppWebhookDetails"
class="w-[50%] max-w-[50%] ml-[25%]"
>
<p class="mt-8 font-medium text-slate-700 dark:text-slate-200">
{{ $t('INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.WEBHOOK_URL') }}
</p>