feat: 알림 시스템 및 시설설비 관리 기능 구현

- 알림 시스템 구축 (navbar 알림 아이콘, 드롭다운)
- 알림 수신자 설정 기능 (계정관리 페이지)
- 시설설비 관리 페이지 추가 (수리 워크플로우)
- 수리 신청 → 접수 → 처리중 → 완료 상태 관리
- 사이드바 메뉴 구조 개선 (공장 관리 카테고리)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-02-04 15:56:57 +09:00
parent d1aec517a6
commit b8ccde7f17
24 changed files with 3204 additions and 9 deletions

View File

@@ -43,6 +43,9 @@ router.post('/external-logs/:logId/return', equipmentController.returnEquipment)
// 수리 항목 목록 조회
router.get('/repair-categories', equipmentController.getRepairCategories);
// 새 수리 항목 추가
router.post('/repair-categories', equipmentController.addRepairCategory);
// ==================== 사진 관리 ====================
// 사진 삭제 (설비 ID 없이 photo_id만으로)

View File

@@ -0,0 +1,28 @@
// routes/notificationRecipientRoutes.js
const express = require('express');
const router = express.Router();
const notificationRecipientController = require('../controllers/notificationRecipientController');
const { verifyToken, requireMinLevel } = require('../middlewares/authMiddleware');
// 모든 라우트에 인증 필요
router.use(verifyToken);
// 알림 유형 목록
router.get('/types', notificationRecipientController.getTypes);
// 전체 수신자 목록 (유형별 그룹화)
router.get('/', notificationRecipientController.getAll);
// 유형별 수신자 조회
router.get('/:type', notificationRecipientController.getByType);
// 수신자 추가 (관리자만)
router.post('/', requireMinLevel('admin'), notificationRecipientController.add);
// 유형별 수신자 일괄 설정 (관리자만)
router.put('/:type', requireMinLevel('admin'), notificationRecipientController.setRecipients);
// 수신자 제거 (관리자만)
router.delete('/:type/:userId', requireMinLevel('admin'), notificationRecipientController.remove);
module.exports = router;

View File

@@ -0,0 +1,27 @@
// routes/notificationRoutes.js
const express = require('express');
const router = express.Router();
const notificationController = require('../controllers/notificationController');
// 읽지 않은 알림 조회
router.get('/unread', notificationController.getUnread);
// 읽지 않은 알림 개수
router.get('/unread/count', notificationController.getUnreadCount);
// 전체 알림 조회 (페이징)
router.get('/', notificationController.getAll);
// 알림 생성 (시스템/관리자용)
router.post('/', notificationController.create);
// 모든 알림 읽음 처리
router.post('/read-all', notificationController.markAllAsRead);
// 특정 알림 읽음 처리
router.post('/:id/read', notificationController.markAsRead);
// 알림 삭제
router.delete('/:id', notificationController.delete);
module.exports = router;