fix: feedback author display, sidebar scroll, stage sort by start date

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-05 22:55:11 +09:00
parent fa8ed76e22
commit 4960fe7352
6 changed files with 26 additions and 17 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE "task_details" ADD COLUMN IF NOT EXISTS "authorName" TEXT;

View File

@@ -99,6 +99,7 @@ model TaskDetail {
taskId String
milestoneId String?
content String
authorName String? // 피드백 작성자 표시명 (자유 입력)
updatedBy String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt

View File

@@ -5,15 +5,6 @@ import { AppError } from '../middleware/errorHandler';
const router = Router();
async function resolveAuthorId(taskId: string, authorName?: string): Promise<string> {
const name = authorName?.toString().trim();
if (name) {
const user = await prisma.user.findFirst({ where: { name } });
if (user) return user.id;
}
return resolveTaskActorId(taskId);
}
// POST /api/details/:taskId
router.post('/:taskId', async (req, res, next) => {
try {
@@ -30,13 +21,15 @@ router.post('/:taskId', async (req, res, next) => {
if (!ms) throw new AppError(400, '유효하지 않은 업무 단계입니다.');
}
const updatedBy = await resolveAuthorId(taskId, authorName);
const displayName = authorName?.toString().trim() || null;
const updatedBy = await resolveTaskActorId(taskId);
const detail = await prisma.taskDetail.create({
data: {
taskId,
milestoneId: milestoneId || null,
content: content.toString().trim(),
authorName: displayName,
updatedBy,
},
include: { author: { select: { id: true, name: true } } },