diff --git a/vue3/src/components/display/IngredientsTable.vue b/vue3/src/components/display/IngredientsTable.vue
index 1d72ca837..3ec583c77 100644
--- a/vue3/src/components/display/IngredientsTable.vue
+++ b/vue3/src/components/display/IngredientsTable.vue
@@ -36,7 +36,7 @@
|
- {{ i.amount * props.ingredientFactor }} |
+ |
{{ i.unit.name }}
|
@@ -59,6 +59,8 @@
diff --git a/vue3/src/utils/number_utils.ts b/vue3/src/utils/number_utils.ts
index a7521a1d0..598e2a8c3 100644
--- a/vue3/src/utils/number_utils.ts
+++ b/vue3/src/utils/number_utils.ts
@@ -1,8 +1,3 @@
-function getUserPreference(pref: string) {
- return false // TODO only placeholder, add real function
-}
-
-
/**
* round to the number of decimals specified in user preferences
* @param num number to round
@@ -16,9 +11,10 @@ export function roundDecimals(num: number) {
* calculates the amount of food, based on the factor and converts it to a fraction if that is the users preference
* @param amount food amount to calculate based upon
* @param factor factor to scale food amount by
+ * @param useFractions if the returned value should be a fraction or not
*/
-export function calculateFoodAmount(amount: number, factor: number) {
- if (getUserPreference("use_fractions")) {
+export function calculateFoodAmount(amount: number, factor: number, useFractions: boolean = false) {
+ if (useFractions) {
let return_string = ""
let fraction = frac(amount * factor, 16, true)