diff --git a/static/app.js b/static/app.js index f1ad19f..5f55b53 100644 --- a/static/app.js +++ b/static/app.js @@ -595,20 +595,39 @@ $(document).ready(function() { const cheopTotal = parseFloat($('#cheopTotal').val()) || 0; const totalGrams = ing.grams_per_cheop * cheopTotal; + // 제품 선택 옵션 생성 + let productOptions = ''; + if (ing.available_products && ing.available_products.length > 0) { + ing.available_products.forEach(product => { + const specInfo = product.specification ? ` [${product.specification}]` : ''; + productOptions += ``; + }); + } + $('#compoundIngredients').append(` - - ${ing.herb_name} + + + ${ing.herb_name} + ${ing.total_available_stock > 0 + ? `(총 ${ing.total_available_stock.toFixed(0)}g 사용 가능)` + : '(재고 없음)'} + ${totalGrams.toFixed(1)} - - + ${productOptions} - 확인중... + + + + 대기중