Update task schema with show toggles and keywords

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-01 17:56:18 +09:00
parent 0a1cb3efe7
commit aeb2f29d4d
7 changed files with 141 additions and 60 deletions

View File

@@ -110,6 +110,7 @@ export function TaskCard({
const handleContextMenu = (e: React.MouseEvent) => {
e.preventDefault();
e.stopPropagation();
// 뷰포트 내 좌표 계산
setCtxMenu({ x: e.clientX, y: e.clientY });
};
@@ -117,7 +118,6 @@ export function TaskCard({
create.mutate({
title: data.title,
section: data.section || null,
tag: data.tag || null,
taskType: data.taskType || null,
status: data.status,
progress: data.progress,
@@ -126,6 +126,10 @@ export function TaskCard({
startDate: data.startDate || null,
dueDate: data.dueDate || null,
showDate: data.showDate,
showDescription: data.showDescription,
showStatus: data.showStatus,
showIssue: data.showIssue,
keywords: data.keywords || null,
quarter: data.quarter,
priority: 'MEDIUM',
creatorId: 'system',
@@ -137,7 +141,6 @@ export function TaskCard({
patch.mutate({
title: data.title,
section: data.section || null,
tag: data.tag || null,
taskType: data.taskType || null,
status: data.status,
progress: data.progress,
@@ -146,6 +149,10 @@ export function TaskCard({
startDate: data.startDate || null,
dueDate: data.dueDate || null,
showDate: data.showDate,
showDescription: data.showDescription,
showStatus: data.showStatus,
showIssue: data.showIssue,
keywords: data.keywords || null,
});
setModalMode(null);
};
@@ -198,20 +205,33 @@ export function TaskCard({
? `${task.startDate ? fmtDate(task.startDate) : '?'} ~ ${task.dueDate ? fmtDate(task.dueDate) : '?'}`
: ''}
</span>
<span className={`shrink-0 rounded-full px-2.5 py-0.5 text-sm font-black shadow-sm ${STATUS_STYLE[task.status]}`}>
{STATUS_LABEL[task.status]}
</span>
{task.showStatus && (
<span className={`shrink-0 rounded-full px-2.5 py-0.5 text-sm font-black shadow-sm ${STATUS_STYLE[task.status]}`}>
{STATUS_LABEL[task.status]}
</span>
)}
</div>
{/* ── 키워드 ── */}
{task.keywords && (
<div className="mt-1.5 flex flex-wrap gap-1.5">
{task.keywords.split(',').map((kw, i) => (
<span key={i} className="px-2 py-0.5 bg-slate-100 text-slate-600 text-sm font-bold rounded-md border border-slate-200/60">
{kw.trim()}
</span>
))}
</div>
)}
{/* ── description ── */}
{task.description && (
{task.showDescription && task.description && (
<div className="mt-2 truncate text-2xl text-slate-700">
{task.description}
</div>
)}
{/* ── 이슈 메모 ── */}
{task.issueNote && (
{task.showIssue && task.issueNote && (
<div className="mt-1.5 flex min-w-0 gap-2 rounded-xl bg-red-50/80 px-2 py-1 text-2xl text-red-500">
<span className="shrink-0"></span>
<span className="truncate">{task.issueNote}</span>