Explorar el Código

Update state handling when submitting an order spreadsheet.

Lee Morgan hace 5 años
padre
commit
9c5d1c4917
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      views/dashboardPage/bundle.js
  2. 1 1
      views/dashboardPage/js/sidebars/newOrder.js

+ 1 - 1
views/dashboardPage/bundle.js

@@ -2040,7 +2040,7 @@ let newOrder = {
                 if(typeof(response) === "string"){
                     controller.createBanner(response, "error");
                 }else{
-                    merchant.addOrder(response, true);
+                    merchant.addOrders([response], true);
 
                     controller.createBanner("ORDER CREATED AND INGREDIENTS UPDATED SUCCESSFULLY", "success");
                     controller.openStrand("orders");

+ 1 - 1
views/dashboardPage/js/sidebars/newOrder.js

@@ -149,7 +149,7 @@ let newOrder = {
                 if(typeof(response) === "string"){
                     controller.createBanner(response, "error");
                 }else{
-                    merchant.addOrder(response, true);
+                    merchant.addOrders([response], true);
 
                     controller.createBanner("ORDER CREATED AND INGREDIENTS UPDATED SUCCESSFULLY", "success");
                     controller.openStrand("orders");