Explorar o código

Fix all bugs with orders.

Lee Morgan %!s(int64=4) %!d(string=hai) anos
pai
achega
44baa761a8

+ 0 - 1
controllers/orderData.js

@@ -67,7 +67,6 @@ module.exports = {
     } 
     */ 
     createOrder: function(req, res){
-        console.log(req.body);
         let newOrder = new Order(req.body);
         newOrder.merchant = res.locals.merchant._id;
         newOrder.save()

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
views/dashboardPage/bundle.js.map


+ 1 - 1
views/dashboardPage/js/classes/Merchant.js

@@ -496,7 +496,7 @@ class Merchant{
 
             if(isNew === true){
                 for(let j = 0; j < order.ingredients.length; j++){
-                    this.getIngredient(order.ingredients[j].ingredient.id).updateQuantity(order.ingredients[j].quantity);
+                    this.getIngredient(order.ingredients[j].ingredient.id).updateQuantity(order.ingredients[j].quantity, order.ingredients[j].ingredient.unit);
                 }
             }
         }

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio