feat: 다수 기능 개선 - 순찰, 출근, 작업분석, 모바일 UI 등
- 순찰/점검 기능 개선 (zone-detail 페이지 추가) - 출근/근태 시스템 개선 (연차 조회, 근무현황) - 작업분석 대분류 그룹화 및 마이그레이션 스크립트 - 모바일 네비게이션 UI 추가 - NAS 배포 도구 및 문서 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* 일일 이슈 보고서 관리 컨트롤러
|
||||
*
|
||||
* 일일 이슈 보고서 CRUD API 엔드포인트 핸들러
|
||||
*
|
||||
* @author TK-FB-Project
|
||||
* @since 2025-12-11
|
||||
*/
|
||||
|
||||
const dailyIssueReportService = require('../services/dailyIssueReportService');
|
||||
const { asyncHandler } = require('../middlewares/errorHandler');
|
||||
|
||||
/**
|
||||
* 일일 이슈 보고서 생성
|
||||
*/
|
||||
const createDailyIssueReport = asyncHandler(async (req, res) => {
|
||||
// 프론트엔드에서 worker_ids 또는 worker_id로 보낼 수 있음
|
||||
const issueData = {
|
||||
...req.body,
|
||||
worker_ids: req.body.worker_ids || req.body.worker_id
|
||||
};
|
||||
|
||||
const result = await dailyIssueReportService.createDailyIssueReportService(issueData);
|
||||
|
||||
res.status(201).json({
|
||||
success: true,
|
||||
data: result,
|
||||
message: result.message
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 날짜별 이슈 조회
|
||||
*/
|
||||
const getDailyIssuesByDate = asyncHandler(async (req, res) => {
|
||||
const { date } = req.query;
|
||||
const issues = await dailyIssueReportService.getDailyIssuesByDateService(date);
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
data: issues,
|
||||
message: '이슈 보고서 조회 성공'
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 이슈 보고서 삭제
|
||||
*/
|
||||
const removeDailyIssue = asyncHandler(async (req, res) => {
|
||||
const { id } = req.params;
|
||||
const result = await dailyIssueReportService.removeDailyIssueService(id);
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
data: result,
|
||||
message: result.message
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
createDailyIssueReport,
|
||||
getDailyIssuesByDate,
|
||||
removeDailyIssue
|
||||
};
|
||||
Reference in New Issue
Block a user