@topconsultnpm/sdkui-react 6.22.0-dev3.9 → 6.22.0-dev4.11
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/TMAlert.js +6 -8
- package/lib/components/base/TMAreaManager.js +53 -55
- package/lib/components/base/TMButton.js +4 -2
- package/lib/components/base/TMCounterContainer.d.ts +3 -1
- package/lib/components/base/TMCounterContainer.js +16 -1
- package/lib/components/base/TMCustomButton.js +40 -48
- package/lib/components/base/TMDataGrid.js +24 -4
- package/lib/components/base/TMPanel.js +173 -170
- package/lib/components/base/TMSpinner.d.ts +2 -1
- package/lib/components/base/TMSpinner.js +9 -7
- package/lib/components/base/TMTabControl.d.ts +5 -0
- package/lib/components/base/TMTabControl.js +18 -7
- package/lib/components/base/TMTreeView.js +20 -0
- package/lib/components/base/TMWaitPanel.js +1 -1
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.d.ts +12 -0
- package/lib/components/base/waitPanel/TMWaitPanelConfirm.js +185 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.d.ts +179 -0
- package/lib/components/base/waitPanel/TMWaitPanelManager.js +373 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.d.ts +58 -0
- package/lib/components/base/waitPanel/TMWaitPanelView.js +346 -0
- package/lib/components/base/waitPanel/index.d.ts +1 -0
- package/lib/components/base/waitPanel/index.js +1 -0
- package/lib/components/choosers/TMDistinctValues.js +3 -3
- package/lib/components/choosers/TMPathChooser.js +17 -34
- package/lib/components/editors/TMTextBox.d.ts +4 -0
- package/lib/components/editors/TMTextBox.js +99 -11
- package/lib/components/features/archive/TMArchive.js +7 -2
- package/lib/components/features/assistant/TMHelpOnLineChat.d.ts +28 -0
- package/lib/components/features/assistant/TMHelpOnLineChat.js +1231 -0
- package/lib/components/features/assistant/TMToppyDraggableHelpCenter.js +2 -2
- package/lib/components/features/documents/TMBatchUpdateForm.js +3 -4
- package/lib/components/features/documents/TMCopyToFolderForm.js +53 -84
- package/lib/components/features/documents/TMDcmtForm.js +50 -61
- package/lib/components/features/documents/TMDcmtIcon.d.ts +1 -3
- package/lib/components/features/documents/TMDcmtIcon.js +3 -5
- package/lib/components/features/documents/TMDcmtPreview.js +5 -3
- package/lib/components/features/documents/TMDcmtTasks.js +2 -9
- package/lib/components/features/documents/TMFileUploader.js +26 -26
- package/lib/components/features/documents/TMMasterDetailDcmts.d.ts +2 -0
- package/lib/components/features/documents/TMMasterDetailDcmts.js +53 -148
- package/lib/components/features/documents/TMMasterInfoFields.js +3 -2
- package/lib/components/features/documents/TMMergeToPdfForm.js +52 -56
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsForm.js +14 -15
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.d.ts +1 -1
- package/lib/components/features/documents/TMMultiMasterDetailDcmtsUtils.js +3 -3
- package/lib/components/features/documents/TMRelationViewer.d.ts +13 -14
- package/lib/components/features/documents/TMRelationViewer.js +206 -143
- package/lib/components/features/documents/relationTreeState.d.ts +32 -0
- package/lib/components/features/documents/relationTreeState.js +89 -0
- package/lib/components/features/search/TMSearch.js +3 -4
- package/lib/components/features/search/TMSearchQueryPanel.js +0 -4
- package/lib/components/features/search/TMSearchResult.d.ts +5 -0
- package/lib/components/features/search/TMSearchResult.js +51 -24
- package/lib/components/features/search/TMTreeSelector.js +23 -27
- package/lib/components/features/search/TMViewHistoryDcmt.js +15 -26
- package/lib/components/features/tasks/TMTasksView.js +97 -90
- package/lib/components/features/wg/TMWGsCopyMoveForm.js +104 -100
- package/lib/components/forms/TMResultDialog.js +1 -1
- package/lib/components/grids/TMBlogsPost.js +93 -97
- package/lib/components/index.d.ts +5 -1
- package/lib/components/index.js +4 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +16 -15
- package/lib/components/layout/panelManager/TMPanelManagerContext.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +5 -1
- package/lib/components/layout/panelManager/TMPanelManagerLoader.d.ts +6 -0
- package/lib/components/layout/panelManager/TMPanelManagerLoader.js +18 -0
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +4 -8
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.d.ts +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerWithPersistenceProvider.js +2 -1
- package/lib/components/pages/TMPage.js +32 -31
- package/lib/components/query/TMQueryEditor.d.ts +3 -0
- package/lib/components/query/TMQueryEditor.js +2 -1
- package/lib/components/sidebar/TMHeader.d.ts +1 -0
- package/lib/components/sidebar/TMHeader.js +2 -2
- package/lib/helper/Enum_Localizator.js +1 -0
- package/lib/helper/SDKUI_Globals.d.ts +7 -2
- package/lib/helper/SDKUI_Globals.js +7 -2
- package/lib/helper/SDKUI_Localizator.d.ts +31 -6
- package/lib/helper/SDKUI_Localizator.js +301 -51
- package/lib/helper/ZipManager.d.ts +1 -1
- package/lib/helper/ZipManager.js +2 -1
- package/lib/helper/checkinCheckoutManager.js +2 -3
- package/lib/helper/dcmtsHelper.d.ts +2 -0
- package/lib/helper/dcmtsHelper.js +3 -1
- package/lib/hooks/useCheckInOutOperations.d.ts +0 -6
- package/lib/hooks/useCheckInOutOperations.js +16 -37
- package/lib/hooks/useDcmtOperations.d.ts +3 -19
- package/lib/hooks/useDcmtOperations.js +175 -229
- package/lib/hooks/useDocumentOperations.d.ts +1 -0
- package/lib/hooks/useDocumentOperations.js +16 -29
- package/lib/hooks/useMultiMasterDetailDcmts.d.ts +0 -15
- package/lib/hooks/useMultiMasterDetailDcmts.js +70 -68
- package/lib/hooks/usePreventFileDrop.js +9 -0
- package/lib/hooks/useWorkflowApprove.js +33 -17
- package/lib/services/caseflow/CaseFlowService.d.ts +69 -9
- package/lib/services/caseflow/CaseFlowService.js +126 -58
- package/package.json +2 -2
|
@@ -11,12 +11,12 @@ import TMDataGrid from "../../base/TMDataGrid";
|
|
|
11
11
|
import { TMMessageBoxManager, ButtonNames } from "../../base/TMPopUp";
|
|
12
12
|
import TMTooltip from "../../base/TMTooltip";
|
|
13
13
|
import TMTabControl, { TMTabPanel } from "../../base/TMTabControl";
|
|
14
|
-
import
|
|
14
|
+
import TMLayoutContainer from "../../base/TMLayout";
|
|
15
|
+
import TMWaitPanelManager from "../../base/waitPanel/TMWaitPanelManager";
|
|
15
16
|
import { TMResultManager } from "../../forms/TMResultDialog";
|
|
16
17
|
import TMTasksCalendar from "./TMTasksCalendar";
|
|
17
18
|
import TMTasksAgenda from "./TMTasksAgenda";
|
|
18
19
|
import TMTaskForm from "./TMTaskForm";
|
|
19
|
-
let abortController = new AbortController();
|
|
20
20
|
const TMTasksView = (props) => {
|
|
21
21
|
const { id, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, visualizedTasks, activeComponent, activeTabIndex, setActiveTabIndex, currentTask, setCurrentTask, assignedToMeCount, assignedByMeCount, allTasksFilteredCount, showId, setShowId, showSearch, setShowSearch, showContextualWG, setShowContextualWG, showContextualDossier, setShowContextualDossier, showContextualDocument, setShowContextualDocument, handleNavigateToWGs, handleNavigateToDossiers, taskContext, usersList, onOpenS4TViewerRequest, s4TViewerDialogComponent, afterTaskSaved, } = props;
|
|
22
22
|
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
@@ -39,18 +39,6 @@ const TMTasksView = (props) => {
|
|
|
39
39
|
const [calendarStartDate, setCalendarStartDate] = useState(undefined);
|
|
40
40
|
/* State to manage the calendar end date */
|
|
41
41
|
const [calendarEndDate, setCalendarEndDate] = useState(undefined);
|
|
42
|
-
// State variable to control the visibility of the wait panel.
|
|
43
|
-
const [showWaitPanel, setShowWaitPanel] = useState(false);
|
|
44
|
-
// State variable to store the title of the wait panel.
|
|
45
|
-
const [waitPanelTitle, setWaitPanelTitle] = useState('');
|
|
46
|
-
// State variable to control the visibility of the primary section of the wait panel.
|
|
47
|
-
const [showPrimary, setShowPrimary] = useState(false);
|
|
48
|
-
// State variable to store the primary text of the wait panel.
|
|
49
|
-
const [waitPanelTextPrimary, setWaitPanelTextPrimary] = useState('');
|
|
50
|
-
// State variable to track the current value of the primary progress indicator in the wait panel.
|
|
51
|
-
const [waitPanelValuePrimary, setWaitPanelValuePrimary] = useState(0);
|
|
52
|
-
// State variable to define the maximum value for the primary progress indicator in the wait panel.
|
|
53
|
-
const [waitPanelMaxValuePrimary, setWaitPanelMaxValuePrimary] = useState(0);
|
|
54
42
|
const [isContextualCreate, setIsContextualCreate] = useState(false);
|
|
55
43
|
// This function open the task form for editing a selected task
|
|
56
44
|
const editTaskAgendaCallback = (rowId) => {
|
|
@@ -158,49 +146,60 @@ const TMTasksView = (props) => {
|
|
|
158
146
|
onButtonClick: async (e) => {
|
|
159
147
|
if (e !== ButtonNames.YES)
|
|
160
148
|
return;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
149
|
+
const waitPanel = TMWaitPanelManager.show({
|
|
150
|
+
title: SDKUI_Localizator.Delete,
|
|
151
|
+
max: rowIds.length,
|
|
152
|
+
cancelable: true,
|
|
153
|
+
});
|
|
154
|
+
try {
|
|
155
|
+
let result = [];
|
|
156
|
+
let i = 0;
|
|
157
|
+
const deletedTaskIds = [];
|
|
158
|
+
for (const key of rowIds) {
|
|
159
|
+
i++;
|
|
160
|
+
const deletedTaskId = Number(key);
|
|
161
|
+
const deletedTask = visualizedTasks.find(task => task.id === deletedTaskId);
|
|
162
|
+
waitPanel.setSubtitle(SDKUI_Localizator.TaskXofY.replaceParams(i, rowIds.length));
|
|
163
|
+
if (waitPanel.aborted) {
|
|
164
|
+
const description = SDKUI_Localizator.OperationItemsInterrupted.replaceParams(i - 1);
|
|
165
|
+
result.push({ rowIndex: i, id1: deletedTaskId, id2: deletedTaskId, resultType: ResultTypes.WARNING, description });
|
|
166
|
+
waitPanel.warning(1, description);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
// Messaggio per il popover del pannello: il nome dice a quale attività si riferisce.
|
|
171
|
+
const panelMessage = (message) => `${deletedTask?.name ?? `ID ${deletedTaskId}`}: ${message}`;
|
|
172
|
+
try {
|
|
173
|
+
const deletionNotAllowed = deletedTask?.fromID !== SDK_Globals.tmSession?.SessionDescr?.userID;
|
|
174
|
+
if (deletionNotAllowed) {
|
|
175
|
+
result.push({ rowIndex: key, id1: key, id2: 0, resultType: ResultTypes.ERROR, description: SDKUI_Localizator.OperationNotAllowed });
|
|
176
|
+
waitPanel.error(1, panelMessage(SDKUI_Localizator.OperationNotAllowed));
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
await SDK_Globals.tmSession?.NewTaskEngine().DeleteAsync(deletedTaskId);
|
|
180
|
+
result.push({ rowIndex: key, id1: key, id2: 0, description: SDKUI_Localizator.DeletionCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
181
|
+
deletedTaskIds.push(deletedTaskId);
|
|
182
|
+
waitPanel.ok();
|
|
183
|
+
}
|
|
184
184
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
result.push({ rowIndex: key, id1: key, id2: 0,
|
|
188
|
-
|
|
185
|
+
catch (err) {
|
|
186
|
+
const description = getExceptionMessage(err);
|
|
187
|
+
result.push({ rowIndex: key, id1: key, id2: 0, resultType: ResultTypes.ERROR, description });
|
|
188
|
+
waitPanel.error(1, panelMessage(description));
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
result.push({ rowIndex: key, id1: key, id2: 0, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
190
|
+
// Avanza a elaborazione conclusa: con una sola attività la barra non parte dal 100%
|
|
191
|
+
await waitPanel.step();
|
|
193
192
|
}
|
|
194
193
|
}
|
|
194
|
+
await deleteTaskByIdsCallback(deletedTaskIds);
|
|
195
|
+
handleSelectionChange([]);
|
|
196
|
+
handleFocusedRowChange(undefined);
|
|
197
|
+
waitPanel.close();
|
|
198
|
+
TMResultManager.show(result, SDKUI_Localizator.Delete, "ID", undefined);
|
|
199
|
+
}
|
|
200
|
+
finally {
|
|
201
|
+
waitPanel.close();
|
|
195
202
|
}
|
|
196
|
-
await deleteTaskByIdsCallback(deletedTaskIds);
|
|
197
|
-
handleSelectionChange([]);
|
|
198
|
-
handleFocusedRowChange(undefined);
|
|
199
|
-
setWaitPanelTextPrimary('');
|
|
200
|
-
setWaitPanelMaxValuePrimary(0);
|
|
201
|
-
setWaitPanelValuePrimary(0);
|
|
202
|
-
setShowWaitPanel(false);
|
|
203
|
-
TMResultManager.show(result, SDKUI_Localizator.Delete, "ID", undefined);
|
|
204
203
|
}
|
|
205
204
|
});
|
|
206
205
|
}, [visualizedTasks]);
|
|
@@ -224,47 +223,55 @@ const TMTasksView = (props) => {
|
|
|
224
223
|
onButtonClick: async (e) => {
|
|
225
224
|
if (e !== ButtonNames.YES)
|
|
226
225
|
return;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
try {
|
|
248
|
-
await SDK_Globals.tmSession?.NewTaskEngine().UpdateAsync(selectedTask);
|
|
249
|
-
result.push({ rowIndex: key, id1: key, id2: 0, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
226
|
+
const waitPanel = TMWaitPanelManager.show({
|
|
227
|
+
title: SDKUI_Localizator.MarkAs,
|
|
228
|
+
max: rowIds.length,
|
|
229
|
+
cancelable: true,
|
|
230
|
+
});
|
|
231
|
+
try {
|
|
232
|
+
let result = [];
|
|
233
|
+
let i = 0;
|
|
234
|
+
for (const key of rowIds) {
|
|
235
|
+
i++;
|
|
236
|
+
const selectedTask = visualizedTasks.find(task => task.id === key) || undefined;
|
|
237
|
+
if (selectedTask === undefined)
|
|
238
|
+
return;
|
|
239
|
+
selectedTask.state = status;
|
|
240
|
+
waitPanel.setSubtitle(SDKUI_Localizator.TaskXofY.replaceParams(i, rowIds.length));
|
|
241
|
+
if (waitPanel.aborted) {
|
|
242
|
+
const description = SDKUI_Localizator.OperationItemsInterrupted.replaceParams(i - 1);
|
|
243
|
+
result.push({ rowIndex: i, id1: selectedTask.id, id2: selectedTask.id, resultType: ResultTypes.WARNING, description });
|
|
244
|
+
waitPanel.warning(1, description);
|
|
245
|
+
break;
|
|
250
246
|
}
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
else {
|
|
248
|
+
try {
|
|
249
|
+
await SDK_Globals.tmSession?.NewTaskEngine().UpdateAsync(selectedTask);
|
|
250
|
+
result.push({ rowIndex: key, id1: key, id2: 0, description: SDKUI_Localizator.UpdateCompletedSuccessfully, resultType: ResultTypes.SUCCESS });
|
|
251
|
+
waitPanel.ok();
|
|
252
|
+
}
|
|
253
|
+
catch (err) {
|
|
254
|
+
const description = getExceptionMessage(err);
|
|
255
|
+
result.push({ rowIndex: key, id1: key, id2: 0, resultType: ResultTypes.ERROR, description });
|
|
256
|
+
waitPanel.error(1, `${selectedTask.name ?? `ID ${selectedTask.id}`}: ${description}`);
|
|
257
|
+
}
|
|
258
|
+
// Avanza a elaborazione conclusa: con una sola attività la barra non parte dal 100%
|
|
259
|
+
await waitPanel.step();
|
|
253
260
|
}
|
|
254
261
|
}
|
|
262
|
+
await getAllTasks().then(() => {
|
|
263
|
+
handleSelectionChange([]);
|
|
264
|
+
handleFocusedRowChange(undefined);
|
|
265
|
+
waitPanel.close();
|
|
266
|
+
TMResultManager.show(result, SDKUI_Localizator.MarkAs, "ID", undefined);
|
|
267
|
+
if (afterTaskSaved) {
|
|
268
|
+
afterTaskSaved(undefined, undefined, true);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
finally {
|
|
273
|
+
waitPanel.close();
|
|
255
274
|
}
|
|
256
|
-
await getAllTasks().then(() => {
|
|
257
|
-
handleSelectionChange([]);
|
|
258
|
-
handleFocusedRowChange(undefined);
|
|
259
|
-
setWaitPanelTextPrimary('');
|
|
260
|
-
setWaitPanelMaxValuePrimary(0);
|
|
261
|
-
setWaitPanelValuePrimary(0);
|
|
262
|
-
setShowWaitPanel(false);
|
|
263
|
-
TMResultManager.show(result, SDKUI_Localizator.MarkAs, "ID", undefined);
|
|
264
|
-
if (afterTaskSaved) {
|
|
265
|
-
afterTaskSaved(undefined, undefined, true);
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
275
|
}
|
|
269
276
|
});
|
|
270
277
|
}, [visualizedTasks]);
|
|
@@ -538,7 +545,7 @@ const TMTasksView = (props) => {
|
|
|
538
545
|
const getFromOrToCalendarElement = (fromOrToDataSource, fromCell = false, toCell = false) => {
|
|
539
546
|
return _jsx("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'column', overflow: "auto" }, children: _jsx("div", { style: { width: "100%", height: "100%" }, children: _jsx(TMTasksCalendar, { id: id, visualizedTasks: fromOrToDataSource, showId: showId, fromCell: fromCell, toCell: toCell, showSearch: showSearch, currentCalendarDate: currentCalendarDate, setCurrentCalendarDate: setCurrentCalendarDate, openTaskForm: openTaskFormCallback, onDeleteCallback: onDeleteCallback, setCalendarStartDate: setCalendarStartDate, setCalendarEndDate: setCalendarEndDate, focusedRowKey: focusedRowKey, handleFocusedRowChange: handleFocusedRowChange, menuItems: menuItems }) }) });
|
|
540
547
|
};
|
|
541
|
-
return _jsxs("div", { style: { width: '100%', height: '100%' }, onContextMenu: (e) => e.preventDefault(), children: [_jsx(
|
|
548
|
+
return _jsxs("div", { style: { width: '100%', height: '100%' }, onContextMenu: (e) => e.preventDefault(), children: [_jsx(TMLayoutContainer, { direction: 'vertical', children: _jsxs(TMTabControl, { variant: 'moduleFilled', contentAnimation: 'none', swipeEnabled: false, selectedId: String(activeTabIndex), onSelectedIdChange: (id) => onSelectedIndexChange(Number(id)), style: { width: '100%', height: '100%' }, contentStyle: { display: 'flex', flex: 1, minHeight: 0 }, children: [_jsx(TMTabPanel, { id: String(AssignedTab.AssignedToMe), label: _jsxs(_Fragment, { children: [_jsxs(TMTooltip, { content: SDKUI_Localizator.AssignedToMe, children: [_jsx("i", { className: 'dx-icon-user' }), "\u00A0", SDKUI_Localizator.AssignedToMe, " ", (assignedToMeCount > 0) ? `(${assignedToMeCount})` : ''] }), newTaskCount > 0 && (_jsx(TMTooltip, { content: SDKUI_Localizator.NewAssignedActivitiesNumber + ": " + newTaskCount, children: _jsx(TMCountBadge, { children: newTaskCount }) }))] }), children: activeTabIndex === AssignedTab.AssignedToMe &&
|
|
542
549
|
_jsxs(_Fragment, { children: [activeComponent === TaskView.LIST_TASK && getFromOrToDatagridElement(visualizedTasks, true, false), activeComponent === TaskView.AGENDA_TASK && getFromOrToAgendaElement(visualizedTasks, true, false), activeComponent === TaskView.CALENDAR_TASK && getFromOrToCalendarElement(visualizedTasks, true, false)] }) }), _jsx(TMTabPanel, { id: String(AssignedTab.AssignedByMe), label: _jsxs(TMTooltip, { content: SDKUI_Localizator.AssignedByMe, children: [_jsx("i", { className: 'dx-icon-login' }), "\u00A0", SDKUI_Localizator.AssignedByMe, " ", (assignedByMeCount > 0) ? `(${assignedByMeCount})` : ''] }), children: activeTabIndex === AssignedTab.AssignedByMe &&
|
|
543
550
|
_jsxs(_Fragment, { children: [activeComponent === TaskView.CALENDAR_TASK && getFromOrToCalendarElement(visualizedTasks, false, true), activeComponent === TaskView.AGENDA_TASK && getFromOrToAgendaElement(visualizedTasks, false, true), activeComponent === TaskView.LIST_TASK && getFromOrToDatagridElement(visualizedTasks, false, true)] }) }), _jsx(TMTabPanel, { id: String(AssignedTab.All), label: _jsxs(_Fragment, { children: [_jsxs(TMTooltip, { content: SDKUI_Localizator.AllFemale, children: [_jsx("i", { className: 'dx-icon-fields' }), "\u00A0", SDKUI_Localizator.AllFemale, " ", (allTasksFilteredCount > 0) ? `(${allTasksFilteredCount})` : ''] }), newTaskCount > 0 && (_jsx(TMTooltip, { content: SDKUI_Localizator.NewAssignedActivitiesNumber + ": " + newTaskCount, children: _jsx(TMCountBadge, { children: newTaskCount }) }))] }), children: activeTabIndex === AssignedTab.All &&
|
|
544
551
|
_jsxs(_Fragment, { children: [activeComponent === TaskView.CALENDAR_TASK && getFromOrToCalendarElement(visualizedTasks, true, true), activeComponent === TaskView.AGENDA_TASK && getFromOrToAgendaElement(visualizedTasks, true, true), activeComponent === TaskView.LIST_TASK && getFromOrToDatagridElement(visualizedTasks, true, true)] }) })] }) }), showTaskForm && _jsx(TMTaskForm, { id: currentTask?.id ?? -1, width: taskModalSizes(deviceType, formMode ?? FormModes.Create).width, height: taskModalSizes(deviceType, formMode ?? FormModes.Create).height, title: isContextualCreate ? SDKUI_Localizator.ContextualTask : SDKUI_Localizator.Widget_Activities, isModal: true, formMode: formMode ?? FormModes.Create, visualizedTasks: visualizedTasks, currentTask: currentTask, setCurrentTask: setCurrentTask, isContextualCreate: isContextualCreate, selectedRowKeys: selectedRowKeys, handleFocusedRowKeyChange: handleFocusedRowChange, taskContext: taskContext, usersList: usersList, onStatusChanged: () => { }, onClose: closeTaskFormCallback, onCancel: closeTaskFormCallback, showBackButton: false, onSaved: onSavedCallback, startDate: calendarStartDate, endDate: calendarEndDate, onOpenS4TViewerRequest: onOpenS4TViewerRequest, s4TViewerDialogComponent: s4TViewerDialogComponent, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGsWrapper, handleNavigateToDossiers: handleNavigateToDossiersWrapper }), _jsx("button", { style: {
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { ResultTypes, SDK_Globals, WorkingGroupCacheService, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { TreeView } from 'devextreme-react';
|
|
5
|
+
import { LoadIndicator } from 'devextreme-react/load-indicator';
|
|
5
6
|
import styled from 'styled-components';
|
|
6
7
|
import { buildFolderHierarchy, findFileItems, setFolderTreeViewItems } from '../../base/TMFileManagerUtils';
|
|
7
|
-
import TMSpinner from '../../base/TMSpinner';
|
|
8
8
|
import { TMExceptionBoxManager } from '../../base/TMPopUp';
|
|
9
9
|
import { useDeviceType } from '../../base/TMDeviceProvider';
|
|
10
10
|
import { SDKUI_Localizator, getExceptionMessage, Globalization, IconUserGroup, IconFolder, calcResponsiveSizes } from '../../../helper';
|
|
@@ -13,7 +13,8 @@ import { FormModes } from '../../../ts';
|
|
|
13
13
|
import { TMColors } from '../../../utils/theme';
|
|
14
14
|
import TMDataGrid from '../../base/TMDataGrid';
|
|
15
15
|
import TMTooltip from '../../base/TMTooltip';
|
|
16
|
-
import
|
|
16
|
+
import TMLayoutContainer from '../../base/TMLayout';
|
|
17
|
+
import TMWaitPanelManager from '../../base/waitPanel/TMWaitPanelManager';
|
|
17
18
|
import { TMResultManager } from '../../forms/TMResultDialog';
|
|
18
19
|
import TMSaveForm from '../../forms/TMSaveForm';
|
|
19
20
|
// Returns a formatted name and optional description based on document type and item DID.
|
|
@@ -34,7 +35,6 @@ export const getDocumentDisplayInfo = (descriptor, item) => {
|
|
|
34
35
|
: '';
|
|
35
36
|
return { name, description };
|
|
36
37
|
};
|
|
37
|
-
let abortController = new AbortController();
|
|
38
38
|
const TMWGsCopyMoveForm = (props) => {
|
|
39
39
|
const { mode, workingGroups, context, folder, onClose, focusedWorkingGroupId = undefined, fetchTreeFileSystemForWorkingGroup, fetchArchivedDocumentsForWorkingGroup } = props;
|
|
40
40
|
// Destructure context to get the current working group descriptor or document type descriptor based on the engine type
|
|
@@ -58,18 +58,10 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
58
58
|
const [treeViewData, setTreeViewData] = useState([]);
|
|
59
59
|
// State to manage the selected file
|
|
60
60
|
const [selectedFolder, setSelectedFolder] = useState(undefined);
|
|
61
|
-
//
|
|
62
|
-
const [
|
|
63
|
-
//
|
|
64
|
-
const [
|
|
65
|
-
// State variable to control the visibility of the primary section of the wait panel
|
|
66
|
-
const [showPrimary, setShowPrimary] = useState(false);
|
|
67
|
-
// State variable to store the primary text of the wait panel
|
|
68
|
-
const [waitPanelTextPrimary, setWaitPanelTextPrimary] = useState('');
|
|
69
|
-
// State variable to track the current value of the primary progress indicator in the wait panel
|
|
70
|
-
const [waitPanelValuePrimary, setWaitPanelValuePrimary] = useState(0);
|
|
71
|
-
// State variable to define the maximum value for the primary progress indicator in the wait panel
|
|
72
|
-
const [waitPanelMaxValuePrimary, setWaitPanelMaxValuePrimary] = useState(0);
|
|
61
|
+
// True until the list of working groups is ready
|
|
62
|
+
const [isLoadingWgs, setIsLoadingWgs] = useState(true);
|
|
63
|
+
// Id of the working group whose folder tree has been loaded
|
|
64
|
+
const [loadedTreeWgId, setLoadedTreeWgId] = useState(undefined);
|
|
73
65
|
// State to manage the current working group descriptor, initially set to the one from context
|
|
74
66
|
const steps = useMemo(() => {
|
|
75
67
|
return mode === 'copyToWgArchivedDoc'
|
|
@@ -104,7 +96,6 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
104
96
|
let groupsToUse = workingGroups;
|
|
105
97
|
if (!groupsToUse) {
|
|
106
98
|
try {
|
|
107
|
-
TMSpinner.show({ description: SDKUI_Localizator.LoadingWorkGroups });
|
|
108
99
|
// Clear cache and fetch working groups
|
|
109
100
|
WorkingGroupCacheService.RemoveAll();
|
|
110
101
|
const fetchedGroups = await WorkingGroupCacheService.GetAllAsync();
|
|
@@ -113,9 +104,6 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
113
104
|
catch (error) {
|
|
114
105
|
TMExceptionBoxManager.show({ exception: error });
|
|
115
106
|
}
|
|
116
|
-
finally {
|
|
117
|
-
TMSpinner.hide();
|
|
118
|
-
}
|
|
119
107
|
}
|
|
120
108
|
if (groupsToUse) {
|
|
121
109
|
const sortedGroups = [...groupsToUse].sort((a, b) => {
|
|
@@ -134,6 +122,7 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
134
122
|
setCurrentStep(1);
|
|
135
123
|
}
|
|
136
124
|
}
|
|
125
|
+
setIsLoadingWgs(false);
|
|
137
126
|
};
|
|
138
127
|
loadWorkingGroups();
|
|
139
128
|
}, [workingGroups, currentWorkingGroupDescriptor]);
|
|
@@ -154,11 +143,16 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
154
143
|
catch (error) {
|
|
155
144
|
TMExceptionBoxManager.show({ exception: error });
|
|
156
145
|
}
|
|
146
|
+
finally {
|
|
147
|
+
setLoadedTreeWgId(selectedWg.id);
|
|
148
|
+
}
|
|
157
149
|
};
|
|
158
150
|
if (selectedWg && wgs.length) {
|
|
159
151
|
fetchWgTree();
|
|
160
152
|
}
|
|
161
153
|
}, [selectedWg, wgs]);
|
|
154
|
+
// Loading while the working groups are fetched, or while the folder tree of the selected working group is not loaded yet
|
|
155
|
+
const isLoading = isLoadingWgs || (currentStep === 1 && mode !== 'copyToWgArchivedDoc' && !!selectedWg?.id && loadedTreeWgId !== selectedWg.id);
|
|
162
156
|
// When the current step resets to the first step (index 0), clear the selected folder by setting it to undefined
|
|
163
157
|
useEffect(() => {
|
|
164
158
|
if (currentStep === 0) {
|
|
@@ -235,86 +229,95 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
235
229
|
if (missingWgOrFolder) {
|
|
236
230
|
return Promise.resolve();
|
|
237
231
|
}
|
|
238
|
-
setWaitPanelTitle(mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move);
|
|
239
|
-
setShowWaitPanel(true);
|
|
240
|
-
setShowPrimary(true);
|
|
241
|
-
abortController = new AbortController();
|
|
242
232
|
let result = [];
|
|
243
233
|
const totalDrafts = context.selectedDrafts.length;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
234
|
+
const waitPanel = TMWaitPanelManager.show({
|
|
235
|
+
title: mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move,
|
|
236
|
+
max: totalDrafts,
|
|
237
|
+
cancelable: true,
|
|
238
|
+
});
|
|
239
|
+
try {
|
|
240
|
+
const workingGroupEngine = new WorkingGroupEngine(SDK_Globals.tmSession);
|
|
241
|
+
const selectedFolderId = selectedFolder?.id === -1 ? 0 : selectedFolder?.id ?? 0;
|
|
242
|
+
const isWgEngine = context.engine === 'WorkingGroupEngine';
|
|
243
|
+
const isSearchEngine = context.engine === 'SearchEngine';
|
|
244
|
+
for (let i = 0; i < totalDrafts; i++) {
|
|
245
|
+
if (waitPanel.aborted) {
|
|
246
|
+
result.push({
|
|
247
|
+
rowIndex: i + 1,
|
|
248
|
+
id1: i + 1,
|
|
249
|
+
id2: i + 1,
|
|
250
|
+
resultType: ResultTypes.WARNING,
|
|
251
|
+
// Il controllo precede l'elemento i: quelli elaborati sono i, non i + 1.
|
|
252
|
+
description: SDKUI_Localizator.OperationItemsInterrupted.replaceParams(i)
|
|
253
|
+
});
|
|
254
|
+
waitPanel.warning(1, SDKUI_Localizator.OperationItemsInterrupted.replaceParams(i));
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
waitPanel.setSubtitle(`${i + 1}/${totalDrafts}`);
|
|
258
|
+
const item = context.selectedDrafts[i];
|
|
259
|
+
try {
|
|
260
|
+
if (isWgEngine && targetWorkingGroup && targetWorkingGroup.id && currentWorkingGroupDescriptor && currentWorkingGroupDescriptor.id && selectedFolder && item.did) {
|
|
261
|
+
const draft = item;
|
|
262
|
+
const did = draft.did ?? 0;
|
|
263
|
+
if (mode === 'copy') {
|
|
264
|
+
await workingGroupEngine.DraftsCopyAsync(currentWorkingGroupDescriptor.id, did, targetWorkingGroup.id, selectedFolderId);
|
|
265
|
+
if (fetchTreeFileSystemForWorkingGroup) {
|
|
266
|
+
await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
else if (mode === 'move') {
|
|
270
|
+
await workingGroupEngine.DraftsMoveAsync(currentWorkingGroupDescriptor.id, did, targetWorkingGroup.id, selectedFolderId);
|
|
271
|
+
if (fetchTreeFileSystemForWorkingGroup) {
|
|
272
|
+
await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
|
|
273
|
+
await fetchTreeFileSystemForWorkingGroup(currentWorkingGroupDescriptor.id);
|
|
274
|
+
}
|
|
271
275
|
}
|
|
272
276
|
}
|
|
273
|
-
else if (
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
await
|
|
277
|
-
|
|
277
|
+
else if (isSearchEngine) {
|
|
278
|
+
if (mode === 'copyToWgDraft' && targetWorkingGroup && targetWorkingGroup.id && selectedFolder && currentDcmtTypeDescriptor) {
|
|
279
|
+
const documentDisplayInfo = getDocumentDisplayInfo(currentDcmtTypeDescriptor, item);
|
|
280
|
+
await workingGroupEngine.DraftsAddByIDAsync(targetWorkingGroup.id, selectedFolderId, documentDisplayInfo.name, documentDisplayInfo.description, item.TID, item.DID);
|
|
281
|
+
if (fetchTreeFileSystemForWorkingGroup)
|
|
282
|
+
await fetchTreeFileSystemForWorkingGroup(targetWorkingGroup.id);
|
|
283
|
+
}
|
|
284
|
+
else if (mode === 'copyToWgArchivedDoc' && targetWorkingGroup && targetWorkingGroup.id) {
|
|
285
|
+
await workingGroupEngine.DcmtsAddOrRemoveAsync(targetWorkingGroup.id, item.TID, item.DID, false);
|
|
286
|
+
if (fetchArchivedDocumentsForWorkingGroup)
|
|
287
|
+
await fetchArchivedDocumentsForWorkingGroup(targetWorkingGroup.id);
|
|
278
288
|
}
|
|
279
289
|
}
|
|
290
|
+
result.push({
|
|
291
|
+
rowIndex: i + 1,
|
|
292
|
+
id1: item.DID ?? i + 1,
|
|
293
|
+
id2: item.TID ?? i + 1,
|
|
294
|
+
description: SDKUI_Localizator.UpdateCompletedSuccessfully,
|
|
295
|
+
resultType: ResultTypes.SUCCESS
|
|
296
|
+
});
|
|
297
|
+
waitPanel.ok();
|
|
280
298
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
299
|
+
catch (err) {
|
|
300
|
+
const description = getExceptionMessage(err);
|
|
301
|
+
result.push({
|
|
302
|
+
rowIndex: i + 1,
|
|
303
|
+
id1: item.DID ?? i + 1,
|
|
304
|
+
id2: item.TID ?? i + 1,
|
|
305
|
+
resultType: ResultTypes.ERROR,
|
|
306
|
+
description
|
|
307
|
+
});
|
|
308
|
+
// Bozza: nome del file; documento archiviato: DID.
|
|
309
|
+
const label = item.name ?? `DID ${item.DID ?? item.did}`;
|
|
310
|
+
waitPanel.error(1, `${label}: ${description}`);
|
|
293
311
|
}
|
|
294
|
-
|
|
295
|
-
rowIndex: i + 1,
|
|
296
|
-
id1: item.DID ?? i + 1,
|
|
297
|
-
id2: item.TID ?? i + 1,
|
|
298
|
-
description: SDKUI_Localizator.UpdateCompletedSuccessfully,
|
|
299
|
-
resultType: ResultTypes.SUCCESS
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
catch (err) {
|
|
303
|
-
result.push({
|
|
304
|
-
rowIndex: i + 1,
|
|
305
|
-
id1: item.DID ?? i + 1,
|
|
306
|
-
id2: item.TID ?? i + 1,
|
|
307
|
-
resultType: ResultTypes.ERROR,
|
|
308
|
-
description: getExceptionMessage(err)
|
|
309
|
-
});
|
|
312
|
+
await waitPanel.step();
|
|
310
313
|
}
|
|
311
314
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
setShowWaitPanel(false);
|
|
316
|
-
TMResultManager.show(result, mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move, "ID", undefined);
|
|
315
|
+
finally {
|
|
316
|
+
waitPanel.close();
|
|
317
|
+
}
|
|
317
318
|
onClose();
|
|
319
|
+
// Shown after the modal has closed: the alert animation is time-based, so it must not start while the page is still busy re-rendering
|
|
320
|
+
setTimeout(() => TMResultManager.show(result, mode !== 'move' ? SDKUI_Localizator.Copy : SDKUI_Localizator.Move, "ID", undefined), 0);
|
|
318
321
|
}
|
|
319
322
|
catch (e) {
|
|
320
323
|
TMExceptionBoxManager.show({ exception: e });
|
|
@@ -365,7 +368,7 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
365
368
|
const tooltipContent = _jsxs("div", { style: { textAlign: "center" }, children: [_jsx("span", { style: { fontWeight: 'bold' }, children: "ID" }), ": ", itemData.id] });
|
|
366
369
|
return (_jsxs("div", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center" }, className: isSelected ? 'treeview-selected-item-manager' : '', children: [_jsx(TMTooltip, { content: tooltipContent, children: _jsx(IconFolder, { fontSize: 24, style: { marginRight: 5, color: TMColors.iconLight } }) }), itemData.text] }));
|
|
367
370
|
};
|
|
368
|
-
return _jsx(TMSaveForm, { title: getTitle(), showTitleFormMode: false, showErrorCount: false, showUndoButton: false, hasNavigation: false, skipIsModifiedCheck: true, isModal: true, width: calcResponsiveSizes(deviceType, '800px', '800px', '95%'), height: '550px', validationItems: validationItems, exception: exception, isModified: isLocalSelectionModified(), showToolbar: false, showSaveButton: false, onClose: onClose, children: _jsxs(
|
|
371
|
+
return _jsx(TMSaveForm, { title: getTitle(), showTitleFormMode: false, showErrorCount: false, showUndoButton: false, hasNavigation: false, skipIsModifiedCheck: true, isModal: true, width: calcResponsiveSizes(deviceType, '800px', '800px', '95%'), height: '550px', validationItems: validationItems, exception: exception, isModified: isLocalSelectionModified(), showToolbar: false, showSaveButton: false, onClose: onClose, children: _jsxs(TMLayoutContainer, { direction: 'vertical', children: [_jsx("div", { style: { width: "100%", height: '48px' }, children: _jsx(TMStepNavigator, { steps: steps, currentStep: adjustedCurrentStep, onStepChange: (stepIndex) => { setCurrentStep(stepIndex); } }) }), _jsxs("div", { style: {
|
|
369
372
|
marginTop: '10px',
|
|
370
373
|
padding: '10px',
|
|
371
374
|
borderRadius: '8px',
|
|
@@ -374,8 +377,9 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
374
377
|
width: '100%',
|
|
375
378
|
height: 'calc(100% - 113px)',
|
|
376
379
|
overflow: 'auto',
|
|
377
|
-
}, children: [
|
|
378
|
-
|
|
380
|
+
}, children: [isLoading &&
|
|
381
|
+
_jsxs("div", { style: { width: '100%', height: '100%', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', gap: '10px' }, children: [_jsx(LoadIndicator, { height: 40, width: 40 }), _jsx("div", { children: currentStep === 0 ? SDKUI_Localizator.LoadingWorkGroups : SDKUI_Localizator.Loading })] }), (!isLoading && currentStep === 0 && wgs.length > 0) &&
|
|
382
|
+
_jsx(TMDataGrid, { dataColumns: dataColumns, dataSource: wgs, selection: selection, focusedRowKey: focusedRowKey, onFocusedRowChanged: onFocusedRowChanged, selectedRowKeys: [...selectedRowKeys], onSelectionChanged: onSelectionChanged, onRowClick: onRowClick, onRowDblClick: onRowDblClick, autoNavigateToFocusedRow: true, showColumnHeaders: false }), (!isLoading && currentStep === 1) &&
|
|
379
383
|
_jsx(TreeView, { dataSource: treeViewData, displayExpr: "text", itemRender: renderTreeViewItem, onItemClick: handleTreeViewItemClick })] }), _jsxs("div", { style: {
|
|
380
384
|
width: "100%",
|
|
381
385
|
height: '45px',
|
|
@@ -419,15 +423,15 @@ const TMWGsCopyMoveForm = (props) => {
|
|
|
419
423
|
}, children: SDKUI_Localizator.Cancel })] })] }) });
|
|
420
424
|
};
|
|
421
425
|
export default TMWGsCopyMoveForm;
|
|
422
|
-
const StepSpan = styled.span `
|
|
423
|
-
color: ${({ $isCurrent, $isPast }) => ($isCurrent ? TMColors.primary : $isPast ? '#555' : '#888')};
|
|
424
|
-
font-weight: ${({ $isCurrent }) => ($isCurrent ? 600 : 400)};
|
|
425
|
-
cursor: ${({ $isPast }) => ($isPast ? 'pointer' : 'default')};
|
|
426
|
-
transition: color 0.3s ease;
|
|
427
|
-
&:hover {
|
|
428
|
-
color: ${({ $isPast }) => ($isPast ? '#007bff' : undefined)};
|
|
429
|
-
text-decoration: ${({ $isPast }) => ($isPast ? 'underline' : 'none')};
|
|
430
|
-
}
|
|
426
|
+
const StepSpan = styled.span `
|
|
427
|
+
color: ${({ $isCurrent, $isPast }) => ($isCurrent ? TMColors.primary : $isPast ? '#555' : '#888')};
|
|
428
|
+
font-weight: ${({ $isCurrent }) => ($isCurrent ? 600 : 400)};
|
|
429
|
+
cursor: ${({ $isPast }) => ($isPast ? 'pointer' : 'default')};
|
|
430
|
+
transition: color 0.3s ease;
|
|
431
|
+
&:hover {
|
|
432
|
+
color: ${({ $isPast }) => ($isPast ? '#007bff' : undefined)};
|
|
433
|
+
text-decoration: ${({ $isPast }) => ($isPast ? 'underline' : 'none')};
|
|
434
|
+
}
|
|
431
435
|
`;
|
|
432
436
|
export const TMStepNavigator = (props) => {
|
|
433
437
|
const { steps, currentStep, onStepChange } = props;
|
|
@@ -25,7 +25,7 @@ const TMResultDialog = ({ title, result, id1Caption, id2Caption }) => {
|
|
|
25
25
|
TMExceptionBoxManager.show({ exception: e.data.description });
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
return (_jsx(TMModal, { height: '65%', width: '75%', title: `${SDKUI_Localizator.OperationResult} - ${title}`, children: _jsxs(TMLayoutContainer, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px', padding: '5px', justifyContent: 'center', alignItems: 'center' }, children: [_jsx("p", { children: `${SDKUI_Localizator.ProcessedItems}: ${result.length}` }), _jsx(IconSuccessCirlce, { fontSize: 22, color: TMColors.success }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.SUCCESS).length ?? 0 }), _jsx(IconWarning, { fontSize: 22, color: TMColors.warning }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.WARNING).length ?? 0 }), _jsx(IconCloseCircle, { fontSize: 22, color: TMColors.error }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.ERROR).length ?? 0 })] }), _jsxs(DataGrid, { dataSource: result.filter(o => o.resultType != ResultTypes.SUCCESS), showColumnLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, showRowLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, keyExpr: "rowIndex", width: "100%", height: "100%", columnResizingMode: "widget", allowColumnResizing: true, focusedRowEnabled: true, hoverStateEnabled: true, rowAlternationEnabled: true, onRowDblClick: handleRowDblClick, children: [_jsx(Column, { dataField: 'resultType', caption: '', width: "5%", allowResizing: true, allowSorting: true, cellRender: cellRender }), _jsx(Column, { dataField: 'id1', caption: id1Caption, width: "10%" }), id2Caption && _jsx(Column, { dataField: 'id2', caption: id2Caption, width: "10%" }), _jsx(Column, { dataField: 'description', allowResizing: true, caption: SDKUI_Localizator.Description, allowSorting: true, width: id2Caption ? "75%" : "85%" }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { enabled: true, pageSize: 30 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(Scrolling, { mode: 'standard', useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 })] })] }) }));
|
|
28
|
+
return (_jsx(TMModal, { height: '65%', width: '75%', title: `${SDKUI_Localizator.OperationResult} - ${title}`, children: _jsxs(TMLayoutContainer, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px', padding: '5px', justifyContent: 'center', alignItems: 'center', flexShrink: 0 }, children: [_jsx("p", { children: `${SDKUI_Localizator.ProcessedItems}: ${result.length}` }), _jsx(IconSuccessCirlce, { fontSize: 22, color: TMColors.success }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.SUCCESS).length ?? 0 }), _jsx(IconWarning, { fontSize: 22, color: TMColors.warning }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.WARNING).length ?? 0 }), _jsx(IconCloseCircle, { fontSize: 22, color: TMColors.error }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.ERROR).length ?? 0 })] }), _jsx("div", { style: { flex: '1 1 auto', minHeight: 0, width: '100%', overflow: 'hidden' }, children: _jsxs(DataGrid, { dataSource: result.filter(o => o.resultType != ResultTypes.SUCCESS), showColumnLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, showRowLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, keyExpr: "rowIndex", width: "100%", height: "100%", columnResizingMode: "widget", allowColumnResizing: true, focusedRowEnabled: true, hoverStateEnabled: true, rowAlternationEnabled: true, onRowDblClick: handleRowDblClick, children: [_jsx(Column, { dataField: 'resultType', caption: '', width: "5%", allowResizing: true, allowSorting: true, cellRender: cellRender }), _jsx(Column, { dataField: 'id1', caption: id1Caption, width: "10%" }), id2Caption && _jsx(Column, { dataField: 'id2', caption: id2Caption, width: "10%" }), _jsx(Column, { dataField: 'description', allowResizing: true, caption: SDKUI_Localizator.Description, allowSorting: true, width: id2Caption ? "75%" : "85%" }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { enabled: true, pageSize: 30 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(Scrolling, { mode: 'standard', useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 })] }) })] }) }));
|
|
29
29
|
};
|
|
30
30
|
export default TMResultDialog;
|
|
31
31
|
export class TMResultManager {
|