// AK-P17b Interim-UI (AD-28) — announcements feed composed from ~/ui (D-HR // "Ankündigungen", archetype A2). Pure presentational: pinned first, URL-driven // unread filter. Final Subframe optics = tracked design-nachzug. import { useTranslation } from "react-i18next"; import { FeatherPin } from "@subframe/core"; import type { HrAnnouncementFeedVM } from "@hivegrid/view-models"; import { BadgeFeedback } from "~/ui/components/BadgeFeedback"; import { Card } from "~/ui/components/Card"; import { EmptyState } from "~/ui/components/EmptyState"; import { LinkButton } from "~/ui/components/LinkButton"; import { Tabs } from "~/ui/components/Tabs"; export type HrAnnouncementsFeedPageProps = { vm: HrAnnouncementFeedVM }; export function HrAnnouncementsFeedPage({ vm }: HrAnnouncementsFeedPageProps) { const { t } = useTranslation(); const data = vm.data; if (vm.status !== "ready" || !data) { return
; } return (
{t("hr.announcements.title")} {t("hr.announcements.subtitle")}
{data.canManage ? ( {t("hr.announcements.action.manage")} ) : null}
{t("hr.announcements.filter.all")} {t("hr.announcements.filter.unread")}
{data.rows.length === 0 ? (
) : (
{data.rows.map((row) => (
{row.pinned ? : null} {row.title}
{row.requiresAcknowledgement && !row.isAcknowledged ? ( {t("hr.announcements.ackRequired")} ) : null}
{row.snippet}
))}
)}
); }