From 34852fccc1b39c6f088ae6cf62667e7dc9d7ad6d Mon Sep 17 00:00:00 2001 From: Tanmay Deep Sharma Date: Mon, 9 Jun 2025 02:35:13 +0530 Subject: [PATCH] update step four content in case of embedded signup --- .../dashboard/i18n/locale/en/inboxMgmt.json | 1 + .../routes/dashboard/settings/inbox/FinishSetup.vue | 11 ++++++++--- app/services/whatsapp/embedded_signup_service.rb | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json index de56674b5..c8e8183ec 100644 --- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json @@ -269,6 +269,7 @@ "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" }, diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue index fcac0648e..c22b78977 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/FinishSetup.vue @@ -67,9 +67,14 @@ export default { } if (this.isWhatsAppCloudInbox) { - return `${this.$t('INBOX_MGMT.FINISH.MESSAGE')}. ${this.$t( - 'INBOX_MGMT.ADD.WHATSAPP.API_CALLBACK.SUBTITLE' - )}`; + 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.isAEmailInbox && !this.currentInbox.provider) { diff --git a/app/services/whatsapp/embedded_signup_service.rb b/app/services/whatsapp/embedded_signup_service.rb index abaa37189..1bf8cd03f 100644 --- a/app/services/whatsapp/embedded_signup_service.rb +++ b/app/services/whatsapp/embedded_signup_service.rb @@ -121,7 +121,8 @@ class Whatsapp::EmbeddedSignupService provider_config: { api_key: access_token, phone_number_id: phone_info[:phone_number_id], - business_account_id: waba_info[:waba_id] + business_account_id: waba_info[:waba_id], + source: 'embedded_signup' } } end