// 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 { FeatherMegaphone, FeatherPin } from "@subframe/core"; import type { HrAnnouncementFeedVM } from "@hivegrid/view-models"; import { PAGE_HEADER_ICON_CLASS, PageBody, PageHeader, PageShell } from "../shared/PageShell"; 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"; import { AppLink } from "~/components/app/AppLink"; export type HrAnnouncementsFeedPageProps = { vm: HrAnnouncementFeedVM }; export function HrAnnouncementsFeedPage({ vm }: HrAnnouncementsFeedPageProps) { const { t } = useTranslation(); const data = vm.data; if (vm.status !== "ready" || !data) { return ( } title={t("hr.announcements.title")} subtitle={t("hr.announcements.subtitle")} /> {null} ); } return ( } title={t("hr.announcements.title")} subtitle={t("hr.announcements.subtitle")} actions={ data.canManage ? ( {t("hr.announcements.action.manage")} ) : undefined } />
{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}
))}
)}
); }