feat(tkpurchase): 체크인 worker_names 배열 저장 + 구매팀 체크인 관리 기능

- doCheckIn()에서 worker_names를 콤마 split 배열로 전송 (DB에 JSON 배열로 저장)
- 구매팀 일정 페이지에 체크인 조회/수정/삭제 모달 추가
- DELETE /checkins/:id endpoint + 트랜잭션 삭제 (reports cascade)
- PUT /checkins/:id에 requirePage 권한 guard 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-13 10:53:46 +09:00
parent 9fda89a374
commit b14448fc54
6 changed files with 143 additions and 8 deletions

View File

@@ -421,12 +421,15 @@ async function openEditReport(reportId, checkinId, scheduleId) {
async function doCheckIn(scheduleId) {
const workerCount = parseInt(document.getElementById('checkinWorkers_' + scheduleId).value) || 1;
const workerNames = document.getElementById('checkinNames_' + scheduleId).value.trim();
const rawNames = document.getElementById('checkinNames_' + scheduleId).value.trim();
const workerNames = rawNames
? rawNames.split(/[,]\s*/).map(n => n.trim()).filter(Boolean)
: null;
const body = {
schedule_id: scheduleId,
actual_worker_count: workerCount,
worker_names: workerNames || null
worker_names: workerNames
};
try {