#45 feat: rename checkout to 'Finalizar Pedido' and add contact info in checkout modal
This commit is contained in:
@@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<v-card-actions v-if="cartItems.length > 0" class="cart-checkout-section">
|
<v-card-actions v-if="cartItems.length > 0" class="cart-checkout-section">
|
||||||
<v-btn color="primary" block @click="$emit('checkout')">
|
<v-btn color="primary" block @click="$emit('checkout')">
|
||||||
Finalizar Compra
|
Finalizar Pedido
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -187,7 +187,7 @@
|
|||||||
<!-- Modal 1: Confirmación de productos -->
|
<!-- Modal 1: Confirmación de productos -->
|
||||||
<v-dialog v-model="checkoutDialog" max-width="600" persistent>
|
<v-dialog v-model="checkoutDialog" max-width="600" persistent>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title class="headline">Confirmar Compra</v-card-title>
|
<v-card-title class="headline">Confirmar Pedido</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-list v-if="cartItems.length > 0" class="product-list-scroll">
|
<v-list v-if="cartItems.length > 0" class="product-list-scroll">
|
||||||
<v-list-item v-for="item in cartItems" :key="item.id">
|
<v-list-item v-for="item in cartItems" :key="item.id">
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
<!-- Modal 2: Datos personales -->
|
<!-- Modal 2: Datos personales + aviso de coordinación -->
|
||||||
<v-dialog v-model="personalDataDialog" max-width="500" persistent>
|
<v-dialog v-model="personalDataDialog" max-width="500" persistent>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title class="headline">Datos de Contacto</v-card-title>
|
<v-card-title class="headline">Datos de Contacto</v-card-title>
|
||||||
@@ -259,6 +259,48 @@
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
></v-select>
|
></v-select>
|
||||||
</v-form>
|
</v-form>
|
||||||
|
|
||||||
|
<v-divider class="my-3"></v-divider>
|
||||||
|
|
||||||
|
<v-alert type="info" variant="tonal" class="mb-0">
|
||||||
|
<div class="text-body-2 mb-2">
|
||||||
|
Para coordinar la entrega de tu pedido escríbenos:
|
||||||
|
</div>
|
||||||
|
<div class="d-flex ga-2">
|
||||||
|
<v-btn
|
||||||
|
icon
|
||||||
|
size="x-small"
|
||||||
|
color="primary"
|
||||||
|
variant="tonal"
|
||||||
|
:href="'tel:' + contactPhone"
|
||||||
|
>
|
||||||
|
<v-icon size="16">mdi-phone</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
icon
|
||||||
|
size="x-small"
|
||||||
|
color="success"
|
||||||
|
variant="tonal"
|
||||||
|
:href="'https://wa.me/57' + contactPhone"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<v-icon size="16">mdi-whatsapp</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
icon
|
||||||
|
size="x-small"
|
||||||
|
color="info"
|
||||||
|
variant="tonal"
|
||||||
|
:href="'https://t.me/+57' + contactPhone"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<v-icon size="16">mdi-send</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
<span class="text-body-2 font-weight-bold ml-1 d-flex align-center">
|
||||||
|
{{ contactPhone }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</v-alert>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
@@ -270,7 +312,7 @@
|
|||||||
:loading="isSubmitting"
|
:loading="isSubmitting"
|
||||||
:disabled="isSubmitting"
|
:disabled="isSubmitting"
|
||||||
>
|
>
|
||||||
Finalizar Compra
|
Finalizar Pedido
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -506,7 +548,6 @@ export default {
|
|||||||
},
|
},
|
||||||
async onSubmitPurchase() {
|
async onSubmitPurchase() {
|
||||||
const form = this.$refs.personalForm;
|
const form = this.$refs.personalForm;
|
||||||
|
|
||||||
if (form) {
|
if (form) {
|
||||||
const { valid } = await form.validate();
|
const { valid } = await form.validate();
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
@@ -528,7 +569,6 @@ export default {
|
|||||||
customer_phone: this.customerPhone,
|
customer_phone: this.customerPhone,
|
||||||
pickup_method: this.pickupMethod,
|
pickup_method: this.pickupMethod,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.api
|
this.api
|
||||||
.createCatalogPurchase(payload)
|
.createCatalogPurchase(payload)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user