refactor(webui): describe function assignment action
This commit is contained in:
@@ -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: () => {
|
||||
onClick: ({ function: item }) => {
|
||||
if (typeof window !== "undefined") {
|
||||
window.location.href = `/idm?function_id=${encodeURIComponent(item.id)}`;
|
||||
}
|
||||
}
|
||||
},
|
||||
"i18n:govoplan-idm.assignments.a0d19ec5"
|
||||
)
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user