@topconsultnpm/sdkui-react 6.20.0-dev2.5 → 6.20.0-dev2.51

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.
Files changed (67) hide show
  1. package/lib/components/base/Styled.d.ts +1 -0
  2. package/lib/components/base/Styled.js +10 -2
  3. package/lib/components/base/TMTreeView.d.ts +3 -1
  4. package/lib/components/base/TMTreeView.js +63 -20
  5. package/lib/components/choosers/TMDataListItemEditor.d.ts +11 -0
  6. package/lib/components/choosers/TMDataListItemEditor.js +130 -0
  7. package/lib/components/choosers/TMDataListItemFields.d.ts +11 -0
  8. package/lib/components/choosers/TMDataListItemFields.js +61 -0
  9. package/lib/components/choosers/TMDataListItemPicker.d.ts +1 -0
  10. package/lib/components/choosers/TMDataListItemPicker.js +178 -18
  11. package/lib/components/choosers/TMDynDataListItemChooser.js +11 -6
  12. package/lib/components/choosers/TMImageIDChooser.d.ts +16 -0
  13. package/lib/components/choosers/TMImageIDChooser.js +53 -0
  14. package/lib/components/choosers/TMMetadataChooser.js +1 -1
  15. package/lib/components/editors/TMLocalizedTextBox.d.ts +1 -0
  16. package/lib/components/editors/TMLocalizedTextBox.js +3 -3
  17. package/lib/components/editors/TMMetadataValues.js +3 -1
  18. package/lib/components/editors/TMTextBox.js +8 -9
  19. package/lib/components/features/archive/TMArchive.js +29 -42
  20. package/lib/components/features/documents/TMDcmtForm.js +165 -42
  21. package/lib/components/features/documents/TMDcmtPreview.js +2 -1
  22. package/lib/components/features/documents/TMMasterDetailDcmts.js +67 -6
  23. package/lib/components/features/documents/TMRelationViewer.d.ts +7 -1
  24. package/lib/components/features/documents/TMRelationViewer.js +389 -76
  25. package/lib/components/features/search/TMSearchResult.d.ts +1 -0
  26. package/lib/components/features/search/TMSearchResult.js +44 -82
  27. package/lib/components/features/search/TMSearchResultsMenuItems.js +2 -2
  28. package/lib/components/features/tasks/TMTaskForm.js +35 -187
  29. package/lib/components/features/tasks/TMTaskFormUtils.d.ts +74 -0
  30. package/lib/components/features/tasks/TMTaskFormUtils.js +538 -0
  31. package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -0
  32. package/lib/components/features/tasks/TMTasksUtils.js +38 -13
  33. package/lib/components/features/tasks/TMTasksUtilsView.d.ts +0 -7
  34. package/lib/components/features/tasks/TMTasksUtilsView.js +7 -14
  35. package/lib/components/features/tasks/TMTasksView.js +2 -2
  36. package/lib/components/features/workflow/TMWorkflowPopup.d.ts +2 -1
  37. package/lib/components/features/workflow/TMWorkflowPopup.js +2 -1
  38. package/lib/components/features/workflow/diagram/DiagramItemForm.js +1 -1
  39. package/lib/components/forms/Login/TMLoginForm.js +1 -1
  40. package/lib/components/forms/TMSaveForm.js +61 -13
  41. package/lib/components/grids/TMBlogsPost.js +2 -2
  42. package/lib/components/index.d.ts +2 -0
  43. package/lib/components/index.js +2 -0
  44. package/lib/components/layout/panelManager/TMPanelManagerContainer.js +3 -2
  45. package/lib/components/pages/TMPage.js +4 -0
  46. package/lib/components/query/TMQueryEditor.d.ts +1 -0
  47. package/lib/components/query/TMQueryEditor.js +2 -2
  48. package/lib/helper/Enum_Localizator.js +5 -0
  49. package/lib/helper/GlobalStyles.js +3 -0
  50. package/lib/helper/SDKUI_Globals.d.ts +4 -0
  51. package/lib/helper/SDKUI_Globals.js +6 -0
  52. package/lib/helper/SDKUI_Localizator.d.ts +11 -3
  53. package/lib/helper/SDKUI_Localizator.js +102 -22
  54. package/lib/helper/TMUtils.d.ts +18 -0
  55. package/lib/helper/TMUtils.js +58 -0
  56. package/lib/helper/helpers.d.ts +6 -2
  57. package/lib/helper/helpers.js +23 -8
  58. package/lib/helper/index.d.ts +1 -0
  59. package/lib/helper/index.js +1 -0
  60. package/lib/helper/queryHelper.js +1 -1
  61. package/lib/hooks/useBetaFeatures.d.ts +1 -0
  62. package/lib/hooks/useBetaFeatures.js +41 -0
  63. package/lib/hooks/useDcmtOperations.js +14 -2
  64. package/lib/hooks/useRelatedDocuments.js +34 -11
  65. package/lib/index.d.ts +1 -0
  66. package/lib/index.js +1 -0
  67. package/package.json +11 -11
@@ -134,6 +134,8 @@ export const getStatusLocalizatorValues = () => {
134
134
  switch (status) {
135
135
  case Task_States.Completed:
136
136
  return ({ value: status, display: SDKUI_Localizator.Completed });
137
+ case Task_States.Closed:
138
+ return ({ value: status, display: SDKUI_Localizator.Closed });
137
139
  case Task_States.Deferred:
138
140
  return ({ value: status, display: SDKUI_Localizator.Postponed });
139
141
  case Task_States.InProgress:
@@ -151,6 +153,8 @@ export const getStatusLocalizatorValue = (status) => {
151
153
  switch (status) {
152
154
  case Task_States.Completed:
153
155
  return SDKUI_Localizator.Completed;
156
+ case Task_States.Closed:
157
+ return SDKUI_Localizator.Closed;
154
158
  case Task_States.Deferred:
155
159
  return SDKUI_Localizator.Postponed;
156
160
  case Task_States.InProgress:
@@ -179,7 +183,8 @@ export const getTaskNotPersonalAssignedToMe = (tasks) => {
179
183
  .filter((task) => task.fromID !== undefined &&
180
184
  task.fromID !== userID &&
181
185
  task.toID === userID &&
182
- task.state !== Task_States.Completed)
186
+ task.state !== Task_States.Completed &&
187
+ task.state !== Task_States.Closed)
183
188
  .sort((a, b) => {
184
189
  if (!a.endTime && !b.endTime)
185
190
  return 0;
@@ -196,7 +201,8 @@ export const getTaskPersonalAssignedToMe = (tasks) => {
196
201
  .filter((task) => task.fromID !== undefined &&
197
202
  task.fromID === userID &&
198
203
  task.toID === userID &&
199
- task.state !== Task_States.Completed)
204
+ task.state !== Task_States.Completed &&
205
+ task.state !== Task_States.Closed)
200
206
  .sort((a, b) => {
201
207
  if (!a.endTime && !b.endTime)
202
208
  return 0;
@@ -216,7 +222,8 @@ export const getTaskNotCompletedAssignedByMe = (tasks) => {
216
222
  return tasks
217
223
  .filter((task) => task.toID !== undefined &&
218
224
  task.toID !== userID &&
219
- task.state !== Task_States.Completed).sort((a, b) => {
225
+ task.state !== Task_States.Completed &&
226
+ task.state !== Task_States.Closed).sort((a, b) => {
220
227
  if (!a.endTime && !b.endTime)
221
228
  return 0;
222
229
  if (!a.endTime)
@@ -226,6 +233,24 @@ export const getTaskNotCompletedAssignedByMe = (tasks) => {
226
233
  return a.endTime.getTime() - b.endTime.getTime();
227
234
  });
228
235
  };
236
+ export const getTaskCompletedAssignedByMe = (tasks) => {
237
+ const userID = SDK_Globals.tmSession?.SessionDescr?.userID;
238
+ return tasks
239
+ .filter((task) => task.toID !== undefined &&
240
+ task.toID !== userID &&
241
+ task.state === Task_States.Completed)
242
+ .sort((a, b) => {
243
+ // Task senza lastUpdateTime li mettiamo alla fine
244
+ if (!a.lastUpdateTime && !b.lastUpdateTime)
245
+ return 0;
246
+ if (!a.lastUpdateTime)
247
+ return 1; // a va dopo
248
+ if (!b.lastUpdateTime)
249
+ return -1; // b va dopo
250
+ // Ordine decrescente: più recente prima
251
+ return b.lastUpdateTime.getTime() - a.lastUpdateTime.getTime();
252
+ });
253
+ };
229
254
  export const getHeaderStatusFilterConfig = () => ({
230
255
  enabled: true,
231
256
  dataSource: getStatusLocalizatorValues().map(item => ({
@@ -297,7 +322,10 @@ newTasks // Array of new tasks to merge
297
322
  return Array.from(taskMap.values());
298
323
  };
299
324
  export const getOriginLabel = (pdg, ID1Name) => {
300
- let label = ID1Name ?? SDKUI_Localizator.NoSource;
325
+ if (!pdg) {
326
+ return SDKUI_Localizator.NoSource;
327
+ }
328
+ let label = ID1Name ?? '';
301
329
  try {
302
330
  if (typeof label === 'string' && label.length > 0) {
303
331
  // Rimuove: (TID: 123), (DID: 456), TID: 123, DID: 456
@@ -307,10 +335,9 @@ export const getOriginLabel = (pdg, ID1Name) => {
307
335
  }
308
336
  }
309
337
  catch {
310
- label = ID1Name ?? SDKUI_Localizator.NoSource;
338
+ // Se fallisce, mantieni label così com'è ('' se undefined)
311
339
  }
312
- // Se pdg esiste ritorna la label (anche se vuota), altrimenti ritorna sempre NoSource
313
- return pdg ? label : SDKUI_Localizator.NoSource;
340
+ return label;
314
341
  };
315
342
  export const taskValidatorAsync = async (taskDescriptor) => {
316
343
  let vil = [];
@@ -334,12 +361,6 @@ export const taskValidatorAsync = async (taskDescriptor) => {
334
361
  vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.ErrorStartEndDate, `${SDKUI_Localizator.StartDateMustBeBeforeEndDate}`));
335
362
  }
336
363
  }
337
- // Validate that reminderTime is less than endTime
338
- if (taskDescriptor.remTime && taskDescriptor.endTime) {
339
- if (taskDescriptor.remTime >= taskDescriptor.endTime) {
340
- vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.ErrorEndRemDate, `${SDKUI_Localizator.ReminderDateMustBeBeforeEndDate}`));
341
- }
342
- }
343
364
  return vil;
344
365
  };
345
366
  const getPDGExtended = (pdg) => {
@@ -404,6 +425,7 @@ export const formatDate = (date) => {
404
425
  // Return the formatted date string
405
426
  return `${day}/${month}/${year} ${hours}:${minutes}:${seconds}`;
406
427
  };
428
+ // Funzione per confrontare due ID e verificare se sono diversi
407
429
  export const areDifferentIDs = (fromID, userID) => {
408
430
  if (fromID && userID) {
409
431
  return fromID !== userID;
@@ -464,6 +486,7 @@ export const createTasksMenuItems = (taskDescriptor, showId, setShowId, showSear
464
486
  { icon: _jsx("span", { className: "dx-icon-product" }), name: SDKUI_Localizator.NewFemale, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(getRowIdsAsArray(rowIds), Task_States.NotStarted) },
465
487
  { icon: _jsx("span", { className: "dx-icon-refresh" }), name: SDKUI_Localizator.InProgress, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(getRowIdsAsArray(rowIds), Task_States.InProgress) },
466
488
  { icon: _jsx("span", { className: "dx-icon-check" }), name: SDKUI_Localizator.Completed, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(getRowIdsAsArray(rowIds), Task_States.Completed) },
489
+ { icon: _jsx("span", { className: "dx-icon-imgarlock" }), name: SDKUI_Localizator.Closed, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(getRowIdsAsArray(rowIds), Task_States.Closed) },
467
490
  { icon: _jsx("span", { className: "dx-icon-taskstop" }), name: SDKUI_Localizator.Pending, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(getRowIdsAsArray(rowIds), Task_States.Waiting) },
468
491
  { icon: _jsx("span", { className: "dx-icon-clock" }), name: SDKUI_Localizator.Postponed, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(getRowIdsAsArray(rowIds), Task_States.Deferred) }
469
492
  ]
@@ -616,6 +639,7 @@ export var FilterCategoryId;
616
639
  FilterCategoryId[FilterCategoryId["New"] = 1.2] = "New";
617
640
  FilterCategoryId[FilterCategoryId["InProgress"] = 1.3] = "InProgress";
618
641
  FilterCategoryId[FilterCategoryId["Completed"] = 1.4] = "Completed";
642
+ FilterCategoryId[FilterCategoryId["Closed"] = 1.45] = "Closed";
619
643
  FilterCategoryId[FilterCategoryId["Pending"] = 1.5] = "Pending";
620
644
  FilterCategoryId[FilterCategoryId["Postponed"] = 1.6] = "Postponed";
621
645
  FilterCategoryId[FilterCategoryId["Low"] = 2.1] = "Low";
@@ -631,6 +655,7 @@ export const filterTreeTask = (tasks, filtersApplied) => {
631
655
  [FilterCategoryId.New]: (task) => task.state === undefined || task.state === Task_States.NotStarted,
632
656
  [FilterCategoryId.InProgress]: (task) => task.state === Task_States.InProgress,
633
657
  [FilterCategoryId.Completed]: (task) => task.state === Task_States.Completed,
658
+ [FilterCategoryId.Closed]: (task) => task.state === Task_States.Closed,
634
659
  [FilterCategoryId.Pending]: (task) => task.state === Task_States.Waiting,
635
660
  [FilterCategoryId.Postponed]: (task) => task.state === Task_States.Deferred,
636
661
  // Low = Low + Normal: Merged 'Low' and 'Normal' filters for backwards compatibility
@@ -29,11 +29,4 @@ export declare const treeFilterDataSource: (allTasks: Array<TaskDescriptor>) =>
29
29
  expanded?: boolean;
30
30
  tooltipContent?: ReactNode;
31
31
  }>;
32
- type RenderContextBlockParams = {
33
- condition: boolean;
34
- pdg: PdGs;
35
- label: string | undefined;
36
- isMobile: boolean;
37
- };
38
- export declare const renderContextBlock: ({ condition, pdg, label, isMobile }: RenderContextBlockParams) => JSX.Element | null;
39
32
  export {};
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useState } from "react";
3
3
  import { PdGs, Priorities, SDK_Globals, Task_States } from '@topconsultnpm/sdk-ts';
4
4
  import { Extended_Task_States, FilterCategoryId, filterTreeTask, gotoPDGExtendedLabel, prioritiesResourceData, taskIsExpiringSoon } from "./TMTasksUtils";
5
- import { getPdgsIconMap, SDKUI_Localizator, TMConditionalWrapper } from "../../../helper";
5
+ import { getPdgsIconMap, SDKUI_Localizator } from "../../../helper";
6
6
  import { FormModes } from "../../../ts";
7
7
  import TMTooltip from "../../base/TMTooltip";
8
8
  const taskStateIconClassMap = () => {
@@ -11,6 +11,7 @@ const taskStateIconClassMap = () => {
11
11
  [Task_States.NotStarted, "dx-icon-product"],
12
12
  [Task_States.InProgress, "dx-icon-refresh"],
13
13
  [Task_States.Completed, "dx-icon-check"],
14
+ [Task_States.Closed, "dx-icon-imgarlock"],
14
15
  [Task_States.Waiting, "dx-icon-taskstop"],
15
16
  [Task_States.Deferred, "dx-icon-clock"],
16
17
  ]);
@@ -21,6 +22,7 @@ export const taskStateIconMap = (fontSize = 20) => {
21
22
  [Task_States.NotStarted, _jsx("i", { style: { fontSize }, className: taskStateIconClassMap().get(Task_States.NotStarted) }, "Task_States-NotStarted")],
22
23
  [Task_States.InProgress, _jsx("i", { style: { fontSize }, className: taskStateIconClassMap().get(Task_States.InProgress) }, "Task_States-InProgress")],
23
24
  [Task_States.Completed, _jsx("i", { style: { fontSize }, className: taskStateIconClassMap().get(Task_States.Completed) }, "Task_States-Completed")],
25
+ [Task_States.Closed, _jsx("i", { style: { fontSize }, className: taskStateIconClassMap().get(Task_States.Closed) }, "Task_States-Closed")],
24
26
  [Task_States.Waiting, _jsx("i", { style: { fontSize }, className: taskStateIconClassMap().get(Task_States.Waiting) }, "Task_States-Waiting")],
25
27
  [Task_States.Deferred, _jsx("i", { style: { fontSize }, className: taskStateIconClassMap().get(Task_States.Deferred) }, "Task_States-Deferred")]
26
28
  ]);
@@ -35,8 +37,8 @@ export const calculateNumberOfDays = (startTime, endTime) => {
35
37
  };
36
38
  export const renderTaskIcons = (taskData) => {
37
39
  const { stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays } = taskData;
38
- return (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [_jsx(TMTooltip, { content: stateTooltipLabel, children: _jsx("div", { className: "task-icon", children: taskStateIconMap().get(stateLabel) }) }), (stateLabel !== Task_States.Completed && endTime && taskIsExpiringSoon(endTime, remTime)) &&
39
- _jsx(TMTooltip, { content: SDKUI_Localizator.Expiring, children: _jsx("i", { className: "dx-icon-warning task-icon" }) }), _jsx(TMTooltip, { content: gotoPDGExtendedLabel(false, pdg ?? PdGs.None, ID1Name), children: _jsx("div", { className: "task-icon", style: {
40
+ return (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [_jsx(TMTooltip, { content: stateTooltipLabel, children: _jsx("div", { className: "task-icon", children: taskStateIconMap().get(stateLabel) }) }), (stateLabel !== Task_States.Completed && stateLabel !== Task_States.Closed && endTime && taskIsExpiringSoon(endTime, remTime)) &&
41
+ _jsx(TMTooltip, { content: SDKUI_Localizator.Expiring, children: _jsx("i", { className: "dx-icon-warning task-icon", style: { fontSize: 20 } }) }), _jsx(TMTooltip, { content: gotoPDGExtendedLabel(false, pdg ?? PdGs.None, ID1Name), children: _jsx("div", { className: "task-icon", style: {
40
42
  marginLeft: pdg === PdGs.CF || pdg === PdGs.WG ? "-4px" : undefined,
41
43
  marginRight: pdg === PdGs.CF || pdg === PdGs.WG ? "-4px" : undefined,
42
44
  }, children: getPdgsIconMap().get(pdg) }) }), numberOfDays > 1 &&
@@ -106,6 +108,7 @@ export const treeFilterDataSource = (allTasks) => {
106
108
  const newNotStartedLength = filterTreeTask(allTasks, [FilterCategoryId.New]).length ?? 0;
107
109
  const inProgressLength = filterTreeTask(allTasks, [FilterCategoryId.InProgress]).length ?? 0;
108
110
  const completedLength = filterTreeTask(allTasks, [FilterCategoryId.Completed]).length ?? 0;
111
+ const closedLength = filterTreeTask(allTasks, [FilterCategoryId.Closed]).length ?? 0;
109
112
  const pendingLength = filterTreeTask(allTasks, [FilterCategoryId.Pending]).length ?? 0;
110
113
  const postponedLength = filterTreeTask(allTasks, [FilterCategoryId.Postponed]).length ?? 0;
111
114
  const lowLength = filterTreeTask(allTasks, [FilterCategoryId.Low]).length ?? 0;
@@ -120,6 +123,7 @@ export const treeFilterDataSource = (allTasks) => {
120
123
  { id: FilterCategoryId.New, label: SDKUI_Localizator.NewFemale + " (" + newNotStartedLength + ")", value: Task_States.NotStarted, categoryId: FilterCategoryId.AllStates },
121
124
  { id: FilterCategoryId.InProgress, label: SDKUI_Localizator.InProgress + " (" + inProgressLength + ")", value: Task_States.InProgress, categoryId: FilterCategoryId.AllStates },
122
125
  { id: FilterCategoryId.Completed, label: SDKUI_Localizator.Completed + " (" + completedLength + ")", value: Task_States.Completed, categoryId: FilterCategoryId.AllStates },
126
+ { id: FilterCategoryId.Closed, label: SDKUI_Localizator.Closed + " (" + closedLength + ")", value: Task_States.Closed, categoryId: FilterCategoryId.AllStates },
123
127
  { id: FilterCategoryId.Pending, label: SDKUI_Localizator.Pending + " (" + pendingLength + ")", value: Task_States.Waiting, categoryId: FilterCategoryId.AllStates },
124
128
  { id: FilterCategoryId.Postponed, label: SDKUI_Localizator.Postponed + " (" + postponedLength + ")", value: Task_States.Deferred, categoryId: FilterCategoryId.AllStates },
125
129
  // Low = Low + Normal for backwards compatibility with version 5
@@ -127,14 +131,3 @@ export const treeFilterDataSource = (allTasks) => {
127
131
  { id: FilterCategoryId.High, label: SDKUI_Localizator.High + " (" + highLength + ")", value: Priorities.High, categoryId: FilterCategoryId.AllPriorities },
128
132
  ];
129
133
  };
130
- export const renderContextBlock = ({ condition, pdg, label, isMobile }) => {
131
- if (!condition || !label)
132
- return null;
133
- return (_jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: (children) => (_jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children })), children: _jsx("div", { style: {
134
- width: isMobile ? '100%' : '50%',
135
- display: 'flex',
136
- alignItems: 'center',
137
- color: "#2559A5",
138
- marginTop: 10
139
- }, children: _jsxs(TMTooltip, { content: label, children: [_jsx("span", { children: getPdgsIconMap().get(pdg) }), "\u00A0", _jsx("span", { children: label })] }) }) }));
140
- };
@@ -5,7 +5,7 @@ import { TabPanel, Item } from 'devextreme-react/tab-panel';
5
5
  import { Priorities, ResultTypes, SDK_Globals, Task_States } from "@topconsultnpm/sdk-ts";
6
6
  import { calculateNumberOfDays, renderTaskIcons } from "./TMTasksUtilsView";
7
7
  import { getPriorityLocalizatorValue } from "../tasks/TMTasksUtils";
8
- import { calcResponsiveSizes, getExceptionMessage, SDKUI_Localizator, StyledTabItem, TMCountBadge } from "../../../helper";
8
+ import { getExceptionMessage, SDKUI_Localizator, StyledTabItem, taskModalSizes, TMCountBadge } from "../../../helper";
9
9
  import { useDeviceType } from "../../base/TMDeviceProvider";
10
10
  import { FormModes } from "../../../ts";
11
11
  import TMDataGrid from "../../base/TMDataGrid";
@@ -545,7 +545,7 @@ const TMTasksView = (props) => {
545
545
  _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(Item, { title: SDKUI_Localizator.AllFemale, icon: "fields", tabRender: (params) => {
546
546
  return _jsxs(StyledTabItem, { "$isSelected": activeTabIndex === AssignedTab.All, children: [_jsxs(TMTooltip, { content: SDKUI_Localizator.AllFemale, children: [_jsx("i", { className: `dx-icon-${params.icon}` }), "\u00A0", params.title, " ", (allTasksFilteredCount > 0) ? `(${allTasksFilteredCount})` : ''] }), newTaskCount > 0 && (_jsx(TMTooltip, { content: SDKUI_Localizator.NewAssignedActivitiesNumber + ": " + newTaskCount, children: _jsx(TMCountBadge, { children: newTaskCount }) }))] });
547
547
  }, render: () => activeTabIndex === AssignedTab.All ?
548
- _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: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), 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: {
548
+ _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: {
549
549
  position: 'absolute',
550
550
  bottom: hasFilters ? '90px' : '18px',
551
551
  right: '20px',
@@ -63,11 +63,12 @@ export declare const WorkflowEndInstanceModal: ({ selectedInstances, onClose, on
63
63
  onClose?: () => void;
64
64
  onCompleted?: () => Promise<void>;
65
65
  }) => import("react/jsx-runtime").JSX.Element;
66
- export declare const WorkFlowMoreInfoPopUp: ({ DID, TID, deviceType, onClose, onCompleted }: {
66
+ export declare const WorkFlowMoreInfoPopUp: ({ DID, TID, deviceType, onClose, onCompleted, getAllTasks }: {
67
67
  TID?: number;
68
68
  DID?: number;
69
69
  deviceType?: DeviceType;
70
70
  onClose?: () => void;
71
71
  onCompleted?: () => Promise<void>;
72
+ getAllTasks?: () => Promise<void>;
72
73
  }) => import("react/jsx-runtime").JSX.Element;
73
74
  export {};
@@ -282,7 +282,7 @@ export const WorkflowEndInstanceModal = ({ selectedInstances, onClose, onComplet
282
282
  : `${SDKUI_Localizator.WorkflowEndInstance} (${selectedInstances.length} istanze)`;
283
283
  return (_jsx(TMModal, { title: title, onClose: onClose, width: '600px', height: '270px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx("div", { style: { fontWeight: 600, marginBottom: '8px' }, children: "Motivazione (obbligatorio):" }), _jsx(StyledTextArea, { "$isValid": !disable, value: commentValue, onChange: (e) => setCommentValue(e.target.value), placeholder: "Inserisci il motivo della terminazione...", maxLength: 200 }), _jsxs(CharacterCounter, { children: [commentValue.length, "/200"] })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconStop, {}), caption: SDKUI_Localizator.WorkflowEndInstance, width: '150px', disabled: disable, onClick: () => !disable && endInstancesAsync(), advancedColor: TMColors.error }) })] }) }));
284
284
  };
285
- export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, onCompleted }) => {
285
+ export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, onCompleted, getAllTasks }) => {
286
286
  const [users, setUsers] = useState([]);
287
287
  const [task, setTask] = useState();
288
288
  const [taskOrig, setTaskOrig] = useState();
@@ -316,6 +316,7 @@ export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
316
316
  name: `${TASK_MORE_INFO_PREFIX_NAME}${nameInput}`
317
317
  };
318
318
  await SDK_Globals.tmSession?.NewWorkflowEngine().WorkItem_MoreInfoAsync(TID, DID, taskWithPrefix);
319
+ await getAllTasks?.();
319
320
  ShowAlert({ mode: 'success', position: 'TOP_RIGHT', title: SDKUI_Localizator.MoreInformation, message: SDKUI_Localizator.MoreInfoSent, duration: 3000 });
320
321
  }
321
322
  catch (e) {
@@ -392,7 +392,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
392
392
  };
393
393
  // Function to render Status-specific fields
394
394
  const renderStatusFields = () => {
395
- return (_jsx(TMDataListItemPicker, { dataListID: wf?.MStatusDLID, selectedValue: localItem.StatusValue, onItemSelect: handleStatusChange }));
395
+ return (_jsx(TMDataListItemPicker, { dataListID: wf?.MStatusDLID, selectedValue: localItem.StatusValue, onItemSelect: handleStatusChange, allowEdit: true }));
396
396
  };
397
397
  const renderAppFields = () => {
398
398
  return (_jsxs(_Fragment, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.WorkflowAppType, dataSource: APP_TYPES_DATASOURCE, value: localItem.AppType, isModifiedWhen: localItem.AppType !== localItemOrig.AppType, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.AppType), onValueChanged: (e) => { handleAppTypeChange(e.target.value); } }), localItem.AppType === WFAppTypes.EXE
@@ -115,7 +115,7 @@ const TMLoginForm = (props) => {
115
115
  const [dcmtArchive, setDcmtArchive] = useState();
116
116
  const [manualArchiveID, setManualArchiveID] = useState('');
117
117
  const [authMode, setAuthMode] = useState(AuthenticationModes.TopMedia);
118
- const [username, setUsername] = useState('SysAdmin');
118
+ const [username, setUsername] = useState('');
119
119
  const [password, setPassword] = useState('');
120
120
  const [authDomain, setAuthDomain] = useState('');
121
121
  const [usernameOnBehalf, setUsernameOnBehalf] = useState('');
@@ -11,7 +11,7 @@ import { TMColors } from '../../utils/theme';
11
11
  import TMValidationItemsList from '../grids/TMValidationItemsList';
12
12
  import TMModal from '../base/TMModal';
13
13
  import { DeviceType, useDeviceType } from '../base/TMDeviceProvider';
14
- const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipIsModifiedCheck = false, title, children, isModal, exception, customToolbarElements, hasNavigation, showSaveButton = true, customSaveButton, customTooltipSaveButton, showBackButton, showWarningsCount = true, showErrorCount = true, showUndoButton = true, onClose, onSaveAsync, onNext, onPrev, canNext, canPrev, isModified, onShowList, validationItems = [], onUndo, onCancel, width, height, askClosingConfirm = false, showTitleFormMode = true, showCloseButton = true }) => {
14
+ const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipIsModifiedCheck = false, title, children, isModal, exception, customToolbarElements, hasNavigation, showSaveButton = true, customSaveButton, customTooltipSaveButton, showBackButton, showWarningsCount = true, showErrorCount = true, showUndoButton = true, onClose, onSaveAsync, onNext, onPrev, canNext, canPrev, isModified, onShowList, validationItems = [], onUndo, onCancel, width, height, askClosingConfirm = false, showTitleFormMode = true, showCloseButton = true, resizable = true }) => {
15
15
  const [showList, setShowList] = useState(true);
16
16
  const [showErrorGrid, setShowErrorGrid] = useState(false);
17
17
  const deviceType = useDeviceType();
@@ -65,26 +65,74 @@ const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipI
65
65
  }
66
66
  });
67
67
  };
68
- const doClose = () => {
68
+ const doClose = async () => {
69
+ // Se non ci sono modifiche o vogliamo ignorare il controllo delle modifiche
69
70
  if (!isModified || skipIsModifiedCheck) {
70
71
  onClose?.();
71
- deviceType === DeviceType.MOBILE && setShowList(true), onShowList?.(true);
72
+ // Se il dispositivo è mobile, mostra di nuovo la lista
73
+ if (deviceType === DeviceType.MOBILE) {
74
+ setShowList(true);
75
+ onShowList?.(true);
76
+ }
72
77
  return;
73
78
  }
79
+ // Determina il messaggio e i pulsanti da mostrare in base alla presenza di errori
80
+ const hasValidationErrors = validationItems.length > 0;
81
+ const message = (isModified && hasValidationErrors) ? SDKUI_Localizator.FormErrorsProceedQuestion : SDKUI_Localizator.SaveQuestion;
82
+ const buttons = hasValidationErrors
83
+ ? [ButtonNames.YES, ButtonNames.NO]
84
+ : [ButtonNames.YES, ButtonNames.NO, ButtonNames.CANCEL];
85
+ // Mostra il messaggio di conferma
74
86
  TMMessageBoxManager.show({
75
- parentId: isModal ? "TMSaveFormShowConfirmForClose-" + id : undefined,
76
- message: SDKUI_Localizator.SaveQuestion, buttons: [ButtonNames.YES, ButtonNames.NO, ButtonNames.CANCEL],
77
- onButtonClick: async (e) => {
87
+ parentId: isModal ? `TMSaveFormShowConfirmForClose-${id}` : undefined,
88
+ message,
89
+ buttons,
90
+ onButtonClick: async (buttonClicked) => {
78
91
  try {
79
- if (e == ButtonNames.CANCEL)
80
- return;
81
- if (e == ButtonNames.NO)
82
- deviceType === DeviceType.MOBILE && (onUndo(), setShowList(true), onShowList?.(true));
83
- if (e == ButtonNames.YES)
84
- deviceType === DeviceType.MOBILE ? (await onSaveAsync?.(), setShowList(true), onShowList?.(true)) : await onSaveAsync?.();
92
+ // Caso con errori di validazione
93
+ if (hasValidationErrors) {
94
+ if (buttonClicked === ButtonNames.NO)
95
+ return; // Non fare nulla
96
+ if (buttonClicked === ButtonNames.YES) {
97
+ if (deviceType === DeviceType.MOBILE) {
98
+ onUndo();
99
+ setShowList(true);
100
+ onShowList?.(true);
101
+ }
102
+ else {
103
+ onUndo();
104
+ }
105
+ }
106
+ }
107
+ else {
108
+ // Caso senza errori
109
+ switch (buttonClicked) {
110
+ case ButtonNames.CANCEL:
111
+ return; // Non fare nulla
112
+ case ButtonNames.NO:
113
+ if (deviceType === DeviceType.MOBILE) {
114
+ onUndo();
115
+ setShowList(true);
116
+ onShowList?.(true);
117
+ }
118
+ break;
119
+ case ButtonNames.YES:
120
+ if (deviceType === DeviceType.MOBILE) {
121
+ await onSaveAsync?.();
122
+ setShowList(true);
123
+ onShowList?.(true);
124
+ }
125
+ else {
126
+ await onSaveAsync?.();
127
+ }
128
+ break;
129
+ }
130
+ }
131
+ // Chiude il form/modal
85
132
  onClose?.();
86
133
  }
87
134
  catch (ex) {
135
+ // Mostra eventuali eccezioni
88
136
  TMExceptionBoxManager.show({ exception: ex });
89
137
  }
90
138
  }
@@ -102,7 +150,7 @@ const TMSaveForm = ({ id, formMode = FormModes.Update, showToolbar = true, skipI
102
150
  _jsx("div", { style: { width: '100%', height: '100%', marginTop: '50px', display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', color: getColor('error') }, children: 'Si è verificato un errore' })
103
151
  : _jsx(_Fragment, { children: children }) }), showErrorGrid && validationItems.length > 0 ? _jsx(TMCard, { scrollY: true, padding: false, showBorder: false, children: _jsx(TMValidationItemsList, { validationItems: validationItems }) }) : _jsx(_Fragment, {})] }) }), (isModal && onClose) && _jsx("div", { id: "TMSaveFormShowConfirmForClose-" + id })] }));
104
152
  };
105
- return (_jsx(_Fragment, { children: (isModal && onClose) ? _jsx(_Fragment, { children: _jsx(TMModal, { title: `${title}${showTitleFormMode ? ` - ${LocalizeFormModes(formMode)}` : ''}`, onClose: doClose, width: width ?? '100%', height: height ?? '100%', hidePopup: false, askClosingConfirm: askClosingConfirm, showCloseButton: showCloseButton, children: _jsx("div", { style: { width: "100%", height: "100%", display: 'block' }, children: renderSaveForm() }) }) })
153
+ return (_jsx(_Fragment, { children: (isModal && onClose) ? _jsx(_Fragment, { children: _jsx(TMModal, { title: `${title}${showTitleFormMode ? ` - ${LocalizeFormModes(formMode)}` : ''}`, onClose: doClose, width: width ?? '100%', height: height ?? '100%', hidePopup: false, askClosingConfirm: askClosingConfirm, showCloseButton: showCloseButton, resizable: resizable, children: _jsx("div", { style: { width: "100%", height: "100%", display: 'block' }, children: renderSaveForm() }) }) })
106
154
  : renderSaveForm() }));
107
155
  };
108
156
  export default TMSaveForm;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useCallback, useEffect, useRef, useState } from "react";
3
3
  import { DossierEngine, LayoutModes, ObjectClasses, ResultTypes, SDK_Globals, TaskDescriptor, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
4
4
  import { ContextMenu as TMContextMenu } from "../NewComponents/ContextMenu";
5
- import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper, calcResponsiveSizes, getMoreInfoTasksForDocument } from "../../helper";
5
+ import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper, getMoreInfoTasksForDocument, taskModalSizes } from "../../helper";
6
6
  import TMToppyMessage from "../../helper/TMToppyMessage";
7
7
  import { useDcmtOperations } from "../../hooks/useDcmtOperations";
8
8
  import { DownloadTypes, FormModes } from "../../ts";
@@ -684,7 +684,7 @@ const TMBlogsPost = (props) => {
684
684
  visible: menuVisible,
685
685
  position: menuPosition,
686
686
  onClose: closeContextMenu,
687
- } })] }), (showTaskForm && handleNavigateToWGs && handleNavigateToDossiers && getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback) && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsx(TMTaskForm, { id: -1, title: SDKUI_Localizator.ContextualTask, isModal: true, width: calcResponsiveSizes(deviceType, '700px', '700px', '95%'), height: calcResponsiveSizes(deviceType, '670px', '80%', '95%'), formMode: FormModes.Create, visualizedTasks: [], currentTask: currentTask, setCurrentTask: () => { }, selectedRowKeys: [], handleFocusedRowKeyChange: () => { }, onStatusChanged: () => { }, onSaved: onSavedTaskFormCallback, onClose: () => closeTaskFormCallback(), onCancel: () => closeTaskFormCallback(), usersList: participants, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, isContextualCreate: true, taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback }) }), (dcmtForm.dcmt && dcmtForm.dcmt.TID && dcmtForm.dcmt.DID) && _jsx(TMDcmtForm, { TID: Number(dcmtForm.dcmt.TID), DID: Number(dcmtForm.dcmt.DID), layoutMode: LayoutModes.Update, onClose: closeDcmtForm, isClosable: true, titleModal: SDKUI_Localizator.Attachment + ": " + dcmtForm.dcmt.fileName, isModal: true, widthModal: "95%", heightModal: "95%", allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, onReferenceClick: handleNavigateToReference, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, Number(dcmtForm.dcmt.TID), Number(dcmtForm.dcmt.DID)) }), (showFloatingCommentButton && showCommentFormCallback && !(context?.engine === 'WorkingGroupEngine' && context?.object?.customData1 === 1)) && _jsx("button", { style: {
687
+ } })] }), (showTaskForm && handleNavigateToWGs && handleNavigateToDossiers && getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback) && _jsx("div", { style: { height: "100%", width: "100%" }, children: _jsx(TMTaskForm, { id: -1, title: SDKUI_Localizator.ContextualTask, isModal: true, width: taskModalSizes(deviceType, FormModes.Create).width, height: taskModalSizes(deviceType, FormModes.Create).height, formMode: FormModes.Create, visualizedTasks: [], currentTask: currentTask, setCurrentTask: () => { }, selectedRowKeys: [], handleFocusedRowKeyChange: () => { }, onStatusChanged: () => { }, onSaved: onSavedTaskFormCallback, onClose: () => closeTaskFormCallback(), onCancel: () => closeTaskFormCallback(), usersList: participants, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, isContextualCreate: true, taskContext: taskContext, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback }) }), (dcmtForm.dcmt && dcmtForm.dcmt.TID && dcmtForm.dcmt.DID) && _jsx(TMDcmtForm, { TID: Number(dcmtForm.dcmt.TID), DID: Number(dcmtForm.dcmt.DID), layoutMode: LayoutModes.Update, onClose: closeDcmtForm, isClosable: true, titleModal: SDKUI_Localizator.Attachment + ": " + dcmtForm.dcmt.fileName, isModal: true, widthModal: "95%", heightModal: "95%", allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, onReferenceClick: handleNavigateToReference, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, Number(dcmtForm.dcmt.TID), Number(dcmtForm.dcmt.DID)) }), (showFloatingCommentButton && showCommentFormCallback && !(context?.engine === 'WorkingGroupEngine' && context?.object?.customData1 === 1)) && _jsx("button", { style: {
688
688
  position: 'absolute',
689
689
  bottom: '18px',
690
690
  right: '20px',
@@ -43,6 +43,8 @@ export { editorColorManager } from './editors/TMEditorStyled';
43
43
  export { default as TMLocalizedTextBox } from './editors/TMLocalizedTextBox';
44
44
  export * from './choosers/TMCultureIDPicker';
45
45
  export * from './choosers/TMDataListItemChooser';
46
+ export * from './choosers/TMDataListItemFields';
47
+ export * from './choosers/TMImageIDChooser';
46
48
  export * from './choosers/TMDistinctValues';
47
49
  export * from './choosers/TMDiskChooser';
48
50
  export * from './choosers/TMDynDataListItemChooser';
@@ -46,6 +46,8 @@ export { default as TMLocalizedTextBox } from './editors/TMLocalizedTextBox';
46
46
  // chooserss
47
47
  export * from './choosers/TMCultureIDPicker';
48
48
  export * from './choosers/TMDataListItemChooser';
49
+ export * from './choosers/TMDataListItemFields';
50
+ export * from './choosers/TMImageIDChooser';
49
51
  export * from './choosers/TMDistinctValues';
50
52
  export * from './choosers/TMDiskChooser';
51
53
  export * from './choosers/TMDynDataListItemChooser';
@@ -4,9 +4,10 @@ import styled from 'styled-components';
4
4
  import { useTMPanelManagerContext } from './TMPanelManagerContext';
5
5
  import TMPanelWrapper from './TMPanelWrapper';
6
6
  import TMPanelManagerToolbar from './TMPanelManagerToolbar';
7
- import { IconInfo, SDKUI_Localizator } from '../../../helper';
7
+ import { getPanelManagerToolbarColor, IconInfo, SDKUI_Localizator } from '../../../helper';
8
8
  import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
9
9
  import { Gutters } from '../../../utils/theme';
10
+ import { AppModules, SDK_Globals } from '@topconsultnpm/sdk-ts';
10
11
  // Styled Component per il contenitore principale di PanelContainer
11
12
  const StyledPanelContainerWrapper = styled.div `
12
13
  display: ${props => (props.$hasVisiblePanels ? 'flex' : 'none')};
@@ -206,7 +207,7 @@ const TMPanelManagerContainer = (props) => {
206
207
  alignItems: 'center',
207
208
  width: isMobile ? '100%' : '50px',
208
209
  height: isMobile ? '50px' : 'max-content',
209
- background: 'transparent linear-gradient(90deg, #CCE0F4 0%, #7EC1E7 14%, #39A6DB 28%, #1E9CD7 35%, #0075BE 78%, #005B97 99%) 0% 0% no-repeat padding-box',
210
+ background: getPanelManagerToolbarColor(SDK_Globals.tmSession?.SessionDescr?.appModuleID ?? AppModules.SURFER),
210
211
  borderRadius: isMobile ? '10px' : '10px 0px 0px 10px',
211
212
  padding: '10px',
212
213
  gap: '10px'
@@ -41,6 +41,8 @@ const TMPage = ({ id, objClass = ObjectClasses.None, listDisabled = false, lastR
41
41
  let itemsCount = gridInstance?.instance().getDataSource().items().length;
42
42
  if (itemsCount && itemsCount > 0) {
43
43
  gridInstance?.instance().selectRows(selectedItems?.map((item) => item.id) ?? [], false);
44
+ if (selectedItems && selectedItems.length > 0 && (selectedItems?.[0]).id)
45
+ gridInstance?.instance()?.navigateToRow((selectedItems?.[0]).id);
44
46
  }
45
47
  }, [selectedItems]);
46
48
  useEffect(() => {
@@ -52,6 +54,8 @@ const TMPage = ({ id, objClass = ObjectClasses.None, listDisabled = false, lastR
52
54
  useEffect(() => {
53
55
  if (lastRefreshTime) {
54
56
  loadDataAsync(id);
57
+ if (id)
58
+ gridInstance?.instance()?.navigateToRow(id);
55
59
  }
56
60
  }, [lastRefreshTime]);
57
61
  useEffect(() => {
@@ -48,6 +48,7 @@ interface ITMQueryEditor extends ITMApplyFormProps<QueryDescriptor> {
48
48
  ShowOnlySAP?: boolean;
49
49
  updateIsModalOpen?: (isOpen: boolean) => void;
50
50
  showSearchResultSidebar?: boolean;
51
+ showDcmtFormSidebar?: boolean;
51
52
  showToppyDraggableHelpCenter?: boolean;
52
53
  toppyHelpCenterUsePortal?: boolean;
53
54
  }
@@ -62,7 +62,7 @@ export function useQueryApplyForm(d, formMode, inputData, onApplied, parameters)
62
62
  const [validationItems, setValidationItems] = useState([]);
63
63
  return { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData };
64
64
  }
65
- const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDistinct = false, showToolbar = true, validateSelect = true, validateOrderBy = true, raiseWarningForOnlyMetadataDcmtTypes = false, onApplied, onClose, height = 'auto', borderRadius = '4px', searchText, showApply, showUndo, showBack, onFromTIDChanged, ShowOnlySAP, updateIsModalOpen, showSearchResultSidebar = true, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false }) => {
65
+ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDistinct = false, showToolbar = true, validateSelect = true, validateOrderBy = true, raiseWarningForOnlyMetadataDcmtTypes = false, onApplied, onClose, height = 'auto', borderRadius = '4px', searchText, showApply, showUndo, showBack, onFromTIDChanged, ShowOnlySAP, updateIsModalOpen, showSearchResultSidebar = true, showDcmtFormSidebar = true, showToppyDraggableHelpCenter = true, toppyHelpCenterUsePortal = false }) => {
66
66
  const [confirmQueryParams, ConfirmQueryParamsDialog] = useQueryParametersDialog();
67
67
  const { formData, setFormData, formDataOrig, validationItems, setValidationItems, exception, applyData } = useQueryApplyForm(Descriptors.Query, formMode, inputData, onApplied);
68
68
  const [dcmtTypesList, setDcmtTypesList] = useState([]);
@@ -598,7 +598,7 @@ const TMQueryEditor = ({ formMode, inputData, onQDChanged, isExpertMode, showDis
598
598
  // #region Ricerca
599
599
  const renderResultSearchForm = (_jsx(TMSearchResult, { context: SearchResultContext.METADATA_SEARCH, allowFloatingBar: false, onClose: () => {
600
600
  setShowResultSearch(false);
601
- }, searchResults: resultSearch, showSearchResultSidebar: showSearchResultSidebar, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal }));
601
+ }, searchResults: resultSearch, showSearchResultSidebar: showSearchResultSidebar, showDcmtFormSidebar: showDcmtFormSidebar, showToppyDraggableHelpCenter: showToppyDraggableHelpCenter, toppyHelpCenterUsePortal: toppyHelpCenterUsePortal }));
602
602
  const onSearchAsync = async (qdInput) => {
603
603
  try {
604
604
  let qdSearch = await prepareQdForSearchAsync(qdInput);
@@ -101,6 +101,11 @@ export function LocalizeJobTypes(value) {
101
101
  case CultureIDs.It_IT: return value?.toString();
102
102
  default: return "CustomsDrawerPlus";
103
103
  }
104
+ case JobTypes.CassettoDoganaleDistiller:
105
+ switch (cultureID) {
106
+ case CultureIDs.It_IT: return value?.toString();
107
+ default: return "CustomsDrawerDistiller";
108
+ }
104
109
  default: return value?.toString() ?? '';
105
110
  }
106
111
  }
@@ -6,5 +6,8 @@ const GlobalStyle = createGlobalStyle `
6
6
  * {
7
7
  font-family: var(--base-font-family, "Inter"), sans-serif;
8
8
  }
9
+ .dx-filemanager-dirs-tree-item-text{
10
+ font-size: var(--base-font-size, 13px);
11
+ }
9
12
  `;
10
13
  export default GlobalStyle;
@@ -16,6 +16,7 @@ export declare class UserSettings {
16
16
  fullTextSettings: FullTextSettings;
17
17
  searchSettings: SearchSettings;
18
18
  themeSettings: ThemeSettings;
19
+ devSettings: DevSettings;
19
20
  dcmtFormSettings: DcmtFormSettings[];
20
21
  wgDraftCheckoutInfo: CheckoutInfo[];
21
22
  dcmtCheckoutInfo: CheckoutInfo[];
@@ -84,6 +85,9 @@ export declare class ArchivingSettings {
84
85
  export declare class FullTextSettings {
85
86
  mruTerms: string[];
86
87
  }
88
+ export declare class DevSettings {
89
+ betaFeatures: number;
90
+ }
87
91
  export declare class AdvancedSettings {
88
92
  private _expertMode;
89
93
  get expertMode(): number;
@@ -18,6 +18,7 @@ export class UserSettings {
18
18
  this.fullTextSettings = new FullTextSettings();
19
19
  this.searchSettings = new SearchSettings();
20
20
  this.themeSettings = new ThemeSettings(true);
21
+ this.devSettings = new DevSettings();
21
22
  this.dcmtFormSettings = [];
22
23
  this.wgDraftCheckoutInfo = [];
23
24
  this.dcmtCheckoutInfo = [];
@@ -120,6 +121,11 @@ export class FullTextSettings {
120
121
  this.mruTerms = [];
121
122
  }
122
123
  }
124
+ export class DevSettings {
125
+ constructor() {
126
+ this.betaFeatures = 0;
127
+ }
128
+ }
123
129
  export class AdvancedSettings {
124
130
  constructor() {
125
131
  this._expertMode = 0;