- 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>
16 lines
518 B
JavaScript
16 lines
518 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const { requireAuth } = require('../middleware/auth');
|
|
const ctrl = require('../controllers/checkinController');
|
|
|
|
router.use(requireAuth);
|
|
|
|
router.get('/', ctrl.stats); // dashboard stats
|
|
router.get('/schedule/:scheduleId', ctrl.list);
|
|
router.get('/my', ctrl.myCheckins); // partner portal
|
|
router.post('/', ctrl.checkIn); // partner can do this
|
|
router.put('/:id/checkout', ctrl.checkOut);
|
|
router.put('/:id', ctrl.update);
|
|
|
|
module.exports = router;
|