@topconsultnpm/sdkui-react 6.20.0-dev1.4 → 6.20.0-dev1.6
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.
- package/lib/components/editors/TMHtmlEditor.js +1 -1
- package/lib/components/features/documents/TMDcmtBlog.d.ts +1 -7
- package/lib/components/features/documents/TMDcmtBlog.js +29 -2
- package/lib/components/features/documents/TMDcmtForm.js +8 -23
- package/lib/components/features/search/TMSearchResult.js +156 -44
- package/lib/components/features/search/TMSearchResultCheckoutInfoForm.js +3 -3
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +1 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +16 -16
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +0 -1
- package/lib/helper/SDKUI_Globals.d.ts +3 -14
- package/lib/helper/SDKUI_Localizator.d.ts +7 -0
- package/lib/helper/SDKUI_Localizator.js +88 -0
- package/lib/helper/TMUtils.d.ts +3 -1
- package/lib/helper/TMUtils.js +51 -0
- package/lib/helper/checkinCheckoutManager.d.ts +55 -0
- package/lib/helper/checkinCheckoutManager.js +271 -0
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/services/platform_services.d.ts +1 -1
- package/package.json +1 -1
- package/lib/helper/cicoHelper.d.ts +0 -31
- package/lib/helper/cicoHelper.js +0 -155
|
@@ -170,7 +170,7 @@ const TMHtmlEditor = (props) => {
|
|
|
170
170
|
justifyContent: 'flex-end',
|
|
171
171
|
fontSize: 12,
|
|
172
172
|
color: '#6c757d',
|
|
173
|
-
marginTop: 4,
|
|
173
|
+
marginTop: showInfoIcon ? 0 : 4,
|
|
174
174
|
gap: 4,
|
|
175
175
|
}, children: [`${Math.max(charactersRemaining, 0)} ${SDKUI_Localizator.CharactersRemaining}`, showInfoIcon && (_jsx(TMTooltip, { content: 'Markup HTML', children: _jsx("span", { className: "dx-icon-codeblock", style: { fontSize: 22, cursor: 'pointer' }, onClick: () => {
|
|
176
176
|
TMMessageBoxManager.show({
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HomeBlogPost, TaskDescriptor } from '@topconsultnpm/sdk-ts';
|
|
3
3
|
interface ITMDcmtBlogProps {
|
|
4
|
-
blogsDatasource: HomeBlogPost[];
|
|
5
|
-
setBlogsDatasource: (posts: HomeBlogPost[]) => void;
|
|
6
|
-
hasLoadedDataOnce: boolean;
|
|
7
|
-
setHasLoadedDataOnce: (loaded: boolean) => void;
|
|
8
|
-
lastLoadedDid: number | undefined;
|
|
9
|
-
setLastLoadedDid: (did: number | undefined) => void;
|
|
10
4
|
tid: number | undefined;
|
|
11
5
|
did: number | undefined;
|
|
12
|
-
fetchBlogDataAsync: (tid: number | undefined, did: number | undefined) => Promise<void>;
|
|
13
6
|
isVisible?: boolean;
|
|
7
|
+
fetchBlogDataTrigger?: number;
|
|
14
8
|
allTasks?: Array<TaskDescriptor>;
|
|
15
9
|
getAllTasks?: () => Promise<void>;
|
|
16
10
|
deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
|
|
@@ -6,13 +6,40 @@ import { TMNothingToShow } from './TMDcmtPreview';
|
|
|
6
6
|
import { IconBoard, SDKUI_Localizator } from '../../../helper';
|
|
7
7
|
import TMBlogCommentForm from '../blog/TMBlogCommentForm';
|
|
8
8
|
import TMBlogsPost from '../../grids/TMBlogsPost';
|
|
9
|
-
|
|
9
|
+
import TMSpinner from '../../base/TMSpinner';
|
|
10
|
+
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
11
|
+
const TMDcmtBlog = ({ tid, did, isVisible, fetchBlogDataTrigger, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers }) => {
|
|
12
|
+
const [blogsDatasource, setBlogsDatasource] = useState([]);
|
|
13
|
+
const [hasLoadedDataOnce, setHasLoadedDataOnce] = useState(false); //traccia se *qualsiasi* dato è stato caricato per la prima volta
|
|
14
|
+
const [lastLoadedDid, setLastLoadedDid] = useState(undefined); // `lastLoadedDid` tiene traccia dell'ultimo `did` per cui abbiamo caricato i dati
|
|
10
15
|
// State to manage show comment form selected file
|
|
11
16
|
const [showCommentForm, setShowCommentForm] = useState(false);
|
|
12
17
|
const [externalBlogPost, setExternalBlogPost] = useState(undefined);
|
|
18
|
+
const fetchBlogDataAsync = useCallback(async (tid, did) => {
|
|
19
|
+
try {
|
|
20
|
+
TMSpinner.show({ description: 'Caricamento - Bacheca...' });
|
|
21
|
+
const res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
|
|
22
|
+
setBlogsDatasource(res ?? []);
|
|
23
|
+
setHasLoadedDataOnce(true);
|
|
24
|
+
setLastLoadedDid(did);
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
let err = e;
|
|
28
|
+
TMExceptionBoxManager.show({ exception: err });
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
TMSpinner.hide();
|
|
32
|
+
}
|
|
33
|
+
}, []);
|
|
13
34
|
const showCommentFormCallback = useCallback(() => {
|
|
14
35
|
setShowCommentForm(true);
|
|
15
36
|
}, []);
|
|
37
|
+
// useEffect per triggerare il fetch dall'esterno tramite props
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (fetchBlogDataTrigger !== undefined && fetchBlogDataTrigger > 0) {
|
|
40
|
+
fetchBlogDataAsync(tid, did);
|
|
41
|
+
}
|
|
42
|
+
}, [fetchBlogDataTrigger, fetchBlogDataAsync, tid, did]);
|
|
16
43
|
useEffect(() => {
|
|
17
44
|
if (!tid || !did) {
|
|
18
45
|
setBlogsDatasource([]);
|
|
@@ -21,7 +48,7 @@ const TMDcmtBlog = ({ blogsDatasource, setBlogsDatasource, hasLoadedDataOnce, se
|
|
|
21
48
|
}
|
|
22
49
|
// Condizione per eseguire il fetch:
|
|
23
50
|
// 1. Il pannello è visibile
|
|
24
|
-
// 2. E (non abbiamo ancora caricato dati
|
|
51
|
+
// 2. E (non abbiamo ancora caricato dati o il `did` è cambiato rispetto all'ultima volta)
|
|
25
52
|
const shouldFetch = isVisible && (!hasLoadedDataOnce || did !== lastLoadedDid);
|
|
26
53
|
// Esegui la chiamata API solo se il pannello è visibile E i dati non sono già stati caricati
|
|
27
54
|
// O, se vuoi ricaricare ogni volta che diventa visibile (ma è meno efficiente per "pesante")
|
|
@@ -96,10 +96,11 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
96
96
|
const [isInitialLoading, setIsInitialLoading] = useState(true);
|
|
97
97
|
const [isNavigating, setIsNavigating] = useState(false);
|
|
98
98
|
const [dcmtReferences, setDcmtReferences] = useState(undefined);
|
|
99
|
-
//
|
|
100
|
-
const [
|
|
101
|
-
const
|
|
102
|
-
|
|
99
|
+
// Stato per triggerare il refresh del blog dall'esterno
|
|
100
|
+
const [refreshBlogTrigger, setRefreshBlogTrigger] = useState(0);
|
|
101
|
+
const triggerBlogRefresh = useCallback(async () => {
|
|
102
|
+
setRefreshBlogTrigger(prev => prev + 1);
|
|
103
|
+
}, []);
|
|
103
104
|
useEffect(() => {
|
|
104
105
|
if (!allowButtonsRefs)
|
|
105
106
|
setDcmtReferences(undefined);
|
|
@@ -1004,28 +1005,12 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1004
1005
|
setShowAll(true);
|
|
1005
1006
|
}
|
|
1006
1007
|
}, [shouldShowAll, showAll]);
|
|
1007
|
-
const fetchBlogDataAsync = useCallback(async (tid, did) => {
|
|
1008
|
-
try {
|
|
1009
|
-
TMSpinner.show({ description: 'Caricamento - Bacheca...' });
|
|
1010
|
-
const res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
|
|
1011
|
-
setBlogsDatasource(res ?? []);
|
|
1012
|
-
setHasLoadedDataOnce(true);
|
|
1013
|
-
setLastLoadedDid(did);
|
|
1014
|
-
}
|
|
1015
|
-
catch (e) {
|
|
1016
|
-
let err = e;
|
|
1017
|
-
TMExceptionBoxManager.show({ exception: err });
|
|
1018
|
-
}
|
|
1019
|
-
finally {
|
|
1020
|
-
TMSpinner.hide();
|
|
1021
|
-
}
|
|
1022
|
-
}, []);
|
|
1023
1008
|
const afterTaskSaved = useCallback(async (task, formMode, forceRefresh = false) => {
|
|
1024
1009
|
const shouldRefresh = forceRefresh || (task && task.state === Task_States.Completed) || formMode === FormModes.Create || formMode === FormModes.Duplicate;
|
|
1025
1010
|
if (TID && DID && shouldRefresh) {
|
|
1026
|
-
await
|
|
1011
|
+
await triggerBlogRefresh();
|
|
1027
1012
|
}
|
|
1028
|
-
}, [TID, DID]);
|
|
1013
|
+
}, [TID, DID, triggerBlogRefresh]);
|
|
1029
1014
|
const tmDcmtForm = useMemo(() => {
|
|
1030
1015
|
return _jsx(_Fragment, { children: metadataValuesSource.length > 0 &&
|
|
1031
1016
|
_jsxs(StyledToolbarCardContainer, { children: [_jsx(TMMetadataValues, { TID: TID, metadataValues: metadataValuesSource, metadataValuesOrig: metadataValuesSourceOrig, isExpertMode: isExpertMode, isOpenDistinctValues: isOpenDistinctValues, openChooserBySingleClick: !isOpenDistinctValues, selectedMID: focusedMetadataValue?.mid, isReadOnly: formMode === FormModes.ReadOnly, layoutMode: layoutMode, deviceType: deviceType, validationItems: validationItems, inputMids: inputMids, layout: layout, onFocusedItemChanged: (item) => { (item?.mid !== focusedMetadataValue?.mid) && setFocusedMetadataValue(item); }, onValueChanged: (newItems) => {
|
|
@@ -1075,7 +1060,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1075
1060
|
handleUndo,
|
|
1076
1061
|
handleClearForm
|
|
1077
1062
|
]);
|
|
1078
|
-
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, {
|
|
1063
|
+
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: TID, did: DID, allTasks: allTasks, fetchBlogDataTrigger: refreshBlogTrigger, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [TID, DID, allTasks, refreshBlogTrigger]);
|
|
1079
1064
|
const tmSysMetadata = useMemo(() => _jsx(TMMetadataValues, { layoutMode: layoutMode, openChooserBySingleClick: !isOpenDistinctValues, TID: TID, isReadOnly: true, deviceType: deviceType, metadataValues: formData.filter(o => (o.mid != undefined && o.mid <= 100)), metadataValuesOrig: formData.filter(o => (o.mid != undefined && o.mid <= 100)), validationItems: [], inputMids: inputMids }), [TID, layoutMode, formData, deviceType, inputMids]);
|
|
1080
1065
|
const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt, dcmtFile: dcmtFile ?? inputFile, deviceType: deviceType, fromDTD: fromDTD, layoutMode: layoutMode, onFileUpload: (file) => {
|
|
1081
1066
|
setDcmtFile(file);
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import { SDK_Globals, DataColumnTypes, MetadataDataDomains, DataListViewModes, MetadataFormats, LayoutModes, TemplateTIDs, DcmtTypeListCacheService, AccessLevels, SystemMIDsAsNumber, RetrieveFileOptions, DcmtOpers, GeneralRetrieveFormats, AccessLevelsEx, ResultTypes, 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, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMCommandsContextMenu, getExceptionMessage, IconCheck, svgToString, TMImageLibrary } from '../../../helper';
|
|
6
|
+
import { genUniqueId, IconShow, IconBoard, IconDcmtTypeSys, IconDetailDcmts, SDKUI_Localizator, IconDelete, IconRefresh, IconMenuVertical, IconDownload, deepCompare, generateUniqueColumnKeys, searchResultDescriptorToSimpleArray, searchResultToMetadataValues, IconSearchCheck, TMCommandsContextMenu, getExceptionMessage, IconCheck, svgToString, TMImageLibrary, SDKUI_Globals, convertSearchResultDescriptorToFileItems, dcmtsFileCachePreview, removeDcmtsFileCache } from '../../../helper';
|
|
7
7
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
8
8
|
import { useInputAttachmentsDialog, useInputCvtFormatDialog } from '../../../hooks/useInputDialog';
|
|
9
9
|
import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
|
|
@@ -43,9 +43,11 @@ import { TMResultManager } from '../../forms/TMResultDialog';
|
|
|
43
43
|
import TMCustomButton from '../../base/TMCustomButton';
|
|
44
44
|
import ToppyDraggableHelpCenter from '../assistant/ToppyDraggableHelpCenter';
|
|
45
45
|
import TMSignSettingsForm from './TMSignSettingsForm';
|
|
46
|
-
import {
|
|
46
|
+
import { getDcmtCicoStatus, cicoDownloadFilesCallback, getCicoDownloadFileName, renderCicoCheckInContent, validateCicoFileName, updateCheckoutItem } from '../../../helper/checkinCheckoutManager';
|
|
47
47
|
import TMSearchResultCheckoutInfoForm from './TMSearchResultCheckoutInfoForm';
|
|
48
48
|
import TMViewHistoryDcmt from './TMViewHistoryDcmt';
|
|
49
|
+
import TMBlogCommentForm from '../blog/TMBlogCommentForm';
|
|
50
|
+
let abortControllerLocal = new AbortController();
|
|
49
51
|
//#region Helper Methods
|
|
50
52
|
export const getSearchResultCountersSingleCategory = (searchResults) => {
|
|
51
53
|
// let totDcmtTypes = searchResults.length;
|
|
@@ -109,15 +111,39 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
109
111
|
const disableSignApproveDisable = selectedDocs.length !== 1 || (selectedDocs.length === 1 && selectedDocs[0].FILEEXT === null);
|
|
110
112
|
const dcmtsReturned = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsReturned : searchResults[0]?.dcmtsReturned ?? 0);
|
|
111
113
|
const dcmtsFound = (searchResults?.length > 1 ? selectedSearchResult?.dcmtsFound : searchResults[0]?.dcmtsFound ?? 0);
|
|
112
|
-
// Dcmt Blog states
|
|
113
|
-
const [blogsDatasource, setBlogsDatasource] = useState([]);
|
|
114
|
-
const [hasLoadedDataOnce, setHasLoadedDataOnce] = useState(false); //traccia se *qualsiasi* dato è stato caricato per la prima volta
|
|
115
|
-
const [lastLoadedDid, setLastLoadedDid] = useState(undefined); // `lastLoadedDid` tiene traccia dell'ultimo `did` per cui abbiamo caricato i dati
|
|
116
114
|
// State to manage show history selected file
|
|
117
115
|
const [showHistory, setShowHistory] = useState(false);
|
|
118
116
|
const [allUsers, setAllUsers] = useState([]);
|
|
119
117
|
// State to manage show history selected file
|
|
120
118
|
const [showCheckoutInformationForm, setShowCheckoutInformationForm] = useState(false);
|
|
119
|
+
// State variable to control the visibility of the wait panel
|
|
120
|
+
const [showLocalWaitPanel, setShowLocalWaitPanel] = useState(false);
|
|
121
|
+
// State variable to store the title of the wait panel
|
|
122
|
+
const [localWaitPanelTitle, setLocalWaitPanelTitle] = useState('');
|
|
123
|
+
// State variable to control the visibility of the primary section of the wait panel
|
|
124
|
+
const [localShowPrimary, setLocalShowPrimary] = useState(false);
|
|
125
|
+
// State variable to store the primary text of the wait panel
|
|
126
|
+
const [localWaitPanelTextPrimary, setLocalWaitPanelTextPrimary] = useState('');
|
|
127
|
+
// State variable to track the current value of the primary progress indicator in the wait panel
|
|
128
|
+
const [localWaitPanelValuePrimary, setLocalWaitPanelValuePrimary] = useState(0);
|
|
129
|
+
// State variable to define the maximum value for the primary progress indicator in the wait panel
|
|
130
|
+
const [localWaitPanelMaxValuePrimary, setLocalWaitPanelMaxValuePrimary] = useState(0);
|
|
131
|
+
/* State to manage show attachment badge on comment form */
|
|
132
|
+
const [removeAndEditAttachmentCommentForm, setRemoveAndEditAttachmentCommentForm] = useState(true);
|
|
133
|
+
// State to manage show comment form selected file
|
|
134
|
+
const [showCommentForm, setShowCommentForm] = useState(false);
|
|
135
|
+
// State to manage show comment form close button
|
|
136
|
+
const [isCommentRequired, setIsCommentRequired] = useState(false);
|
|
137
|
+
// Stato per triggerare il refresh del blog dall'esterno
|
|
138
|
+
const [refreshBlogTrigger, setRefreshBlogTrigger] = useState(0);
|
|
139
|
+
// Stato per triggerare il refresh della preview dall'esterno
|
|
140
|
+
const [refreshPreviewTrigger, setRefreshPreviewTrigger] = useState(0);
|
|
141
|
+
const triggerBlogRefresh = useCallback(async () => {
|
|
142
|
+
setRefreshBlogTrigger(prev => prev + 1);
|
|
143
|
+
}, []);
|
|
144
|
+
const triggerPreviewRefresh = useCallback(() => {
|
|
145
|
+
setRefreshPreviewTrigger(prev => prev + 1);
|
|
146
|
+
}, []);
|
|
121
147
|
useEffect(() => {
|
|
122
148
|
const fetchAllUsers = async () => {
|
|
123
149
|
const users = await UserListCacheService.GetAllAsync();
|
|
@@ -297,6 +323,28 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
297
323
|
const showCheckoutInformationFormCallback = useCallback(() => {
|
|
298
324
|
setShowCheckoutInformationForm(true);
|
|
299
325
|
}, []);
|
|
326
|
+
const showCommentFormCallback = useCallback(() => {
|
|
327
|
+
setShowCommentForm(true);
|
|
328
|
+
}, []);
|
|
329
|
+
const infoCheckCopyToClipboard = () => {
|
|
330
|
+
const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
331
|
+
const firstDoc = selectedDocs?.[0];
|
|
332
|
+
if (!firstDoc)
|
|
333
|
+
return;
|
|
334
|
+
const defaultCheckInOutFolder = SDKUI_Globals.userSettings.defaultCheckInOutFolder ?? "Download";
|
|
335
|
+
const wGSDraftCheckoutItemCurrentItems = [...SDKUI_Globals.userSettings.dcmtCheckoutInfo];
|
|
336
|
+
const existingItem = wGSDraftCheckoutItemCurrentItems.find((item) => item.TID === firstDoc.TID.toString() && item.DID === firstDoc.DID.toString());
|
|
337
|
+
const folder = existingItem && existingItem.checkoutFolder && existingItem.checkoutFolder !== "" ? existingItem.checkoutFolder : defaultCheckInOutFolder;
|
|
338
|
+
const name = existingItem?.checkoutName ?? getCicoDownloadFileName({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: fromDTD?.name ?? SDKUI_Localizator.SearchResult }, true, false);
|
|
339
|
+
const textToCopy = folder ? `${folder}\\${name}` : name;
|
|
340
|
+
navigator.clipboard.writeText(textToCopy)
|
|
341
|
+
.then(() => {
|
|
342
|
+
ShowAlert({ message: SDKUI_Localizator.OperationSuccess, mode: 'success', duration: 5000, title: SDKUI_Localizator.CopyToClipboard });
|
|
343
|
+
})
|
|
344
|
+
.catch(err => {
|
|
345
|
+
ShowAlert({ message: err, mode: 'error', duration: 5000, title: SDKUI_Localizator.OperationResult });
|
|
346
|
+
});
|
|
347
|
+
};
|
|
300
348
|
const getTitleHeader = () => {
|
|
301
349
|
let counters = (showSelector && disableAccordionIfSingleCategory && searchResults.length > 1) ? getSearchResultCountersSingleCategory(searchResults) : "";
|
|
302
350
|
if (title)
|
|
@@ -372,7 +420,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
372
420
|
return;
|
|
373
421
|
if (e.target === 'content') {
|
|
374
422
|
e.items = e.items || [];
|
|
375
|
-
const menuItems = getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
|
|
423
|
+
const menuItems = getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation);
|
|
376
424
|
e.items.push(...menuItems);
|
|
377
425
|
e.items.push(customButtonMenuItems());
|
|
378
426
|
}
|
|
@@ -389,10 +437,15 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
389
437
|
message: msg,
|
|
390
438
|
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
391
439
|
onButtonClick: async (e) => {
|
|
392
|
-
let result = [];
|
|
393
440
|
if (e !== ButtonNames.YES)
|
|
394
441
|
return;
|
|
442
|
+
let result = [];
|
|
395
443
|
try {
|
|
444
|
+
setLocalWaitPanelTitle(title);
|
|
445
|
+
setShowLocalWaitPanel(true);
|
|
446
|
+
setLocalShowPrimary(true);
|
|
447
|
+
abortControllerLocal = new AbortController();
|
|
448
|
+
let i = 0;
|
|
396
449
|
const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
|
|
397
450
|
if (ue) {
|
|
398
451
|
ue.TID = firstDoc.TID;
|
|
@@ -401,26 +454,21 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
401
454
|
await ue.CheckOutAsync()
|
|
402
455
|
.then(async () => {
|
|
403
456
|
const filename = fromDTD?.nameLoc || SDKUI_Localizator.SearchResult;
|
|
404
|
-
await
|
|
405
|
-
result.push({ rowIndex:
|
|
457
|
+
await cicoDownloadFilesCallback([{ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: filename }], true, downloadDcmtsAsync);
|
|
458
|
+
result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
406
459
|
await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
|
|
407
460
|
})
|
|
408
461
|
.catch((error) => {
|
|
409
|
-
result.push({ rowIndex:
|
|
462
|
+
result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
|
|
410
463
|
throw error;
|
|
411
464
|
});
|
|
412
465
|
}
|
|
413
466
|
else {
|
|
414
467
|
await ue.UndoCheckOutAsync()
|
|
415
468
|
.then(async () => {
|
|
416
|
-
result.push({ rowIndex:
|
|
469
|
+
result.push({ rowIndex: i, id1: firstDoc.TID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
417
470
|
// Remove the corresponding draft checkout item
|
|
418
|
-
|
|
419
|
-
TID: firstDoc.TID.toString(),
|
|
420
|
-
DID: firstDoc.DID.toString(),
|
|
421
|
-
checkoutFolder: "",
|
|
422
|
-
checkoutName: ""
|
|
423
|
-
}, "remove");
|
|
471
|
+
updateCheckoutItem({ TID: firstDoc.TID.toString(), DID: firstDoc.DID.toString(), checkoutFolder: "", checkoutName: "" }, "dcmtInfo", "remove");
|
|
424
472
|
await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
|
|
425
473
|
})
|
|
426
474
|
.catch((error) => {
|
|
@@ -434,11 +482,91 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
434
482
|
result.push({ rowIndex: 0, id1: firstDoc.TID, id2: firstDoc.DID, resultType: ResultTypes.ERROR, description: getExceptionMessage(error) });
|
|
435
483
|
}
|
|
436
484
|
finally {
|
|
485
|
+
setLocalWaitPanelTextPrimary('');
|
|
486
|
+
setLocalWaitPanelMaxValuePrimary(0);
|
|
487
|
+
setLocalWaitPanelValuePrimary(0);
|
|
488
|
+
setShowLocalWaitPanel(false);
|
|
437
489
|
TMResultManager.show(result, title, "ID", undefined);
|
|
438
490
|
}
|
|
439
491
|
}
|
|
440
492
|
});
|
|
441
493
|
};
|
|
494
|
+
const triggerCommentOnFileAdd = (addedFiles) => {
|
|
495
|
+
if (addedFiles.length > 0) {
|
|
496
|
+
showCommentFormCallback();
|
|
497
|
+
setIsCommentRequired(true);
|
|
498
|
+
setRemoveAndEditAttachmentCommentForm(false);
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
const handleCheckInOperationCallback = useCallback(() => {
|
|
502
|
+
const selectedDocs = getSelectedDcmtsOrFocused(selectedItems, focusedItem);
|
|
503
|
+
const firstDoc = selectedDocs?.[0];
|
|
504
|
+
if (!firstDoc)
|
|
505
|
+
return;
|
|
506
|
+
// Create a new file input element
|
|
507
|
+
const input = document.createElement("input");
|
|
508
|
+
// Set the input type to "file" to allow file selection
|
|
509
|
+
input.type = "file";
|
|
510
|
+
// Set the accepted file types (e.g., images, PDFs, etc.)
|
|
511
|
+
input.accept = "*/*";
|
|
512
|
+
// Enable the input to accept one file at once
|
|
513
|
+
input.multiple = false;
|
|
514
|
+
// Add an event listener for when the file selection changes
|
|
515
|
+
input.addEventListener('change', async (event) => {
|
|
516
|
+
const fileInput = event.target;
|
|
517
|
+
if (!fileInput.files || fileInput.files.length === 0)
|
|
518
|
+
return;
|
|
519
|
+
const file = fileInput.files[0];
|
|
520
|
+
firstDoc.fileName = fromDTD?.name ?? SDKUI_Localizator.SearchResult;
|
|
521
|
+
const validateFileName = validateCicoFileName({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: firstDoc.fileName }, file.name);
|
|
522
|
+
TMMessageBoxManager.show({
|
|
523
|
+
resizable: true,
|
|
524
|
+
buttons: [ButtonNames.YES, ButtonNames.NO],
|
|
525
|
+
message: renderCicoCheckInContent({ type: 'dcmtInfo', dcmtInfo: firstDoc, originalFileName: firstDoc.fileName }, file, validateFileName.isValid, validateFileName.validationResults),
|
|
526
|
+
title: "Check in",
|
|
527
|
+
onButtonClick: async (e) => {
|
|
528
|
+
if (e !== ButtonNames.YES)
|
|
529
|
+
return;
|
|
530
|
+
setLocalWaitPanelTitle('Check in');
|
|
531
|
+
setShowLocalWaitPanel(true);
|
|
532
|
+
setLocalShowPrimary(true);
|
|
533
|
+
abortControllerLocal = new AbortController();
|
|
534
|
+
let result = [];
|
|
535
|
+
let i = 0;
|
|
536
|
+
if (firstDoc.TID && firstDoc.DID) {
|
|
537
|
+
try {
|
|
538
|
+
const ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
|
|
539
|
+
if (ue) {
|
|
540
|
+
ue.TID = firstDoc.TID;
|
|
541
|
+
ue.DID = firstDoc.DID;
|
|
542
|
+
await ue.CheckInAsync(file, "", abortControllerLocal.signal);
|
|
543
|
+
// Remove the corresponding draft checkout item
|
|
544
|
+
updateCheckoutItem({ TID: firstDoc.TID.toString(), DID: firstDoc.DID.toString(), checkoutFolder: "", checkoutName: "" }, "dcmtInfo", "remove");
|
|
545
|
+
result.push({ rowIndex: i, id1: firstDoc.DID, id2: firstDoc.DID, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
546
|
+
await refreshFocusedDataRowAsync(firstDoc.TID, firstDoc.DID, true);
|
|
547
|
+
const cacheKey = `${firstDoc.TID}-${firstDoc.DID}`;
|
|
548
|
+
if (dcmtsFileCachePreview.has(cacheKey))
|
|
549
|
+
removeDcmtsFileCache(cacheKey);
|
|
550
|
+
triggerPreviewRefresh();
|
|
551
|
+
triggerCommentOnFileAdd([firstDoc.DID]);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
catch (err) {
|
|
555
|
+
result.push({ rowIndex: i, id1: i, id2: i, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
556
|
+
}
|
|
557
|
+
finally {
|
|
558
|
+
setLocalWaitPanelTextPrimary('');
|
|
559
|
+
setLocalWaitPanelMaxValuePrimary(0);
|
|
560
|
+
setLocalWaitPanelValuePrimary(0);
|
|
561
|
+
setShowLocalWaitPanel(false);
|
|
562
|
+
TMResultManager.show(result, 'Check in', "ID", undefined, SDKUI_Localizator.CheckInSuccessMessage, 6000);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
});
|
|
567
|
+
});
|
|
568
|
+
input.click();
|
|
569
|
+
}, [selectedItems, focusedItem, getSelectedDcmtsOrFocused]);
|
|
442
570
|
const refreshDataGridAfterRemoveAsync = async () => {
|
|
443
571
|
let index = selectedSearchResult?.dtdResult?.columns?.findIndex(col => col.caption === 'DID');
|
|
444
572
|
let selectedRows = [];
|
|
@@ -617,7 +745,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
617
745
|
}
|
|
618
746
|
};
|
|
619
747
|
const searchResutlToolbar = _jsxs(_Fragment, { children: [(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.FAVORITES_AND_RECENTS &&
|
|
620
|
-
_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (selectedSearchResult?.category === "Favorites" ? '"Preferiti"' : '"Recenti"'), 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(TMCommandsContextMenu, { target: `#commands-header-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] });
|
|
748
|
+
_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '5px' }, children: _jsx(TMButton, { btnStyle: 'icon', icon: _jsx(IconDelete, { color: 'white' }), caption: "Rimuovi da " + (selectedSearchResult?.category === "Favorites" ? '"Preferiti"' : '"Recenti"'), 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(TMCommandsContextMenu, { target: `#commands-header-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] });
|
|
621
749
|
const handleAddItem = (tid, did) => {
|
|
622
750
|
let newItem = { TID: tid ?? 0, DID: did ?? 0 };
|
|
623
751
|
setSecondaryMasterDcmts((prevItems) => [...prevItems, newItem]);
|
|
@@ -625,22 +753,6 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
625
753
|
const handleRemoveItem = (tid, did) => {
|
|
626
754
|
setSecondaryMasterDcmts((prevItems) => prevItems.filter(item => item.TID !== tid && item.DID !== did));
|
|
627
755
|
};
|
|
628
|
-
const fetchBlogDataAsync = useCallback(async (tid, did) => {
|
|
629
|
-
try {
|
|
630
|
-
TMSpinner.show({ description: 'Caricamento - Bacheca...' });
|
|
631
|
-
const res = await SDK_Globals.tmSession?.NewSearchEngine().BlogRetrieveAsync(tid, did);
|
|
632
|
-
setBlogsDatasource(res ?? []);
|
|
633
|
-
setHasLoadedDataOnce(true);
|
|
634
|
-
setLastLoadedDid(did);
|
|
635
|
-
}
|
|
636
|
-
catch (e) {
|
|
637
|
-
let err = e;
|
|
638
|
-
TMExceptionBoxManager.show({ exception: err });
|
|
639
|
-
}
|
|
640
|
-
finally {
|
|
641
|
-
TMSpinner.hide();
|
|
642
|
-
}
|
|
643
|
-
}, []);
|
|
644
756
|
const handleSavedAsyncCallback = useCallback(async (tid, did, metadataResult) => {
|
|
645
757
|
await refreshFocusedDataRowAsync(tid, did, true, metadataResult);
|
|
646
758
|
}, []);
|
|
@@ -652,7 +764,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
652
764
|
_jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, selectedSearchResult: selectedSearchResult, autoSelectFirst: !isMobile || currentSearchResults.length === 1, onSelectionChanged: onSearchResultSelectionChanged }) })
|
|
653
765
|
:
|
|
654
766
|
_jsx(_Fragment, {}), _jsxs(TMLayoutItem, { children: [_jsx(TMSearchResultGrid, { showSearch: showSearch, fromDTD: fromDTD, allUsers: allUsers, inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, openInOffice: openInOffice, onDblClick: () => openFormHandler(LayoutModes.Update), onContextMenuPreparing: onContextMenuPreparing, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem, onDownloadDcmtsAsync: async (inputDcmts, downloadType, downloadMode, _y, confirmAttachments) => await downloadDcmtsAsync(inputDcmts, downloadType, downloadMode, onFileOpened, confirmAttachments), showExportForm: showExportForm, onCloseExportForm: onCloseExportForm }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
|
|
655
|
-
_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 || !focusedItem?.DID, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download"); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-floating-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { TID: focusedItem?.TID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: onWFOperationCompleted, onClose: () => setShowMoreInfoPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${getSelectionDcmtInfo().length} documenti selezionati)`, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
|
767
|
+
_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 || !focusedItem?.DID, icon: _jsx(IconDownload, { color: 'white' }), onClick: () => { downloadDcmtsAsync(getSelectedDcmtsOrFocused(selectedItems, focusedItem), DownloadTypes.Dcmt, "download"); } }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasDetailRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white' }), caption: SDKUI_Localizator.DcmtsDetail, onClick: () => setIsOpenDetails(true) }), allowRelations && _jsx(TMButton, { btnStyle: 'icon', disabled: !currentTIDHasMasterRelations || !focusedItem?.DID, icon: _jsx(IconDetailDcmts, { color: 'white', transform: 'scale(-1, 1)' }), caption: SDKUI_Localizator.DcmtsMaster, onClick: () => setIsOpenMaster(true) }), _jsx(IconMenuVertical, { id: `commands-floating-${id}`, color: 'white', cursor: 'pointer' }), _jsx(TMCommandsContextMenu, { target: `#commands-floating-${id}`, showEvent: "click", menuItems: getCommandsMenuItems(isMobile, fromDTD, allUsers, selectedItems, focusedItem, context, showFloatingBar, workingGroupContext, showSearch, setShowFloatingBar, openFormHandler, openSharedArchiveHandler, showSharedDcmtsHandler, downloadDcmtsAsync, runOperationAsync, onRefreshSearchAsync, refreshSelectionDataRowsAsync, onRefreshAfterAddDcmtToFavs, confirmFormat, openConfirmAttachmentsDialog, openTaskFormHandler, openDetailDcmtsFormHandler, openMasterDcmtsFormHandler, openBatchUpdateFormHandler, openExportForm, handleToggleSearch, handleSignApprove, openSignSettingsForm, handleCheckOutOperationCallback, handleCheckInOperationCallback, showCheckoutInformationFormCallback, viewHistoryCallback, infoCheckCopyToClipboard, openWGsCopyMoveForm, openCommentFormCallback, openEditPdf, openAddDocumentForm, passToArchiveCallback, archiveMasterDocuments, archiveDetailDocuments, currentTIDHasMasterRelations, currentTIDHasDetailRelations, canArchiveMasterRelation, canArchiveDetailRelation, pairManyToMany, hasManyToManyRelation).concat([customButtonMenuItems()]) })] })] })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { TID: focusedItem?.TID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: onWFOperationCompleted, onClose: () => setShowMoreInfoPopup(false) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${getSelectionDcmtInfo().length} documenti selezionati)`, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
|
656
768
|
setIsOpenBatchUpdate(false);
|
|
657
769
|
}, onSavedCallbackAsync: async () => {
|
|
658
770
|
setIsOpenBatchUpdate(false);
|
|
@@ -764,9 +876,9 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
764
876
|
sharedDcmtFile,
|
|
765
877
|
onRefreshSearchAsync
|
|
766
878
|
]);
|
|
767
|
-
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, {
|
|
879
|
+
const tmBlog = useMemo(() => _jsx(TMDcmtBlog, { tid: focusedItem?.TID, did: focusedItem?.DID, fetchBlogDataTrigger: refreshBlogTrigger, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), [focusedItem, allTasks, refreshBlogTrigger]);
|
|
768
880
|
const tmSysMetadata = useMemo(() => _jsx(TMMetadataValues, { layoutMode: LayoutModes.Update, openChooserBySingleClick: true, TID: focusedItem?.TID, isReadOnly: true, deviceType: deviceType, metadataValues: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), metadataValuesOrig: currentMetadataValues.filter(o => (o.mid != undefined && o.mid <= 100)), validationItems: [] }), [focusedItem, currentMetadataValues, deviceType]);
|
|
769
|
-
const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }), [currentDcmt]);
|
|
881
|
+
const tmDcmtPreview = useMemo(() => _jsx(TMDcmtPreviewWrapper, { currentDcmt: currentDcmt }, refreshPreviewTrigger), [currentDcmt, refreshPreviewTrigger]);
|
|
770
882
|
const allInitialPanelVisibility = {
|
|
771
883
|
'tmSearchResult': true,
|
|
772
884
|
'tmBlog': false,
|
|
@@ -824,10 +936,10 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
824
936
|
gap: Gutters.getGutters(),
|
|
825
937
|
width: '100%',
|
|
826
938
|
height: '100%',
|
|
827
|
-
}, children: _jsx(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: (groupId && groupId.length > 0) ?
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
939
|
+
}, children: _jsx(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: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showLocalWaitPanel, showWaitPanelPrimary: localShowPrimary, waitPanelTitle: localWaitPanelTitle, waitPanelTextPrimary: localWaitPanelTextPrimary, waitPanelValuePrimary: localWaitPanelValuePrimary, waitPanelMaxValuePrimary: localWaitPanelMaxValuePrimary, isCancelable: true, abortController: abortControllerLocal, children: (groupId && groupId.length > 0) ?
|
|
940
|
+
_jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar })
|
|
941
|
+
:
|
|
942
|
+
_jsx(TMPanelManagerProvider, { panels: initialPanels, initialVisibility: allInitialPanelVisibility, defaultDimensions: initialPanelDimensions, initialDimensions: initialPanelDimensions, initialMobilePanelId: 'tmSearchResult', children: _jsx(TMPanelManagerContainer, { panels: initialPanels, direction: "horizontal", parentId: groupId, showToolbar: showSearchResultSidebar }) }) }) }) }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDetails, children: isOpenDetails && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, isForMaster: false, inputDcmts: getSelectionDcmtInfo(), allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenDetails(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), _jsxs(StyledMultiViewPanel, { "$isVisible": isOpenMaster, children: [isOpenMaster && _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: getSelectionDcmtInfo(), isForMaster: true, allowNavigation: focusedItem && selectedItems.length <= 0, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onBack: () => setIsOpenMaster(false), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
|
|
831
943
|
return (_jsx(StyledModalContainer, { style: { backgroundColor: 'white' }, children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: [dcmt], isForMaster: true, allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }, `${index}-${dcmt.DID}`));
|
|
832
944
|
})] }), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDcmtForm, children: isOpenDcmtForm && focusedItem?.TID !== undefined && focusedItem?.DID !== undefined && _jsx(TMDcmtForm, { isModal: openDcmtFormAsModal || (dcmtFormLayoutMode === LayoutModes.Ark && focusedItem?.DID), titleModal: fromDTD?.name ?? '', TID: focusedItem.TID, DID: focusedItem.DID, allowButtonsRefs: true, layoutMode: dcmtFormLayoutMode, count: visibleItems.length, itemIndex: visibleItems.findIndex(o => o.rowIndex === focusedItem?.rowIndex) + 1, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), onClose: () => { setIsOpenDcmtForm(false); }, onWFOperationCompleted: onWFOperationCompleted, onTaskCreateRequest: onTaskCreateRequest, onSavedAsyncCallback: handleSavedAsyncCallback, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenArchiveRelationForm && _jsx(TMDcmtForm, { isModal: true, titleModal: SDKUI_Localizator.Archive + ' - ' + (archiveType === 'detail' ? SDKUI_Localizator.DcmtsDetail : SDKUI_Localizator.DcmtsMaster), TID: archiveRelatedDcmtFormTID, layoutMode: LayoutModes.Ark, inputMids: archiveRelatedDcmtFormMids, showBackButton: false, allowButtonsRefs: false, onClose: () => {
|
|
833
945
|
setIsOpenArchiveRelationForm(false);
|
|
@@ -840,7 +952,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
840
952
|
setArchiveRelatedDcmtFormTID(undefined);
|
|
841
953
|
setArchiveRelatedDcmtFormMids([]);
|
|
842
954
|
await onRefreshSearchAsync?.();
|
|
843
|
-
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showSignSettingsForm && fromDTD) && _jsx(TMSignSettingsForm, { fromDTD: fromDTD, inputDcmts: allFieldSelectedDocs, onCloseSignSettingsForm: closeSignSettingsForm, onSavedAsyncCallback: handleSavedAsyncCallback }), (showHistory && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMViewHistoryDcmt, { fromDTD: fromDTD, deviceType: deviceType, inputDcmt: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: () => setShowHistory(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers })] }));
|
|
955
|
+
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showSignSettingsForm && fromDTD) && _jsx(TMSignSettingsForm, { fromDTD: fromDTD, inputDcmts: allFieldSelectedDocs, onCloseSignSettingsForm: closeSignSettingsForm, onSavedAsyncCallback: handleSavedAsyncCallback }), (showHistory && fromDTD && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMViewHistoryDcmt, { fromDTD: fromDTD, deviceType: deviceType, inputDcmt: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0], onClose: () => setShowHistory(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), (showCommentForm && getSelectedDcmtsOrFocused(selectedItems, focusedItem).length > 0) && _jsx(TMBlogCommentForm, { context: { engine: 'SearchEngine', object: { tid: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].TID, did: getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID } }, onClose: () => setShowCommentForm(false), refreshCallback: triggerBlogRefresh, participants: [], showAttachmentsSection: true, allArchivedDocumentsFileItems: convertSearchResultDescriptorToFileItems(currentSearchResults ?? []), isCommentRequired: isCommentRequired, removeAndEditAttachment: removeAndEditAttachmentCommentForm, selectedAttachmentDid: [Number(getSelectedDcmtsOrFocused(selectedItems, focusedItem)[0].DID)] })] }));
|
|
844
956
|
};
|
|
845
957
|
export default TMSearchResult;
|
|
846
958
|
const renderDcmtIcon = (cellData, onDownloadDcmtsAsync, openInOffice) => {
|
|
@@ -928,7 +1040,7 @@ const TMSearchResultGrid = ({ openInOffice, fromDTD, allUsers, inputFocusedItem,
|
|
|
928
1040
|
const isLexProt = cellData.data.IsLexProt == 1;
|
|
929
1041
|
// Prima colonna: la colonna numero 2 (dopo icona e selezione)
|
|
930
1042
|
const isFirstColumn = cellData.columnIndex === 2;
|
|
931
|
-
const { checkoutStatus } =
|
|
1043
|
+
const { checkoutStatus } = getDcmtCicoStatus(cellData.data, allUsers, fromDTD);
|
|
932
1044
|
const shouldShowCheckoutIcon = isFirstColumn && checkoutStatus.isCheckedOut && checkoutStatus.icon;
|
|
933
1045
|
let style = {};
|
|
934
1046
|
if (isLogDel) {
|
|
@@ -5,7 +5,7 @@ import { IconBxInfo, IconFileDots, IconFolder, SDKUI_Globals, SDKUI_Localizator
|
|
|
5
5
|
import { FormModes } from "../../../ts";
|
|
6
6
|
import { ResultTypes, ValidationItem } from "@topconsultnpm/sdk-ts";
|
|
7
7
|
import { SaveFormOptions, useSaveForm } from "../../../hooks/useForm";
|
|
8
|
-
import { getCicoDownloadFileName,
|
|
8
|
+
import { getCicoDownloadFileName, updateCheckoutItem } from "../../../helper/checkinCheckoutManager";
|
|
9
9
|
import { TMColors } from "../../../utils/theme";
|
|
10
10
|
import TMLayoutContainer, { TMLayoutItem } from "../../base/TMLayout";
|
|
11
11
|
import TMTooltip from "../../base/TMTooltip";
|
|
@@ -31,7 +31,7 @@ const TMSearchResultCheckoutInfoForm = (props) => {
|
|
|
31
31
|
const dcmtCheckoutInfoCurrentItems = [...SDKUI_Globals.userSettings.dcmtCheckoutInfo];
|
|
32
32
|
const existingItem = dcmtCheckoutInfoCurrentItems.find((item) => item.TID === selectedDcmtOrFocused.TID.toString() && item.DID === selectedDcmtOrFocused.DID.toString());
|
|
33
33
|
const folder = existingItem?.checkoutFolder ?? "";
|
|
34
|
-
const name = existingItem?.checkoutName ?? getCicoDownloadFileName(dtdName ?? SDKUI_Localizator.SearchResult
|
|
34
|
+
const name = existingItem?.checkoutName ?? getCicoDownloadFileName({ type: 'dcmtInfo', dcmtInfo: selectedDcmtOrFocused, originalFileName: dtdName ?? SDKUI_Localizator.SearchResult }, true, false);
|
|
35
35
|
// Set form data
|
|
36
36
|
setFormData({
|
|
37
37
|
...formData,
|
|
@@ -63,7 +63,7 @@ const TMSearchResultCheckoutInfoForm = (props) => {
|
|
|
63
63
|
checkoutFolder: formData.checkoutFolder ?? "",
|
|
64
64
|
checkoutName: formData.checkoutName ?? ""
|
|
65
65
|
};
|
|
66
|
-
|
|
66
|
+
updateCheckoutItem(newItem, "dcmtInfo", "addOrUpdate");
|
|
67
67
|
onClose();
|
|
68
68
|
ShowAlert({ mode: 'success', title: SDKUI_Localizator.CheckoutInfo, message: SDKUI_Localizator.OperationSuccess, duration: 3000 });
|
|
69
69
|
}
|
|
@@ -5,7 +5,7 @@ import { DcmtInfo, DcmtOperationTypes, DownloadModes, DownloadTypes, SearchResul
|
|
|
5
5
|
export declare const getSelectedDcmtsOrFocused: (selectedItems: Array<any>, focusedItem: any, fileFormat?: FileFormats) => DcmtInfo[];
|
|
6
6
|
export declare const getAllFieldSelectedDcmtsOrFocused: (selectedItems: Array<any>, focusedItem: any, fileFormat?: FileFormats) => any[];
|
|
7
7
|
export declare const signatureInformationCallback: (isMobile: boolean, inputDcmts: DcmtInfo[] | undefined) => Promise<void>;
|
|
8
|
-
export declare const getCommandsMenuItems: (isMobile: boolean, dtd: DcmtTypeDescriptor | undefined, allUsers: Array<UserDescriptor>, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, workingGroupContext: WorkingGroupDescriptor | undefined, showSearch: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => void, openSharedArchiveHandler: () => Promise<void>, showSharedDcmtsHandler: () => Promise<void>, downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => 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>, confirmAttachments: (list: FileDescriptor[]) => Promise<string[] | undefined>, openTaskFormHandler: () => void, openDetailDcmtsFormHandler: (value: boolean) => void, openMasterDcmtsFormHandler: (value: boolean) => void, openBatchUpdateFormHandler: (value: boolean) => void, openExportForm: () => void, handleToggleSearch: () => void, handleSignApprove: () => void, openSignSettingsForm: () => void, handleCheckOutOperationCallback: (checkout: boolean) => Promise<void>, showCheckoutInformationFormCallback: () => void, viewHistoryCallback: () => void, openWGsCopyMoveForm?: ((mode: "copyToWgDraft" | "copyToWgArchivedDoc", dcmtTypeDescriptor: DcmtTypeDescriptor, documents: Array<DcmtInfo>) => void), openCommentFormCallback?: ((documents: Array<DcmtInfo>) => void), openEditPdf?: ((documents: Array<DcmtInfo>) => void), openAddDocumentForm?: () => void, passToArchiveCallback?: (outputMids: Array<{
|
|
8
|
+
export declare const getCommandsMenuItems: (isMobile: boolean, dtd: DcmtTypeDescriptor | undefined, allUsers: Array<UserDescriptor>, selectedItems: Array<any>, focusedItem: any, context: SearchResultContext, showFloatingBar: boolean, workingGroupContext: WorkingGroupDescriptor | undefined, showSearch: boolean, setShowFloatingBar: React.Dispatch<React.SetStateAction<boolean>>, openFormHandler: (layoutMode: LayoutModes) => void, openSharedArchiveHandler: () => Promise<void>, showSharedDcmtsHandler: () => Promise<void>, downloadDcmtsAsync: (inputDcmts: DcmtInfo[] | undefined, downloadType: DownloadTypes, downloadMode: DownloadModes, onFileDownloaded?: (dcmtFile: File | undefined) => void, confirmAttachments?: (list: FileDescriptor[]) => Promise<string[] | undefined>, skipConfirmation?: boolean) => 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>, confirmAttachments: (list: FileDescriptor[]) => Promise<string[] | undefined>, openTaskFormHandler: () => void, openDetailDcmtsFormHandler: (value: boolean) => void, openMasterDcmtsFormHandler: (value: boolean) => void, openBatchUpdateFormHandler: (value: boolean) => void, openExportForm: () => void, handleToggleSearch: () => void, handleSignApprove: () => void, openSignSettingsForm: () => void, handleCheckOutOperationCallback: (checkout: boolean) => Promise<void>, handleCheckInOperationCallback: () => void, showCheckoutInformationFormCallback: () => void, viewHistoryCallback: () => void, infoCheckCopyToClipboard: () => void, openWGsCopyMoveForm?: ((mode: "copyToWgDraft" | "copyToWgArchivedDoc", dcmtTypeDescriptor: DcmtTypeDescriptor, documents: Array<DcmtInfo>) => void), openCommentFormCallback?: ((documents: Array<DcmtInfo>) => void), openEditPdf?: ((documents: Array<DcmtInfo>) => void), openAddDocumentForm?: () => void, passToArchiveCallback?: (outputMids: Array<{
|
|
9
9
|
mid: number;
|
|
10
10
|
value: string;
|
|
11
11
|
}>, tid?: number) => void, archiveMasterDocuments?: (tid: number | undefined) => Promise<void>, archiveDetailDocuments?: (tid: number | undefined) => Promise<void>, hasMasterRelation?: boolean, hasDetailRelation?: boolean, canArchiveMasterRelation?: boolean, canArchiveDetailRelation?: boolean, pairManyToManyDocuments?: (isPairing: boolean) => Promise<void>, hasManyToManyRelation?: boolean) => Array<TMDataGridContextMenuItem>;
|