fix(Map): Copy-Paste restriction: support from FE side - fixed problem with incorrect disabling copy and paste buttons

This commit is contained in:
DanSylvest
2025-10-21 09:20:41 +03:00
parent 81d3495b65
commit 74e0b85748
2 changed files with 12 additions and 1 deletions

View File

@@ -24,7 +24,6 @@ export const ContextMenuSystemMultiple: React.FC<ContextMenuSystemMultipleProps>
const items: MenuItem[] = useMemo(() => {
const allowCopy = checkPermissions(userPermissions, options.allowed_copy_for);
return [
{
label: 'Delete',
@@ -38,6 +37,10 @@ export const ContextMenuSystemMultiple: React.FC<ContextMenuSystemMultipleProps>
command: onCopySystems,
disabled: !allowCopy,
template: () => {
if (allowCopy) {
return <WdMenuItem icon="pi pi-copy">Copy</WdMenuItem>;
}
return (
<MenuItemWithInfo
infoTitle="Action is blocked because you dont have permission to Copy."