From a23960736071b56aa9ea783f97bc632521ee4b2c Mon Sep 17 00:00:00 2001 From: dmitriylaukhin Date: Wed, 24 Jun 2026 10:23:35 +0500 Subject: [PATCH] Show homework badge by review status, not just feedback presence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Curator list labeled APPROVED-without-feedback submissions as 'Без ответа' (badge keyed on feedbacks only). Key it on status: Принято / С отзывом / На рассмотрении / Отклонено / Без ответа. Dashboards already count by status. Co-Authored-By: Claude Opus 4.8 --- src/app/curator/homework/page.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/app/curator/homework/page.tsx b/src/app/curator/homework/page.tsx index 405aa3c..2e32028 100644 --- a/src/app/curator/homework/page.tsx +++ b/src/app/curator/homework/page.tsx @@ -166,9 +166,22 @@ export default async function HomeworkListPage({ searchParams }: Props) {
{submissions.map((s) => { const hasReview = s.feedbacks.length > 0; - const reviewBadge = hasReview - ? { label: "С отзывом", bg: "oklch(0.88 0.1 145)", color: "oklch(0.35 0.15 145)" } - : { label: "Без ответа", bg: "var(--foreground)", color: "var(--background)" }; + // Метка по статусу проверки, а не только по наличию письменного отзыва: + // принятое кнопкой ДЗ (APPROVED без фидбека) — это «Принято», не «Без ответа». + let reviewBadge: { label: string; bg: string; color: string }; + if (s.status === "APPROVED") { + reviewBadge = { + label: hasReview ? "С отзывом" : "Принято", + bg: "oklch(0.88 0.1 145)", + color: "oklch(0.35 0.15 145)", + }; + } else if (s.status === "REJECTED") { + reviewBadge = { label: "Отклонено", bg: "oklch(0.9 0.06 27)", color: "oklch(0.45 0.2 27)" }; + } else if (s.status === "REVIEWING") { + reviewBadge = { label: "На рассмотрении", bg: "oklch(0.9 0.08 80)", color: "oklch(0.4 0.1 80)" }; + } else { + reviewBadge = { label: "Без ответа", bg: "var(--foreground)", color: "var(--background)" }; + } return (