From 6dae5d9574a08bbf2778913395dcb2bff553af30 Mon Sep 17 00:00:00 2001 From: Alexandro Uc Santos Date: Sat, 12 Oct 2024 16:41:34 -0600 Subject: [PATCH] add: send whatsapp & fixes --- src/components/CardUser.vue | 21 ++++++++++++++++++--- src/components/DriverVehicleModal.vue | 2 ++ src/views/TrackingLoadView.vue | 16 ++++++++-------- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/components/CardUser.vue b/src/components/CardUser.vue index 9f74093..ab42b10 100644 --- a/src/components/CardUser.vue +++ b/src/components/CardUser.vue @@ -5,6 +5,7 @@ import { useCompanyStore } from '../stores/company'; import { useAuthStore } from '../stores/auth'; import { useI18n } from 'vue-i18n'; + import {computed } from 'vue' const props = defineProps({ user: { @@ -19,8 +20,6 @@ }) - console.log(props.user) - defineEmits(['set-user']) const companyStore = useCompanyStore(); @@ -67,6 +66,11 @@ }); } + + const message = computed(() => `Hola, soy ${authStore.user.first_name} de ${authStore.user.company.company_name} y vi tu contacto en Eta Viaporte. Estoy interesado en tu oferta de ${authStore.user.company.company_type === 'Carrier' ? 'carga' : 'transporte'}. ${authStore.user.company.company_type === 'Carrier' ? '¿Podrías darme más detalles sobre el tipo de carga, el origen y destino?' : '¿Podrías proporcionarme más detalles sobre la disponibilidad, la ruta y las tarifas?'} Por favor, contáctame cuando puedas. ¡Gracias!`) + + const whatsappLink = computed(() => `https://wa.me/${props.user.phone}?text=${message.value}`) +