@topconsultnpm/sdkui-react 6.21.0-t2 → 6.21.0-t3
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/NewComponents/ContextMenu/TMContextMenu.js +22 -1
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +4 -4
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +6 -6
- package/lib/components/base/Styled.d.ts +1 -1
- package/lib/components/base/TMAreaManager.js +11 -0
- package/lib/components/base/TMCounterBar.d.ts +2 -2
- package/lib/components/base/TMCounterContainer.d.ts +2 -1
- package/lib/components/base/TMCustomButton.d.ts +1 -1
- package/lib/components/base/TMDataGrid.js +12 -2
- package/lib/components/base/TMDataGridExportForm.d.ts +2 -1
- package/lib/components/base/TMDataGridExportForm.js +19 -8
- package/lib/components/base/TMFileManager.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -1
- package/lib/components/base/TMFileManagerDataGridView.js +4 -4
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +1 -1
- package/lib/components/base/TMFileManagerThumbnailItems.js +3 -3
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +1 -1
- package/lib/components/base/TMFileManagerUtils.d.ts +7 -0
- package/lib/components/base/TMFileManagerUtils.js +14 -1
- package/lib/components/base/TMLayout.d.ts +4 -4
- package/lib/components/base/TMList.d.ts +2 -1
- package/lib/components/base/TMListView.d.ts +1 -1
- package/lib/components/base/TMModal.js +2 -2
- package/lib/components/base/TMPopUp.d.ts +1 -0
- package/lib/components/base/TMPopUp.js +59 -2
- package/lib/components/base/TMSpinner.d.ts +5 -2
- package/lib/components/base/TMSpinner.js +33 -6
- package/lib/components/base/TMTab.d.ts +4 -3
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTreeView.d.ts +1 -1
- package/lib/components/base/TMTreeView.js +12 -15
- package/lib/components/base/TMUserAvatar.d.ts +2 -1
- package/lib/components/base/TMVilViewer.d.ts +2 -1
- package/lib/components/base/TMWaitPanel.d.ts +5 -2
- package/lib/components/base/TMWaitPanel.js +8 -6
- package/lib/components/choosers/TMDynDataListItemChooser.d.ts +1 -1
- package/lib/components/choosers/TMDynDataListItemChooser.js +6 -1
- package/lib/components/choosers/TMGroupChooser.js +1 -1
- package/lib/components/choosers/TMInvoiceRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMOrderRetrieveFormats.d.ts +2 -1
- package/lib/components/choosers/TMRelationChooser.d.ts +3 -3
- package/lib/components/choosers/TMUserChooser.d.ts +2 -2
- package/lib/components/editors/TMEditorStyled.d.ts +6 -6
- package/lib/components/editors/TMFormulaEditor.d.ts +2 -1
- package/lib/components/editors/TMFormulaEditor.js +98 -49
- package/lib/components/editors/TMHtmlContentDisplay.d.ts +2 -1
- package/lib/components/editors/TMHtmlEditor.d.ts +2 -1
- package/lib/components/editors/TMMetadataEditor.js +6 -2
- package/lib/components/editors/TMMetadataValues.js +23 -6
- package/lib/components/editors/TMTreeDropDown.d.ts +1 -1
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.d.ts +1 -1
- package/lib/components/features/blog/TMBlogCommentForm.d.ts +2 -1
- package/lib/components/features/blog/TMBlogCommentForm.js +5 -2
- package/lib/components/features/documents/TMCopyToFolderForm.js +46 -24
- package/lib/components/features/documents/TMDcmtForm.js +19 -9
- package/lib/components/features/documents/TMDcmtFormActionButtons.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtIcon.d.ts +2 -1
- package/lib/components/features/documents/TMDcmtIcon.js +1 -1
- package/lib/components/features/documents/TMDcmtPreview.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtTasks.d.ts +2 -1
- package/lib/components/features/documents/TMDragDropOverlay.d.ts +1 -1
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +0 -2
- package/lib/components/features/documents/TMMasterDetailDcmts.js +4 -5
- package/lib/components/features/documents/TMMergeToPdfForm.d.ts +0 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +26 -10
- package/lib/components/features/documents/TMRelationViewer.js +8 -3
- package/lib/components/features/documents/copyAndMergeDcmtsShared.d.ts +0 -13
- package/lib/components/features/documents/copyAndMergeDcmtsShared.js +1 -39
- package/lib/components/features/search/TMDcmtCheckoutInfoForm.d.ts +2 -1
- package/lib/components/features/search/TMMetadataOutputForm.d.ts +18 -0
- package/lib/components/features/search/TMMetadataOutputForm.js +225 -0
- package/lib/components/features/search/TMMetadataSorterForm.d.ts +18 -0
- package/lib/components/features/search/TMMetadataSorterForm.js +243 -0
- package/lib/components/features/search/TMSavedQuerySelector.d.ts +2 -2
- package/lib/components/features/search/TMSearch.d.ts +0 -2
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/features/search/TMSearchQueryEditor.js +14 -8
- package/lib/components/features/search/TMSearchQueryPanel.js +249 -58
- package/lib/components/features/search/TMSearchResult.d.ts +1 -2
- package/lib/components/features/search/TMSearchResult.js +40 -20
- package/lib/components/features/search/TMSearchResultFloatingActionButton.d.ts +1 -1
- package/lib/components/features/search/TMSignatureInfoContent.d.ts +2 -1
- package/lib/components/features/search/TMViewHistoryDcmt.d.ts +2 -1
- package/lib/components/features/search/TMViewHistoryDcmt.js +1 -1
- package/lib/components/features/search/metadataFormHelper.d.ts +16 -0
- package/lib/components/features/search/metadataFormHelper.js +77 -0
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +10 -10
- package/lib/components/features/tasks/TMTasksAgenda.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksHeader.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksPanelContent.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtilsView.d.ts +5 -5
- package/lib/components/features/tasks/TMTasksView.d.ts +1 -1
- package/lib/components/features/wg/TMWGsCopyMoveForm.d.ts +3 -2
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +8 -7
- package/lib/components/forms/Login/Chooser.d.ts +2 -2
- package/lib/components/forms/Login/TMLoginForm.js +15 -3
- package/lib/components/forms/TMChooserForm.d.ts +2 -1
- package/lib/components/forms/TMSaveForm.d.ts +4 -4
- package/lib/components/grids/TMBlogAttachments.d.ts +2 -1
- package/lib/components/grids/TMBlogAttachments.js +2 -2
- package/lib/components/grids/TMBlogHeader.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.d.ts +1 -1
- package/lib/components/grids/TMBlogsPost.js +5 -3
- package/lib/components/grids/TMBlogsPostUtils.d.ts +10 -9
- package/lib/components/grids/TMBlogsPostUtils.js +3 -1
- package/lib/components/grids/TMValidationItemsList.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +2 -1
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.d.ts +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +2 -2
- package/lib/components/layout/panelManager/TMPanelWrapper.d.ts +2 -2
- package/lib/components/pages/TMPage.d.ts +1 -1
- package/lib/components/settings/SettingsAppearance.d.ts +2 -1
- package/lib/components/sidebar/TMAboutApp.d.ts +2 -1
- package/lib/components/sidebar/TMHeader.d.ts +3 -3
- package/lib/components/viewers/TMDataListItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMDataUserIdItemViewer.d.ts +3 -2
- package/lib/components/viewers/TMMidViewer.d.ts +2 -2
- package/lib/components/viewers/TMTidViewer.d.ts +2 -2
- package/lib/components/wizard/TMWizard.d.ts +1 -0
- package/lib/components/wizard/TMWizard.js +5 -3
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/MergePdfManager.d.ts +45 -0
- package/lib/helper/MergePdfManager.js +148 -0
- package/lib/helper/SDKUI_Globals.js +2 -1
- package/lib/helper/SDKUI_Localizator.d.ts +6 -0
- package/lib/helper/SDKUI_Localizator.js +60 -0
- package/lib/helper/TMCommandsContextMenu.d.ts +1 -1
- package/lib/helper/TMIcons.d.ts +278 -278
- package/lib/helper/TMPdfViewer.d.ts +2 -1
- package/lib/helper/TMToppyMessage.d.ts +2 -2
- package/lib/helper/TMUtils.d.ts +24 -20
- package/lib/helper/TMUtils.js +55 -0
- package/lib/helper/checkinCheckoutManager.d.ts +4 -3
- package/lib/helper/checkinCheckoutManager.js +29 -11
- package/lib/helper/helpers.d.ts +3 -2
- package/lib/helper/helpers.js +1 -0
- package/lib/hooks/useCheckInOutOperations.d.ts +4 -3
- package/lib/hooks/useDataUserIdItem.js +1 -1
- package/lib/hooks/useDcmtOperations.d.ts +18 -1
- package/lib/hooks/useDcmtOperations.js +235 -24
- package/lib/hooks/useDocumentOperations.d.ts +0 -2
- package/lib/hooks/useDocumentOperations.js +27 -10
- package/lib/hooks/useInputDialog.d.ts +2 -1
- package/lib/hooks/useRelatedDocuments.js +4 -4
- package/lib/services/platform_services.d.ts +7 -6
- package/lib/ts/types.d.ts +2 -1
- package/lib/ts/types.js +1 -0
- package/package.json +14 -7
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { LocalizeDcmtOperationTypes } from '../helper/Enum_Localizator';
|
|
3
|
-
import { SDK_Globals, RetrieveFileOptions, DcmtOpers, ResultTypes, RecentCategories, MetadataDataTypes, MetadataDataDomains, DataListCacheService } from '@topconsultnpm/sdk-ts';
|
|
3
|
+
import { SDK_Globals, RetrieveFileOptions, DcmtOpers, ResultTypes, RecentCategories, MetadataDataTypes, MetadataDataDomains, DataListCacheService, DcmtTypeListCacheService, TemplateTIDs } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { ShowAlert, TMResultManager, FormulaHelper, TMExceptionBoxManager, TMSpinner } from '../components';
|
|
5
|
-
import { Globalization, getExceptionMessage, dialogConfirmOperation, extensionHandler, downloadBase64File, SDKUI_Globals, dcmtsFileCacheDownload, CACHE_SIZE_LIMIT, clearDcmtsFileCache, dcmtsFileCachePreview, isDcmtFileInCache, removeDcmtsFileCache, SDKUI_Localizator } from '../helper';
|
|
5
|
+
import { Globalization, getExceptionMessage, dialogConfirmOperation, extensionHandler, downloadBase64File, SDKUI_Globals, dcmtsFileCacheDownload, CACHE_SIZE_LIMIT, clearDcmtsFileCache, dcmtsFileCachePreview, isDcmtFileInCache, removeDcmtsFileCache, SDKUI_Localizator, ZipManager } from '../helper';
|
|
6
6
|
import { DcmtOperationTypes, DownloadTypes, FileExtensionHandler } from '../ts';
|
|
7
7
|
import { useFileDialog, useFileSourceDialog } from './useInputDialog';
|
|
8
8
|
import { isXMLFileExt } from '../helper/dcmtsHelper';
|
|
9
9
|
import { ShowConfirm } from '../components/base/TMConfirm';
|
|
10
|
+
import { generateTargetFileName } from '../components/features/documents/copyAndMergeDcmtsShared';
|
|
10
11
|
const isScannerLicenseConfigured = () => {
|
|
11
12
|
try {
|
|
12
13
|
const scannerLicense = SDKUI_Globals.userSettings.advancedSettings.scannerLicense;
|
|
@@ -19,30 +20,72 @@ const isScannerLicenseConfigured = () => {
|
|
|
19
20
|
let abortController = new AbortController();
|
|
20
21
|
const downloadCountMap = new Map();
|
|
21
22
|
/**
|
|
22
|
-
* Genera il nome file per il download con
|
|
23
|
-
*
|
|
23
|
+
* Genera il nome file per il download con logica di priorità configurabile.
|
|
24
|
+
*
|
|
25
|
+
* @param file - File recuperato dal backend (può contenere il nome originale)
|
|
26
|
+
* @param dcmtInfo - Informazioni del documento (fileName, DID, FILEEXT)
|
|
27
|
+
* @param useInputFileName - Controlla la priorità del nome:
|
|
28
|
+
* - true: priorità a dcmtInfo.fileName → file.name → DID
|
|
29
|
+
* - false (default): priorità a file.name → dcmtInfo.fileName → DID
|
|
30
|
+
*
|
|
31
|
+
* Gestisce anche:
|
|
32
|
+
* - Aggiunta automatica dell'estensione se mancante
|
|
33
|
+
* - Duplicati per file con estensioni multiple (es: file.pdf.p7m)
|
|
24
34
|
*/
|
|
25
|
-
const getDownloadFileName = (file, dcmtInfo) => {
|
|
35
|
+
const getDownloadFileName = (file, dcmtInfo, useInputFileName = false) => {
|
|
26
36
|
// === FASE 1: Costruzione nome base con fallback ===
|
|
27
|
-
// Determina l'estensione con fallback
|
|
37
|
+
// Determina l'estensione con fallback: prima dal backend, poi dal documento
|
|
28
38
|
const fileExtFromBackend = file?.name?.split('.').pop()?.toLowerCase();
|
|
29
39
|
const fileExtFromDcmt = dcmtInfo.FILEEXT?.toLowerCase();
|
|
30
40
|
const fileExtension = fileExtFromBackend ?? fileExtFromDcmt ?? '';
|
|
31
41
|
let baseFileName;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Logica di priorità per il nome file:
|
|
44
|
+
*
|
|
45
|
+
* Se useInputFileName = true:
|
|
46
|
+
* 1. Usa dcmtInfo.fileName (nome passato nell'input)
|
|
47
|
+
* 2. Fallback a file.name (nome dal backend)
|
|
48
|
+
* 3. Fallback finale a DID
|
|
49
|
+
*
|
|
50
|
+
* Se useInputFileName = false (default):
|
|
51
|
+
* 1. Usa file.name (nome recuperato dal backend)
|
|
52
|
+
* 2. Fallback a dcmtInfo.fileName (nome salvato nel documento)
|
|
53
|
+
* 3. Fallback finale a DID
|
|
54
|
+
*/
|
|
55
|
+
if (useInputFileName) {
|
|
56
|
+
// Priorità al nome da inputDcmts (dcmtInfo.fileName)
|
|
57
|
+
if (dcmtInfo.fileName) {
|
|
58
|
+
const hasExtension = dcmtInfo.fileName.includes('.');
|
|
59
|
+
baseFileName = hasExtension
|
|
60
|
+
? dcmtInfo.fileName
|
|
61
|
+
: (fileExtension ? `${dcmtInfo.fileName}.${fileExtension}` : dcmtInfo.fileName);
|
|
62
|
+
}
|
|
63
|
+
// Seconda priorità: nome dal backend
|
|
64
|
+
else if (file?.name) {
|
|
65
|
+
baseFileName = file.name;
|
|
66
|
+
}
|
|
67
|
+
// Fallback finale: ID documento con estensione
|
|
68
|
+
else {
|
|
69
|
+
baseFileName = fileExtension ? `${dcmtInfo.DID}.${fileExtension}` : `${dcmtInfo.DID}`;
|
|
70
|
+
}
|
|
42
71
|
}
|
|
43
|
-
// 3. Fallback finale: ID documento con estensione
|
|
44
72
|
else {
|
|
45
|
-
|
|
73
|
+
// Comportamento default: priorità al nome dal backend
|
|
74
|
+
// 1. Priorità massima: nome dal backend
|
|
75
|
+
if (file?.name) {
|
|
76
|
+
baseFileName = file.name;
|
|
77
|
+
}
|
|
78
|
+
// 2. Seconda priorità: nome salvato nel documento
|
|
79
|
+
else if (dcmtInfo.fileName) {
|
|
80
|
+
const hasExtension = dcmtInfo.fileName.includes('.');
|
|
81
|
+
baseFileName = hasExtension
|
|
82
|
+
? dcmtInfo.fileName
|
|
83
|
+
: (fileExtension ? `${dcmtInfo.fileName}.${fileExtension}` : dcmtInfo.fileName);
|
|
84
|
+
}
|
|
85
|
+
// 3. Fallback finale: ID documento con estensione
|
|
86
|
+
else {
|
|
87
|
+
baseFileName = fileExtension ? `${dcmtInfo.DID}.${fileExtension}` : `${dcmtInfo.DID}`;
|
|
88
|
+
}
|
|
46
89
|
}
|
|
47
90
|
// === FASE 2: Gestione duplicati per file con estensioni multiple ===
|
|
48
91
|
const firstDot = baseFileName.indexOf('.');
|
|
@@ -75,7 +118,145 @@ export const useDcmtOperations = () => {
|
|
|
75
118
|
const [waitPanelMaxValueSecondary, setWaitPanelMaxValueSecondary] = useState(0);
|
|
76
119
|
const { OpenFileDialog } = useFileDialog();
|
|
77
120
|
const [selectFileSource, FileSourceDialog] = useFileSourceDialog();
|
|
78
|
-
const
|
|
121
|
+
const copyCompliantDcmtsAsync = async (inputDcmt, onFileDownloaded) => {
|
|
122
|
+
return await _copyCompliantDcmtsAsync(inputDcmt, onFileDownloaded);
|
|
123
|
+
};
|
|
124
|
+
const _copyCompliantDcmtsAsync = async (inputDcmt, onFileDownloaded) => {
|
|
125
|
+
if (inputDcmt === undefined)
|
|
126
|
+
return;
|
|
127
|
+
let returnDcmtFiles = [];
|
|
128
|
+
let returnDcmtInfos = [];
|
|
129
|
+
const rfo = new RetrieveFileOptions();
|
|
130
|
+
rfo.retrieveReason = DcmtOpers.ShowFile;
|
|
131
|
+
let firstBlock = true;
|
|
132
|
+
let maxFileSize = 0;
|
|
133
|
+
let signerInfoDescriptor = undefined;
|
|
134
|
+
if (inputDcmt?.FILEEXT == undefined || inputDcmt.FILEEXT == '') {
|
|
135
|
+
throw new Error('WARNING#Documento di soli metadati');
|
|
136
|
+
}
|
|
137
|
+
let ue = SDK_Globals.tmSession?.NewUpdateEngineByID();
|
|
138
|
+
if (ue) {
|
|
139
|
+
ue.TID = inputDcmt?.TID;
|
|
140
|
+
ue.DID = inputDcmt?.DID;
|
|
141
|
+
//Verifichiamo la nostra firma che nel Lex è sempre CadES
|
|
142
|
+
if (inputDcmt?.FILEEXT && inputDcmt.FILEEXT?.toLowerCase().includes('p7m')) {
|
|
143
|
+
//Verifica firma e recupero informazioni firmatari
|
|
144
|
+
await ue.VerifySignAsync();
|
|
145
|
+
//Recuperiamo le impronte
|
|
146
|
+
signerInfoDescriptor = await ue.GetSignersAsync();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
//Documenti master
|
|
150
|
+
let dsRes = await SDK_Globals.tmSession?.NewSearchEngine().GetAllMasterDcmtsAsync(inputDcmt?.TID, inputDcmt?.DID);
|
|
151
|
+
if (dsRes == undefined || dsRes.length === 0) {
|
|
152
|
+
throw new Error('Nessun documento master trovato');
|
|
153
|
+
}
|
|
154
|
+
//Cerchiamo quello con modello IdC
|
|
155
|
+
let serachResultIdC = null;
|
|
156
|
+
for (const dtRes of dsRes) {
|
|
157
|
+
let dtdCur = await DcmtTypeListCacheService.GetAsync(dtRes.fromTID);
|
|
158
|
+
if (dtdCur?.templateTID === TemplateTIDs.IDC_DcmtType && dtRes.dcmtsFound && dtRes.dcmtsFound > 0) {
|
|
159
|
+
serachResultIdC = { ...dtRes };
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (serachResultIdC == null || serachResultIdC.dcmtsFound !== 1) {
|
|
163
|
+
throw new Error('Nessun IdC correlato al documento');
|
|
164
|
+
}
|
|
165
|
+
if (ue) {
|
|
166
|
+
ue.Metadata_ClearAll();
|
|
167
|
+
ue.TID = serachResultIdC.dtdResult.rows[0][0];
|
|
168
|
+
ue.DID = serachResultIdC.dtdResult.rows[0][1];
|
|
169
|
+
//Verifica dell'IdC
|
|
170
|
+
await ue.VerifySignAsync();
|
|
171
|
+
const signerInfoDescriptorIdC = await ue.GetSignersAsync();
|
|
172
|
+
//Controllo se marcato temporalmente
|
|
173
|
+
if (signerInfoDescriptorIdC) {
|
|
174
|
+
if (signerInfoDescriptorIdC.signers?.filter(s => s.isTimeStamp === true).length === 0) {
|
|
175
|
+
throw new Error('IdC non marcato temporalmente!');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else
|
|
179
|
+
throw new Error('IdC non firmato e non marcato temporalmente!');
|
|
180
|
+
//Ricerca dell'impronta SHA256 nel contenuto dell'IdC
|
|
181
|
+
let fileIdC = await SDK_Globals.tmSession?.NewSearchEngine().RetrieveFileAsync(serachResultIdC.dtdResult.rows[0][0], serachResultIdC.dtdResult.rows[0][1], rfo, abortController.signal, (pd) => {
|
|
182
|
+
if (firstBlock) {
|
|
183
|
+
maxFileSize = pd.ProgressBarMaximum ?? 0;
|
|
184
|
+
setWaitPanelMaxValueSecondary(maxFileSize);
|
|
185
|
+
firstBlock = false;
|
|
186
|
+
}
|
|
187
|
+
setWaitPanelValueSecondary(pd.ProgressBarValue);
|
|
188
|
+
setWaitPanelTextSecondary(`Downloading IdC... ${Globalization.getNumberDisplayValue(pd.ProgressBarValue, true)} / ${Globalization.getNumberDisplayValue(maxFileSize, true)}`);
|
|
189
|
+
if (pd.ProgressBarValue === pd.ProgressBarMaximum) {
|
|
190
|
+
setWaitPanelMaxValueSecondary(0);
|
|
191
|
+
setWaitPanelValueSecondary(0);
|
|
192
|
+
setWaitPanelTextSecondary('');
|
|
193
|
+
firstBlock = true;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
let hashOk = false;
|
|
197
|
+
if (fileIdC) {
|
|
198
|
+
try {
|
|
199
|
+
const contenuto = await fileIdC.text();
|
|
200
|
+
if (contenuto && signerInfoDescriptor?.shA256) {
|
|
201
|
+
hashOk = contenuto.toLocaleUpperCase().includes(signerInfoDescriptor.shA256.toLocaleUpperCase());
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (errDebug) {
|
|
205
|
+
throw new Error(`Errore nella lettura del file IdC: ${errDebug}`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (!hashOk) {
|
|
209
|
+
throw new Error('Impronta non trovata nel file IdC o non corrispondente a quella del documento');
|
|
210
|
+
}
|
|
211
|
+
let file;
|
|
212
|
+
file = await SDK_Globals.tmSession?.NewSearchEngine().RetrieveFileAsync(inputDcmt.TID, inputDcmt.DID, rfo, abortController.signal, (pd) => {
|
|
213
|
+
if (firstBlock) {
|
|
214
|
+
maxFileSize = pd.ProgressBarMaximum ?? 0;
|
|
215
|
+
setWaitPanelMaxValueSecondary(maxFileSize);
|
|
216
|
+
firstBlock = false;
|
|
217
|
+
}
|
|
218
|
+
setWaitPanelValueSecondary(pd.ProgressBarValue);
|
|
219
|
+
setWaitPanelTextSecondary(`Downloading... ${Globalization.getNumberDisplayValue(pd.ProgressBarValue, true)} / ${Globalization.getNumberDisplayValue(maxFileSize, true)}`);
|
|
220
|
+
if (pd.ProgressBarValue === pd.ProgressBarMaximum) {
|
|
221
|
+
setWaitPanelMaxValueSecondary(0);
|
|
222
|
+
setWaitPanelValueSecondary(0);
|
|
223
|
+
setWaitPanelTextSecondary('');
|
|
224
|
+
firstBlock = true;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
if (file && fileIdC) {
|
|
228
|
+
returnDcmtFiles.push(file);
|
|
229
|
+
returnDcmtInfos.push(inputDcmt);
|
|
230
|
+
returnDcmtFiles.push(fileIdC);
|
|
231
|
+
returnDcmtInfos.push({ ...inputDcmt, fileName: inputDcmt.fileName + "_IdC", FILEEXT: 'TXT.P7M.TSD' });
|
|
232
|
+
}
|
|
233
|
+
onFileDownloaded && await onFileDownloaded(returnDcmtFiles, returnDcmtInfos);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
const zipGetName = async (operation, tid) => {
|
|
237
|
+
let nameZip = tid ? tid.toString() + ".zip" : operation.toString() + ".zip";
|
|
238
|
+
switch (operation) {
|
|
239
|
+
case DcmtOperationTypes.CopyCompliant:
|
|
240
|
+
nameZip = `Duplicato_Informatico_${tid ?? '1'}`;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
return nameZip.trim().toLowerCase().endsWith('.zip')
|
|
244
|
+
? nameZip.trim() : nameZip.trim() + '.zip';
|
|
245
|
+
};
|
|
246
|
+
const zipDocuments = async (zipEntries, typeOperation, tid, passwordZip) => {
|
|
247
|
+
if (zipEntries.length > 0) {
|
|
248
|
+
const zipFileName = await zipGetName(typeOperation, tid);
|
|
249
|
+
// Crea il blob ZIP
|
|
250
|
+
const zipBlob = await ZipManager.createZip(zipEntries, {
|
|
251
|
+
compressionLevel: 6,
|
|
252
|
+
password: passwordZip || undefined,
|
|
253
|
+
});
|
|
254
|
+
// Download zip nella cartella Downloads del browser
|
|
255
|
+
ZipManager.downloadBlob(zipBlob, zipFileName);
|
|
256
|
+
ShowAlert({ message: SDKUI_Localizator.ZipCreatedSavedInFolder.replaceParams(zipFileName, "Zip creato con successo"), mode: 'success', duration: 5000, title: SDKUI_Localizator.CompressToZipFile });
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
const _downloadDcmtsAsync = async (inputDcmts, downloadMode = "download", onFileDownloaded, skipConfirmation = false, retrieveOptions, useCache = true, showSuccessAlert = true, useInputFileName = false) => {
|
|
79
260
|
if (inputDcmts === undefined)
|
|
80
261
|
return;
|
|
81
262
|
if (inputDcmts.length <= 0)
|
|
@@ -159,7 +340,8 @@ export const useDcmtOperations = () => {
|
|
|
159
340
|
else {
|
|
160
341
|
const alink2 = document.createElement('a');
|
|
161
342
|
alink2.href = fileURL;
|
|
162
|
-
|
|
343
|
+
// Usa useInputFileName per determinare la priorità del nome file
|
|
344
|
+
alink2.download = getDownloadFileName(file, inputDcmts[i], useInputFileName);
|
|
163
345
|
alink2.target = "_blank";
|
|
164
346
|
alink2.rel = "noreferrer";
|
|
165
347
|
alink2.click();
|
|
@@ -251,11 +433,14 @@ export const useDcmtOperations = () => {
|
|
|
251
433
|
TMExceptionBoxManager.show({ exception: err });
|
|
252
434
|
}
|
|
253
435
|
};
|
|
254
|
-
const downloadDcmtsAsync = async (
|
|
436
|
+
const downloadDcmtsAsync = async (params) => {
|
|
437
|
+
const { inputDcmts, downloadType = DownloadTypes.Attachment, downloadMode = "download", onFileDownloaded, confirmAttachments, skipConfirmation = false, retrieveOptions, useCache = true, showSuccessAlert = true, useInputFileName = false, // Default: usa il nome dal backend
|
|
438
|
+
} = params;
|
|
255
439
|
switch (downloadType) {
|
|
256
|
-
|
|
440
|
+
// Per il download di documenti, passa useInputFileName per controllare la priorità del nome
|
|
441
|
+
case DownloadTypes.Dcmt: return await _downloadDcmtsAsync(inputDcmts, downloadMode, onFileDownloaded, skipConfirmation, retrieveOptions, useCache, showSuccessAlert, useInputFileName);
|
|
257
442
|
case DownloadTypes.Attachment: return await _downloadAttachmentsAsync(inputDcmts, confirmAttachments, showSuccessAlert);
|
|
258
|
-
default: return await _downloadDcmtsAsync(inputDcmts, undefined, undefined, skipConfirmation, retrieveOptions, useCache, showSuccessAlert);
|
|
443
|
+
default: return await _downloadDcmtsAsync(inputDcmts, undefined, undefined, skipConfirmation, retrieveOptions, useCache, showSuccessAlert, useInputFileName);
|
|
259
444
|
}
|
|
260
445
|
};
|
|
261
446
|
const uploadDcmtsAsync = async (inputDcmts, operationTitle, operType, actionAfterOperationAsync) => {
|
|
@@ -481,6 +666,7 @@ export const useDcmtOperations = () => {
|
|
|
481
666
|
await uploadDcmtsAsync(inputDcmts, operationTitle, undefined, actionAfterOperationAsync);
|
|
482
667
|
return;
|
|
483
668
|
}
|
|
669
|
+
let zipEntries = [];
|
|
484
670
|
setShowWaitPanel(true);
|
|
485
671
|
setShowPrimary(true);
|
|
486
672
|
setShowSecondary(false);
|
|
@@ -529,6 +715,23 @@ export const useDcmtOperations = () => {
|
|
|
529
715
|
}
|
|
530
716
|
break;
|
|
531
717
|
}
|
|
718
|
+
case DcmtOperationTypes.CopyCompliant:
|
|
719
|
+
const collectFileForZip = async (file, dcmtInfo) => {
|
|
720
|
+
if (file.length !== dcmtInfo.length) {
|
|
721
|
+
console.warn(`Numero di file (${file.length}) e documenti (${dcmtInfo.length}) non corrispondono. Impossibile associare correttamente i file ai documenti per la creazione dello zip.`);
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
for (let j = 0; j < file.length; j++) {
|
|
725
|
+
let targetFileName = await generateTargetFileName(file[j], dcmtInfo[j], {
|
|
726
|
+
fileNamingMode: 'documentTypeAndDid',
|
|
727
|
+
separatorChar: '_',
|
|
728
|
+
});
|
|
729
|
+
targetFileName = targetFileName.replace(/\.xml\.p7m\.tsd$/i, '_IdC.XML.P7M.TSD');
|
|
730
|
+
zipEntries.push({ filename: targetFileName, data: file[j] });
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
await copyCompliantDcmtsAsync(inputDcmts[i], collectFileForZip);
|
|
734
|
+
break;
|
|
532
735
|
case DcmtOperationTypes.CheckFile:
|
|
533
736
|
await SDK_Globals.tmSession?.NewSearchEngine().CheckFileAsync(inputDcmts[i].TID, inputDcmts[i].DID);
|
|
534
737
|
break;
|
|
@@ -581,7 +784,12 @@ export const useDcmtOperations = () => {
|
|
|
581
784
|
result.push({ rowIndex: i, id1: inputDcmts[i].TID, id2: inputDcmts[i].DID, resultType: ResultTypes.SUCCESS });
|
|
582
785
|
}
|
|
583
786
|
catch (ex) {
|
|
584
|
-
|
|
787
|
+
let msg = getExceptionMessage(ex);
|
|
788
|
+
if (msg.startsWith('WARNING#')) {
|
|
789
|
+
result.push({ rowIndex: i, id1: inputDcmts[i].TID, id2: inputDcmts[i].DID, resultType: ResultTypes.WARNING, description: msg.replace('WARNING#', '') });
|
|
790
|
+
}
|
|
791
|
+
else
|
|
792
|
+
result.push({ rowIndex: i, id1: inputDcmts[i].TID, id2: inputDcmts[i].DID, resultType: ResultTypes.ERROR, description: msg });
|
|
585
793
|
const err = ex;
|
|
586
794
|
if (err.name === 'CanceledError') {
|
|
587
795
|
ShowAlert({ message: err.message, mode: 'warning', duration: 3000, title: 'Abort' });
|
|
@@ -589,6 +797,9 @@ export const useDcmtOperations = () => {
|
|
|
589
797
|
}
|
|
590
798
|
setWaitPanelValuePrimary(i + 1);
|
|
591
799
|
}
|
|
800
|
+
if (zipEntries.length > 0) {
|
|
801
|
+
await zipDocuments(zipEntries, dcmtOperationType, inputDcmts[0].TID);
|
|
802
|
+
}
|
|
592
803
|
setWaitPanelMaxValuePrimary(0);
|
|
593
804
|
setWaitPanelValuePrimary(0);
|
|
594
805
|
setWaitPanelTextPrimary('');
|
|
@@ -6,7 +6,6 @@ import { DcmtInfo, MetadataValueDescriptorEx, SearchResultContext, TaskContext }
|
|
|
6
6
|
import { UseCheckInOutOperationsReturn } from "./useCheckInOutOperations";
|
|
7
7
|
import { UseDcmtOperationsReturn } from "./useDcmtOperations";
|
|
8
8
|
import { UseRelatedDocumentsReturn } from "./useRelatedDocuments";
|
|
9
|
-
import { MergePdfManagerType } from '../helper';
|
|
10
9
|
export interface DocumentDataProps {
|
|
11
10
|
dtd: DcmtTypeDescriptor | undefined;
|
|
12
11
|
selectedItems: Array<any>;
|
|
@@ -100,7 +99,6 @@ interface UseDocumentOperationsProps {
|
|
|
100
99
|
tasks: TasksProps;
|
|
101
100
|
callbacks: OperationCallbacks;
|
|
102
101
|
exportData?: ExportDataProps;
|
|
103
|
-
mergePdfManager?: MergePdfManagerType;
|
|
104
102
|
}
|
|
105
103
|
export interface UseDocumentOperationsResult {
|
|
106
104
|
operationItems: Array<TMContextMenuItemProps>;
|
|
@@ -51,7 +51,7 @@ export const getAllFieldSelectedDcmtsOrFocused = (selectedItems, focusedItem, fi
|
|
|
51
51
|
return [];
|
|
52
52
|
};
|
|
53
53
|
export const useDocumentOperations = (props) => {
|
|
54
|
-
const { context, documentData, exportData, uiConfig, tasks, callbacks,
|
|
54
|
+
const { context, documentData, exportData, uiConfig, tasks, callbacks, } = props;
|
|
55
55
|
const { dtd, selectedItems, focusedItem, searchResult, currentSearchResults, currentMetadataValues, allUsers = [], datagridUtility, dcmtUtility, } = documentData;
|
|
56
56
|
/** State for managing the document(s) to process */
|
|
57
57
|
const [selectedDcmtInfos, setSelectedDcmtInfos] = useState([]);
|
|
@@ -210,6 +210,14 @@ export const useDocumentOperations = (props) => {
|
|
|
210
210
|
const isDisabledForMultiRow = () => {
|
|
211
211
|
return selectedDcmtInfos.length === 0 || selectedDcmtInfos.every(d => d.TID === undefined || d.DID === undefined);
|
|
212
212
|
};
|
|
213
|
+
const isDisabledForMultiRowCopyCompliant = () => {
|
|
214
|
+
let isNotSeletced = selectedDcmtInfos.length === 0 || selectedDcmtInfos.every(d => d.TID === undefined || d.DID === undefined);
|
|
215
|
+
if (isNotSeletced)
|
|
216
|
+
return true;
|
|
217
|
+
let isOnlyMetadata = selectedDcmtInfos.filter(d => d.FILEEXT === null).length === selectedDcmtInfos.length;
|
|
218
|
+
let isAllNotIsLex = selectedItemsFull.filter(d => d.ISLEX === null).length === selectedDcmtInfos.length;
|
|
219
|
+
return isOnlyMetadata || isAllNotIsLex;
|
|
220
|
+
};
|
|
213
221
|
const onRefreshBlog = async () => {
|
|
214
222
|
await onRefreshBlogForm?.();
|
|
215
223
|
await onRefreshBlogDatagrid?.();
|
|
@@ -475,7 +483,7 @@ export const useDocumentOperations = (props) => {
|
|
|
475
483
|
icon: _jsx(IconDownload, {}),
|
|
476
484
|
operationType: 'multiRow',
|
|
477
485
|
disabled: dtd?.perm?.canRetrieveFile !== AccessLevels.Yes ? true : isDisabledForMultiRow(),
|
|
478
|
-
name: SDKUI_Localizator.DownloadFile, onClick: () => downloadDcmtsAsync(selectedDcmtInfos, DownloadTypes.Dcmt, "download",
|
|
486
|
+
name: SDKUI_Localizator.DownloadFile, onClick: () => downloadDcmtsAsync({ inputDcmts: selectedDcmtInfos, downloadType: DownloadTypes.Dcmt, downloadMode: "download", skipConfirmation: true })
|
|
479
487
|
};
|
|
480
488
|
};
|
|
481
489
|
const downloadXMLAttachmentsMenuItem = () => {
|
|
@@ -484,7 +492,7 @@ export const useDocumentOperations = (props) => {
|
|
|
484
492
|
icon: _jsx(IconDownload, {}),
|
|
485
493
|
operationType: 'singleRow',
|
|
486
494
|
disabled: !isXMLFileExt(selectedDcmtInfos?.[0]?.FILEEXT) ? true : isDisabledForSingleRow(),
|
|
487
|
-
name: SDKUI_Localizator.DownloadXMLAttachments, onClick: () => downloadDcmtsAsync(selectedDcmtInfos, DownloadTypes.Attachment, "download",
|
|
495
|
+
name: SDKUI_Localizator.DownloadXMLAttachments, onClick: () => downloadDcmtsAsync({ inputDcmts: selectedDcmtInfos, downloadType: DownloadTypes.Attachment, downloadMode: "download", confirmAttachments: openConfirmAttachmentsDialog, skipConfirmation: true })
|
|
488
496
|
};
|
|
489
497
|
};
|
|
490
498
|
const duplicateDocumentMenuItem = () => {
|
|
@@ -691,7 +699,7 @@ export const useDocumentOperations = (props) => {
|
|
|
691
699
|
rfo.cvtFormat = FileFormats.PDF;
|
|
692
700
|
rfo.invoiceRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings.invoiceRetrieveFormat;
|
|
693
701
|
rfo.orderRetrieveFormat = SDKUI_Globals.userSettings?.searchSettings.orderRetrieveFormat;
|
|
694
|
-
await downloadDcmtsAsync(selectedDcmtInfos, DownloadTypes.Dcmt, "download", handlePrint,
|
|
702
|
+
await downloadDcmtsAsync({ inputDcmts: selectedDcmtInfos, downloadType: DownloadTypes.Dcmt, downloadMode: "download", onFileDownloaded: handlePrint, skipConfirmation: true, retrieveOptions: rfo, useCache: true, showSuccessAlert: false });
|
|
695
703
|
};
|
|
696
704
|
return {
|
|
697
705
|
id: 'print',
|
|
@@ -807,6 +815,16 @@ export const useDocumentOperations = (props) => {
|
|
|
807
815
|
],
|
|
808
816
|
};
|
|
809
817
|
};
|
|
818
|
+
const copyCompliantMenuItem = () => {
|
|
819
|
+
return {
|
|
820
|
+
id: 'copy-compliant',
|
|
821
|
+
icon: _jsx(IconCopy, {}),
|
|
822
|
+
name: SDKUI_Localizator.CopyCompliant,
|
|
823
|
+
operationType: 'multiRow',
|
|
824
|
+
disabled: isDisabledForMultiRowCopyCompliant(),
|
|
825
|
+
onClick: async () => { await runOperationAsync(selectedDcmtInfos, DcmtOperationTypes.CopyCompliant); }
|
|
826
|
+
};
|
|
827
|
+
};
|
|
810
828
|
const copyToFolderMenuItem = () => {
|
|
811
829
|
return {
|
|
812
830
|
id: 'copy-to-folder',
|
|
@@ -1153,6 +1171,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1153
1171
|
downloadFileMenuItem(),
|
|
1154
1172
|
downloadXMLAttachmentsMenuItem(),
|
|
1155
1173
|
duplicateDocumentMenuItem(),
|
|
1174
|
+
copyCompliantMenuItem(),
|
|
1156
1175
|
batchUpdateMenuItem(),
|
|
1157
1176
|
passToArchive(),
|
|
1158
1177
|
...(selectedDcmtInfos.length > 0 && isPdfEditorAvailable(dtd, selectedDcmtInfos[0]?.FILEEXT) && onOpenPdfEditorRequest ? [pdfEditorMenuItem(onOpenPdfEditorRequest)] : []),
|
|
@@ -1162,7 +1181,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1162
1181
|
signatureMenuItem(),
|
|
1163
1182
|
checkinMenuItem(),
|
|
1164
1183
|
copyToFolderMenuItem(),
|
|
1165
|
-
|
|
1184
|
+
mergeToPdfMenuItem(),
|
|
1166
1185
|
allowRelations ? relationsMenuItem() : null,
|
|
1167
1186
|
sharedDcmtsMenuItem(),
|
|
1168
1187
|
// shareMenuItem(),
|
|
@@ -1307,7 +1326,6 @@ export const useDocumentOperations = (props) => {
|
|
|
1307
1326
|
onTaskCreateRequest,
|
|
1308
1327
|
datagridUtility,
|
|
1309
1328
|
dcmtUtility,
|
|
1310
|
-
mergePdfManager,
|
|
1311
1329
|
};
|
|
1312
1330
|
const masterDetailMasterCommonProps = {
|
|
1313
1331
|
deviceType,
|
|
@@ -1335,7 +1353,6 @@ export const useDocumentOperations = (props) => {
|
|
|
1335
1353
|
onTaskCreateRequest,
|
|
1336
1354
|
datagridUtility,
|
|
1337
1355
|
dcmtUtility,
|
|
1338
|
-
mergePdfManager,
|
|
1339
1356
|
};
|
|
1340
1357
|
const renderDcmtOperations = (_jsxs(_Fragment, { children: [(showExportForm && searchResult && dataColumns && dataSource && selectedRowKeys) && (_jsx(TMDataGridExportForm, { dataColumns: dataColumns, dataSource: dataSource, selectedRowKeys: selectedRowKeys, onCloseExportForm: () => setShowExportForm(false), searchResult: searchResult })), _jsx(StyledMultiViewPanel, { "$isVisible": isOpenDcmtForm, children: ((isOpenDcmtForm && focusedItem?.TID !== undefined && focusedItem?.DID !== undefined) &&
|
|
1341
1358
|
_jsx(TMDcmtForm, { isModal: openDcmtFormAsModal || (dcmtFormLayoutMode === LayoutModes.Ark && focusedItem?.DID !== undefined), titleModal: dtd?.name ?? '', TID: focusedItem.TID, DID: focusedItem.DID, allowButtonsRefs: true, showTodoDcmtForm: showTodoDcmtForm, layoutMode: dcmtFormLayoutMode, count: visibleItems?.length, itemIndex: visibleItems ? visibleItems.findIndex(o => o.rowIndex === focusedItem?.rowIndex) + 1 : undefined, canNext: canNavigateHandler ? canNavigateHandler('next') : false, canPrev: canNavigateHandler ? canNavigateHandler('prev') : false, onNext: () => onNavigateHandler && onNavigateHandler('next'), onPrev: () => onNavigateHandler && onNavigateHandler('prev'), onClose: () => { (false); onDcmtFormOpenChange(false, LayoutModes.Update); }, onWFOperationCompleted: onWFOperationCompleted, onTaskCreateRequest: onTaskCreateRequest, onSavedAsyncCallback: onSavedAsyncCallback, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openFileUploaderPdfEditor: openFileUploaderPdfEditor, onReferenceClick: onReferenceClick, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, focusedItem?.TID, focusedItem?.DID), showDcmtFormSidebar: showDcmtFormSidebar, datagridUtility: {
|
|
@@ -1391,7 +1408,7 @@ export const useDocumentOperations = (props) => {
|
|
|
1391
1408
|
TMSpinner.hide();
|
|
1392
1409
|
}
|
|
1393
1410
|
}, onClose: () => setShowManyToManyChooser(false), manageUseLocalizedName: false }), showPairDcmtsModal &&
|
|
1394
|
-
_jsx(TMModal, { title: (isPairingManyToMany ? "Abbina" : "Disabbina") + " documenti", onClose: () => setShowPairDcmtsModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearchResult, { searchResults: pairedSearchResults, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, passToArchiveCallback: passToArchiveCallback, showTodoDcmtForm: showTodoDcmtForm, allowFloatingBar: false, floatingActionConfig: pairFloatingActionConfig, showBackButton: false, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter
|
|
1411
|
+
_jsx(TMModal, { title: (isPairingManyToMany ? "Abbina" : "Disabbina") + " documenti", onClose: () => setShowPairDcmtsModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearchResult, { searchResults: pairedSearchResults, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, onRefreshSearchAsyncDatagrid: onRefreshSearchAsyncDatagrid, onFileOpened: onFileOpened, onTaskCreateRequest: onTaskCreateRequest, openWGsCopyMoveForm: openWGsCopyMoveForm, editPdfForm: editPdfForm, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, passToArchiveCallback: passToArchiveCallback, showTodoDcmtForm: showTodoDcmtForm, allowFloatingBar: false, floatingActionConfig: pairFloatingActionConfig, showBackButton: false, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter }) }), showPairSearchModal &&
|
|
1395
1412
|
_jsx(TMModal, { title: "Ricerca documenti", onClose: () => setShowPairSearchModal(false), width: isMobile ? '90%' : '50%', height: isMobile ? '90%' : '70%', children: _jsx(TMSearch, { onlyShowSearchQueryPanel: true, inputTID: pairSearchModalTargetTID, inputMids: pairSearchModalInputMids, floatingActionConfig: pairSearchModalFloatingActionConfig, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenSharedArchive && _jsx(TMModal, { title: SDKUI_Localizator.SharedArchiving, onClose: () => {
|
|
1396
1413
|
setIsOpenSharedArchive(false);
|
|
1397
1414
|
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMArchive, { inputDID: selectedDcmtInfos?.[0].DID, inputTID: selectedDcmtInfos?.[0].TID, inputMids: currentMetadataValues.filter(md => md.mid && md.mid > 100).map(md => ({ mid: md.mid, value: md.value ?? '' })), isSharedArchive: true, inputFile: sharedDcmtFile, onSavedAsyncCallback: async (tid, did) => {
|
|
@@ -1400,11 +1417,11 @@ export const useDocumentOperations = (props) => {
|
|
|
1400
1417
|
}, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), sharedDcmtSearchResults.length > 0 &&
|
|
1401
1418
|
_jsx(TMModal, { title: "Documenti condivisi", onClose: () => {
|
|
1402
1419
|
setSharedDcmtSearchResults([]);
|
|
1403
|
-
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMSearchResult, { searchResults: sharedDcmtSearchResults, allowFloatingBar: false, showSelector: true, disableAccordionIfSingleCategory: true, showBackButton: isMobile, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers
|
|
1420
|
+
}, width: isMobile ? '90%' : '60%', height: isMobile ? '90%' : '80%', children: _jsx(TMSearchResult, { searchResults: sharedDcmtSearchResults, allowFloatingBar: false, showSelector: true, disableAccordionIfSingleCategory: true, showBackButton: isMobile, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${selectedDcmtInfos.length} documenti selezionati)`, inputDcmts: selectedDcmtInfos, TID: selectedDcmtInfos.length > 0 ? selectedDcmtInfos[0]?.TID : undefined, DID: selectedDcmtInfos.length > 0 ? selectedDcmtInfos[0]?.DID : undefined, onBack: () => updateBatchUpdateForm(false), onSavedCallbackAsync: async () => {
|
|
1404
1421
|
updateBatchUpdateForm(false);
|
|
1405
1422
|
setIsModifiedBatchUpdate(false);
|
|
1406
1423
|
await onRefreshDataRowsAsync?.();
|
|
1407
|
-
}, onStatusChanged: (isModified) => { setIsModifiedBatchUpdate(isModified); } }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 0, onClose: () => updateShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 1, onClose: () => updateShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, onClose: () => updateShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { fromDTD: dtd, TID: contextConfig.approvalTID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: handleWFOperationCompleted, onClose: () => updateShowMoreInfoPopup(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, triggerBlogRefresh: onRefreshBlogDatagrid }), openCopyToFolderForm.open && openCopyToFolderForm.operationType === 'mergeToPdf' && _jsx(TMMergeToPdfForm, { mode: openCopyToFolderForm.mode, selectedDcmtInfos: selectedDcmtInfos, onClose: () => setOpenCopyToFolderForm({ open: false, operationType: 'copyToFolder', mode: 'onlySelected' }), showTMRelationViewer: showTMRelationViewerInCopyToFolderForm,
|
|
1424
|
+
}, onStatusChanged: (isModified) => { setIsModifiedBatchUpdate(isModified); } }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 0, onClose: () => updateShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, isReject: 1, onClose: () => updateShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, selectedItems: approvalVID ? selectedDcmtInfos.map(item => ({ ...item, TID: approvalVID })) : selectedDcmtInfos, onClose: () => updateShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { fromDTD: dtd, TID: contextConfig.approvalTID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: handleWFOperationCompleted, onClose: () => updateShowMoreInfoPopup(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, triggerBlogRefresh: onRefreshBlogDatagrid }), openCopyToFolderForm.open && openCopyToFolderForm.operationType === 'mergeToPdf' && _jsx(TMMergeToPdfForm, { mode: openCopyToFolderForm.mode, selectedDcmtInfos: selectedDcmtInfos, onClose: () => setOpenCopyToFolderForm({ open: false, operationType: 'copyToFolder', mode: 'onlySelected' }), showTMRelationViewer: showTMRelationViewerInCopyToFolderForm, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), openCopyToFolderForm.open && openCopyToFolderForm.operationType === 'copyToFolder' && _jsx(TMCopyToFolderForm, { mode: openCopyToFolderForm.mode, selectedDcmtInfos: selectedDcmtInfos, onClose: () => setOpenCopyToFolderForm({ open: false, operationType: 'copyToFolder', mode: 'onlySelected' }), showTMRelationViewer: showTMRelationViewerInCopyToFolderForm, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {}), _jsx(FileSourceDialog, {}), taskFormDialogComponent, s4TViewerDialogComponent, currentCustomButton && _jsx(TMCustomButton, { button: currentCustomButton, formData: currentMetadataValues, selectedItems: selectedItemsFull, onClose: () => setCurrentCustomButton(undefined) })] }));
|
|
1408
1425
|
return {
|
|
1409
1426
|
operationItems: operationItems(),
|
|
1410
1427
|
renderFloatingBar,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FileDescriptor, FileFormats } from '@topconsultnpm/sdk-ts';
|
|
2
3
|
export declare const useInputCvtFormatDialog: () => [() => Promise<FileFormats>, () => JSX.Element];
|
|
3
4
|
export declare const useFileDialog: () => {
|
|
@@ -5,7 +6,7 @@ export declare const useFileDialog: () => {
|
|
|
5
6
|
};
|
|
6
7
|
export declare const useInputAttachmentsDialog: () => {
|
|
7
8
|
openConfirmAttachmentsDialog: (list: FileDescriptor[]) => Promise<string[] | undefined>;
|
|
8
|
-
ConfirmAttachmentsDialog: () =>
|
|
9
|
+
ConfirmAttachmentsDialog: () => React.JSX.Element | null;
|
|
9
10
|
};
|
|
10
11
|
export type FileSourceType = 'filesystem' | 'scanner-new' | 'scanner-edit' | undefined;
|
|
11
12
|
export declare const useFileSourceDialog: () => [(hasExistingFile?: boolean) => Promise<FileSourceType>, () => JSX.Element];
|
|
@@ -160,10 +160,10 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
|
|
|
160
160
|
setCanArchiveDetailRelation(false);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
const detailRelations = relations.filter(r => r.detailTID === tid);
|
|
163
|
+
const detailRelations = relations.filter(r => r.detailTID === tid && r.relationType !== RelationTypes.ManyToMany);
|
|
164
164
|
const hasMasterWithAssociations = detailRelations.some(rel => rel.associations && rel.associations.length > 0);
|
|
165
165
|
setCanArchiveMasterRelation(hasMasterWithAssociations);
|
|
166
|
-
const masterRelations = relations.filter(r => r.masterTID === tid);
|
|
166
|
+
const masterRelations = relations.filter(r => r.masterTID === tid && r.relationType !== RelationTypes.ManyToMany);
|
|
167
167
|
const hasDetailWithAssociations = masterRelations.some(rel => rel.associations && rel.associations.length > 0);
|
|
168
168
|
setCanArchiveDetailRelation(hasDetailWithAssociations);
|
|
169
169
|
}
|
|
@@ -196,8 +196,8 @@ export const useRelatedDocuments = ({ selectedSearchResult, focusedItem, current
|
|
|
196
196
|
}, [selectedSearchResult?.fromTID]);
|
|
197
197
|
const filterRelationsByType = (relations, tid, type) => {
|
|
198
198
|
return type === 'detail'
|
|
199
|
-
? relations.filter(r => r.masterTID == tid)
|
|
200
|
-
: relations.filter(r => r.detailTID == tid);
|
|
199
|
+
? relations.filter(r => r.masterTID == tid && r.relationType !== RelationTypes.ManyToMany)
|
|
200
|
+
: relations.filter(r => r.detailTID == tid && r.relationType !== RelationTypes.ManyToMany);
|
|
201
201
|
};
|
|
202
202
|
const filterRelationsWithAssociations = (relations) => {
|
|
203
203
|
return relations.filter(rel => rel.associations && rel.associations.length > 0);
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { JobTypes, ObjectClasses, ProcessDescriptor, DcmtTypeDescriptor } from "@topconsultnpm/sdk-ts";
|
|
2
3
|
export declare class PlatformObjectService {
|
|
3
|
-
static readonly retrieveAllAsync: (objClass: ObjectClasses, refreshCache?: boolean) => Promise<import("@topconsultnpm/sdk-ts").
|
|
4
|
-
static readonly retrieveAsync: (objClass: ObjectClasses, id: number) => Promise<import("@topconsultnpm/sdk-ts").
|
|
4
|
+
static readonly retrieveAllAsync: (objClass: ObjectClasses, refreshCache?: boolean) => Promise<import("@topconsultnpm/sdk-ts").RelationDescriptor[] | import("@topconsultnpm/sdk-ts").AreaDescriptor[] | import("@topconsultnpm/sdk-ts").NotificationDescriptor[] | import("@topconsultnpm/sdk-ts").TaskDescriptor[] | import("@topconsultnpm/sdk-ts").WorkingGroupDescriptor[] | undefined>;
|
|
5
|
+
static readonly retrieveAsync: (objClass: ObjectClasses, id: number) => Promise<import("@topconsultnpm/sdk-ts").RelationDescriptor | import("@topconsultnpm/sdk-ts").AreaDescriptor | import("@topconsultnpm/sdk-ts").BasketTypeDescriptor | import("@topconsultnpm/sdk-ts").NotificationDescriptor | import("@topconsultnpm/sdk-ts").TaskDescriptor | import("@topconsultnpm/sdk-ts").WorkingGroupDescriptor | undefined>;
|
|
5
6
|
private static readonly retrieveAllAdminJobsAsync;
|
|
6
|
-
static readonly retrieveAllAdminAsync: (objClass: ObjectClasses, jobType?: JobTypes) => Promise<import("@topconsultnpm/sdk-ts").UserDescriptor[] |
|
|
7
|
+
static readonly retrieveAllAdminAsync: (objClass: ObjectClasses, jobType?: JobTypes) => Promise<import("@topconsultnpm/sdk-ts").UserDescriptor[] | import("@topconsultnpm/sdk-ts").RelationDescriptor[] | import("@topconsultnpm/sdk-ts").GroupDescriptor[] | DcmtTypeDescriptor[] | import("@topconsultnpm/sdk-ts").AreaDescriptor[] | import("@topconsultnpm/sdk-ts").FEDistillerJobDescriptor[] | import("@topconsultnpm/sdk-ts").DataListDescriptor[] | import("@topconsultnpm/sdk-ts").DiskDescriptor[] | import("@topconsultnpm/sdk-ts").LDAPDescriptor[] | import("@topconsultnpm/sdk-ts").NumeratorDescriptor[] | ProcessDescriptor[] | import("@topconsultnpm/sdk-ts").SAPLoginDescriptor[] | import("@topconsultnpm/sdk-ts").SignCertDescriptor[] | import("@topconsultnpm/sdk-ts").SignServerDescriptor[] | import("@topconsultnpm/sdk-ts").TreeDescriptor[] | import("@topconsultnpm/sdk-ts").TSADescriptor[] | import("@topconsultnpm/sdk-ts").WFDescriptor[] | undefined>;
|
|
7
8
|
private static readonly loadCacheForJobAsync;
|
|
8
9
|
private static readonly retrieveAdminJobAsync;
|
|
9
|
-
static readonly retrieveAdminAsync: (objClass: ObjectClasses, jobType: JobTypes, id: number) => Promise<import("@topconsultnpm/sdk-ts").UserDescriptor | import("@topconsultnpm/sdk-ts").WFDescriptor | DcmtTypeDescriptor | import("@topconsultnpm/sdk-ts").
|
|
10
|
+
static readonly retrieveAdminAsync: (objClass: ObjectClasses, jobType: JobTypes, id: number) => Promise<import("@topconsultnpm/sdk-ts").UserDescriptor | import("@topconsultnpm/sdk-ts").WFDescriptor | DcmtTypeDescriptor | import("@topconsultnpm/sdk-ts").DataListDescriptor | import("@topconsultnpm/sdk-ts").RelationDescriptor | import("@topconsultnpm/sdk-ts").GroupDescriptor | import("@topconsultnpm/sdk-ts").SavedQueryDescriptor | import("@topconsultnpm/sdk-ts").AreaDescriptor | import("@topconsultnpm/sdk-ts").BasketTypeDescriptor | import("@topconsultnpm/sdk-ts").TaskDescriptor | import("@topconsultnpm/sdk-ts").WorkingGroupDescriptor | import("@topconsultnpm/sdk-ts").BarcodeArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").BatchUpdaterJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoDoganaleJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoDoganalePlusJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoDoganaleDistillerJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoFiscaleQueryJobDescriptor | import("@topconsultnpm/sdk-ts").CassettoFiscaleSenderJobDescriptor | import("@topconsultnpm/sdk-ts").CheckSequenceJobDescriptor | import("@topconsultnpm/sdk-ts").COSCheckerJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtConverterJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtCreatorJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtDeleterJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtNoteJobDescriptor | import("@topconsultnpm/sdk-ts").DcmtPrinterJobDescriptor | import("@topconsultnpm/sdk-ts").FEAttacherJobDescriptor | import("@topconsultnpm/sdk-ts").FECreatorTxtJobDescriptor | import("@topconsultnpm/sdk-ts").FEDetacherJobDescriptor | import("@topconsultnpm/sdk-ts").FEDistillerJobDescriptor | import("@topconsultnpm/sdk-ts").FESenderWsJobDescriptor | import("@topconsultnpm/sdk-ts").FESplitterJobDescriptor | import("@topconsultnpm/sdk-ts").FEValidatorJobDescriptor | import("@topconsultnpm/sdk-ts").FileArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").FileCheckerJobDescriptor | import("@topconsultnpm/sdk-ts").FileExecJobDescriptor | import("@topconsultnpm/sdk-ts").FileExportJobDescriptor | import("@topconsultnpm/sdk-ts").FileMoverJobDescriptor | import("@topconsultnpm/sdk-ts").LexJobDescriptor | import("@topconsultnpm/sdk-ts").LinkerJobDescriptor | import("@topconsultnpm/sdk-ts").MailArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").MailQueryJobDescriptor | import("@topconsultnpm/sdk-ts").MailSenderJobDescriptor | import("@topconsultnpm/sdk-ts").MigrationJobDescriptor | import("@topconsultnpm/sdk-ts").OcrSixJobDescriptor | import("@topconsultnpm/sdk-ts").PdDCreatorJobDescriptor | import("@topconsultnpm/sdk-ts").PDFArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").PdVArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").PdVQueryJobDescriptor | import("@topconsultnpm/sdk-ts").PdVSenderJobDescriptor | import("@topconsultnpm/sdk-ts").PeppolQueryJobDescriptor | import("@topconsultnpm/sdk-ts").PeppolSenderJobDescriptor | import("@topconsultnpm/sdk-ts").PostelQueryJobDescriptor | import("@topconsultnpm/sdk-ts").PostelSenderJobDescriptor | import("@topconsultnpm/sdk-ts").ReplicatorJobDescriptor | import("@topconsultnpm/sdk-ts").SAPAlignerJobDescriptor | import("@topconsultnpm/sdk-ts").SAPBarcodeJobDescriptor | import("@topconsultnpm/sdk-ts").SAPDataReaderJobDescriptor | import("@topconsultnpm/sdk-ts").SAPDataWriterJobDescriptor | import("@topconsultnpm/sdk-ts").SignerJobDescriptor | import("@topconsultnpm/sdk-ts").SpoolArchiverJobDescriptor | import("@topconsultnpm/sdk-ts").UpdaterJobDescriptor | import("@topconsultnpm/sdk-ts").DiskDescriptor | import("@topconsultnpm/sdk-ts").LDAPDescriptor | import("@topconsultnpm/sdk-ts").NumeratorDescriptor | ProcessDescriptor | import("@topconsultnpm/sdk-ts").SAPLoginDescriptor | import("@topconsultnpm/sdk-ts").SignCertDescriptor | import("@topconsultnpm/sdk-ts").SignServerDescriptor | import("@topconsultnpm/sdk-ts").TreeDescriptor | import("@topconsultnpm/sdk-ts").TSADescriptor | undefined>;
|
|
10
11
|
private static readonly updateJobAsync;
|
|
11
12
|
static readonly updateAsync: (objClass: ObjectClasses, jobType: JobTypes, d: any, ...args: any[]) => Promise<number | undefined>;
|
|
12
13
|
private static readonly createJobAsync;
|
|
13
14
|
static readonly createAsync: (objClass: ObjectClasses, jobType: JobTypes, d: any) => Promise<number | undefined>;
|
|
14
15
|
static readonly deleteAsync: (objClass: ObjectClasses, id: number) => Promise<number | undefined>;
|
|
15
16
|
static readonly getName: (objClass: ObjectClasses, jobType?: JobTypes, isPlural?: boolean) => string;
|
|
16
|
-
static readonly getIcon: (objClass: ObjectClasses, d: any) =>
|
|
17
|
-
static readonly getTooltip: (objClass: ObjectClasses, d: any) =>
|
|
17
|
+
static readonly getIcon: (objClass: ObjectClasses, d: any) => React.JSX.Element;
|
|
18
|
+
static readonly getTooltip: (objClass: ObjectClasses, d: any) => React.JSX.Element | null;
|
|
18
19
|
}
|
package/lib/ts/types.d.ts
CHANGED
package/lib/ts/types.js
CHANGED
|
@@ -39,6 +39,7 @@ export var DcmtOperationTypes;
|
|
|
39
39
|
DcmtOperationTypes[DcmtOperationTypes["FreeSearchPurge"] = 13] = "FreeSearchPurge";
|
|
40
40
|
DcmtOperationTypes[DcmtOperationTypes["BatchUpdate"] = 14] = "BatchUpdate";
|
|
41
41
|
DcmtOperationTypes[DcmtOperationTypes["RemoveFromWorkgroup"] = 15] = "RemoveFromWorkgroup";
|
|
42
|
+
DcmtOperationTypes[DcmtOperationTypes["CopyCompliant"] = 16] = "CopyCompliant";
|
|
42
43
|
})(DcmtOperationTypes || (DcmtOperationTypes = {}));
|
|
43
44
|
export var DownloadTypes;
|
|
44
45
|
(function (DownloadTypes) {
|