diff --git a/js/order.js b/js/order.js index c4d2547..844a041 100644 --- a/js/order.js +++ b/js/order.js @@ -33,7 +33,36 @@ function orderDisplay(drink){ name: "default Drink
", iced: "", syrups: "", - size: "" + size: "", + shotDeclaration: "" + } + + if(drink.recipe.shots != standardShots(drink.size)){ + switch(drink.recipe.shots){ + case 1: + o.shotDeclaration = "SOLO
"; + break; + case 2: + o.shotDeclaration = "DOUBLE
"; + break; + case 3: + o.shotDeclaration = "Triple
"; + break; + case 4: + o.shotDeclaration = "QUAD
"; + break; + default: + if(drink.recipe.shots){ + o.shotDeclaration = (drink.recipe.shots + " shot
") || ""; + } + else{ + o.shotDeclaration = ""; + } + + } + } + else{ + o.shotDeclaration = ""; } switch(drink.size){ @@ -86,5 +115,5 @@ function orderDisplay(drink){ }, this); } - return o.size + o.name + o.iced + o.syrups + o.caffeine; + return o.size + o.name + o.shotDeclaration + o.iced + o.syrups + o.caffeine; }