// PEP-197: the acceptance agent's list in the project chat — per item «Делать» / «Не надо», // below «Делать важные» / «Отклонить всё». Once an item is decided the buttons give way to the outcome. import { proposalAction } from "@/app/(app)/actions"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { getT } from "@/lib/i18n"; import type { ProposalItem } from "@peppa/core"; import { m } from "@peppa/shared/i18n"; const SEVERITY = { breakage: { label: m("Поломка"), variant: "danger" }, important: { label: m("Важно"), variant: "warn" }, minor: { label: m("Мелочь"), variant: "muted" }, } as const; export async function ProposalList({ items, back }: { items: ProposalItem[]; back: string }) { const t = await getT(); const open = items.filter((i) => i.open); return (
{items.map((i) => (
{i.key} {i.title} {i.severity && ( {t(SEVERITY[i.severity].label)} )}
{i.open ? (
) : ( {i.decision === "rejected" ? t("Отклонено") : t("Взято в бэклог")} )}
))} {open.length > 0 && (
i.id).join(",")} />
)}
); }