Browse Source

Go through all of the TODO's.
All TODO's were simply removed because they were false.

Lee Morgan 5 years ago
parent
commit
468dd4f419

+ 0 - 1
controllers/ingredientData.js

@@ -41,7 +41,6 @@ module.exports = {
                     defaultUnit: req.body.defaultUnit
                 }
 
-                //TODO this should come in as the base unit
                 newIngredient.quantity = helper.convertQuantityToBaseUnit(req.body.quantity, req.body.defaultUnit);
 
                 response[1].inventory.push(newIngredient);

+ 0 - 1
controllers/orderData.js

@@ -241,7 +241,6 @@ module.exports = {
                             order.ingredients.push({
                                 ingredient: merchant.inventory[j].ingredient._id,
                                 quantity: baseQuantity,
-                                //TODO: this should not be storing based on the default unit, but the base unit
                                 pricePerUnit: helper.convertPrice(array[i][locations.price] * 100, merchant.inventory[j].defaultUnit)
                             });
 

+ 0 - 5
views/dashboardPage/bundle.js

@@ -803,12 +803,10 @@ class OrderIngredient{
 
     get quantity(){
         switch(this._ingredient.unit){
-            case "g":return this._quantity;
             case "kg": return this._quantity / 1000;
             case "oz": return this._quantity / 28.3495;
             case "lb": return this._quantity / 453.5924;
             case "ml": return this._quantity * 1000;
-            case "l": return this._quantity;
             case "tsp": return this._quantity * 202.8842;
             case "tbsp": return this._quantity * 67.6278;
             case "ozfl": return this._quantity * 33.8141;
@@ -818,7 +816,6 @@ class OrderIngredient{
             case "gal": return this._quantity / 3.7854;
             case "mm": return this._quantity * 1000;
             case "cm": return this._quantity * 100;
-            case "m": return this._quantity;
             case "in": return this._quantity * 39.3701;
             case "ft": return this._quantity * 3.2808;
             default: return this._quantity;
@@ -2120,7 +2117,6 @@ let newOrder = {
             data.ingredients.push({
                 ingredient: ingredients[i].ingredient.ingredient.id,
                 quantity: ingredients[i].ingredient.convertToBase(quantity),
-                //TODO: this should be done in a class and not here
                 pricePerUnit: this.convertPrice(ingredients[i].ingredient.ingredient, price * 100)
             });
         }
@@ -2154,7 +2150,6 @@ let newOrder = {
             });
     },
 
-    //TODO: Remove this function, it should be on the order
     convertPrice: function(ingredient, price){
         switch(ingredient.unit){
             case "g": return price;

+ 0 - 3
views/dashboardPage/js/classes/Order.js

@@ -14,12 +14,10 @@ class OrderIngredient{
 
     get quantity(){
         switch(this._ingredient.unit){
-            case "g":return this._quantity;
             case "kg": return this._quantity / 1000;
             case "oz": return this._quantity / 28.3495;
             case "lb": return this._quantity / 453.5924;
             case "ml": return this._quantity * 1000;
-            case "l": return this._quantity;
             case "tsp": return this._quantity * 202.8842;
             case "tbsp": return this._quantity * 67.6278;
             case "ozfl": return this._quantity * 33.8141;
@@ -29,7 +27,6 @@ class OrderIngredient{
             case "gal": return this._quantity / 3.7854;
             case "mm": return this._quantity * 1000;
             case "cm": return this._quantity * 100;
-            case "m": return this._quantity;
             case "in": return this._quantity * 39.3701;
             case "ft": return this._quantity * 3.2808;
             default: return this._quantity;

+ 0 - 2
views/dashboardPage/js/sidebars/newOrder.js

@@ -68,7 +68,6 @@ let newOrder = {
             data.ingredients.push({
                 ingredient: ingredients[i].ingredient.ingredient.id,
                 quantity: ingredients[i].ingredient.convertToBase(quantity),
-                //TODO: this should be done in a class and not here
                 pricePerUnit: this.convertPrice(ingredients[i].ingredient.ingredient, price * 100)
             });
         }
@@ -102,7 +101,6 @@ let newOrder = {
             });
     },
 
-    //TODO: Remove this function, it should be on the order
     convertPrice: function(ingredient, price){
         switch(ingredient.unit){
             case "g": return price;