feat: showProgress toggle and auto display flags on task type move

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-02 16:53:57 +09:00
parent 395680ea20
commit 849897b141
9 changed files with 62 additions and 16 deletions

View File

@@ -57,7 +57,7 @@ router.post('/', async (req, res, next) => {
try {
const { title, description, status, priority, quarter, category,
section, tag, taskType, progress, issueNote, startDate, dueDate, assigneeId, showDate,
showDescription, showStatus, showIssue, keywords } =
showDescription, showStatus, showIssue, showProgress, keywords } =
req.body as Record<string, any>;
if (!title || !quarter) {
@@ -83,6 +83,7 @@ router.post('/', async (req, res, next) => {
showDescription: showDescription !== undefined ? showDescription === 'true' || showDescription === true : true,
showStatus: showStatus !== undefined ? showStatus === 'true' || showStatus === true : true,
showIssue: showIssue !== undefined ? showIssue === 'true' || showIssue === true : true,
showProgress: showProgress !== undefined ? showProgress === 'true' || showProgress === true : true,
keywords: keywords || null,
assigneeId: assigneeId || null,
creatorId: (req.body as Record<string, string>).creatorId ?? 'system',
@@ -103,7 +104,7 @@ router.patch('/:id', async (req, res, next) => {
const { title, description, status, priority, quarter, category,
section, tag, taskType, progress, issueNote, startDate, dueDate, assigneeId, showDate,
showDescription, showStatus, showIssue, keywords } =
showDescription, showStatus, showIssue, showProgress, keywords } =
req.body as Record<string, any>;
const task = await prisma.task.update({
@@ -127,6 +128,7 @@ router.patch('/:id', async (req, res, next) => {
...(showDescription !== undefined && { showDescription: showDescription === true || showDescription === 'true' }),
...(showStatus !== undefined && { showStatus: showStatus === true || showStatus === 'true' }),
...(showIssue !== undefined && { showIssue: showIssue === true || showIssue === 'true' }),
...(showProgress !== undefined && { showProgress: showProgress === true || showProgress === 'true' }),
...(keywords !== undefined && { keywords: keywords || null }),
},
});