diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index 26549ca..1bf4969 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -777,15 +777,15 @@ function editRecipe(recipe) { const coco = ings.find(i => i.oil === '椰子油') if (coco) { formCocoRow.value = { ...coco, _search: '椰子油', _open: false } + const eoDrops = ings.filter(i => i.oil && i.oil !== '椰子油').reduce((s, i) => s + (i.drops || 0), 0) // Use stored volume if available, otherwise guess from drops if (recipe.volume) { formVolume.value = recipe.volume if (recipe.volume === 'custom') { - const totalDrops = ings.reduce((s, i) => s + (i.drops || 0), 0) + const totalDrops = eoDrops + coco.drops formCustomVolume.value = Math.round(totalDrops / DROPS_PER_ML) } } else { - const eoDrops = ings.filter(i => i.oil && i.oil !== '椰子油').reduce((s, i) => s + (i.drops || 0), 0) const totalDrops = eoDrops + coco.drops const ml = totalDrops / DROPS_PER_ML if (ml <= 2) formVolume.value = 'single'