Преглед на файлове

Fix bug: ingredient updating did not show immediately on frontend.

Lee Morgan преди 5 години
родител
ревизия
0ebf4d53bf
променени са 2 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 4 0
      views/dashboardPage/bundle.js
  2. 4 0
      views/dashboardPage/js/classes/Merchant.js

+ 4 - 0
views/dashboardPage/bundle.js

@@ -168,6 +168,10 @@ class MerchantIngredient{
         }
     }
 
+    set quantity(quantity){
+        this._quantity = quantity;
+    }
+
     updateQuantity(quantity){
         this._quantity += this.convertToBase(quantity);
     }

+ 4 - 0
views/dashboardPage/js/classes/Merchant.js

@@ -41,6 +41,10 @@ class MerchantIngredient{
         }
     }
 
+    set quantity(quantity){
+        this._quantity = quantity;
+    }
+
     updateQuantity(quantity){
         this._quantity += this.convertToBase(quantity);
     }