@topconsultnpm/sdkui-react 6.20.0-dev1.32 → 6.20.0-dev1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -728,11 +728,11 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
728
728
|
const customButtonsItems = customButtonsLayout.customButtons
|
|
729
729
|
.filter((customButton) => customButton.isForUpdate && customButton.isForUpdate > 0)
|
|
730
730
|
.map((customButton) => ({
|
|
731
|
-
icon: TMImageLibrary({ imageID: customButton.glyphID
|
|
731
|
+
icon: TMImageLibrary({ imageID: customButton.glyphID }),
|
|
732
732
|
name: customButton.title || 'Bottone personalizzato',
|
|
733
733
|
onClick: () => setCustomButton(customButton)
|
|
734
734
|
}));
|
|
735
|
-
items.push({
|
|
735
|
+
customButtonsItems && customButtonsItems.length > 0 && items.push({
|
|
736
736
|
icon: _jsx(IconCheck, {}),
|
|
737
737
|
name: SDKUI_Localizator.CustomButtons,
|
|
738
738
|
submenu: customButtonsItems
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
3
3
|
import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, SystemMIDsAsNumber, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, AccessLevelsEx, LayoutCacheService, UserListCacheService } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { getAllFieldSelectedDcmtsOrFocused, getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
|
|
6
|
-
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, IconCheck,
|
|
6
|
+
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, IconCheck, TMImageLibrary, convertSearchResultDescriptorToFileItems } from '../../../helper';
|
|
7
7
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
8
8
|
import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
|
|
9
9
|
import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
|
|
@@ -360,15 +360,15 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
360
360
|
const customButtonMenuItems = () => {
|
|
361
361
|
const customButtonsItems = customButtonsLayout?.customButtons?.filter((customButton) => customButton.isForSearchResult && customButton.isForSearchResult > 0)
|
|
362
362
|
.map((customButton) => ({
|
|
363
|
-
icon:
|
|
363
|
+
icon: TMImageLibrary({ imageID: customButton.glyphID }),
|
|
364
364
|
name: customButton.title || 'Bottone personalizzato',
|
|
365
365
|
onClick: () => setCustomButton(customButton)
|
|
366
366
|
}));
|
|
367
|
-
return {
|
|
367
|
+
return customButtonsItems && customButtonsItems.length > 0 ? {
|
|
368
368
|
icon: _jsx(IconCheck, {}),
|
|
369
369
|
name: SDKUI_Localizator.CustomButtons,
|
|
370
370
|
submenu: customButtonsItems
|
|
371
|
-
};
|
|
371
|
+
} : {};
|
|
372
372
|
};
|
|
373
373
|
const onContextMenuPreparing = (e) => {
|
|
374
374
|
if (e === undefined)
|