refactor: Consolidate WhatsApp template components and improve naming (#12299)

This commit is contained in:
Muhsin Keloth
2025-08-26 15:20:53 +05:30
committed by GitHub
parent f6062f992e
commit 19faa7fdfa
4 changed files with 12 additions and 189 deletions

View File

@@ -1,4 +1,13 @@
<script setup>
/**
* This component handles parsing and sending WhatsApp message templates.
* It works as follows:
* 1. Displays the template text with variable placeholders.
* 2. Generates input fields for each variable in the template.
* 3. Validates that all variables are filled before sending.
* 4. Replaces placeholders with user-provided values.
* 5. Emits events to send the processed message or reset the template.
*/
import { ref, computed, onMounted, watch } from 'vue';
import { useVuelidate } from '@vuelidate/core';
import { requiredIf } from '@vuelidate/validators';