// AK-P17b Interim-UI (AD-28) — employee payslips composed from ~/ui (D-HR // "Lohnabrechnungen", archetype A2). Pure presentational: own list; opening a // payslip is audited server-side and returns the File id (route opens it). Final // Subframe optics = tracked design-nachzug. import { useTranslation } from "react-i18next"; import { FeatherExternalLink, FeatherFileText } from "@subframe/core"; import type { HrPayslipOwnVM } from "@hivegrid/view-models"; import { PAGE_HEADER_ICON_CLASS, PageBody, PageHeader, PageShell } from "../shared/PageShell"; import { BadgeFeedback } from "~/ui/components/BadgeFeedback"; import { Button } from "~/ui/components/Button"; import { EmptyState } from "~/ui/components/EmptyState"; import { Table } from "~/ui/components/Table"; export type HrPayslipsActions = { onOpen: (payslipId: string) => void }; export type HrPayslipsPageProps = { vm: HrPayslipOwnVM; submitting: boolean; actions: HrPayslipsActions; }; export function HrPayslipsPage({ vm, submitting, actions }: HrPayslipsPageProps) { const { t } = useTranslation(); const rows = vm.data?.rows ?? []; if (vm.status !== "ready" || !vm.data) { return ( } title={t("hr.payslips.title")} subtitle={t("hr.payslips.subtitle")} /> {null} ); } return ( } title={t("hr.payslips.title")} subtitle={t("hr.payslips.subtitle")} /> {rows.length === 0 ? (
) : (
{t("hr.payslips.column.period")} } > {rows.map((row) => ( {row.periodLabel} {!row.isRead ? ( {t("hr.payslips.unread")} ) : null}
))}
)}
); }