fix: 작업자 배정 조회 쿼리 수정 및 작업보고서 시간 자동입력
- tbmTransferModel: leader_id → leader_user_id 컬럼명 수정, department 필터 제거 - daily-work-report: TBM 출근유형(정상/연장/조퇴)에 따른 시간 자동 계산 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -414,12 +414,29 @@ function renderTbmWorkList() {
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" id="totalHours_${index}" value="" required>
|
||||
<div class="time-input-trigger placeholder"
|
||||
id="totalHoursDisplay_${index}"
|
||||
onclick="openTimePicker(${index}, 'total')">
|
||||
시간 선택
|
||||
</div>
|
||||
${(() => {
|
||||
// TBM 마감 시 확정된 근무시간 자동 계산
|
||||
let autoHours = '';
|
||||
if (tbm.attendance_type === 'overtime') {
|
||||
autoHours = ((tbm.work_hours || 8) + (tbm.attendance_hours || 0)).toString();
|
||||
} else if (tbm.attendance_type === 'early') {
|
||||
autoHours = (tbm.attendance_hours || tbm.work_hours || 8).toString();
|
||||
} else if (tbm.attendance_type === 'regular') {
|
||||
autoHours = (tbm.work_hours || 8).toString();
|
||||
} else if (tbm.work_hours) {
|
||||
autoHours = tbm.work_hours.toString();
|
||||
}
|
||||
const hasAuto = autoHours !== '';
|
||||
return `
|
||||
<input type="hidden" id="totalHours_${index}" value="${autoHours}" required>
|
||||
<div class="time-input-trigger ${hasAuto ? '' : 'placeholder'}"
|
||||
id="totalHoursDisplay_${index}"
|
||||
onclick="openTimePicker(${index}, 'total')"
|
||||
style="${hasAuto ? 'color:#059669;font-weight:600;' : ''}">
|
||||
${hasAuto ? autoHours + 'h' : '시간 선택'}
|
||||
</div>
|
||||
`;
|
||||
})()}
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" id="errorHours_${index}" value="0">
|
||||
|
||||
Reference in New Issue
Block a user