+ {[
+ [tLegacy("summary.pending"), approvals.length],
+ [tLegacy("summary.noTelegram"), noTelegramCount],
+ [tLegacy("summary.observe"), observeCount],
+ [tLegacy("summary.critical"), criticalCount],
+ ].map(([label, value]) => (
+
+ ))}
+
+
+ {error && (
+
+
+
+
+ | {tLegacy("columns.risk")} |
+ {tLegacy("columns.action")} |
+ {tLegacy("columns.incident")} |
+ {tLegacy("columns.source")} |
+ {tLegacy("columns.created")} |
+
+
+
+ {loading ? (
+ Array.from({ length: 4 }).map((_, row) => (
+
+ {Array.from({ length: 5 }).map((_, cell) => (
+ |
+
+ |
+ ))}
+
+ ))
+ ) : (
+ approvals.slice(0, 8).map((approval) => {
+ const risk = approval.risk_level?.toLowerCase() ?? "unknown";
+ const riskClass =
+ risk === "critical"
+ ? "border-[#e2a29b] bg-[#fff0ef] text-[#9f2f25]"
+ : "border-[#d9b36f] bg-[#fff7e8] text-[#8a5a08]";
+ return (
+
+ |
+
+ {risk}
+
+ |
+
+ {approval.action}
+
+ {approval.description || "--"}
+
+ |
+
+ {approval.incident_id || "--"}
+ |
+
+ {approval.telegram_message_id
+ ? tLegacy("telegramRef", { id: approval.telegram_message_id })
+ : tLegacy("noTelegram")}
+ |
+
+ {formatLocalTime(approval.created_at)}
+ |
+
+ );
+ })
+ )}
+
+
+ {!loading && approvals.length > 8 && (
+
+ {tLegacy("moreRows", { count: approvals.length - 8 })}
+
+ )}
+
+ )}
+