fix: column-level context menu capture for all departments

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-02 13:01:27 +09:00
parent 2f60ec6ab1
commit 395680ea20
6 changed files with 139 additions and 159 deletions

View File

@@ -18,6 +18,7 @@ import { DepartmentColumn } from '../components/dashboard/DepartmentColumn';
import { TaskManager } from '../components/dashboard/TaskManager';
import { useSocket } from '../contexts/SocketContext';
import { sendTaskSelected, openDetailWindow } from '../lib/dualMonitor';
import { isRoutineTask } from '../lib/taskType';
const QUARTER = '2026-Q2';
const SECTIONS = ['인사관리', '학습성장', '운영지원', '전산관리'] as const;
@@ -131,9 +132,9 @@ export default function DashboardPage() {
const updateData: Record<string, any> = {};
if (targetSection !== srcSection) updateData.section = targetSection;
if (areaType === 'routine' && draggedTask.taskType !== '상시업무' && draggedTask.taskType !== '기반업무') {
if (areaType === 'routine' && !isRoutineTask(draggedTask.taskType)) {
updateData.taskType = '기반업무';
} else if (areaType === 'project' && (draggedTask.taskType === '상시업무' || draggedTask.taskType === '기반업무')) {
} else if (areaType === 'project' && isRoutineTask(draggedTask.taskType)) {
updateData.taskType = '실행과제';
}
if (Object.keys(updateData).length > 0) {
@@ -147,11 +148,16 @@ export default function DashboardPage() {
if (!overTask) return;
const dstSection = overTask.section ?? '';
const typeChanged = isRoutineTask(draggedTask.taskType) !== isRoutineTask(overTask.taskType);
if (dstSection !== srcSection) {
// 컬럼 간 이동 — 섹션 변경
patchTask.mutate({ id: activeId, data: { section: dstSection } });
return;
if (dstSection !== srcSection || typeChanged) {
const updateData: Record<string, any> = {};
if (dstSection !== srcSection) updateData.section = dstSection;
if (typeChanged) {
updateData.taskType = isRoutineTask(overTask.taskType) ? '기반업무' : '실행과제';
}
patchTask.mutate({ id: activeId, data: updateData });
if (dstSection !== srcSection) return;
}
// ── 같은 컬럼 내 순서 변경 ───────────────────────────────────