fix: OTC 라벨 저장 시 display_name 자동 설정

- display_name 비어있으면 원본 약품명(currentDrugName) 사용
- 저장된 프리셋 목록에 바코드 대신 약품명 표시
This commit is contained in:
thug0bin 2026-03-02 17:07:02 +09:00
parent ac0e1ced0e
commit b71d511c7a

View File

@ -492,9 +492,12 @@
return;
}
// display_name이 비어있으면 원본 약품명 사용
const displayName = document.getElementById('displayName').value || currentDrugName;
const payload = {
barcode: currentBarcode,
display_name: document.getElementById('displayName').value,
display_name: displayName,
effect: document.getElementById('effect').value,
dosage_instruction: document.getElementById('dosageInstruction').value,
usage_tip: document.getElementById('usageTip').value