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 }); + } } }