@topconsultnpm/sdkui-react 6.19.0-dev1.67 → 6.19.0-dev1.69

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.
@@ -71,6 +71,8 @@ const TMTaskForm = (props) => {
71
71
  return task;
72
72
  if (formMode !== FormModes.Create)
73
73
  return task;
74
+ if (task.id && task.id > 0)
75
+ return task;
74
76
  if (taskContext?.document) {
75
77
  task.pdG = PdGs.DT;
76
78
  task.iD1 = taskContext.document.tid;
@@ -83,8 +85,10 @@ const TMTaskForm = (props) => {
83
85
  else if (taskContext?.dossier) {
84
86
  task.pdG = PdGs.CF;
85
87
  task.iD1 = taskContext.dossier.id;
86
- if (currentTask)
88
+ if (currentTask) {
87
89
  task.name = currentTask.name;
90
+ task.toID = 0;
91
+ }
88
92
  }
89
93
  else if (taskContext?.workItem) {
90
94
  task.pdG = PdGs.DT;
@@ -108,8 +108,7 @@ const TMTasksView = (props) => {
108
108
  setShowTaskForm(true);
109
109
  setIsContextualCreate(isContextual ?? false);
110
110
  // If a task is provided, set it as the current task to be processed
111
- if (task)
112
- setCurrentTask(task);
111
+ setCurrentTask(task ?? null);
113
112
  }, []);
114
113
  // Updates the active tab index when the selected index changes
115
114
  const onSelectedIndexChange = (index) => {
@@ -14,7 +14,7 @@ const StyledToppyTextContainer = styled.div `
14
14
  box-sizing: border-box;
15
15
  min-height: 100px;
16
16
  `;
17
- const StyledToppyText = styled.p `
17
+ const StyledToppyText = styled.div `
18
18
  text-align: center;
19
19
  color: #2559A5;
20
20
  font-size: 1rem;
@@ -22,7 +22,7 @@ const StyledToppyText = styled.p `
22
22
  margin: 0;
23
23
  display: -webkit-box;
24
24
  -webkit-box-orient: vertical;
25
- -webkit-line-clamp: 3; /* non è una proprietà standard ma è così diffusa e ben supportata che è considerata una "best practice pragmatica" */
25
+ -webkit-line-clamp: 3;
26
26
  overflow: hidden;
27
27
  text-overflow: ellipsis;
28
28
  white-space: normal;
@@ -30,13 +30,13 @@ const StyledToppyText = styled.p `
30
30
  line-height: 1.2;
31
31
  `;
32
32
  const StyledToppyImage = styled.img `
33
- width: 100%;
34
- max-width: 120px;
33
+ width: 100%;
34
+ max-width: 120px;
35
35
  height: auto;
36
- display: block;
36
+ display: block;
37
37
  `;
38
38
  const TMToppyMessage = (props) => {
39
39
  const { message, titleTooltip } = props;
40
- return _jsxs(TMLayoutContainer, { gap: 30, alignItems: 'center', justifyContent: 'center', onContextMenu: (e) => e.preventDefault(), children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { title: titleTooltip ? titleTooltip : undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: 'Toppy' })] });
40
+ return (_jsxs(TMLayoutContainer, { gap: 30, alignItems: "center", justifyContent: "center", onContextMenu: (e) => e.preventDefault(), children: [_jsx(StyledToppyTextContainer, { children: _jsx(StyledToppyText, { title: titleTooltip || undefined, children: message }) }), _jsx(StyledToppyImage, { src: Toppy, alt: "Toppy" })] }));
41
41
  };
42
42
  export default TMToppyMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.19.0-dev1.67",
3
+ "version": "6.19.0-dev1.69",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",