feat: 작업 관리 시스템 및 TBM 공정/작업 통합
## Backend Changes - Create tasks table with work_type_id FK to work_types - Add taskModel, taskController, taskRoutes for task CRUD - Update tbmModel to support work_type_id and task_id - Add migrations for tasks table and TBM integration ## Frontend Changes - Create task management admin page (tasks.html, task-management.js) - Update TBM modal to include work type (공정) and task (작업) selection - Add cascading dropdown: work type → task selection - Display work type and task info in TBM session cards - Update sidebar navigation in all admin pages ## Database Schema - tasks: task_id, work_type_id, task_name, description, is_active - tbm_sessions: add work_type_id, task_id columns with FKs - Foreign keys maintain referential integrity with work_types and tasks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
27
api.hyungi.net/routes/taskRoutes.js
Normal file
27
api.hyungi.net/routes/taskRoutes.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// routes/taskRoutes.js
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const taskController = require('../controllers/taskController');
|
||||
|
||||
// CREATE 작업
|
||||
router.post('/', taskController.createTask);
|
||||
|
||||
// READ ALL 작업
|
||||
router.get('/', taskController.getAllTasks);
|
||||
|
||||
// READ ACTIVE 작업
|
||||
router.get('/active/list', taskController.getActiveTasks);
|
||||
|
||||
// READ BY WORK TYPE (공정별)
|
||||
router.get('/by-work-type/:work_type_id', taskController.getTasksByWorkType);
|
||||
|
||||
// READ ONE 작업
|
||||
router.get('/:id', taskController.getTaskById);
|
||||
|
||||
// UPDATE 작업
|
||||
router.put('/:id', taskController.updateTask);
|
||||
|
||||
// DELETE 작업
|
||||
router.delete('/:id', taskController.deleteTask);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user