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:
@@ -108,4 +108,16 @@ async function stats(req, res) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { list, myCheckins, checkIn, checkOut, update, stats };
|
||||
// 체크인 삭제
|
||||
async function deleteCheckin(req, res) {
|
||||
try {
|
||||
const result = await checkinModel.deleteCheckin(req.params.id);
|
||||
if (!result) return res.status(404).json({ success: false, error: '체크인 기록을 찾을 수 없습니다' });
|
||||
res.json({ success: true });
|
||||
} catch (err) {
|
||||
console.error('Checkin delete error:', err);
|
||||
res.status(500).json({ success: false, error: err.message });
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { list, myCheckins, checkIn, checkOut, update, stats, deleteCheckin };
|
||||
|
||||
Reference in New Issue
Block a user