metis-desk/modules/companies/src/web/access/help/ui/entity-help.tsx
David 0a34ddf752 feat: add local identity management features and UI components
- Implement folder account options helper for filtering access items based on person ID and date.
- Create FolderAccessAccountField component for selecting accounts with profile integration.
- Develop AssetLocalIdentities component for managing local identities associated with assets.
- Introduce LocalIdentityOwner component to display and manage local identity ownership.
- Add LocalIdentityEditor for creating, associating, and retiring local identities.
- Implement local identity API for fetching and executing local identity commands.
- Create tests for local identity UI components to ensure functionality and correctness.
- Add NetworkShareOptions class for structured and paginated SMB selection.
- Introduce NetworkShareAddress component for displaying and copying network share addresses.
- Create RemoteOptionList and RemoteOptionPicker components for remote option selection with pagination and search.
- Add tests for RemoteOptionList to validate rendering and behavior under various states.
2026-10-21 12:37:59 +02:00

36 lines
989 B
TypeScript

import { ContextHelp } from "@repo/rdx-ui/components/context-help";
import { FormHelp } from "@repo/rdx-ui/components/form-help";
import { useTranslation } from "react-i18next";
import type { HelpKind } from "../../shared/i18n";
export function EntityHelp({
kind,
scope,
placement = "body",
}: {
kind: HelpKind;
scope?: string;
placement?: "body" | "footer";
}) {
const { t } = useTranslation("access");
const catalogue = ["system", "resource_type", "permission", "template"].includes(kind);
const Help = placement === "footer" ? FormHelp : ContextHelp;
return (
<Help
description={t(`helpContent.${kind}.description`)}
examples={t(`helpContent.${kind}.examples`)}
examplesLabel={t("helpExamples")}
guidance={t(`helpContent.${kind}.guidance`)}
scopeNote={
catalogue && scope
? t(scope === "global" ? "helpGlobalScope" : "helpCompanyScope")
: undefined
}
title={t("helpTitle")}
/>
);
}