@topconsultnpm/sdkui-react 6.20.0-dev1.124 → 6.20.0-dev1.126
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/base/TMPanel.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtForm.js +15 -6
- package/lib/components/features/search/TMViewHistoryDcmt.js +45 -50
- package/lib/helper/SDKUI_Localizator.d.ts +3 -4
- package/lib/helper/SDKUI_Localizator.js +16 -26
- package/lib/helper/queryHelper.d.ts +1 -1
- package/lib/helper/queryHelper.js +47 -21
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
|
8
8
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
9
9
|
import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
|
|
10
10
|
import { getWorkItemSetIDAsync, handleArchiveVisibility, searchResultToMetadataValues } from '../../../helper/queryHelper';
|
|
11
|
-
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch, deepCompare, IconCheck, IconActivity, TMImageLibrary, IconStar, IconRelation, IconInfo, IconArchiveDoc, IconDelete, IconPair, IconUnpair, IconArchiveMaster, IconArchiveDetail, getExceptionMessage, isApprovalWorkflowView, getDcmtCicoStatus, IconFileDots, IconCustom, buildWorkItemsFromWFCtrl } from '../../../helper';
|
|
11
|
+
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch, deepCompare, IconCheck, IconActivity, TMImageLibrary, IconStar, IconRelation, IconInfo, IconArchiveDoc, IconDelete, IconPair, IconUnpair, IconArchiveMaster, IconArchiveDetail, getExceptionMessage, isApprovalWorkflowView, getDcmtCicoStatus, IconFileDots, IconCustom, buildWorkItemsFromWFCtrl, IconLock } from '../../../helper';
|
|
12
12
|
import { hasDetailRelations, hasMasterRelations, isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
13
13
|
import { Gutters, TMColors } from '../../../utils/theme';
|
|
14
14
|
import { StyledFormButtonsContainer, StyledLoadingContainer, StyledModalContainer, StyledReferenceButton, StyledSpinner, StyledToolbarCardContainer } from '../../base/Styled';
|
|
@@ -62,6 +62,7 @@ export var InvocationContext;
|
|
|
62
62
|
// Aggiungi qui altri contesti futuri secondo necessità
|
|
63
63
|
})(InvocationContext || (InvocationContext = {}));
|
|
64
64
|
let abortControllerLocal = new AbortController();
|
|
65
|
+
;
|
|
65
66
|
//#endregion
|
|
66
67
|
const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, showHeader = true, onSaveRecents, layoutMode = LayoutModes.Update, showBackButton = true, onClose, onSavedAsyncCallback, TID, DID, formMode = FormModes.Update, canNext, canPrev, count, itemIndex, onNext, onPrev, allowNavigation = true, allowRelations = true, isClosable = false, isExpertMode = SDKUI_Globals.userSettings.advancedSettings.expertMode === 1, showDcmtFormSidebar = true, invocationContext = InvocationContext.Default, titleModal, isModal = false, widthModal = "100%", heightModal = "100%", groupId, onWFOperationCompleted, onTaskCompleted, onTaskCreateRequest, inputFile = null, taskFormDialogComponent, moreInfoTasks, connectorFileSave = undefined, inputMids = [], openS4TViewer = false, onOpenS4TViewerRequest, s4TViewerDialogComponent, enableDragDropOverlay = false, passToSearch, isSharedDcmt = false, sharedSourceTID, sharedSourceDID, allowButtonsRefs = false, onReferenceClick, }) => {
|
|
67
68
|
const { showHistory, showHistoryCallback, hideHistoryCallback, showCheckoutInformationForm, commentFormState, hideCommentFormCallback, showCheckoutInformationFormCallback, hideCheckoutInformationFormCallback, copyCheckoutPathToClipboardCallback, handleCheckOutCallback, handleCheckInCallback, refreshPreviewTrigger, showCicoWaitPanel, cicoWaitPanelTitle, showCicoPrimaryProgress, cicoPrimaryProgressText, cicoPrimaryProgressValue, cicoPrimaryProgressMax, } = useCheckInOutOperations();
|
|
@@ -121,6 +122,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
121
122
|
// Stato per triggerare il refresh del blog dall'esterno
|
|
122
123
|
const [refreshBlogTrigger, setRefreshBlogTrigger] = useState(0);
|
|
123
124
|
const [wfError, setWfError] = useState(null);
|
|
125
|
+
const [metadataDcmtOrigin, setMetadataDcmtOrigin] = useState(null);
|
|
124
126
|
const triggerBlogRefresh = useCallback(async () => {
|
|
125
127
|
setRefreshBlogTrigger(prev => prev + 1);
|
|
126
128
|
}, []);
|
|
@@ -188,10 +190,11 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
188
190
|
return;
|
|
189
191
|
TMSpinner.show({ description: 'Loading Metadata...' });
|
|
190
192
|
let res = getMetadataResult ?? await SDK_Globals.tmSession?.NewSearchEngine().GetMetadataAsync(TID, did, true);
|
|
193
|
+
const origin = { fromName: res?.fromName, fromTID: res?.fromTID };
|
|
191
194
|
let dtd = res?.dtdResult;
|
|
192
195
|
let rows = dtd.rows ? dtd.rows[0] : [];
|
|
193
196
|
let mids = res?.selectMIDs;
|
|
194
|
-
let metadataList = searchResultToMetadataValues(TID, dtd, rows, mids, mdList, layoutMode);
|
|
197
|
+
let metadataList = searchResultToMetadataValues(TID, dtd, rows, mids, mdList, layoutMode, origin.fromTID?.toString() !== TID?.toString());
|
|
195
198
|
if (archived) {
|
|
196
199
|
// Usa setFormData con funzione callback per accedere allo stato precedente
|
|
197
200
|
// invece di dipendere da formDataOrig nell'array di dipendenze
|
|
@@ -217,6 +220,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
217
220
|
});
|
|
218
221
|
return;
|
|
219
222
|
}
|
|
223
|
+
setMetadataDcmtOrigin(origin);
|
|
220
224
|
setFormDataOrig(structuredClone(metadataList));
|
|
221
225
|
setFormData(structuredClone(metadataList));
|
|
222
226
|
// Sincronizza il ref con i dati caricati per evitare stale closure in handleSave
|
|
@@ -278,7 +282,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
278
282
|
}
|
|
279
283
|
else {
|
|
280
284
|
const renderedMetadata = dtd?.metadata?.filter((metadata) => handleArchiveVisibility(metadata)) ?? [];
|
|
281
|
-
const metadataList = searchResultToMetadataValues(dtd?.id, undefined, [], [], renderedMetadata, layoutMode);
|
|
285
|
+
const metadataList = searchResultToMetadataValues(dtd?.id, undefined, [], [], renderedMetadata, layoutMode, metadataDcmtOrigin?.fromTID?.toString() !== TID?.toString());
|
|
282
286
|
setFormDataOrig(structuredClone(metadataList));
|
|
283
287
|
setFormData(structuredClone(metadataList));
|
|
284
288
|
formDataOrigRef.current = structuredClone(metadataList);
|
|
@@ -293,7 +297,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
293
297
|
setIsInitialLoading(false);
|
|
294
298
|
setIsNavigating(false);
|
|
295
299
|
}
|
|
296
|
-
}, [TID, DID, layoutMode, inputFile, setMetadataList, handleReset, allowButtonsRefs]);
|
|
300
|
+
}, [TID, DID, layoutMode, inputFile, setMetadataList, handleReset, allowButtonsRefs, metadataDcmtOrigin?.fromTID]);
|
|
297
301
|
const createChange = useCallback((mid, metadataType, modifiedValue) => {
|
|
298
302
|
return { mid, metadataType, modifiedValue };
|
|
299
303
|
}, []);
|
|
@@ -1377,6 +1381,11 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1377
1381
|
};
|
|
1378
1382
|
const initialPanels = useMemo(() => {
|
|
1379
1383
|
const { assignedToMe, assignedByMe } = getDcmtTasksCounter(TID, DID, allTasks);
|
|
1384
|
+
let titleDcmtFormPanel = fromDTD?.nameLoc ?? "";
|
|
1385
|
+
// Caso: Il documento proviene da un'origine esterna
|
|
1386
|
+
if (metadataDcmtOrigin?.fromTID?.toString() !== TID?.toString()) {
|
|
1387
|
+
titleDcmtFormPanel = (_jsxs("div", { style: { display: 'inline-flex', alignItems: 'center', gap: '4px' }, children: [_jsx(TMTooltip, { content: _jsxs("div", { style: { textAlign: 'left' }, children: [_jsx("p", { children: "Questo documento proviene da un'altra origine e non pu\u00F2 essere modificato." }), _jsx("hr", {}), _jsxs("p", { children: [_jsx("strong", { children: "TID corrente:" }), " ", TID?.toString()] }), _jsxs("p", { children: [_jsx("strong", { children: "Nome corrente:" }), " ", fromDTD?.nameLoc] }), _jsx("hr", {}), _jsxs("p", { children: [_jsx("strong", { children: "TID origine:" }), " ", metadataDcmtOrigin?.fromTID?.toString()] }), _jsxs("p", { children: [_jsx("strong", { children: "Nome origine:" }), " ", metadataDcmtOrigin?.fromName] })] }), children: _jsx(IconLock, { fontSize: 16, style: { alignSelf: 'center' } }) }), metadataDcmtOrigin?.fromName] }));
|
|
1388
|
+
}
|
|
1380
1389
|
const panels = [
|
|
1381
1390
|
{
|
|
1382
1391
|
id: 'tmDcmtForm',
|
|
@@ -1386,7 +1395,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1386
1395
|
isClosable: isClosable,
|
|
1387
1396
|
panelContainer: {
|
|
1388
1397
|
showHeader: showHeader,
|
|
1389
|
-
title:
|
|
1398
|
+
title: titleDcmtFormPanel,
|
|
1390
1399
|
allowMaximize: !isMobile,
|
|
1391
1400
|
onBack: showBackButton ? (isClosable && deviceType !== DeviceType.MOBILE) ? undefined : handleClose : undefined,
|
|
1392
1401
|
onClose: isClosable ? () => { } : undefined,
|
|
@@ -1458,7 +1467,7 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1458
1467
|
},
|
|
1459
1468
|
];
|
|
1460
1469
|
return panels;
|
|
1461
|
-
}, [fromDTD, showBackButton, tmDcmtForm, tmBlog, tmSysMetadata, tmDcmtPreview, tmWF, tmDcmtTasks, isPreviewDisabled, isSysMetadataDisabled, isBoardDisabled, isWFDisabled, inputFile, isClosable, allTasks, DID, TID]);
|
|
1470
|
+
}, [fromDTD, showBackButton, tmDcmtForm, tmBlog, tmSysMetadata, tmDcmtPreview, tmWF, tmDcmtTasks, isPreviewDisabled, isSysMetadataDisabled, isBoardDisabled, isWFDisabled, inputFile, isClosable, allTasks, DID, TID, metadataDcmtOrigin?.fromTID]);
|
|
1462
1471
|
// Retrieves the current document form setting based on the normalized TID
|
|
1463
1472
|
const getCurrentDcmtFormSetting = () => {
|
|
1464
1473
|
const settings = SDKUI_Globals.userSettings.dcmtFormSettings;
|
|
@@ -187,55 +187,50 @@ const TMViewHistoryDcmt = (props) => {
|
|
|
187
187
|
const tooltipContent = (_jsxs("div", { style: { textAlign: 'left' }, children: [_jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID:" }), " ", data.id ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "DID:" }), " ", data.DID ?? '-'] }), _jsxs("div", { children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "TID:" }), " ", data.TID ?? '-'] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Author, ":"] }), " ", data.UpdaterDisplayName ?? '-'] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Version, ":"] }), " ", data.Version] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.Size, ":"] }), " ", formatBytes(Number(data.FileSize ?? 0))] }), _jsx("hr", {}), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.CreationTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(data.CreationTime)] }), _jsxs("div", { children: [_jsxs("span", { style: { fontWeight: 'bold' }, children: [SDKUI_Localizator.LastUpdateTime, ":"] }), " ", Globalization.getDateTimeDisplayValue(data.LastUpdateTime)] })] }));
|
|
188
188
|
return _jsx("div", { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, children: _jsx(TMDcmtIcon, { tid: Number(data.TID), did: Number(data.DID), fileExtension: data.FileExt, downloadMode: 'openInNewWindow', tooltipContent: tooltipContent }) });
|
|
189
189
|
}, []);
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
onClick: loadData,
|
|
235
|
-
},
|
|
236
|
-
];
|
|
237
|
-
}
|
|
238
|
-
};
|
|
190
|
+
const customContextMenuItems = useMemo(() => {
|
|
191
|
+
return [
|
|
192
|
+
{
|
|
193
|
+
icon: _jsx("span", { className: "dx-icon-datafield" }),
|
|
194
|
+
name: SDKUI_Localizator.OpenForm,
|
|
195
|
+
disabled: focusedRowKey === undefined,
|
|
196
|
+
onClick: () => setShowDcmtForm(true),
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
icon: _jsx("span", { className: "dx-icon-download" }),
|
|
200
|
+
name: 'Download',
|
|
201
|
+
disabled: focusedRowKey === undefined,
|
|
202
|
+
onClick: () => downloadFilesCallback(),
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
icon: _jsx("span", { className: "dx-icon-trash" }),
|
|
206
|
+
name: SDKUI_Localizator.Delete,
|
|
207
|
+
disabled: focusedRowKey === undefined,
|
|
208
|
+
onClick: deleteFilesCallback,
|
|
209
|
+
beginGroup: true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
icon: _jsx("span", { className: showSearch ? "dx-icon-eyeclose" : "dx-icon-eyeopen" }),
|
|
213
|
+
onClick: () => setShowSearch(prevShowSearch => !prevShowSearch),
|
|
214
|
+
name: showSearch ? SDKUI_Localizator.HideSearch : SDKUI_Localizator.ShowSearch,
|
|
215
|
+
visible: true,
|
|
216
|
+
disabled: false,
|
|
217
|
+
beginGroup: true
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
icon: _jsx("span", { className: showId ? "dx-icon-eyeclose" : "dx-icon-eyeopen" }),
|
|
221
|
+
onClick: () => setShowId(prevShowId => !prevShowId),
|
|
222
|
+
name: showId ? SDKUI_Localizator.ID_Hide : SDKUI_Localizator.ID_Show,
|
|
223
|
+
visible: true,
|
|
224
|
+
disabled: false,
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
icon: _jsx("span", { className: "dx-icon-refresh" }),
|
|
228
|
+
name: SDKUI_Localizator.Refresh,
|
|
229
|
+
disabled: false,
|
|
230
|
+
onClick: async () => await loadData(),
|
|
231
|
+
},
|
|
232
|
+
];
|
|
233
|
+
}, [focusedRowKey, showSearch, showId]);
|
|
239
234
|
// Handler for double-click cell event
|
|
240
235
|
const onCellDblClick = useCallback((e) => {
|
|
241
236
|
if (e.column.dataField === "FileExt")
|
|
@@ -279,7 +274,7 @@ const TMViewHistoryDcmt = (props) => {
|
|
|
279
274
|
{ dataField: "LastUpdateTimeDisplay", caption: SDKUI_Localizator.LastUpdateTime },
|
|
280
275
|
]);
|
|
281
276
|
}, [showId]);
|
|
282
|
-
return _jsx(TMModal, { title: `${SDKUI_Localizator.SearchResult} \u2014 ${SDKUI_Localizator.History + ": " + (fromDTD.nameLoc ?? SDKUI_Localizator.Document) + " (DID:" + inputDcmt.DID})`, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '80%', '80%', '95%'), onClose: onClose, 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: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showLocalWaitPanel, showWaitPanelPrimary: showLocalPrimary, waitPanelTitle: waitLocalPanelTitle, waitPanelTextPrimary: waitLocalPanelTextPrimary, waitPanelValuePrimary: waitLocalPanelValuePrimary, waitPanelMaxValuePrimary: waitLocalPanelMaxValuePrimary, isCancelable: true, abortController: abortLocalController, children: [_jsx(TMDataGrid, { dataSource: dcmtHistory, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selection: selection,
|
|
277
|
+
return _jsx(TMModal, { title: `${SDKUI_Localizator.SearchResult} \u2014 ${SDKUI_Localizator.History + ": " + (fromDTD.nameLoc ?? SDKUI_Localizator.Document) + " (DID:" + inputDcmt.DID})`, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '80%', '80%', '95%'), onClose: onClose, 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: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showLocalWaitPanel, showWaitPanelPrimary: showLocalPrimary, waitPanelTitle: waitLocalPanelTitle, waitPanelTextPrimary: waitLocalPanelTextPrimary, waitPanelValuePrimary: waitLocalPanelValuePrimary, waitPanelMaxValuePrimary: waitLocalPanelMaxValuePrimary, isCancelable: true, abortController: abortLocalController, children: [_jsx(TMDataGrid, { dataSource: dcmtHistory, dataColumns: dataColumns, focusedRowKey: focusedRowKey, selection: selection, customContextMenuItems: customContextMenuItems, onFocusedRowChanged: onFocusedRowChanged, onCellDblClick: onCellDblClick, noDataText: SDKUI_Localizator.NoDataToDisplay, showSearchPanel: showSearch }), (showDcmtForm && selectedDcmt !== undefined) &&
|
|
283
278
|
_jsx(TMDcmtForm, { TID: Number(selectedDcmt.TID), DID: Number(selectedDcmt.DID), formMode: FormModes.ReadOnly, isModal: true, widthModal: "95%", heightModal: "95%", titleModal: fromDTD.name ?? SDKUI_Localizator.SearchResult, allowNavigation: dcmtHistory.length > 0, itemIndex: selectedIndex + 1, count: dcmtHistory.length, onClose: () => { setShowDcmtForm(false); }, canNext: canNavigateHandler('next'), canPrev: canNavigateHandler('prev'), onNext: () => onNavigateHandler('next'), onPrev: () => onNavigateHandler('prev'), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks ?? [], Number(selectedDcmt.TID), Number(selectedDcmt.DID)) })] }) }) });
|
|
284
279
|
};
|
|
285
280
|
export default TMViewHistoryDcmt;
|
|
@@ -83,8 +83,7 @@ export declare class SDKUI_Localizator {
|
|
|
83
83
|
static get Calendar(): "Kalender" | "Calendar" | "Calendario" | "Calendrier" | "Calendário";
|
|
84
84
|
static get CancelCheckOut(): string;
|
|
85
85
|
static get CassettoDoganaleExportMRN(): "MRN-Erholung für den Export" | "MRN recovery for export" | "Recuperación MRN para exportación" | "Récupération MRN pour l'export" | "Recuperação MRN para exportação" | "Recupero MRN per Export";
|
|
86
|
-
static get
|
|
87
|
-
static get CassettoDoganaleExportEUR1(): "EUR1-Erholung für den Export" | "EUR1 recovery for export" | "Recuperación EUR1 para exportación" | "Récupération EUR1 pour l'export" | "Recuperação EUR1 para exportação" | "Recupero EUR1 per Export";
|
|
86
|
+
static get CassettoDoganaleExportVUEur1(): "Wiederherstellung des Ausreisevisums" | "Exit Visa Recovery" | "Recuperación de Visa de Salida" | "Sortie Récupération Visa" | "Recuperação de Visto de Saída" | "Recupero Visto Uscire ed EUR1 per Export";
|
|
88
87
|
static get CassettoDoganaleImportMRN(): "MRN-Erholung für den Import" | "MRN recovery for import" | "Recuperación MRN para importación" | "Récupération MRN à l'import" | "Recuperação MRN para importação" | "Recupero MRN per Import";
|
|
89
88
|
static get CassettoDoganalePlus_UserName(): "STD-Benutzer des ADM-Portals" | "STD User of the ADM Portal" | "Usuario STD del Portal ADM" | "Utilisateur STD du portail ADM" | "Utilizador DST do Portal ADM" | "Utente STD del Portale ADM";
|
|
90
89
|
static get Cancel(): "Abbrechen" | "Cancel" | "Anular" | "Annuler" | "Cancelar" | "Annulla";
|
|
@@ -256,7 +255,7 @@ export declare class SDKUI_Localizator {
|
|
|
256
255
|
static get ExportMRNOuputFile(): "Dateipfad für den Export (MRN)" | "File Path for Export (MRN)" | "Ruta de archivo para exportación (MRN)" | "Chemin du fichier à exporter (MRN)" | "Caminho do arquivo para exportação (MRN)" | "Percorso del File per Export (MRN)";
|
|
257
256
|
static get ExportVU(): "Exportieren – Gesehener Ausgang" | "Export - Seen Exit" | "Exportar - Salida vista" | "Exporter - Vu Sortie" | "Exportar - Saída vista" | "Export - Visto Uscire";
|
|
258
257
|
static get ExportVUDayBack(): "Anzahl der Tage für die Exportdatenwiederherstellung (Gesehener Ausgang)" | "Number of days for export data recovery (Seen Exit)" | "Número de días para la recuperación de datos de exportación (Salida vista)" | "Nombre de jours pour la récupération des données d'exportation (Vu Sortie)" | "Número de dias para recuperação de dados de exportação (Saída vista)" | "Numero di giorni per il recupero dei dati di Export (Visto Uscire)";
|
|
259
|
-
static get
|
|
258
|
+
static get ExportVUEUR1OuputFile(): "Dateipfad für den Export (Gesehener Ausgang und EUR1)" | "File Path for Export (Seen Exit and EUR1)" | "Ruta de archivo para exportación (Salida vista y EUR1)" | "Chemin du fichier à exporter (Vu Sortie et EUR1)" | "Caminho do arquivo para exportação (Saída vista e EUR1)" | "Percorso del File per Export (Visto Uscire ed EUR1)";
|
|
260
259
|
static get Extension(): string;
|
|
261
260
|
static get Favorites(): "Favoriten" | "Favorites" | "Favoritos" | "Favoris" | "Preferiti";
|
|
262
261
|
static get FavoritesAndRecentDcmts(): "Zuletzt verwendete und bevorzugte Dokumente" | "Preferred and recent documents" | "Documentos preferidos y recientes" | "Documents préférés et récents" | "Documentos preferidos e recentes" | "Documenti preferiti e recenti";
|
|
@@ -355,7 +354,7 @@ export declare class SDKUI_Localizator {
|
|
|
355
354
|
static get Login(): string;
|
|
356
355
|
static get LogDelete(): "Löschen der Logik" | "Logical delete" | "Cancelación lógica" | "Suppression logique" | "Lógica de cancelamento" | "Cancellazione logica";
|
|
357
356
|
static get Logout(): "Abmelden" | "Logout" | "Cerrar sesión" | "Déconnexion" | "Sair" | "Esci";
|
|
358
|
-
static get
|
|
357
|
+
static get LogFolder(): "Protokollordner" | "Log folder" | "Carpeta de registro" | "Dossier de journal" | "Pasta de registro" | "Cartella di log";
|
|
359
358
|
static get Low(): "Niedrig" | "Low" | "Baja" | "Faible" | "Baixa" | "Bassa";
|
|
360
359
|
static get MakeEditable(): "Bearbeitbar machen" | "Make editable" | "Hacer editable" | "Rendre modifiable" | "Faça editável" | "Rendi editabile";
|
|
361
360
|
static get ManageFromTaskPanel(): string;
|
|
@@ -785,24 +785,14 @@ export class SDKUI_Localizator {
|
|
|
785
785
|
default: return "Recupero MRN per Export";
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
|
-
static get
|
|
788
|
+
static get CassettoDoganaleExportVUEur1() {
|
|
789
789
|
switch (this._cultureID) {
|
|
790
790
|
case CultureIDs.De_DE: return "Wiederherstellung des Ausreisevisums";
|
|
791
791
|
case CultureIDs.En_US: return "Exit Visa Recovery";
|
|
792
792
|
case CultureIDs.Es_ES: return "Recuperación de Visa de Salida";
|
|
793
793
|
case CultureIDs.Fr_FR: return "Sortie Récupération Visa";
|
|
794
794
|
case CultureIDs.Pt_PT: return "Recuperação de Visto de Saída";
|
|
795
|
-
default: return "Recupero Visto Uscire per Export";
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
static get CassettoDoganaleExportEUR1() {
|
|
799
|
-
switch (this._cultureID) {
|
|
800
|
-
case CultureIDs.De_DE: return "EUR1-Erholung für den Export";
|
|
801
|
-
case CultureIDs.En_US: return "EUR1 recovery for export";
|
|
802
|
-
case CultureIDs.Es_ES: return "Recuperación EUR1 para exportación";
|
|
803
|
-
case CultureIDs.Fr_FR: return "Récupération EUR1 pour l'export";
|
|
804
|
-
case CultureIDs.Pt_PT: return "Recuperação EUR1 para exportação";
|
|
805
|
-
default: return "Recupero EUR1 per Export";
|
|
795
|
+
default: return "Recupero Visto Uscire ed EUR1 per Export";
|
|
806
796
|
}
|
|
807
797
|
}
|
|
808
798
|
static get CassettoDoganaleImportMRN() {
|
|
@@ -2527,14 +2517,14 @@ export class SDKUI_Localizator {
|
|
|
2527
2517
|
default: return "Numero di giorni per il recupero dei dati di Export (Visto Uscire)";
|
|
2528
2518
|
}
|
|
2529
2519
|
}
|
|
2530
|
-
static get
|
|
2520
|
+
static get ExportVUEUR1OuputFile() {
|
|
2531
2521
|
switch (this._cultureID) {
|
|
2532
|
-
case CultureIDs.De_DE: return "Dateipfad für den Export (Gesehener Ausgang)";
|
|
2533
|
-
case CultureIDs.En_US: return "File Path for Export (Seen Exit)";
|
|
2534
|
-
case CultureIDs.Es_ES: return "Ruta de archivo para exportación (Salida vista)";
|
|
2535
|
-
case CultureIDs.Fr_FR: return "Chemin du fichier à exporter (Vu Sortie)";
|
|
2536
|
-
case CultureIDs.Pt_PT: return "Caminho do arquivo para exportação (Saída vista)";
|
|
2537
|
-
default: return "Percorso del File per Export (Visto Uscire)";
|
|
2522
|
+
case CultureIDs.De_DE: return "Dateipfad für den Export (Gesehener Ausgang und EUR1)";
|
|
2523
|
+
case CultureIDs.En_US: return "File Path for Export (Seen Exit and EUR1)";
|
|
2524
|
+
case CultureIDs.Es_ES: return "Ruta de archivo para exportación (Salida vista y EUR1)";
|
|
2525
|
+
case CultureIDs.Fr_FR: return "Chemin du fichier à exporter (Vu Sortie et EUR1)";
|
|
2526
|
+
case CultureIDs.Pt_PT: return "Caminho do arquivo para exportação (Saída vista e EUR1)";
|
|
2527
|
+
default: return "Percorso del File per Export (Visto Uscire ed EUR1)";
|
|
2538
2528
|
}
|
|
2539
2529
|
}
|
|
2540
2530
|
static get Extension() {
|
|
@@ -3516,14 +3506,14 @@ export class SDKUI_Localizator {
|
|
|
3516
3506
|
default: return "Esci";
|
|
3517
3507
|
}
|
|
3518
3508
|
}
|
|
3519
|
-
static get
|
|
3509
|
+
static get LogFolder() {
|
|
3520
3510
|
switch (this._cultureID) {
|
|
3521
|
-
case CultureIDs.De_DE: return "
|
|
3522
|
-
case CultureIDs.En_US: return "Log
|
|
3523
|
-
case CultureIDs.Es_ES: return "Carpeta de registro
|
|
3524
|
-
case CultureIDs.Fr_FR: return "Dossier de journal
|
|
3525
|
-
case CultureIDs.Pt_PT: return "Pasta de
|
|
3526
|
-
default: return "Cartella di log
|
|
3511
|
+
case CultureIDs.De_DE: return "Protokollordner";
|
|
3512
|
+
case CultureIDs.En_US: return "Log folder";
|
|
3513
|
+
case CultureIDs.Es_ES: return "Carpeta de registro";
|
|
3514
|
+
case CultureIDs.Fr_FR: return "Dossier de journal";
|
|
3515
|
+
case CultureIDs.Pt_PT: return "Pasta de registro";
|
|
3516
|
+
default: return "Cartella di log";
|
|
3527
3517
|
}
|
|
3528
3518
|
}
|
|
3529
3519
|
static get Low() {
|
|
@@ -15,5 +15,5 @@ export declare function getDefaultOperator(dataDomain: MetadataDataDomains | und
|
|
|
15
15
|
export declare const getQD: (tid: number | undefined, easyOr: boolean, newMaxDcmtsToBeReturned: number) => Promise<QueryDescriptor | undefined>;
|
|
16
16
|
export declare const getWorkItemSetIDAsync: (vid: number, did: number) => Promise<string | undefined>;
|
|
17
17
|
export declare const getSysAllDcmtsSQD: (tid: number | undefined, easyOr: boolean) => Promise<SavedQueryDescriptor>;
|
|
18
|
-
export declare const searchResultToMetadataValues: (tid: number | undefined, dtd: DataTableDescriptor | undefined, rows: string[], mids: number[], metadata: MetadataDescriptor[], layoutMode: LayoutModes) => MetadataValueDescriptorEx[];
|
|
18
|
+
export declare const searchResultToMetadataValues: (tid: number | undefined, dtd: DataTableDescriptor | undefined, rows: string[], mids: number[], metadata: MetadataDescriptor[], layoutMode: LayoutModes, isReadOnlyOrigin?: boolean) => MetadataValueDescriptorEx[];
|
|
19
19
|
export declare const handleArchiveVisibility: (md: MetadataDescriptor) => boolean;
|
|
@@ -260,7 +260,7 @@ export const getSysAllDcmtsSQD = async (tid, easyOr) => {
|
|
|
260
260
|
sqd.qd = await getQD(tid, easyOr, SDKUI_Globals.userSettings.searchSettings?.maxDcmtsToBeReturned ?? 1000);
|
|
261
261
|
return sqd;
|
|
262
262
|
};
|
|
263
|
-
export const searchResultToMetadataValues = (tid, dtd, rows, mids, metadata, layoutMode) => {
|
|
263
|
+
export const searchResultToMetadataValues = (tid, dtd, rows, mids, metadata, layoutMode, isReadOnlyOrigin = false) => {
|
|
264
264
|
if (!metadata || metadata.length === 0) {
|
|
265
265
|
return [];
|
|
266
266
|
}
|
|
@@ -345,27 +345,53 @@ export const searchResultToMetadataValues = (tid, dtd, rows, mids, metadata, lay
|
|
|
345
345
|
}
|
|
346
346
|
return mvd;
|
|
347
347
|
};
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
348
|
+
// Caso: il documento proviene da un'origine esterna e non può essere modificato
|
|
349
|
+
// Documento esterno: visualizza tutti i metadati non di sistema come read-only
|
|
350
|
+
if (isReadOnlyOrigin) {
|
|
351
|
+
const columns = dtd?.columns || [];
|
|
352
|
+
const rows = dtd?.rows ?? [];
|
|
353
|
+
// Itera su ogni colonna per costruire la metadata read-only
|
|
354
|
+
columns.forEach((col, index) => {
|
|
355
|
+
// MID: identificatore unico della colonna
|
|
356
|
+
const mid = Number(col.extendedProperties?.MID);
|
|
357
|
+
// Solo se MID > 100 (per escludere i metadati di sistema)
|
|
358
|
+
if (mid > 100 && rows[0] && rows[0][index]) {
|
|
359
|
+
// Cerca nei metadata se esiste un oggetto corrispondente a questo MID
|
|
360
|
+
const md = metadata.find(m => m.fromMID === mid);
|
|
361
|
+
if (!md)
|
|
362
|
+
return;
|
|
363
|
+
// Crea le proprietà del metadata impostando isReadOnly a true
|
|
364
|
+
const metadataProps = createMetadataProps(tid, md, rows[0][index], 0);
|
|
365
|
+
metadataProps.isReadOnly = true;
|
|
366
|
+
// Aggiunge l'oggetto read-only alla lista di output
|
|
367
|
+
outputMetadataList.push(metadataProps);
|
|
360
368
|
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
// Caso: documento locale/modificabile
|
|
373
|
+
metadata.forEach(md => {
|
|
374
|
+
if (!md.id)
|
|
375
|
+
return;
|
|
376
|
+
if (layoutMode === LayoutModes.Ark && !handleArchiveVisibility(md))
|
|
377
|
+
return;
|
|
378
|
+
if (!rows)
|
|
379
|
+
return;
|
|
380
|
+
if (mids.length > 0) {
|
|
381
|
+
const index = mids.indexOf(md.id);
|
|
382
|
+
if (index >= 0) {
|
|
383
|
+
const isLexProt = (isLexProtIndex !== undefined && rows[isLexProtIndex]) ? (parseInt(rows[isLexProtIndex]) || undefined) : undefined;
|
|
384
|
+
outputMetadataList.push(createMetadataProps(tid, md, rows[index], isLexProt));
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
let defaultValue;
|
|
389
|
+
if (layoutMode === LayoutModes.Ark && (md.dataDomain === MetadataDataDomains.DataList || md.dataDomain === MetadataDataDomains.DynamicDataList || md.dataDomain === MetadataDataDomains.UserID))
|
|
390
|
+
defaultValue = md.defaultValue;
|
|
391
|
+
outputMetadataList.push(createMetadataProps(tid, md, defaultValue, undefined));
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
369
395
|
return outputMetadataList;
|
|
370
396
|
};
|
|
371
397
|
export const handleArchiveVisibility = (md) => {
|