@topconsultnpm/sdkui-react-beta 6.12.55 → 6.12.57
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.
@@ -27,7 +27,7 @@ const TMUserAvatar = ({ name, returnType = 'jsx' }) => {
|
|
27
27
|
};
|
28
28
|
// Helper function to extract initials from name
|
29
29
|
const extractInitialsFromName = (name) => {
|
30
|
-
if (name.length >=
|
30
|
+
if (name.length >= 2) {
|
31
31
|
const lettersOnly = name.replace(/[^a-zA-Z]/g, '');
|
32
32
|
return lettersOnly.substring(0, 3).toUpperCase();
|
33
33
|
}
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
2
2
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
3
3
|
import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, RecentCategories, TemplateTIDs, DcmtTypeListCacheService, AccessLevels, SystemMIDsAsNumber, ArchiveConstraints } from '@topconsultnpm/sdk-ts-beta';
|
4
4
|
import styled from 'styled-components';
|
5
|
-
import {
|
5
|
+
import { getCommandsMenuItems, getSelectedDcmtsOrFocused } from './TMSearchResultsMenuItems';
|
6
6
|
import { ContextMenu } from 'devextreme-react';
|
7
|
-
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconTag, IconDetails, IconCommand, IconDelete, IconRefresh, IconMenuVertical, IconDownload, IconSignature,
|
7
|
+
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconTag, IconDetails, IconCommand, IconDelete, IconRefresh, IconMenuVertical, IconDownload, IconSignature, deepCompare, getDataColumnName, searchResultDescriptorToSimpleArray, SDKUI_Globals, IconArchive, IconActivityLog, IconStar, IconFreeSearch, IconChevronDown, searchResultToMetadataValues } from '../../../helper';
|
8
8
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
9
9
|
import { useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
|
10
10
|
import { DcmtOperationTypes, FormModes, SearchResultContext } from '../../../ts';
|
@@ -224,7 +224,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
224
224
|
return;
|
225
225
|
if (e.target === 'content') {
|
226
226
|
e.items = e.items || [];
|
227
|
-
const menuItems =
|
227
|
+
const menuItems = getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler);
|
228
228
|
e.items.push(...menuItems);
|
229
229
|
}
|
230
230
|
};
|
@@ -427,7 +427,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
427
427
|
if (!searchResults || searchResults.length <= 0)
|
428
428
|
return _jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '100%' }, children: [_jsx(IconBoard, { fontSize: 96 }), _jsx("div", { style: { fontSize: "15px", marginTop: "10px" }, children: SDKUI_Localizator.NoDcmtFound })] });
|
429
429
|
return (_jsx(StyledMultiViewPanel, { "$isVisible": isVisible, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: [_jsxs(TMSplitterLayout, { separatorSize: 5, separatorColor: 'transparent', showSeparator: (isOpenPreview || isOpenMiddlePanel() || isOpenBatchUpdate) && deviceType !== DeviceType.MOBILE, start: getPrimarySplitterStartLayout(), min: deviceType !== DeviceType.MOBILE && isOpenDcmtForm ? ['150px', '0'] : ['0', '0'], direction: 'horizontal', children: [_jsx(TMLayoutItem, { children: _jsxs(TMToolbarCard, { toolbar: _jsxs(_Fragment, { children: [context !== SearchResultContext.METADATA_SEARCH && fromDTD?.templateTID === TemplateTIDs.WF_WIApprView && _jsx(WorkFlowOperationButtons, { deviceType: deviceType, onApprove: () => setShowApprovePopup(true), onReject: () => setShowRejectPopup(true), onReAssign: () => setShowReAssignPopup(true), approveDisable: disable, rejectDisable: disable, reassignDisable: disable, infoDisable: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length !== 1 }), (dcmtsReturned != dcmtsFound) && _jsx("p", { style: { backgroundColor: `white`, color: TMColors.primaryColor, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${dcmtsReturned}/${dcmtsFound} restituiti` }), (context === SearchResultContext.RECENT || context === SearchResultContext.FAVORITES) &&
|
430
|
-
_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (context === SearchResultContext.RECENT ? '"Recenti"' : '"Preferiti"'), disabled: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length <= 0, onClick: removeDcmtFromFavsOrRecents }) }), _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconRefresh, { color: 'white' }), caption: SDKUI_Localizator.Refresh, onClick: onRefreshSearchAsync }), _jsx(IconMenuVertical, { id: `commands-header-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-header-${id}`, menuItems:
|
430
|
+
_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (context === SearchResultContext.RECENT ? '"Recenti"' : '"Preferiti"'), disabled: getSelectedDcmtsOrFocused(selectedItems, focusedItem).length <= 0, onClick: removeDcmtFromFavsOrRecents }) }), _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconRefresh, { color: 'white' }), caption: SDKUI_Localizator.Refresh, onClick: onRefreshSearchAsync }), _jsx(IconMenuVertical, { id: `commands-header-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-header-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] }), onBack: !isClosable && allowBackButton() ? onBack : undefined, onClose: isClosable && allowBackButton() ? onBack : undefined, items: showSearchResultSidebar ? sideBarItems : undefined, title: getTitleHeader(), showHeader: showToolbarHeader, children: [_jsxs(TMLayoutItem, { height: '100%', children: [_jsxs(TMSplitterLayout, { direction: 'horizontal', min: ['0', '0'], showSeparator: showSelector && deviceType !== DeviceType.MOBILE, start: showSelector ? deviceType !== DeviceType.MOBILE ? ['25%', '75%'] : splitterSize : ['0%', '100%'], children: [showSelector ?
|
431
431
|
_jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: searchResults, onSelectionChanged: onSearchResultSelectionChanged }) })
|
432
432
|
:
|
433
433
|
_jsx(_Fragment, {}), _jsxs(TMLayoutItem, { children: [_jsx(TMSearchResultGrid
|
@@ -435,7 +435,7 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
|
|
435
435
|
, {
|
436
436
|
// allowMultipleSelection={allowMultipleSelection}
|
437
437
|
inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, onDblClick: () => openFormHandler(LayoutModes.Update), onContextMenuPreparing: onContextMenuPreparing, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
|
438
|
-
_jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem)); } }), _jsx(TMButton, { btnStyle: 'icon', caption: 'Firma e marca', icon: _jsx(IconSignature, { color: 'white' }), onClick: () => { ShowAlert({ message: "TODO Firma e marca ", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), _jsx(
|
438
|
+
_jsxs(TMFloatingToolbar, { backgroundColor: TMColors.primaryColor, initialLeft: '10px', initialTop: 'calc(100% - 75px)', children: [fromDTD?.perm?.canRetrieveFile === AccessLevels.Yes && _jsx(TMButton, { btnStyle: 'icon', caption: "Download file", disabled: fromDTD?.perm?.canRetrieveFile !== AccessLevels.Yes, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem)); } }), _jsx(TMButton, { btnStyle: 'icon', caption: 'Firma e marca', icon: _jsx(IconSignature, { color: 'white' }), onClick: () => { ShowAlert({ message: "TODO Firma e marca ", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(CommandsContextMenu, { target: `#commands-floating-${id}`, menuItems: getCommandsMenuItems(fromDTD, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), op: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onUpdate: onUpdate, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) })] }), _jsx(ConfirmFormatDialog, {})] }) }), isOpenBatchUpdate ?
|
439
439
|
_jsx(StyledModalContainer, { style: { backgroundColor: 'white' }, children: _jsx(TMBatchUpdateForm, { inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => setIsOpenBatchUpdate(false), onSavedCallbackAsync: async () => {
|
440
440
|
setIsOpenBatchUpdate(false);
|
441
441
|
setIsModifiedBatchUpdate(false);
|
@@ -3,4 +3,4 @@ import { DcmtTypeDescriptor, FileFormats, LayoutModes, RecentCategories } from '
|
|
3
3
|
import { TMDataGridContextMenuItem } from '../../base/TMDataGrid';
|
4
4
|
import { DcmtInfo, DcmtOperationTypes, SearchResultContext } from '../../../ts';
|
5
5
|
export declare const getSelectedDcmtsOrFocused: (selectedItems: Array<any>, focusedItem: any, category?: RecentCategories, fileFormat?: FileFormats) => DcmtInfo[];
|
6
|
-
export declare const
|
6
|
+
export declare const getCommandsMenuItems: (dtd: DcmtTypeDescriptor | undefined, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => void, downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined) => Promise<void>, runOperationAsync: (inputDcmts: DcmtInfo[] | undefined, dcmtOperationType: DcmtOperationTypes, actionAfterOperationAsync?: () => Promise<void>) => Promise<void>, onRefreshSearchAsync: (() => Promise<void>) | undefined, onRefreshDataRowsAsync: (() => Promise<void>) | undefined, onRefreshAfterAddDcmtToFavs: (() => void) | undefined, confirmFormat: () => Promise<FileFormats>, openTaskFormHandler: (value: boolean) => void, openDetailDcmtsFormHandler: (value: boolean) => void, openMasterDcmtsFormHandler: (value: boolean) => void, openBatchUpdateFormHandler: (value: boolean) => void) => Array<TMDataGridContextMenuItem>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { AccessLevels, AccessLevelsEx, FileFormats, LayoutModes, SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
3
|
-
import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile,
|
2
|
+
import { AccessLevels, AccessLevelsEx, AppModules, FileFormats, LayoutModes, SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
3
|
+
import { IconActivity, IconArchiveDoc, IconBatchUpdate, IconCheckFile, IconCloseCircle, IconConvertFilePdf, IconDelete, IconDotsVerticalCircleOutline, IconDownload, IconFileDots, IconHide, IconInfo, IconPreview, IconRelation, IconSearch, IconShow, IconSignature, IconStar, IconSubstFile, IconUndo, SDKUI_Localizator, svgToString } from '../../../helper';
|
4
4
|
import ShowAlert from '../../base/TMAlert';
|
5
5
|
import { TMMessageBoxManager, ButtonNames, TMExceptionBoxManager } from '../../base/TMPopUp';
|
6
6
|
import TMSpinner from '../../base/TMSpinner';
|
@@ -23,7 +23,7 @@ export const getSelectedDcmtsOrFocused = (selectedItems, focusedItem, category,
|
|
23
23
|
}
|
24
24
|
return [];
|
25
25
|
};
|
26
|
-
export const
|
26
|
+
export const getCommandsMenuItems = (dtd, selectedItems, focusedItem, context, showFloatingBar, setShowFloatingBar, openFormHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, onRefreshDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler) => {
|
27
27
|
return [
|
28
28
|
{
|
29
29
|
icon: svgToString(_jsx(IconFileDots, {})),
|
@@ -34,34 +34,34 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
34
34
|
icon: svgToString(_jsx(IconStar, {})),
|
35
35
|
text: 'Aggiungi a "Preferiti"',
|
36
36
|
operationType: 'multiRow',
|
37
|
-
disabled:
|
37
|
+
disabled: context === SearchResultContext.FAVORITES || disabledForMultiRow(selectedItems, focusedItem),
|
38
38
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.AddToFavs); onRefreshAfterAddDcmtToFavs?.(); },
|
39
39
|
},
|
40
40
|
{
|
41
41
|
icon: svgToString(_jsx(IconSubstFile, {})),
|
42
42
|
text: "Aggiungi/sostituisci file",
|
43
43
|
operationType: 'singleRow',
|
44
|
-
disabled: dtd?.perm?.canSubstFile !== AccessLevels.Yes ? true :
|
44
|
+
disabled: dtd?.perm?.canSubstFile !== AccessLevels.Yes ? true : disabledForSingleRow(selectedItems, focusedItem),
|
45
45
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.SubstituteFile, onRefreshDataRowsAsync); }
|
46
46
|
},
|
47
47
|
{
|
48
48
|
icon: svgToString(_jsx(IconPreview, {})),
|
49
49
|
text: "Apri form",
|
50
50
|
operationType: 'singleRow',
|
51
|
-
disabled:
|
51
|
+
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
52
52
|
onClick: () => openFormHandler?.(LayoutModes.Update)
|
53
53
|
},
|
54
54
|
{
|
55
55
|
icon: svgToString(_jsx(IconDelete, {})),
|
56
56
|
text: "Cancellazione",
|
57
57
|
operationType: 'multiRow',
|
58
|
-
disabled:
|
58
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
59
59
|
items: [
|
60
60
|
{
|
61
61
|
icon: svgToString(_jsx(IconDelete, {})),
|
62
62
|
text: "Cancellazione logica",
|
63
63
|
operationType: 'multiRow',
|
64
|
-
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true :
|
64
|
+
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
65
65
|
onClick: async () => {
|
66
66
|
let dcmts = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
67
67
|
await runOperationAsync(dcmts, DcmtOperationTypes.LogDelete, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
|
@@ -71,7 +71,7 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
71
71
|
icon: svgToString(_jsx(IconUndo, {})),
|
72
72
|
text: "Ripristina",
|
73
73
|
operationType: 'multiRow',
|
74
|
-
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true :
|
74
|
+
disabled: dtd?.perm?.canLogicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
75
75
|
onClick: async () => {
|
76
76
|
let dcmts = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
77
77
|
await runOperationAsync(dcmts, DcmtOperationTypes.Undelete, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
|
@@ -81,7 +81,7 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
81
81
|
icon: svgToString(_jsx(IconCloseCircle, {})),
|
82
82
|
text: "Cancellazione fisica",
|
83
83
|
operationType: 'multiRow',
|
84
|
-
disabled: dtd?.perm?.canPhysicalDelete !== AccessLevels.Yes ? true :
|
84
|
+
disabled: dtd?.perm?.canPhysicalDelete !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
85
85
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.PhysDelete, onRefreshSearchAsync); }
|
86
86
|
},
|
87
87
|
]
|
@@ -90,14 +90,14 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
90
90
|
icon: svgToString(_jsx(IconCheckFile, {})),
|
91
91
|
text: "Controllo file",
|
92
92
|
operationType: 'multiRow',
|
93
|
-
disabled:
|
93
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
94
94
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.CheckFile); }
|
95
95
|
},
|
96
96
|
{
|
97
97
|
icon: svgToString(_jsx(IconConvertFilePdf, {})),
|
98
98
|
text: "Conversione file",
|
99
99
|
operationType: 'multiRow',
|
100
|
-
disabled:
|
100
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
101
101
|
onClick: async () => {
|
102
102
|
let format = await confirmFormat();
|
103
103
|
if (format === FileFormats.None)
|
@@ -106,33 +106,40 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
106
106
|
await runOperationAsync(dcmts, DcmtOperationTypes.ConvertFile, dcmts.length <= MAX_DCMTS_FOR_SELECTION_REFRESH ? onRefreshDataRowsAsync : onRefreshSearchAsync);
|
107
107
|
}
|
108
108
|
},
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
109
|
+
...(SDK_Globals.tmSession?.SessionDescr?.appModuleID === AppModules.SURFER
|
110
|
+
? [{
|
111
|
+
icon: svgToString(_jsx(IconActivity, {})),
|
112
|
+
text: SDKUI_Localizator.CreateContextualTask,
|
113
|
+
operationType: 'singleRow',
|
114
|
+
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
115
|
+
onClick: async () => {
|
116
|
+
openTaskFormHandler(true);
|
117
|
+
}
|
118
|
+
}] : []),
|
118
119
|
{
|
119
120
|
icon: svgToString(_jsx(IconDownload, {})),
|
120
121
|
operationType: 'multiRow',
|
121
|
-
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true :
|
122
|
+
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : disabledForMultiRow(selectedItems, focusedItem),
|
122
123
|
text: "Download file", onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem))
|
123
124
|
},
|
125
|
+
{
|
126
|
+
icon: svgToString(_jsx(IconDownload, {})),
|
127
|
+
operationType: 'singleRow',
|
128
|
+
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : disabledForSingleRow(selectedItems, focusedItem),
|
129
|
+
text: "Download allegati XML", onClick: () => downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem))
|
130
|
+
},
|
124
131
|
{
|
125
132
|
icon: svgToString(_jsx(IconArchiveDoc, {})),
|
126
133
|
text: "Duplica documento",
|
127
134
|
operationType: 'singleRow',
|
128
|
-
disabled: dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed ? true :
|
135
|
+
disabled: dtd?.perm?.canArchive !== AccessLevelsEx.Yes && dtd?.perm?.canArchive !== AccessLevelsEx.Mixed ? true : disabledForSingleRow(selectedItems, focusedItem),
|
129
136
|
onClick: () => { openFormHandler?.(LayoutModes.Ark); }
|
130
137
|
},
|
131
138
|
{
|
132
139
|
icon: svgToString(_jsx(IconBatchUpdate, {})),
|
133
140
|
text: "Modifica multipla",
|
134
141
|
operationType: 'multiRow',
|
135
|
-
disabled: dtd?.perm?.canUpdate !== AccessLevelsEx.Yes && dtd?.perm?.canUpdate !== AccessLevelsEx.Mixed ? true :
|
142
|
+
disabled: dtd?.perm?.canUpdate !== AccessLevelsEx.Yes && dtd?.perm?.canUpdate !== AccessLevelsEx.Mixed ? true : disabledForMultiRow(selectedItems, focusedItem),
|
136
143
|
onClick: () => openBatchUpdateFormHandler?.(true)
|
137
144
|
}
|
138
145
|
]
|
@@ -145,106 +152,106 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
145
152
|
{
|
146
153
|
icon: svgToString(_jsx(IconSignature, {})),
|
147
154
|
text: "Informazioni di firma",
|
148
|
-
operationType: '
|
149
|
-
disabled:
|
155
|
+
operationType: 'singleRow',
|
156
|
+
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
150
157
|
onClick: () => ShowAlert({ message: "TODO Informazioni di firma", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
151
158
|
},
|
152
159
|
{
|
153
160
|
icon: svgToString(_jsx(IconSignature, {})),
|
154
161
|
text: "Verifica firma",
|
155
162
|
operationType: 'multiRow',
|
156
|
-
disabled:
|
163
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
157
164
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.VerifySign); }
|
158
165
|
},
|
159
166
|
{
|
160
167
|
icon: svgToString(_jsx(IconSignature, {})),
|
161
168
|
operationType: 'multiRow',
|
162
|
-
disabled:
|
169
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
163
170
|
text: "Firma e marca", onClick: () => ShowAlert({ message: "TODO Firma e marca", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
164
171
|
},
|
165
172
|
]
|
166
173
|
},
|
167
|
-
{
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
},
|
174
|
+
// {
|
175
|
+
// icon: svgToString(<IconCheckIn />),
|
176
|
+
// text: "Check in",
|
177
|
+
// disabled: disabledForSingleRow(selectedItems, focusedItem) && disabledForMultiRow(selectedItems, focusedItem),
|
178
|
+
// items: [
|
179
|
+
// {
|
180
|
+
// icon: svgToString(<IconCheckIn />),
|
181
|
+
// operationType: 'singleRow',
|
182
|
+
// disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
183
|
+
// text: "Check out", onClick: () => ShowAlert({ message: "TODO Check out", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
184
|
+
// },
|
185
|
+
// {
|
186
|
+
// icon: svgToString(<IconCheckIn />),
|
187
|
+
// text: "Modifica file",
|
188
|
+
// operationType: 'singleRow',
|
189
|
+
// disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
190
|
+
// onClick: () => ShowAlert({ message: "TODO Modifica file", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
191
|
+
// },
|
192
|
+
// {
|
193
|
+
// icon: svgToString(<IconCheckIn />),
|
194
|
+
// text: "Annulla check out",
|
195
|
+
// operationType: 'singleRow',
|
196
|
+
// disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
197
|
+
// onClick: () => ShowAlert({ message: "TODO Annulla check out", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
198
|
+
// },
|
199
|
+
// {
|
200
|
+
// icon: svgToString(<IconCheckIn />),
|
201
|
+
// text: "Check in",
|
202
|
+
// operationType: 'singleRow',
|
203
|
+
// disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
204
|
+
// onClick: () => ShowAlert({ message: "TODO Check in", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
205
|
+
// },
|
206
|
+
// {
|
207
|
+
// icon: svgToString(<IconCheckIn />),
|
208
|
+
// text: "Cronologia",
|
209
|
+
// operationType: 'singleRow',
|
210
|
+
// disabled: fromDatagrid ? false : disabledForSingleRow(selectedItems, focusedItem),
|
211
|
+
// onClick: () => ShowAlert({ message: "TODO Cronologia", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
212
|
+
// },
|
213
|
+
// ]
|
214
|
+
// },
|
208
215
|
{
|
209
216
|
icon: svgToString(_jsx(IconRelation, {})),
|
210
217
|
text: "Correlazioni",
|
211
218
|
operationType: 'multiRow',
|
212
|
-
disabled:
|
219
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
213
220
|
items: [
|
214
|
-
{
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
},
|
221
|
-
{
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
},
|
228
|
-
{
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
},
|
236
|
-
{
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
},
|
221
|
+
// {
|
222
|
+
// icon: svgToString(<IconRelation />),
|
223
|
+
// text: "Abbina documenti molti a molti",
|
224
|
+
// operationType: 'multiRow',
|
225
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
226
|
+
// onClick: () => ShowAlert({ message: "TODO Abbina documenti molti a molti", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
227
|
+
// },
|
228
|
+
// {
|
229
|
+
// icon: svgToString(<IconRelation />),
|
230
|
+
// text: "Disabbina documenti molti a molti",
|
231
|
+
// operationType: 'multiRow',
|
232
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
233
|
+
// onClick: () => ShowAlert({ message: "TODO Disabbina documenti molti a molti", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
234
|
+
// },
|
235
|
+
// {
|
236
|
+
// icon: svgToString(<IconRelation />),
|
237
|
+
// text: "Archivia documento master",
|
238
|
+
// operationType: 'multiRow',
|
239
|
+
// beginGroup: true,
|
240
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
241
|
+
// onClick: () => ShowAlert({ message: "TODO Archivia documento master", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
242
|
+
// },
|
243
|
+
// {
|
244
|
+
// icon: svgToString(<IconRelation />),
|
245
|
+
// text: "Archivia documento dettaglio",
|
246
|
+
// operationType: 'multiRow',
|
247
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
248
|
+
// onClick: () => ShowAlert({ message: "TODO Archivia documento dettaglio", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
249
|
+
// },
|
243
250
|
{
|
244
251
|
icon: svgToString(_jsx(IconRelation, {})),
|
245
252
|
text: SDKUI_Localizator.DcmtsMaster,
|
246
253
|
operationType: 'singleRow',
|
247
|
-
visible:
|
254
|
+
visible: true,
|
248
255
|
beginGroup: true,
|
249
256
|
disabled: disabledForSingleRow(selectedItems, focusedItem),
|
250
257
|
onClick: () => openMasterDcmtsFormHandler?.(true)
|
@@ -253,39 +260,39 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
253
260
|
icon: svgToString(_jsx(IconRelation, {})),
|
254
261
|
text: SDKUI_Localizator.DcmtsDetail,
|
255
262
|
operationType: 'multiRow',
|
256
|
-
visible:
|
257
|
-
disabled:
|
263
|
+
visible: true,
|
264
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
258
265
|
onClick: () => openDetailDcmtsFormHandler?.(true)
|
259
266
|
}
|
260
267
|
]
|
261
268
|
},
|
262
|
-
{
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
},
|
269
|
+
// {
|
270
|
+
// icon: svgToString(<IconShare />),
|
271
|
+
// text: "Condivisione",
|
272
|
+
// operationType: 'multiRow',
|
273
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
274
|
+
// items: [
|
275
|
+
// {
|
276
|
+
// icon: svgToString(<IconShare />),
|
277
|
+
// text: "Archiviazione condivisa",
|
278
|
+
// operationType: 'multiRow',
|
279
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
280
|
+
// onClick: () => ShowAlert({ message: "TODO Archiviazione condivisa", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
281
|
+
// },
|
282
|
+
// {
|
283
|
+
// icon: svgToString(<IconSharedDcmt />),
|
284
|
+
// text: "Documenti condivisi",
|
285
|
+
// operationType: 'multiRow',
|
286
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
287
|
+
// onClick: () => ShowAlert({ message: "TODO Documenti condivisi", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
288
|
+
// }
|
289
|
+
// ]
|
290
|
+
// },
|
284
291
|
{
|
285
292
|
icon: svgToString(_jsx(IconSearch, {})),
|
286
293
|
text: "Ricerca full text",
|
287
294
|
operationType: 'multiRow',
|
288
|
-
disabled:
|
295
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
289
296
|
items: [
|
290
297
|
{
|
291
298
|
icon: svgToString(_jsx(IconInfo, {})),
|
@@ -311,14 +318,14 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
311
318
|
icon: svgToString(_jsx(IconArchiveDoc, {})),
|
312
319
|
text: "Indicizza (o re-indicizza)",
|
313
320
|
operationType: 'multiRow',
|
314
|
-
disabled:
|
321
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
315
322
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchReindex); }
|
316
323
|
},
|
317
324
|
{
|
318
325
|
icon: svgToString(_jsx(IconDelete, {})),
|
319
326
|
text: "Elimina indicizzazione",
|
320
327
|
operationType: 'multiRow',
|
321
|
-
disabled:
|
328
|
+
disabled: disabledForMultiRow(selectedItems, focusedItem),
|
322
329
|
onClick: async () => { await runOperationAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DcmtOperationTypes.FreeSearchPurge); }
|
323
330
|
}
|
324
331
|
]
|
@@ -327,49 +334,49 @@ export const commandsMenuItems = (dtd, selectedItems, focusedItem, context, show
|
|
327
334
|
icon: svgToString(_jsx(IconDotsVerticalCircleOutline, {})),
|
328
335
|
text: "Altro",
|
329
336
|
items: [
|
330
|
-
{
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
},
|
337
|
-
{
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
},
|
337
|
+
// {
|
338
|
+
// icon: svgToString(<IconExportTo />),
|
339
|
+
// text: "Esporta in...",
|
340
|
+
// operationType: 'multiRow',
|
341
|
+
// disabled: fromDatagrid ? false : disabledForMultiRow(selectedItems, focusedItem),
|
342
|
+
// onClick: () => ShowAlert({ message: "TODO Esporta in", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
343
|
+
// },
|
344
|
+
// {
|
345
|
+
// icon: svgToString(<IconShow />),
|
346
|
+
// text: "Mostra footer",
|
347
|
+
// disabled: false,
|
348
|
+
// onClick: () => ShowAlert({ message: "TODO Mostra footer", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
349
|
+
// },
|
343
350
|
{
|
344
351
|
icon: svgToString(showFloatingBar ? _jsx(IconHide, {}) : _jsx(IconShow, {})),
|
345
352
|
text: showFloatingBar ? "Nascondi floating bar" : "Mostra floating bar",
|
346
353
|
disabled: false,
|
347
354
|
onClick: () => setShowFloatingBar(!showFloatingBar)
|
348
355
|
},
|
349
|
-
{
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
},
|
355
|
-
{
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
}
|
356
|
+
// {
|
357
|
+
// icon: svgToString(<IconSave />),
|
358
|
+
// text: "Salva layout",
|
359
|
+
// disabled: false,
|
360
|
+
// onClick: () => ShowAlert({ message: "TODO Salva layout", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
361
|
+
// },
|
362
|
+
// {
|
363
|
+
// icon: svgToString(<IconSearch />),
|
364
|
+
// text: "Trova tutti i riferimenti",
|
365
|
+
// items: [
|
366
|
+
// {
|
367
|
+
// icon: svgToString(<IconSearch />),
|
368
|
+
// text: "Trova tutti i riferimenti",
|
369
|
+
// disabled: false,
|
370
|
+
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
371
|
+
// },
|
372
|
+
// {
|
373
|
+
// icon: svgToString(<IconSearch />),
|
374
|
+
// text: "Trova tutti i riferimenti (anche nello storico)",
|
375
|
+
// disabled: false,
|
376
|
+
// onClick: () => ShowAlert({ message: "TODO Trova tutti i riferimenti (anche nello storico)", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
377
|
+
// },
|
378
|
+
// ]
|
379
|
+
// }
|
373
380
|
]
|
374
381
|
}
|
375
382
|
];
|