fix: 배포 후 버그 수정 — 테이블명/컬럼명 불일치, navbar active, API 검증 강화, 대시보드 통계 라우트 추가
- checkinModel: partner_checkins → partner_work_checkins, countActive() 추가 - workReportModel: partner_work_reports → daily_work_reports - partner-portal: check_out_at/check_in_at → check_out_time/check_in_time - checkinModel findTodayByCompany: LEFT JOIN has_work_report - tkpurchase-core/tksafety-core: navbar match '' 제거 - checkinController: checkOut에 업무현황 검증, stats() 추가 - workReportController: checkin_id 필수 + schedule 일치 검증 - checkinRoutes: GET / 대시보드 통계 라우트 추가 - nginx.conf: visit.html → tksafety 리다이렉트 - migration-purchase-safety.sql: DDL 동기화 - migration-purchase-safety-patch.sql: 신규 패치 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,7 +86,7 @@ function doLogout() {
|
||||
function renderNavbar() {
|
||||
const currentPage = location.pathname.replace(/\//g, '') || 'index.html';
|
||||
const links = [
|
||||
{ href: '/', icon: 'fa-chart-line', label: '대시보드', match: ['', 'index.html'] },
|
||||
{ href: '/', icon: 'fa-chart-line', label: '대시보드', match: ['index.html'] },
|
||||
{ href: '/daylabor.html', icon: 'fa-hard-hat', label: '일용공 신청', match: ['daylabor.html'] },
|
||||
{ href: '/schedule.html', icon: 'fa-calendar-alt', label: '작업일정', match: ['schedule.html'] },
|
||||
{ href: '/workreport.html', icon: 'fa-clipboard-list', label: '업무현황', match: ['workreport.html'] },
|
||||
|
||||
@@ -44,8 +44,8 @@ async function renderScheduleCards() {
|
||||
|
||||
container.innerHTML = portalSchedules.map(s => {
|
||||
const checkin = portalCheckins[s.id];
|
||||
const isCheckedIn = checkin && !checkin.check_out_at;
|
||||
const isCheckedOut = checkin && checkin.check_out_at;
|
||||
const isCheckedIn = checkin && !checkin.check_out_time;
|
||||
const isCheckedOut = checkin && checkin.check_out_time;
|
||||
const hasReport = checkin && checkin.has_work_report;
|
||||
|
||||
// Step indicators
|
||||
@@ -108,7 +108,7 @@ async function renderScheduleCards() {
|
||||
</div>
|
||||
` : `
|
||||
<div class="text-sm text-emerald-600 mb-1">
|
||||
<i class="fas fa-check-circle mr-1"></i>체크인 완료 (${formatTime(checkin.check_in_at)})
|
||||
<i class="fas fa-check-circle mr-1"></i>체크인 완료 (${formatTime(checkin.check_in_time)})
|
||||
· ${checkin.actual_worker_count || 0}명
|
||||
</div>
|
||||
`}
|
||||
@@ -161,7 +161,7 @@ async function renderScheduleCards() {
|
||||
${isCheckedOut ? `
|
||||
<div class="p-5 border-t bg-gray-50">
|
||||
<div class="text-sm text-blue-600">
|
||||
<i class="fas fa-check-double mr-1"></i>작업 종료 완료 (${formatTime(checkin.check_out_at)})
|
||||
<i class="fas fa-check-double mr-1"></i>작업 종료 완료 (${formatTime(checkin.check_out_time)})
|
||||
</div>
|
||||
${hasReport ? '<div class="text-xs text-emerald-600 mt-1"><i class="fas fa-clipboard-check mr-1"></i>업무현황 제출 완료</div>' : ''}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user