diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue index bdeb04c13..0c581db91 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue @@ -63,6 +63,10 @@ const shouldShowWhatsAppQr = computed(() => { return isAWhatsAppChannel.value && Boolean(whatsappPhoneNumber.value); }); +const shouldShowSmsQr = computed(() => { + return isATwilioSMSChannel.value && Boolean(currentInbox.value?.phone_number); +}); + const message = computed(() => { if (shouldShowWhatsAppQr.value) { return `${t('INBOX_MGMT.FINISH.MESSAGE')}. ${t( @@ -70,7 +74,7 @@ const message = computed(() => { )}`; } - if (isATwilioSMSChannel.value) { + if (shouldShowSmsQr.value) { return `${t('INBOX_MGMT.FINISH.MESSAGE')}. ${t( 'INBOX_MGMT.FINISH.SMS_QR_INSTRUCTION' )}`; @@ -128,7 +132,7 @@ async function generateQRCodes() { await generateQRCode('whatsapp', whatsappPhoneNumber.value); } - if (isATwilioSMSChannel.value && currentInbox.value.phone_number) { + if (shouldShowSmsQr.value) { await generateQRCode('sms', currentInbox.value.phone_number); } @@ -217,7 +221,7 @@ onMounted(() => {