diff --git a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ScheduledMessageItem.vue b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ScheduledMessageItem.vue
index 05e47f5cf..7cb071ba0 100644
--- a/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ScheduledMessageItem.vue
+++ b/app/javascript/dashboard/components-next/Contacts/ContactsSidebar/components/ScheduledMessageItem.vue
@@ -109,6 +109,8 @@ const templateName = computed(() => {
return templateParams.name || templateParams.id;
});
+const hasTemplate = computed(() => Boolean(templateName.value));
+
const attachment = computed(() => props.scheduledMessage?.attachment);
const attachmentName = computed(() => attachment.value?.filename);
const attachmentUrl = computed(() => attachment.value?.file_url);
@@ -247,6 +249,20 @@ watch(previewContent, () => {
+
{
+ return (
+ props.sendButtonLabel || t('WHATSAPP_TEMPLATES.PARSER.SEND_MESSAGE_LABEL')
+ );
+});
+
const languageLabel = computed(() => {
return `${t('WHATSAPP_TEMPLATES.PARSER.LANGUAGE')}: ${props.template.language || DEFAULT_LANGUAGE}`;
});
@@ -305,6 +315,7 @@ defineExpose({
:go-back="goBack"
:is-valid="!v$.$invalid"
:disabled="isFormInvalid"
+ :send-button-text="sendButtonText"
/>
diff --git a/app/javascript/dashboard/components/widgets/conversation/WhatsappTemplates/Modal.vue b/app/javascript/dashboard/components/widgets/conversation/WhatsappTemplates/Modal.vue
index ad3464854..7a2c47161 100644
--- a/app/javascript/dashboard/components/widgets/conversation/WhatsappTemplates/Modal.vue
+++ b/app/javascript/dashboard/components/widgets/conversation/WhatsappTemplates/Modal.vue
@@ -12,9 +12,13 @@ export default {
default: false,
},
inboxId: {
- type: Number,
+ type: [Number, String],
default: undefined,
},
+ sendButtonLabel: {
+ type: String,
+ default: '',
+ },
},
emits: ['onSend', 'cancel', 'update:show'],
data() {
@@ -39,6 +43,13 @@ export default {
: this.$t('WHATSAPP_TEMPLATES.MODAL.SUBTITLE');
},
},
+ watch: {
+ show(newVal) {
+ if (newVal) {
+ this.selectedWaTemplate = null;
+ }
+ },
+ },
methods: {
pickTemplate(template) {
this.selectedWaTemplate = template;
@@ -71,6 +82,7 @@ export default {
-
+
-
+
+
+
+
+
+ {{
+ t('SCHEDULED_MESSAGES.MODAL.TEMPLATE_SELECTED', {
+ name: templateName,
+ })
+ }}
+
+
+
+