diff --git a/webui/src/module.ts b/webui/src/module.ts index bd6ff95..0da9ca3 100644 --- a/webui/src/module.ts +++ b/webui/src/module.ts @@ -1,5 +1,6 @@ import { createElement, lazy } from "react"; -import { Button, type OrganizationFunctionActionsUiCapability, type PlatformWebModule } from "@govoplan/core-webui"; +import { Users } from "lucide-react"; +import type { OrganizationFunctionActionsUiCapability, PlatformWebModule } from "@govoplan/core-webui"; import { generatedTranslations } from "./i18n/generatedTranslations"; import "./styles/idm.css"; @@ -20,23 +21,15 @@ const organizationFunctionActions: OrganizationFunctionActionsUiCapability = { actions: [ { id: "idm.view-function-assignments", - label: "i18n:govoplan-idm.assignments.a0d19ec5", + label: "i18n:govoplan-idm.view_assignments.2d40d6a5", + icon: createElement(Users, { size: 16 }), anyOf: idmReadScopes, order: 40, - render: ({ function: item }) => createElement( - Button, - { - type: "button", - variant: "ghost", - title: "i18n:govoplan-idm.view_assignments.2d40d6a5", - onClick: () => { - if (typeof window !== "undefined") { - window.location.href = `/idm?function_id=${encodeURIComponent(item.id)}`; - } - } - }, - "i18n:govoplan-idm.assignments.a0d19ec5" - ) + onClick: ({ function: item }) => { + if (typeof window !== "undefined") { + window.location.href = `/idm?function_id=${encodeURIComponent(item.id)}`; + } + } } ] };