feat(Purchase): warn user invalid form #71
This commit is contained in:
		@@ -133,6 +133,9 @@
 | 
				
			|||||||
          <CasherModal :total_purchase="calculateTotal" ref="casherModal"</CasherModal>
 | 
					          <CasherModal :total_purchase="calculateTotal" ref="casherModal"</CasherModal>
 | 
				
			||||||
        </v-container>
 | 
					        </v-container>
 | 
				
			||||||
        <v-btn @click="submit" color="green">Comprar</v-btn>
 | 
					        <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-form>
 | 
				
			||||||
</v-container>
 | 
					</v-container>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -154,6 +157,7 @@
 | 
				
			|||||||
     return {
 | 
					     return {
 | 
				
			||||||
       valid: false,
 | 
					       valid: false,
 | 
				
			||||||
       show_alert_lines: false,
 | 
					       show_alert_lines: false,
 | 
				
			||||||
 | 
					       show_alert_purchase: false,
 | 
				
			||||||
       client_search: '',
 | 
					       client_search: '',
 | 
				
			||||||
       product_search: '',
 | 
					       product_search: '',
 | 
				
			||||||
       payment_methods: null,
 | 
					       payment_methods: null,
 | 
				
			||||||
@@ -306,6 +310,11 @@
 | 
				
			|||||||
           } catch (error) {
 | 
					           } catch (error) {
 | 
				
			||||||
               console.error('Error de red:', error);
 | 
					               console.error('Error de red:', error);
 | 
				
			||||||
           }
 | 
					           }
 | 
				
			||||||
 | 
					       } else {
 | 
				
			||||||
 | 
					         this.show_alert_purchase = true;
 | 
				
			||||||
 | 
					           setTimeout(() => {
 | 
				
			||||||
 | 
					             this.show_alert_purchase = false;
 | 
				
			||||||
 | 
					           }, 4000);
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
     },
 | 
					     },
 | 
				
			||||||
     navigate(route) {
 | 
					     navigate(route) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user