feat(Purchase): warn user invalid form #71
This commit is contained in:
parent
a5ac06704b
commit
201333ab4b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user