import Link from "next/link"; import { DELAY_REASON_NAMES, type DelayView } from "@peppa/core"; import { delayActionForm } from "@/app/(app)/dashboard/actions"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Key } from "@/components/common"; import { getT } from "@/lib/i18n"; /** * PEP-150/209: what is held up on the platform's side — the superadmin's list in «Дашборд → * Задержки». Owners see one line on the story instead; a row leaves when its cause is gone. * With `actions` every card has «Перезапустить», «Перевести на ревью» (story cards) and «Закрыть». */ export async function PlatformDelays({ delays, actions = false }: { delays: DelayView[]; actions?: boolean }) { const t = await getT(); const hhmm = (ms: number) => new Date(ms).toLocaleString("ru-RU", { day: "2-digit", month: "2-digit", hour: "2-digit", minute: "2-digit", timeZone: process.env.PEPPA_TZ || undefined }); return (
{t.text(d.details)}
{actions && (