From 5a062759c5790b22466670cd66980bfc048baefd Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Fri, 13 Mar 2026 13:59:18 +0900 Subject: [PATCH] =?UTF-8?q?fix(tkpurchase):=20=EC=B2=B4=ED=81=AC=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=ED=8F=BC=20worker=5Fnames=20=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=20actual=5Fworker=5Fcount=EB=A7=8C=ED=81=BC=20?= =?UTF-8?q?=EB=B9=88=20=ED=96=89=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 체크인 시 작업자 이름 미입력 + 인원 수만 입력한 경우 체크아웃 폼에 빈 행 1개만 표시되던 버그 수정 Co-Authored-By: Claude Opus 4.6 --- tkpurchase/web/static/js/tkpurchase-partner-portal.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tkpurchase/web/static/js/tkpurchase-partner-portal.js b/tkpurchase/web/static/js/tkpurchase-partner-portal.js index e14984e..acc9e97 100644 --- a/tkpurchase/web/static/js/tkpurchase-partner-portal.js +++ b/tkpurchase/web/static/js/tkpurchase-partner-portal.js @@ -169,8 +169,11 @@ async function showCheckoutForm(checkinId, scheduleId) { } if (workerNames.length > 0) { existingWorkers = workerNames.map(name => ({ worker_name: name, hours_worked: 8.0 })); - } else if (currentUser) { - existingWorkers = [{ worker_name: currentUser.name || '', hours_worked: 8.0 }]; + } else { + const count = Math.max(checkin.actual_worker_count || 1, 1); + for (let i = 0; i < count; i++) { + existingWorkers.push({ worker_name: '', hours_worked: 8.0 }); + } } }