summaryrefslogtreecommitdiff
path: root/lib/b-rfq
diff options
context:
space:
mode:
Diffstat (limited to 'lib/b-rfq')
-rw-r--r--lib/b-rfq/service.ts6
-rw-r--r--lib/b-rfq/summary-table/summary-rfq-columns.tsx4
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/b-rfq/service.ts b/lib/b-rfq/service.ts
index 8aa79084..5a65872b 100644
--- a/lib/b-rfq/service.ts
+++ b/lib/b-rfq/service.ts
@@ -2528,6 +2528,11 @@ export async function requestRevision(
): Promise<RequestRevisionResult> {
try {
// 입력값 검증
+
+ const session = await getServerSession(authOptions)
+ if (!session?.user?.id) {
+ throw new Error("인증이 필요합니다.")
+ }
const validatedData = requestRevisionSchema.parse({
responseId,
revisionReason,
@@ -2567,6 +2572,7 @@ export async function requestRevision(
revisionRequestComment: validatedData.revisionReason, // 새로운 필드에 저장
revisionRequestedAt: new Date(), // 수정 요청 시간 저장
updatedAt: new Date(),
+ updatedBy: Number(session.user.id),
})
.where(eq(vendorAttachmentResponses.id, validatedData.responseId))
.returning();
diff --git a/lib/b-rfq/summary-table/summary-rfq-columns.tsx b/lib/b-rfq/summary-table/summary-rfq-columns.tsx
index 40f143b2..af5c22b2 100644
--- a/lib/b-rfq/summary-table/summary-rfq-columns.tsx
+++ b/lib/b-rfq/summary-table/summary-rfq-columns.tsx
@@ -411,11 +411,11 @@ export function getRFQColumns({ setRowAction, router }: GetRFQColumnsProps): Col
<div className="flex flex-col gap-1 text-xs">
<div className="flex items-center justify-between">
<span className="text-muted-foreground">초기:</span>
- <span>{initial}개사 ({initialRate}%)</span>
+ <span>{initial}개사 ({Number(initialRate).toFixed(0)}%)</span>
</div>
<div className="flex items-center justify-between">
<span className="text-muted-foreground">최종:</span>
- <span>{final}개사 ({finalRate}%)</span>
+ <span>{final}개사 ({Number(finalRate).toFixed(0)}%)</span>
</div>
</div>
);