Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+74
@@ -0,0 +1,74 @@
|
||||
// AK-P17a Interim-UI (AD-28) — HR hub launchpad composed from ~/ui (D-HR
|
||||
// "HR-Hub-Start", archetype A1/A6). Pure presentational: the loader gates the
|
||||
// connector + permission and passes the resolved quick-link list in as a prop;
|
||||
// this screen only renders. The richer hub widgets (announcements, pending
|
||||
// duties, birthdays) arrive with their data in follow-up tickets; the interim
|
||||
// screen renders exactly what the loader provides. Final Subframe optics = a
|
||||
// tracked design-nachzug once David's D-HR delta ships.
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FeatherArrowRight, FeatherLock } from "@subframe/core";
|
||||
import { Card } from "~/ui/components/Card";
|
||||
import { EmptyState } from "~/ui/components/EmptyState";
|
||||
|
||||
export type HrHubLink = {
|
||||
/** i18n key for the link label (e.g. "hr.nav.directory"). */
|
||||
readonly labelKey: string;
|
||||
readonly href: string;
|
||||
};
|
||||
|
||||
export type HrHubPageProps = {
|
||||
/** False when the tenant has the HR module gated off (locked state). */
|
||||
moduleActive: boolean;
|
||||
links: readonly HrHubLink[];
|
||||
};
|
||||
|
||||
export function HrHubPage({ moduleActive, links }: HrHubPageProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!moduleActive) {
|
||||
return (
|
||||
<div className="flex w-full flex-col gap-6 p-6" data-ui-id="ui.hr.hub">
|
||||
<div className="flex items-center gap-2 text-text-neutral-tertiary" data-ui-id="ui.hr.hub.locked">
|
||||
<FeatherLock className="text-heading-3 font-heading-3" />
|
||||
<EmptyState title={t("hr.hub.locked.headline")} body={t("hr.hub.locked.body")} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex w-full flex-col gap-6 p-6" data-ui-id="ui.hr.hub">
|
||||
{/* Header: title + description (0px rhythm) */}
|
||||
<div className="flex flex-col gap-0">
|
||||
<span className="text-heading-2 font-heading-2 text-text-neutral-primary">{t("hr.hub.title")}</span>
|
||||
<span className="text-body-default-regular-150 font-body-default-regular-150 text-text-neutral-secondary">
|
||||
{t("hr.hub.subtitle")}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<nav
|
||||
className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"
|
||||
data-ui-id="ui.hr.hub.links"
|
||||
>
|
||||
{links.map((link) => (
|
||||
<a
|
||||
key={link.labelKey}
|
||||
href={link.href}
|
||||
className="no-underline"
|
||||
data-row-id={link.labelKey}
|
||||
>
|
||||
<Card>
|
||||
<div className="flex w-full items-center justify-between gap-4">
|
||||
<span className="text-body-default-medium-0 font-body-default-medium-0 text-text-neutral-primary">
|
||||
{t(link.labelKey)}
|
||||
</span>
|
||||
<FeatherArrowRight className="text-body-default-regular-0 font-body-default-regular-0 text-icon-neutral-tertiary" />
|
||||
</div>
|
||||
</Card>
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user