Se ajusta validaciones de formulario y advierte al usuario cuando abandona la página por iteraciones en el navegador. #73

Merged
mono merged 4 commits from warn_before_leave_purchase_#67 into main 2024-11-11 23:08:54 -05:00
Showing only changes of commit 201333ab4b - Show all commits

View File

@ -133,6 +133,9 @@
<CasherModal :total_purchase="calculateTotal" ref="casherModal"</CasherModal>
</v-container>
<v-btn @click="submit" color="green">Comprar</v-btn>
<v-alert type="error" :duration="2000" closable v-model="show_alert_purchase">
Verifique los campos obligatorios.
</v-alert>
</v-form>
</v-container>
</template>
@ -154,6 +157,7 @@
return {
valid: false,
show_alert_lines: false,
show_alert_purchase: false,
client_search: '',
product_search: '',
payment_methods: null,
@ -306,6 +310,11 @@
} catch (error) {
console.error('Error de red:', error);
}
} else {
this.show_alert_purchase = true;
setTimeout(() => {
this.show_alert_purchase = false;
}, 4000);
}
},
navigate(route) {