feat: added shot declaration on menu item list
This commit is contained in:
parent
61f01b80b3
commit
9cbb2be17a
33
js/order.js
33
js/order.js
@ -33,7 +33,36 @@ function orderDisplay(drink){
|
|||||||
name: "default Drink <br>",
|
name: "default Drink <br>",
|
||||||
iced: "",
|
iced: "",
|
||||||
syrups: "",
|
syrups: "",
|
||||||
size: ""
|
size: "",
|
||||||
|
shotDeclaration: ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if(drink.recipe.shots != standardShots(drink.size)){
|
||||||
|
switch(drink.recipe.shots){
|
||||||
|
case 1:
|
||||||
|
o.shotDeclaration = "SOLO<br>";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
o.shotDeclaration = "DOUBLE<br>";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
o.shotDeclaration = "Triple<br>";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
o.shotDeclaration = "QUAD<br>";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if(drink.recipe.shots){
|
||||||
|
o.shotDeclaration = (drink.recipe.shots + " shot<br>") || "";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
o.shotDeclaration = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
o.shotDeclaration = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(drink.size){
|
switch(drink.size){
|
||||||
@ -86,5 +115,5 @@ function orderDisplay(drink){
|
|||||||
}, this);
|
}, 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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user