Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+61
-49
@@ -4,8 +4,9 @@
|
||||
// Subframe optics = tracked design-nachzug.
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FeatherExternalLink } from "@subframe/core";
|
||||
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";
|
||||
@@ -24,56 +25,67 @@ export function HrPayslipsPage({ vm, submitting, actions }: HrPayslipsPageProps)
|
||||
const rows = vm.data?.rows ?? [];
|
||||
|
||||
if (vm.status !== "ready" || !vm.data) {
|
||||
return <div className="flex w-full flex-col gap-6 p-6" data-ui-id="ui.hr.payslips" />;
|
||||
return (
|
||||
<PageShell uiId="ui.hr.payslips">
|
||||
<PageHeader
|
||||
icon={<FeatherFileText className={PAGE_HEADER_ICON_CLASS} />}
|
||||
title={t("hr.payslips.title")}
|
||||
subtitle={t("hr.payslips.subtitle")}
|
||||
/>
|
||||
<PageBody>{null}</PageBody>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex w-full flex-col gap-6 p-6" data-ui-id="ui.hr.payslips">
|
||||
<div className="flex flex-col gap-0">
|
||||
<span className="text-heading-2 font-heading-2 text-text-neutral-primary">{t("hr.payslips.title")}</span>
|
||||
<span className="text-body-default-regular-150 font-body-default-regular-150 text-text-neutral-secondary">{t("hr.payslips.subtitle")}</span>
|
||||
</div>
|
||||
|
||||
{rows.length === 0 ? (
|
||||
<div data-ui-id="ui.hr.payslips.empty">
|
||||
<EmptyState title={t("hr.payslips.own.empty.headline")} body={t("hr.payslips.own.empty.body")} />
|
||||
</div>
|
||||
) : (
|
||||
<div className="w-full overflow-x-auto">
|
||||
<Table
|
||||
data-ui-id="ui.hr.payslips.list"
|
||||
header={
|
||||
<Table.HeaderRow>
|
||||
<Table.HeaderCell>{t("hr.payslips.column.period")}</Table.HeaderCell>
|
||||
<Table.HeaderCell> </Table.HeaderCell>
|
||||
<Table.HeaderCell> </Table.HeaderCell>
|
||||
</Table.HeaderRow>
|
||||
}
|
||||
>
|
||||
{rows.map((row) => (
|
||||
<Table.Row key={row.id} data-row-id={row.id} data-read={row.isRead}>
|
||||
<Table.Cell>
|
||||
<span className="text-body-default-medium-0 font-body-default-medium-0 text-text-neutral-primary">{row.periodLabel}</span>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
{!row.isRead ? (
|
||||
<BadgeFeedback farbe="subtle-warning" size="small">
|
||||
{t("hr.payslips.unread")}
|
||||
</BadgeFeedback>
|
||||
) : null}
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
<div className="flex justify-end">
|
||||
<Button variant="tertiary" size="small" icon={<FeatherExternalLink />} loading={submitting} onClick={() => actions.onOpen(row.id)}>
|
||||
{t("hr.payslips.action.open")}
|
||||
</Button>
|
||||
</div>
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
))}
|
||||
</Table>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<PageShell uiId="ui.hr.payslips">
|
||||
<PageHeader
|
||||
icon={<FeatherFileText className={PAGE_HEADER_ICON_CLASS} />}
|
||||
title={t("hr.payslips.title")}
|
||||
subtitle={t("hr.payslips.subtitle")}
|
||||
/>
|
||||
<PageBody>
|
||||
{rows.length === 0 ? (
|
||||
<div data-ui-id="ui.hr.payslips.empty">
|
||||
<EmptyState title={t("hr.payslips.own.empty.headline")} body={t("hr.payslips.own.empty.body")} />
|
||||
</div>
|
||||
) : (
|
||||
<div className="w-full overflow-x-auto">
|
||||
<Table
|
||||
data-ui-id="ui.hr.payslips.list"
|
||||
header={
|
||||
<Table.HeaderRow>
|
||||
<Table.HeaderCell>{t("hr.payslips.column.period")}</Table.HeaderCell>
|
||||
<Table.HeaderCell> </Table.HeaderCell>
|
||||
<Table.HeaderCell> </Table.HeaderCell>
|
||||
</Table.HeaderRow>
|
||||
}
|
||||
>
|
||||
{rows.map((row) => (
|
||||
<Table.Row key={row.id} data-row-id={row.id} data-read={row.isRead}>
|
||||
<Table.Cell>
|
||||
<span className="text-body-default-medium-0 font-body-default-medium-0 text-text-neutral-primary">{row.periodLabel}</span>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
{!row.isRead ? (
|
||||
<BadgeFeedback farbe="subtle-warning" size="small">
|
||||
{t("hr.payslips.unread")}
|
||||
</BadgeFeedback>
|
||||
) : null}
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
<div className="flex justify-end">
|
||||
<Button variant="tertiary" size="small" icon={<FeatherExternalLink />} loading={submitting} onClick={() => actions.onOpen(row.id)}>
|
||||
{t("hr.payslips.action.open")}
|
||||
</Button>
|
||||
</div>
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
))}
|
||||
</Table>
|
||||
</div>
|
||||
)}
|
||||
</PageBody>
|
||||
</PageShell>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user