fix: 캘린더 모달 중복 카드 문제 및 삭제 권한 개선
- monthly_worker_status 조회 시 GROUP BY로 중복 데이터 합산 - 작업보고서 삭제 권한을 그룹장 이상으로 제한 (admin, system, group_leader) - 중복 데이터 정리를 위한 마이그레이션 SQL 추가 (009_fix_duplicate_monthly_status.sql) - synology_deployment 버전에도 동일 수정 적용
This commit is contained in:
24
synology_deployment/api/routes/monthlyStatusRoutes.js
Normal file
24
synology_deployment/api/routes/monthlyStatusRoutes.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// routes/monthlyStatusRoutes.js
|
||||
// 월별 작업자 상태 집계 라우트
|
||||
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const MonthlyStatusController = require('../controllers/monthlyStatusController');
|
||||
const { verifyToken } = require('../middlewares/authMiddleware');
|
||||
|
||||
// 모든 라우트에 인증 미들웨어 적용 (임시로 주석 처리 - 테스트용)
|
||||
// router.use(verifyToken);
|
||||
|
||||
// 월별 캘린더 데이터 조회 (캘린더 페이지용)
|
||||
router.get('/calendar', MonthlyStatusController.getMonthlyCalendarData);
|
||||
|
||||
// 특정 날짜의 작업자별 상세 상태 조회 (모달용)
|
||||
router.get('/daily-details', MonthlyStatusController.getDailyWorkerDetails);
|
||||
|
||||
// 월별 집계 재계산 (관리자용)
|
||||
router.post('/recalculate', MonthlyStatusController.recalculateMonth);
|
||||
|
||||
// 집계 테이블 상태 확인 (관리자용)
|
||||
router.get('/status', MonthlyStatusController.getStatusInfo);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user