feat: 어드민 적립내역 클릭 시 품목 상세 모달 + 키오스크 UI 개선
- 어드민 최근 적립 내역에서 행 클릭 시 MSSQL 품목 상세 모달 표시 - transaction_id가 있는 행만 클릭 가능 (돋보기 아이콘 표시) - 키오스크 품목 목록 표시, 세로 모니터 반응형 레이아웃 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1791,7 +1791,8 @@ def admin():
|
||||
ml.balance_after,
|
||||
ml.reason,
|
||||
ml.description,
|
||||
ml.created_at
|
||||
ml.created_at,
|
||||
ml.transaction_id
|
||||
FROM mileage_ledger ml
|
||||
JOIN users u ON ml.user_id = u.id
|
||||
ORDER BY ml.created_at DESC
|
||||
@@ -1912,12 +1913,35 @@ def api_kiosk_trigger():
|
||||
claimable_points = token_info['claimable_points']
|
||||
qr_url = token_info['qr_url']
|
||||
|
||||
# MSSQL에서 구매 품목 조회
|
||||
sale_items = []
|
||||
try:
|
||||
mssql_session = db_manager.get_session('PM_PRES')
|
||||
sale_sub_query = text("""
|
||||
SELECT
|
||||
ISNULL(G.GoodsName, '(약품명 없음)') AS goods_name,
|
||||
S.SL_NM_item AS quantity,
|
||||
S.SL_TOTAL_PRICE AS total
|
||||
FROM SALE_SUB S
|
||||
LEFT JOIN PM_DRUG.dbo.CD_GOODS G ON S.DrugCode = G.DrugCode
|
||||
WHERE S.SL_NO_order = :transaction_id
|
||||
ORDER BY S.DrugCode
|
||||
""")
|
||||
rows = mssql_session.execute(sale_sub_query, {'transaction_id': transaction_id}).fetchall()
|
||||
sale_items = [
|
||||
{'name': r.goods_name, 'qty': int(r.quantity or 0), 'total': int(r.total or 0)}
|
||||
for r in rows
|
||||
]
|
||||
except Exception as e:
|
||||
logging.warning(f"키오스크 품목 조회 실패 (transaction_id={transaction_id}): {e}")
|
||||
|
||||
# 키오스크 세션 저장
|
||||
kiosk_current_session = {
|
||||
'transaction_id': transaction_id,
|
||||
'amount': int(amount),
|
||||
'points': claimable_points,
|
||||
'qr_url': qr_url,
|
||||
'items': sale_items,
|
||||
'created_at': datetime.now(KST).isoformat()
|
||||
}
|
||||
|
||||
@@ -1954,7 +1978,8 @@ def api_kiosk_current():
|
||||
'transaction_id': kiosk_current_session['transaction_id'],
|
||||
'amount': kiosk_current_session['amount'],
|
||||
'points': kiosk_current_session['points'],
|
||||
'qr_url': kiosk_current_session.get('qr_url')
|
||||
'qr_url': kiosk_current_session.get('qr_url'),
|
||||
'items': kiosk_current_session.get('items', [])
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user