فهرست منبع

Require all fields to be filled before continuing merchant creation process.

Lee Morgan 6 سال پیش
والد
کامیت
278177ef55
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      views/merchantSetupPage/addIngredients.js

+ 5 - 0
views/merchantSetupPage/addIngredients.js

@@ -59,6 +59,11 @@ addIngredientsObj = {
             if(row.children[0].children[0].checked){
                 let quantity = row.children[3].children[0].value;
 
+                if(quantity === ""){
+                    banner.createError("Must provide a quantity for all checked ingredients");
+                    return;
+                }
+
                 if(validator.ingredient.quantity(quantity)){
                     controller.data.inventory.push({
                         ingredient: {