fix: printPaaiResult 전역 함수로 변경
- async function → window.printPaaiResult = async function - WebSocket 이벤트에서 호출 가능하도록 전역 노출
This commit is contained in:
@@ -2678,8 +2678,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// PAAI 결과 인쇄
|
||||
async function printPaaiResult(preSerial, patientName, result) {
|
||||
// PAAI 결과 인쇄 (전역)
|
||||
window.printPaaiResult = async function(preSerial, patientName, result) {
|
||||
if (!autoPrintEnabled) {
|
||||
console.log('[AutoPrint] 비활성화됨');
|
||||
return;
|
||||
@@ -2687,7 +2687,7 @@
|
||||
|
||||
try {
|
||||
console.log('[AutoPrint] 인쇄 요청:', preSerial);
|
||||
const response = await fetch('/pmr/api/paai/print', {
|
||||
var response = await fetch('/pmr/api/paai/print', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({
|
||||
@@ -2697,7 +2697,7 @@
|
||||
})
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
var data = await response.json();
|
||||
if (data.success) {
|
||||
console.log('[AutoPrint] 인쇄 완료');
|
||||
showToast('인쇄 완료: ' + patientName, 'success');
|
||||
|
||||
Reference in New Issue
Block a user