@topconsultnpm/sdkui-react 6.21.0-dev1.11 → 6.21.0-dev1.12
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.
|
@@ -603,7 +603,8 @@ const TMAreaManager = (props = { selectionMode: 'multiple', isPathChooser: false
|
|
|
603
603
|
if (!ad)
|
|
604
604
|
return;
|
|
605
605
|
let aid = ad.id;
|
|
606
|
-
|
|
606
|
+
const parts = e.directory.path.split("/");
|
|
607
|
+
let subFolder = parts.slice(1).join("/");
|
|
607
608
|
setAreaFolder(getAreaPath(aid, subFolder));
|
|
608
609
|
e.component.option("fileSystemProvider").getItems(e.directory).then((items) => {
|
|
609
610
|
setParentDirectoryFileSystemItems(items);
|
|
@@ -134,8 +134,8 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
134
134
|
// searchResult: selectedSearchResult,
|
|
135
135
|
datagridUtility: {
|
|
136
136
|
visibleItems: [],
|
|
137
|
-
onRefreshSearchAsyncDatagrid:
|
|
138
|
-
onRefreshDataRowsAsync:
|
|
137
|
+
onRefreshSearchAsyncDatagrid: onRefreshSearch,
|
|
138
|
+
onRefreshDataRowsAsync: onRefreshSearch,
|
|
139
139
|
refreshFocusedDataRowAsync: datagridUtility?.refreshFocusedDataRowAsync,
|
|
140
140
|
onRefreshBlogDatagrid: datagridUtility?.onRefreshBlogDatagrid,
|
|
141
141
|
onRefreshPreviewDatagrid: datagridUtility?.onRefreshPreviewDatagrid,
|
|
@@ -436,5 +436,5 @@ const TMFormOrResultWrapper = ({ refreshKey, deviceType, focusedItem, onTaskCrea
|
|
|
436
436
|
_jsx(TMDcmtForm, { groupId: 'tmFormOrResult', TID: focusedItem?.tid, DID: focusedItem.did, allowButtonsRefs: true, isClosable: deviceType !== DeviceType.MOBILE, allowNavigation: false, allowRelations: deviceType !== DeviceType.MOBILE, showDcmtFormSidebar: false, onClose: () => { setPanelVisibilityById('tmTreeView', true); }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, focusedItem?.tid, focusedItem?.did), openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, onOpenPdfEditorRequest: onOpenPdfEditorRequest, datagridUtility: {
|
|
437
437
|
onRefreshSearchAsyncDatagrid,
|
|
438
438
|
} }, refreshKey) :
|
|
439
|
-
_jsx(TMSearchResult, { groupId: 'tmFormOrResult', isClosable: deviceType !== DeviceType.MOBILE, context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, allowRelations: false, openDcmtFormAsModal: true, searchResults: focusedItem?.searchResult ?? [], showSearchResultSidebar: false, showDcmtFormSidebar: false, onTaskCreateRequest: onTaskCreateRequest, onClose: () => { setPanelVisibilityById('tmTreeView', true); }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, enablePinIcons: false, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs }, refreshKey) }));
|
|
439
|
+
_jsx(TMSearchResult, { groupId: 'tmFormOrResult', isClosable: deviceType !== DeviceType.MOBILE, context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, allowRelations: false, openDcmtFormAsModal: true, searchResults: focusedItem?.searchResult ?? [], showSearchResultSidebar: false, showDcmtFormSidebar: false, onTaskCreateRequest: onTaskCreateRequest, onClose: () => { setPanelVisibilityById('tmTreeView', true); }, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, editPdfForm: editPdfForm, onOpenPdfEditorRequest: onOpenPdfEditorRequest, openS4TViewer: openS4TViewer, onOpenS4TViewerRequest: onOpenS4TViewerRequest, enablePinIcons: false, onRefreshAfterAddDcmtToFavs: onRefreshAfterAddDcmtToFavs, showBackButton: false }, refreshKey) }));
|
|
440
440
|
};
|
|
@@ -703,7 +703,26 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
|
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
705
|
// #endregion
|
|
706
|
-
|
|
706
|
+
const getQueryCountLocalAsync = async (qd, showSpinner) => {
|
|
707
|
+
if (IsParametricQuery(qd)) {
|
|
708
|
+
const qdParams = await confirmQueryParams(qd, lastQdParams);
|
|
709
|
+
setLastQdParams(qdParams);
|
|
710
|
+
if (!qdParams || qdParams.length <= 0)
|
|
711
|
+
return;
|
|
712
|
+
for (const qpd of qdParams) {
|
|
713
|
+
let wi = qd.where?.find(o => o.value1 == qpd.name);
|
|
714
|
+
if (wi)
|
|
715
|
+
wi.value1 = wi.value1?.replace(wi.value1, !qpd.value ? '' : qpd.value.toString());
|
|
716
|
+
else {
|
|
717
|
+
wi = qd.where?.find(o => o.value2 == qpd.name);
|
|
718
|
+
if (wi)
|
|
719
|
+
wi.value2 = wi.value2?.replace(wi.value2, !qpd.value ? '' : qpd.value.toString());
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
await getQueryCountAsync(qd, showSpinner);
|
|
724
|
+
};
|
|
725
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TMApplyForm, { isModal: false, formMode: formMode, isModified: calcIsModified(formData, formDataOrig), exception: exception, validationItems: validationItems, hasNavigation: false, customToolbarElements: _jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Search, color: 'tertiary', icon: _jsx(IconSearch, {}), disabled: errorsCount > 0, onClick: async () => await onSearchAsync(formData) }), _jsx(TMButton, { btnStyle: 'toolbar', caption: SDKUI_Localizator.Count, icon: _jsx(IconCount, {}), disabled: errorsCount > 0, onClick: () => getQueryCountLocalAsync(formData, true) }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Passa ad archiviazione", icon: _jsx(IconArchiveDoc, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Passa ad archiviazione", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } }), SDK_Globals.tmSession?.SessionDescr?.appModuleID == AppModules.SURFER && _jsx(TMButton, { caption: "Vai a risultato", icon: _jsx(IconArrowRight, {}), btnStyle: 'toolbar', fontSize: '1.3rem', onClick: () => { ShowAlert({ message: "TODO Vai a risultato", mode: 'info', title: `${"TODO"}`, duration: 3000 }); } })] }), showToolbar: showToolbar, showApply: showApply, showUndo: showUndo, showBack: showBack, onApply: () => applyData(), onClose: () => onClose?.(), onUndo: () => setFormData(formDataOrig), children: [_jsxs(Accordion, { elementAttr: { class: 'tm-query-dx-accordion' }, height: height, multiple: true, collapsible: true, repaintChangesOnly: true, deferRendering: false, animationDuration: 0, onContentReady: (e) => {
|
|
707
726
|
let items = e.component.option("items");
|
|
708
727
|
if (items && items.length > 0) {
|
|
709
728
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -267,7 +267,6 @@ export const getDcmtCicoStatus = (dcmt, allUsers, dtd) => {
|
|
|
267
267
|
// o liste dove ogni metadato è un oggetto separato con proprietà 'md' e 'value'
|
|
268
268
|
if (Array.isArray(dcmt) && dcmt.length > 0 && dcmt[0]?.md !== undefined) {
|
|
269
269
|
const dcmtsArray = dcmt;
|
|
270
|
-
console.log("dcmtsArray:", dcmtsArray);
|
|
271
270
|
// Estrai l'ID dell'utente che ha effettuato il checkout
|
|
272
271
|
const checkoutUserIdProperty = dcmtsArray.find((item) => item.md?.name === CICO_MetadataNames.CICO_CheckoutUserID);
|
|
273
272
|
const checkoutUserIdValue = checkoutUserIdProperty?.value;
|