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

@@ -5,6 +5,7 @@ import { apiClient } from '../../lib/apiClient';
import { TaskModal } from '../common/TaskModal';
import type { TaskFormData } from '../common/TaskModal';
import type { Task } from '../../types';
import { isProjectTask, isRoutineTask } from '../../lib/taskType';
const STATUS_LABEL: Record<string, string> = {
IN_PROGRESS: '진행', REVIEW: '보류', TODO: '대기', DONE: '완료', CANCELLED: '취소',
@@ -47,11 +48,10 @@ export function TaskManager({ tasks, sectionOptions, quarter, onClose }: TaskMan
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['tasks'] }),
});
// 기반업무 = 상시업무(구), 실행과제 = 프로젝트(구) — 둘 다 매칭
const matchType = (taskType: string | null | undefined, filter: string) => {
if (filter === '전체') return true;
if (filter === '실행과제') return taskType === '실행과제' || taskType === '프로젝트';
if (filter === '기반업무') return taskType === '기반업무' || taskType === '상시업무';
if (filter === '실행과제') return isProjectTask(taskType);
if (filter === '기반업무') return isRoutineTask(taskType);
return taskType === filter;
};
@@ -170,9 +170,9 @@ export function TaskManager({ tasks, sectionOptions, quarter, onClose }: TaskMan
<td className="px-4 py-3 text-gray-600 font-medium whitespace-nowrap">{task.section ?? '-'}</td>
<td className="px-4 py-3">
<span className={`text-xs font-bold px-2 py-0.5 rounded-full ${
(task.taskType === '상시업무' || task.taskType === '기반업무') ? 'bg-amber-100 text-amber-700' : 'bg-blue-100 text-blue-700'
isRoutineTask(task.taskType) ? 'bg-amber-100 text-amber-700' : 'bg-blue-100 text-blue-700'
}`}>
{task.taskType === '상시업무' ? '기반업무' : task.taskType === '프로젝트' ? '실행과제' : (task.taskType ?? '실행과제')}
{isRoutineTask(task.taskType) ? '기반업무' : '실행과제'}
</span>
</td>
<td className="px-4 py-3 font-semibold text-gray-800 max-w-[200px] truncate">{task.title}</td>
@@ -216,8 +216,8 @@ export function TaskManager({ tasks, sectionOptions, quarter, onClose }: TaskMan
{/* 하단 요약 */}
<div className="px-6 py-3 border-t border-gray-100 shrink-0 flex items-center gap-4 text-xs text-gray-400">
<span> <strong className="text-gray-700">{filtered.length}</strong></span>
<span> <strong className="text-blue-600">{filtered.filter(t => t.taskType !== '상시업무' && t.taskType !== '기반업무').length}</strong></span>
<span> <strong className="text-amber-600">{filtered.filter(t => t.taskType === '상시업무' || t.taskType === '기반업무').length}</strong></span>
<span> <strong className="text-blue-600">{filtered.filter(t => isProjectTask(t.taskType)).length}</strong></span>
<span> <strong className="text-amber-600">{filtered.filter(t => isRoutineTask(t.taskType)).length}</strong></span>
</div>
</div>