diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json index dcd1a43a1..eb948dbbd 100644 --- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json @@ -170,6 +170,10 @@ "SUBMIT_BUTTON": "Create Twilio Channel", "API": { "ERROR_MESSAGE": "We were not able to authenticate Twilio credentials, please try again" + }, + "API_CALLBACK": { + "TITLE": "Callback URL", + "SUBTITLE": "You have to configure the message callback URL in Twilio with the URL mentioned here." } }, "SMS": { @@ -214,15 +218,15 @@ "PLACEHOLDER": "Please enter the phone number from which message will be sent.", "ERROR": "Please provide a valid phone number that starts with a `+` sign and does not contain any spaces." }, - "SUBMIT_BUTTON": "Create Bandwidth Channel", - "API": { - "ERROR_MESSAGE": "We were not able to authenticate Bandwidth credentials, please try again" - }, - "API_CALLBACK": { - "TITLE": "Callback URL", - "SUBTITLE": "You have to configure the message callback URL in Bandwidth with the URL mentioned here." + "SUBMIT_BUTTON": "Create Bandwidth Channel", + "API": { + "ERROR_MESSAGE": "We were not able to authenticate Bandwidth credentials, please try again" + }, + "API_CALLBACK": { + "TITLE": "Callback URL", + "SUBTITLE": "You have to configure the message callback URL in Bandwidth with the URL mentioned here." + } } - } }, "WHATSAPP": { "TITLE": "WhatsApp Channel", diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue index 2f9ad8269..bdeb04c13 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue @@ -30,7 +30,6 @@ const currentInbox = computed(() => const { isAWhatsAppCloudChannel, isAWhatsAppChannel, - isATwilioChannel, isASmsInbox, isALineChannel, isAnEmailChannel, @@ -56,16 +55,6 @@ const shouldShowWhatsAppWebhookDetails = computed(() => { ); }); -const isTwilioSmsInbox = computed(() => { - const phoneNumber = currentInbox.value?.phone_number; - const callbackUrl = currentInbox.value?.callback_webhook_url; - - return ( - (phoneNumber || '').startsWith('+') && - Boolean(callbackUrl && callbackUrl.includes('/twilio/callback')) - ); -}); - const whatsappPhoneNumber = computed(() => { return (currentInbox.value?.phone_number || '').replace('whatsapp:', ''); }); @@ -81,20 +70,12 @@ const message = computed(() => { )}`; } - if (isTwilioSmsInbox.value) { + if (isATwilioSMSChannel.value) { return `${t('INBOX_MGMT.FINISH.MESSAGE')}. ${t( 'INBOX_MGMT.FINISH.SMS_QR_INSTRUCTION' )}`; } - if (isASmsInbox.value) { - return t('INBOX_MGMT.FINISH.MESSAGE'); - } - - if (isATwilioChannel.value) { - return t('INBOX_MGMT.FINISH.MESSAGE'); - } - if (isALineChannel.value) { return `${t('INBOX_MGMT.FINISH.MESSAGE')}. ${t( 'INBOX_MGMT.ADD.LINE_CHANNEL.API_CALLBACK.SUBTITLE' @@ -147,7 +128,7 @@ async function generateQRCodes() { await generateQRCode('whatsapp', whatsappPhoneNumber.value); } - if (isTwilioSmsInbox.value && currentInbox.value.phone_number) { + if (isATwilioSMSChannel.value && currentInbox.value.phone_number) { await generateQRCode('sms', currentInbox.value.phone_number); } @@ -224,7 +205,7 @@ onMounted(() => { />
@@ -233,14 +214,10 @@ onMounted(() => {
{{ $t('INBOX_MGMT.ADD.SMS.BANDWIDTH.API_CALLBACK.SUBTITLE') }}
-