From b58e46f8fde0393ccd091a5837c476d685a986e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8B=9C=EA=B3=A8=EC=95=BD=EC=82=AC?= Date: Sun, 15 Feb 2026 12:21:53 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=EC=B5=9C=EA=B7=BC=20=EC=A1=B0=EC=A0=9C=20=EB=82=B4=EC=97=AD=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 개선사항 - 대시보드에 최근 조제 내역 5건 표시 - 조제일, 환자명, 처방명, 제수, 파우치, 상태 표시 - 상태별 배지 색상 구분 - 조제완료: 녹색 - 출고완료: 파란색 - 취소: 빨간색 이제 대시보드에서 오늘 조제 수와 최근 조제 내역을 한눈에 확인 가능! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- static/app.js | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/static/app.js b/static/app.js index aabe25f..9d2c492 100644 --- a/static/app.js +++ b/static/app.js @@ -68,12 +68,49 @@ $(document).ready(function() { } }); - // 오늘 조제 수 + // 오늘 조제 수 및 최근 조제 내역 $.get('/api/compounds', function(response) { if (response.success) { const today = new Date().toISOString().split('T')[0]; const todayCompounds = response.data.filter(c => c.compound_date === today); $('#todayCompounds').text(todayCompounds.length); + + // 최근 조제 내역 (최근 5개) + const tbody = $('#recentCompounds'); + tbody.empty(); + + const recentCompounds = response.data.slice(0, 5); + if (recentCompounds.length > 0) { + recentCompounds.forEach(compound => { + let statusBadge = ''; + switch(compound.status) { + case 'PREPARED': + statusBadge = '조제완료'; + break; + case 'DISPENSED': + statusBadge = '출고완료'; + break; + case 'CANCELLED': + statusBadge = '취소'; + break; + default: + statusBadge = '대기'; + } + + tbody.append(` + + ${compound.compound_date || '-'} + ${compound.patient_name || '직접조제'} + ${compound.formula_name || '직접조제'} + ${compound.je_count}제 + ${compound.pouch_total}개 + ${statusBadge} + + `); + }); + } else { + tbody.html('조제 내역이 없습니다.'); + } } }); }