@topconsultnpm/sdkui-react 6.20.0-dev2.50 → 6.20.0-dev2.52
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/TMTreeView.js +2 -2
- package/lib/components/features/documents/TMMasterDetailDcmts.js +1 -78
- package/lib/components/features/tasks/TMTaskForm.js +9 -3
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +2 -1
- package/lib/components/features/tasks/TMTaskFormUtils.js +44 -56
- package/lib/components/features/tasks/TMTasksUtils.js +0 -6
- package/lib/helper/Enum_Localizator.js +5 -5
- package/lib/helper/SDKUI_Localizator.d.ts +1 -1
- package/lib/helper/SDKUI_Localizator.js +10 -10
- package/lib/helper/helpers.js +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { IconChevronDown, IconChevronRight } from '../../helper';
|
|
4
|
+
import { IconChevronDown, IconChevronRight, SDKUI_Localizator } from '../../helper';
|
|
5
5
|
import TMButton from './TMButton';
|
|
6
6
|
const TMTreeView = ({ dataSource = [], focusedItem, selectedItems = [], allowMultipleSelection, onDataChanged, calculateItemsForNode, itemRender, onNodeUpdate, onFocusedItemChanged, onSelectionChanged, shouldDelayFocusOnEvent, autoSelectChildren = true, itemsPerPage = 100, showLoadMoreButton = true }) => {
|
|
7
7
|
useEffect(() => {
|
|
@@ -350,7 +350,7 @@ const TMTreeView = ({ dataSource = [], focusedItem, selectedItems = [], allowMul
|
|
|
350
350
|
if (input) {
|
|
351
351
|
input.indeterminate = isIndeterminate(node);
|
|
352
352
|
}
|
|
353
|
-
} })), _jsx("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, onClick: (e) => { handleNodeClick(node, e); }, children: itemRender(node) })] }), node.expanded && node.items && (_jsxs("div", { style: { paddingLeft: 20, width: '100%' }, children: [renderTree(getVisibleItems(node)), needsPagination(node) && (_jsxs(StyledStickyPaginator, { children: [_jsx(TMButton, { onClick: () => handlePageChange(node.key, (node.currentPage ?? 0) - 1), showTooltip: false, caption: "\u25C4", disabled: (node.currentPage ?? 0) <= 0 }),
|
|
353
|
+
} })), _jsx("div", { style: { display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }, onClick: (e) => { handleNodeClick(node, e); }, children: itemRender(node) })] }), node.expanded && node.items && (_jsxs("div", { style: { paddingLeft: 20, width: '100%' }, children: [renderTree(getVisibleItems(node)), needsPagination(node) && (_jsxs(StyledStickyPaginator, { children: [_jsx(TMButton, { onClick: () => handlePageChange(node.key, (node.currentPage ?? 0) - 1), showTooltip: false, caption: "\u25C4", disabled: (node.currentPage ?? 0) <= 0 }), _jsx("span", { style: { fontSize: '12px', whiteSpace: 'nowrap', fontWeight: 500, overflow: 'hidden', textOverflow: 'ellipsis', minWidth: 0, color: 'white' }, children: SDKUI_Localizator.PaginationInfo.replaceParams((node.currentPage ?? 0) + 1, getTotalPages(node), node.items?.length ?? 0) }), _jsx(TMButton, { onClick: () => handlePageChange(node.key, (node.currentPage ?? 0) + 1), showTooltip: false, caption: "\u25BA", disabled: (node.currentPage ?? 0) >= getTotalPages(node) - 1 })] }))] }))] }, node.key)));
|
|
354
354
|
}, [handleNodeClick, handleNodeToggle, handleCheckboxChange, focusedItem, selectedItems, allowMultipleSelection, getVisibleItems, needsPagination, handlePageChange, getTotalPages]);
|
|
355
355
|
return (_jsx("div", { style: { height: '100%', width: '100%', overflowY: 'auto', overflowX: 'hidden', padding: '0px 5px 2px 2px' }, children: renderTree(dataSource) }));
|
|
356
356
|
};
|
|
@@ -4,10 +4,9 @@ import { DcmtTypeListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts
|
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import TMRelationViewer from './TMRelationViewer';
|
|
6
6
|
import TMContextMenu from '../../NewComponents/ContextMenu/TMContextMenu';
|
|
7
|
-
import { genUniqueId, IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator,
|
|
7
|
+
import { genUniqueId, IconMultipleSelection, IconCheckFile, IconDetailDcmts, SDKUI_Localizator, IconMenuVertical, IconDataList, IconPreview, IconSearchCheck, IconBoard, IconDcmtTypeSys, IconShow, getMoreInfoTasksForDocument } from '../../../helper';
|
|
8
8
|
import { FormModes, SearchResultContext } from '../../../ts';
|
|
9
9
|
import { TMColors } from '../../../utils/theme';
|
|
10
|
-
import ShowAlert from '../../base/TMAlert';
|
|
11
10
|
import { DeviceType } from '../../base/TMDeviceProvider';
|
|
12
11
|
import { TMSaveFormButtonPrevious, TMSaveFormButtonNext } from '../../forms/TMSaveForm';
|
|
13
12
|
import TMPanelManagerContainer from '../../layout/panelManager/TMPanelManagerContainer';
|
|
@@ -122,82 +121,6 @@ const TMMasterDetailDcmts = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallba
|
|
|
122
121
|
onClick: () => {
|
|
123
122
|
appendMasterDcmts?.(focusedItem?.tid, focusedItem?.did);
|
|
124
123
|
}
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
icon: _jsx(IconMail, {}),
|
|
128
|
-
name: "Invia per posta",
|
|
129
|
-
disabled: false,
|
|
130
|
-
beginGroup: true,
|
|
131
|
-
submenu: [
|
|
132
|
-
{
|
|
133
|
-
icon: _jsx(IconMail, {}),
|
|
134
|
-
name: "I documenti selezionati",
|
|
135
|
-
disabled: false,
|
|
136
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
icon: _jsx(IconMail, {}),
|
|
140
|
-
name: "I documenti di primo livello e tutti i documenti correlati",
|
|
141
|
-
disabled: false,
|
|
142
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
icon: _jsx(IconMail, {}),
|
|
146
|
-
name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
|
|
147
|
-
disabled: false,
|
|
148
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
149
|
-
},
|
|
150
|
-
]
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
154
|
-
name: "Unisci in un file PDF",
|
|
155
|
-
disabled: false,
|
|
156
|
-
submenu: [
|
|
157
|
-
{
|
|
158
|
-
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
159
|
-
name: "I documenti selezionati",
|
|
160
|
-
disabled: false,
|
|
161
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
165
|
-
name: "I documenti di primo livello e tutti i documenti correlati",
|
|
166
|
-
disabled: false,
|
|
167
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
icon: _jsx(IconDcmtTypeOnlyMetadata, {}),
|
|
171
|
-
name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
|
|
172
|
-
disabled: false,
|
|
173
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
174
|
-
},
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
icon: _jsx(IconCopy, {}),
|
|
179
|
-
name: "Copia in una cartella",
|
|
180
|
-
disabled: false,
|
|
181
|
-
submenu: [
|
|
182
|
-
{
|
|
183
|
-
icon: _jsx(IconCopy, {}),
|
|
184
|
-
name: "I documenti selezionati",
|
|
185
|
-
disabled: false,
|
|
186
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
icon: _jsx(IconCopy, {}),
|
|
190
|
-
name: "I documenti di primo livello e tutti i documenti correlati",
|
|
191
|
-
disabled: false,
|
|
192
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
icon: _jsx(IconCopy, {}),
|
|
196
|
-
name: "I documenti di primo livello e i documenti correlati personalizzando l'operazione",
|
|
197
|
-
disabled: false,
|
|
198
|
-
onClick: () => ShowAlert({ message: "TODO", mode: 'info', title: `${"TODO"}`, duration: 3000 })
|
|
199
|
-
},
|
|
200
|
-
]
|
|
201
124
|
}
|
|
202
125
|
];
|
|
203
126
|
const toolbar = _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '10px' }, children: [allowMultipleSelection && _jsx("p", { style: { color: TMColors.colorHeader, textAlign: 'center', padding: '1px 4px', borderRadius: '3px', display: 'flex' }, children: `${selectedItems.length} selezionati` }), allowNavigation && canPrev != undefined && _jsx(TMSaveFormButtonPrevious, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canPrev: canPrev, onPrev: onPrev }), allowNavigation && canNext != undefined && _jsx(TMSaveFormButtonNext, { btnStyle: 'icon', iconColor: 'white', isModified: false, formMode: FormModes.ReadOnly, canNext: canNext, onNext: onNext }), _jsx(TMContextMenu, { items: commandsMenuItems, trigger: 'left', children: _jsx(IconMenuVertical, { color: 'white', cursor: 'pointer' }) })] });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { ObjectClasses, TaskDescriptor, PdGs, UserListCacheService, SDK_Localizator } from '@topconsultnpm/sdk-ts';
|
|
3
|
+
import { ObjectClasses, TaskDescriptor, PdGs, UserListCacheService, SDK_Localizator, Task_States } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { gotoPDGExtendedLabel, taskValidatorAsync } from './TMTasksUtils';
|
|
5
5
|
import ScrollView from 'devextreme-react/scroll-view';
|
|
6
6
|
import TMLayoutContainer from '../../base/TMLayout';
|
|
@@ -22,6 +22,12 @@ const TMTaskForm = (props) => {
|
|
|
22
22
|
const sfo = new SaveFormOptions();
|
|
23
23
|
sfo.objClass = ObjectClasses.Task;
|
|
24
24
|
const customizeFormData = (task) => {
|
|
25
|
+
if (formMode === FormModes.Duplicate) {
|
|
26
|
+
task.toID = undefined;
|
|
27
|
+
task.toName = undefined;
|
|
28
|
+
task.state = Task_States.NotStarted;
|
|
29
|
+
return task;
|
|
30
|
+
}
|
|
25
31
|
if (!isContextualCreate)
|
|
26
32
|
return task;
|
|
27
33
|
if (formMode !== FormModes.Create)
|
|
@@ -265,11 +271,11 @@ const TMTaskForm = (props) => {
|
|
|
265
271
|
console.warn(`Unhandled object type: ${ref.objClass}`);
|
|
266
272
|
}
|
|
267
273
|
};
|
|
268
|
-
return (_jsx("div", { style: { width: "100%", height: "100%", overflow: "auto" }, ref: containerRef, children: _jsxs(TMSaveForm, { width: width, height: height, id: id, title: title, isModal: isModal, formMode: formMode, onSaveAsync: saveDataAsync, onClose: onCloseCallback, showUndoButton: formMode === FormModes.Update, onUndo: onUndoCallback, exception: exception, isModified: calcIsModified(formData, formDataOrig), validationItems: validationItems, showBackButton: showBackButton, hasNavigation: (hasNavigation && formMode !== FormModes.Create), canNext: canNext(), onNext: onNextCallback, canPrev: canPrev(), onPrev: onPrevCallback, showToolbar: !(showDcmtForm && formData?.iD1 && formData?.iD2), children: [_jsxs(_Fragment, { children: [_jsx(ScrollView, { direction: "vertical", useNative: true, height: formData && (formMode === FormModes.Create || formMode === FormModes.None) ? "calc(100% - 70px)" : "calc(100% - 35px)", children: _jsx("div", { style: { marginRight: "5px" }, children: _jsxs(TMLayoutContainer, { direction: 'vertical', gap: 2, children: [(formMode === FormModes.Create || formMode === FormModes.None) && _jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsx(RenderNameField, { fieldsReadOnly: fieldsReadOnly, setFormData: setFormData, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems }), _jsx(RenderDescriptionField, { fieldsReadOnly: fieldsReadOnly, setFormData: setFormData, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems }), _jsx(TaskAssigneeField, { formMode: formMode, formData: formData, formDataOrig: formDataOrig, taskContext: taskContext, validationItems: validationItems, fieldsReadOnly: fieldsReadOnly, usersList: usersList, onValueChanged: (newValue) => {
|
|
274
|
+
return (_jsx("div", { style: { width: "100%", height: "100%", overflow: "auto" }, ref: containerRef, children: _jsxs(TMSaveForm, { width: width, height: height, id: id, title: title, isModal: isModal, formMode: formMode, onSaveAsync: saveDataAsync, onClose: onCloseCallback, showUndoButton: formMode === FormModes.Update, onUndo: onUndoCallback, exception: exception, isModified: calcIsModified(formData, formDataOrig), validationItems: validationItems, showBackButton: showBackButton, hasNavigation: (hasNavigation && formMode !== FormModes.Create), canNext: canNext(), onNext: onNextCallback, canPrev: canPrev(), onPrev: onPrevCallback, showToolbar: !(showDcmtForm && formData?.iD1 && formData?.iD2), children: [_jsxs(_Fragment, { children: [_jsx(ScrollView, { direction: "vertical", useNative: true, height: formData && (formMode === FormModes.Create || formMode === FormModes.None) ? "calc(100% - 70px)" : "calc(100% - 35px)", children: _jsx("div", { style: { marginRight: "5px" }, children: _jsxs(TMLayoutContainer, { direction: 'vertical', gap: 2, children: [(formMode === FormModes.Create || formMode === FormModes.Duplicate || formMode === FormModes.None) && _jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsx(RenderNameField, { fieldsReadOnly: fieldsReadOnly, setFormData: setFormData, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems }), _jsx(RenderDescriptionField, { fieldsReadOnly: fieldsReadOnly, setFormData: setFormData, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems }), _jsx(TaskAssigneeField, { formMode: formMode, formData: formData, formDataOrig: formDataOrig, taskContext: taskContext, validationItems: validationItems, fieldsReadOnly: fieldsReadOnly, usersList: usersList, onValueChanged: (newValue) => {
|
|
269
275
|
if (newValue === undefined)
|
|
270
276
|
return;
|
|
271
277
|
setFormData({ ...formData ?? {}, toID: newValue[0] });
|
|
272
|
-
} }), _jsx(RenderStartDateField, { fieldsReadOnly: fieldsReadOnly, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems, setFormData: setFormData, onContentReady: handleStartTimeContentReady }), _jsx(RenderEndDateField, { fieldsReadOnly: fieldsReadOnly, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems, setFormData: setFormData, onContentReady: handleEndTimeContentReady }), _jsx(RenderRemindDateField, { fieldsReadOnly: fieldsReadOnly, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems, setFormData: setFormData }), _jsx(RenderPriorityField, { formData: formData, formDataOrig: formDataOrig, fieldsReadOnly: fieldsReadOnly, onPriorityValueChange: onPriorityValueChange }), _jsx(TaskFormContextualAttachments, { taskContext: taskContext })] }), (formMode === FormModes.Update
|
|
278
|
+
} }), _jsx(RenderStartDateField, { fieldsReadOnly: fieldsReadOnly, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems, setFormData: setFormData, onContentReady: handleStartTimeContentReady }), _jsx(RenderEndDateField, { fieldsReadOnly: fieldsReadOnly, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems, setFormData: setFormData, onContentReady: handleEndTimeContentReady }), _jsx(RenderRemindDateField, { fieldsReadOnly: fieldsReadOnly, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems, setFormData: setFormData }), _jsx(RenderPriorityField, { formData: formData, formDataOrig: formDataOrig, fieldsReadOnly: fieldsReadOnly, onPriorityValueChange: onPriorityValueChange }), _jsx(TaskFormContextualAttachments, { taskContext: taskContext, currentTask: formData })] }), (formMode === FormModes.Update) && _jsxs("div", { style: { width: '100%', height: '100%' }, children: [_jsx(RenderNameField, { fieldsReadOnly: fieldsReadOnly, setFormData: setFormData, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems }), _jsx(RenderDescriptionField, { fieldsReadOnly: fieldsReadOnly, setFormData: setFormData, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems }), _jsx(TaskAssigneeField, { formMode: formMode, formData: formData, formDataOrig: formDataOrig, taskContext: taskContext, validationItems: validationItems, fieldsReadOnly: fieldsReadOnly, usersList: usersList, onValueChanged: (newValue) => {
|
|
273
279
|
if (newValue === undefined)
|
|
274
280
|
return;
|
|
275
281
|
setFormData({ ...formData ?? {}, toID: newValue[0] });
|
|
@@ -15,9 +15,10 @@ interface RenderContextBlockParams {
|
|
|
15
15
|
}
|
|
16
16
|
export declare const RenderAttachmentBlock: ({ condition, pdg, label }: RenderContextBlockParams) => JSX.Element | null;
|
|
17
17
|
interface TaskFormContextualAttachmentsProps {
|
|
18
|
+
currentTask: TaskDescriptor | undefined;
|
|
18
19
|
taskContext: TaskContext | undefined;
|
|
19
20
|
}
|
|
20
|
-
export declare const TaskFormContextualAttachments: (
|
|
21
|
+
export declare const TaskFormContextualAttachments: (props: TaskFormContextualAttachmentsProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
interface TaskFormAssignedToProps {
|
|
22
23
|
formMode: FormModes;
|
|
23
24
|
formData: TaskDescriptor | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React, { useEffect, useMemo, useState } from "react";
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { PdGs, Priorities, SDK_Globals, Task_States } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { FormModes } from "../../../ts";
|
|
5
5
|
import { calcResponsiveSizes, DateDisplayTypes, getPdgsIconMap, IconSave, SDKUI_Localizator } from "../../../helper";
|
|
@@ -84,15 +84,50 @@ export const TaskFormAssignmentNoticeBadge = (props) => {
|
|
|
84
84
|
export const RenderAttachmentBlock = ({ condition, pdg, label }) => {
|
|
85
85
|
if (!condition || !label)
|
|
86
86
|
return null;
|
|
87
|
-
return (_jsxs("span", { style: { display: 'inline-flex', alignItems: 'center', gap: 4 }, children: [SDKUI_Localizator.Attachment, ": ", getPdgsIconMap().get(pdg), " ", label] }));
|
|
87
|
+
return (_jsxs("span", { style: { display: 'inline-flex', alignItems: 'center', gap: 4 }, children: [SDKUI_Localizator.Attachment, ": ", _jsx("span", { style: { flexShrink: 0 }, children: getPdgsIconMap().get(pdg) }), " ", label] }));
|
|
88
88
|
};
|
|
89
|
-
export const TaskFormContextualAttachments = (
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
export const TaskFormContextualAttachments = (props) => {
|
|
90
|
+
const { currentTask, taskContext } = props;
|
|
91
|
+
const getAttachmentInfo = useCallback(() => {
|
|
92
|
+
let hasWorkingGroup = false;
|
|
93
|
+
let workingGroupName;
|
|
94
|
+
let hasDossier = false;
|
|
95
|
+
let dossierName;
|
|
96
|
+
let hasDocument = false;
|
|
97
|
+
let documentName;
|
|
98
|
+
let hasWorkItem = false;
|
|
99
|
+
let workItemName;
|
|
100
|
+
if (taskContext) {
|
|
101
|
+
hasWorkingGroup = !!taskContext?.workingGroup?.id;
|
|
102
|
+
workingGroupName = taskContext?.workingGroup?.name;
|
|
103
|
+
hasDossier = !!taskContext?.dossier?.id;
|
|
104
|
+
dossierName = taskContext?.dossier?.name;
|
|
105
|
+
hasDocument = !!taskContext?.document?.tid && !!taskContext?.document?.did;
|
|
106
|
+
documentName = taskContext?.document?.name;
|
|
107
|
+
hasWorkItem = !!taskContext?.workItem?.tid && !!taskContext?.workItem?.did;
|
|
108
|
+
workItemName = taskContext?.workItem?.name;
|
|
109
|
+
}
|
|
110
|
+
else if (currentTask) {
|
|
111
|
+
switch (currentTask.pdG) {
|
|
112
|
+
case PdGs.WG:
|
|
113
|
+
hasWorkingGroup = true;
|
|
114
|
+
workingGroupName = currentTask.iD1Name;
|
|
115
|
+
break;
|
|
116
|
+
case PdGs.CF:
|
|
117
|
+
hasDossier = true;
|
|
118
|
+
dossierName = currentTask.iD1Name;
|
|
119
|
+
break;
|
|
120
|
+
case PdGs.DT:
|
|
121
|
+
hasDocument = true;
|
|
122
|
+
documentName = currentTask.iD1Name;
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const hasAnyAttachment = hasWorkingGroup || hasDossier || hasDocument || hasWorkItem;
|
|
127
|
+
return { hasWorkingGroup, workingGroupName, hasDossier, dossierName, hasDocument, documentName, hasWorkItem, workItemName, hasAnyAttachment };
|
|
128
|
+
}, [currentTask, taskContext]);
|
|
129
|
+
const { hasWorkingGroup, workingGroupName, hasDossier, dossierName, hasDocument, documentName, hasWorkItem, workItemName, hasAnyAttachment } = useMemo(() => getAttachmentInfo(), [getAttachmentInfo]);
|
|
130
|
+
return (_jsx("div", { style: { width: '100%', marginTop: 15, marginLeft: 5 }, children: !hasAnyAttachment ? (_jsxs("span", { children: [SDKUI_Localizator.Attachment, ":", " ", _jsx("span", { style: { color: "#6c757d", fontStyle: "italic" }, children: "Nessun allegato" })] })) : (_jsxs(_Fragment, { children: [_jsx(RenderAttachmentBlock, { condition: hasWorkingGroup, pdg: PdGs.WG, label: `${SDKUI_Localizator.WorkGroup} "${getOriginLabel(PdGs.WG, workingGroupName)}"` }), _jsx(RenderAttachmentBlock, { condition: hasDossier, pdg: PdGs.CF, label: `${SDKUI_Localizator.Dossier} "${getOriginLabel(PdGs.CF, dossierName)}"` }), _jsx(RenderAttachmentBlock, { condition: hasDocument, pdg: PdGs.DT, label: `${SDKUI_Localizator.Document} "${getOriginLabel(PdGs.DT, documentName)}"` }), _jsx(RenderAttachmentBlock, { condition: hasWorkItem, pdg: PdGs.DT, label: `${SDKUI_Localizator.Document} "${getOriginLabel(PdGs.DT, workItemName)}"` })] })) }));
|
|
96
131
|
};
|
|
97
132
|
const TaskPdgOriginNavigator = (props) => {
|
|
98
133
|
const { formMode, formData, isMobile, gotoPDGExtendedLabelClickCallback } = props;
|
|
@@ -195,7 +230,6 @@ const FloatingFieldLabel = styled.label `
|
|
|
195
230
|
align-items: center;
|
|
196
231
|
gap: 6px;
|
|
197
232
|
`;
|
|
198
|
-
// Nuovo Styled component semplice per StatusFieldValue
|
|
199
233
|
const StatusFieldLabel = styled.div `
|
|
200
234
|
display: flex;
|
|
201
235
|
align-items: center;
|
|
@@ -221,49 +255,6 @@ const StatusValue = styled.span `
|
|
|
221
255
|
color: ${props => props.$isModifiedWhen ? "#B46900" : "#3A3A3A"};
|
|
222
256
|
transition: all 0.2s ease;
|
|
223
257
|
`;
|
|
224
|
-
const ResponseReadOnlyContainer = styled.div `width: 100%;`;
|
|
225
|
-
const ResponseReadOnlyLabel = styled.div `
|
|
226
|
-
font-size: 1rem;
|
|
227
|
-
color: #000;
|
|
228
|
-
margin-bottom: 6px;
|
|
229
|
-
`;
|
|
230
|
-
const ResponseReadOnlyValue = styled.div `
|
|
231
|
-
border: 1px solid #dee2e6;
|
|
232
|
-
border-radius: 8px;
|
|
233
|
-
padding: 12px 14px;
|
|
234
|
-
font-size: 0.95rem;
|
|
235
|
-
color: #495057;
|
|
236
|
-
line-height: 1.5;
|
|
237
|
-
white-space: pre-wrap;
|
|
238
|
-
word-wrap: break-word;
|
|
239
|
-
background: ${props => props.$isModifiedWhen
|
|
240
|
-
? "#FFF4E0"
|
|
241
|
-
: `linear-gradient(#F6F7F9, #F6F7F9) padding-box,
|
|
242
|
-
linear-gradient(270deg, #46B5A2 16%, #3BAABC 34%, #3BAABC 34%, #3681AD 54%, #3368A5 72%, #2F549D 88%, #304F99 100%) border-box`};
|
|
243
|
-
${props => props.$isModifiedWhen && `border-color: #FFD79A;`}
|
|
244
|
-
/* Limite a 3 righe con scrollbar */
|
|
245
|
-
max-height: calc(1.5em * 3 + 24px); /* 3 righe + padding */
|
|
246
|
-
overflow-y: auto;
|
|
247
|
-
|
|
248
|
-
/* Scrollbar stilizzata */
|
|
249
|
-
&::-webkit-scrollbar {
|
|
250
|
-
width: 6px;
|
|
251
|
-
}
|
|
252
|
-
&::-webkit-scrollbar-track {
|
|
253
|
-
background: #f1f1f1;
|
|
254
|
-
border-radius: 3px;
|
|
255
|
-
}
|
|
256
|
-
&::-webkit-scrollbar-thumb {
|
|
257
|
-
background: linear-gradient(180deg, #46B5A2, #3681AD);
|
|
258
|
-
border-radius: 3px;
|
|
259
|
-
}
|
|
260
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
261
|
-
background: linear-gradient(180deg, #3a9a89, #2d6d94);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/* Permette selezione testo */
|
|
265
|
-
user-select: text;
|
|
266
|
-
`;
|
|
267
258
|
const ResponseCommentWrapper = styled.div `
|
|
268
259
|
position: relative;
|
|
269
260
|
width: 100%;
|
|
@@ -367,9 +358,6 @@ export const RenderTaskFormStateField = (props) => {
|
|
|
367
358
|
// Condizione per mostrare il pulsante
|
|
368
359
|
const showCloseButton = taskRole === 'sender' && formDataOrig?.state === Task_States.Completed;
|
|
369
360
|
const showModifyButton = !(taskRole === 'sender' && formDataOrig?.state === Task_States.Completed);
|
|
370
|
-
console.log(taskRole);
|
|
371
|
-
console.log("showCloseButton", showCloseButton);
|
|
372
|
-
console.log("showModifyButton", showModifyButton);
|
|
373
361
|
const closeTaskCallback = () => {
|
|
374
362
|
if (!formData || !formData.id)
|
|
375
363
|
return;
|
|
@@ -361,12 +361,6 @@ export const taskValidatorAsync = async (taskDescriptor) => {
|
|
|
361
361
|
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.ErrorStartEndDate, `${SDKUI_Localizator.StartDateMustBeBeforeEndDate}`));
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
// Validate that reminderTime is less than endTime
|
|
365
|
-
if (taskDescriptor.remTime && taskDescriptor.endTime) {
|
|
366
|
-
if (taskDescriptor.remTime >= taskDescriptor.endTime) {
|
|
367
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.ErrorEndRemDate, `${SDKUI_Localizator.ReminderDateMustBeBeforeEndDate}`));
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
364
|
return vil;
|
|
371
365
|
};
|
|
372
366
|
const getPDGExtended = (pdg) => {
|
|
@@ -101,11 +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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
// case JobTypes.CassettoDoganaleDistiller:
|
|
105
|
+
// switch (cultureID) {
|
|
106
|
+
// case CultureIDs.It_IT: return value?.toString();
|
|
107
|
+
// default: return "CustomsDrawerDistiller";
|
|
108
|
+
// }
|
|
109
109
|
default: return value?.toString() ?? '';
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -462,6 +462,7 @@ export declare class SDKUI_Localizator {
|
|
|
462
462
|
static get ParametricFilterTypes_ByUserID(): "Filtern nach {@UserID}" | "Filter on {@UserID}" | "Filtro en {@UserID}" | "Filtre sur {@UserID}" | "Filtre on {@UserID}" | "Filtro su {@UserID}";
|
|
463
463
|
static get ParametricFilterTypes_ByUserName(): "Filtern nach {@Benutzername} (=)" | "Filter on {@UserName} (=)" | "Filtro en {@UserName} (=)" | "Filtre sur {@UserName} (=)" | "Filtre on {@UserName} (=)" | "Filtro su {@UserName} (=)";
|
|
464
464
|
static get ParametricFilterTypes_ByUserNameC(): "Filter nach {@Benutzername} (Enthält)" | "Filter on {@UserName} (Contains)" | "Filtro en {@UserName} (Contiene)" | "Filtre sur {@UserName} (Contient)" | "Filtre on {@UserName} (Contém)" | "Filtro su {@UserName} (Contiene)";
|
|
465
|
+
static get PaginationInfo(): string;
|
|
465
466
|
static get Participants(): "Teilnehmer" | "Participants" | "Participantes" | "Partecipanti";
|
|
466
467
|
static get Password(): "Passwort" | "Password" | "Contraseña" | "Mot de passe" | "Senha";
|
|
467
468
|
static get PassToArchive(): "Zur Archivierung übergeben" | "Pass to archive" | "Pasar a archivo" | "Passer à l'archivage" | "Passar para arquivo" | "Passa ad archiviazione";
|
|
@@ -541,7 +542,6 @@ export declare class SDKUI_Localizator {
|
|
|
541
542
|
static get RequiredNOT(): "Nicht obligatorisch" | "Not mandatory" | "No obligatorio" | "Pas obligatoire" | "Não é obrigatório" | "Non obbligatorio";
|
|
542
543
|
static get Refresh(): "Aktualisieren" | "Refresh" | "Actualizar" | "Mis à jour" | "Refrescar" | "Aggiorna";
|
|
543
544
|
static get Reminder(): "Erinnerung" | "Reminder" | "Recordatorio" | "Rappel" | "Lembrete" | "Promemoria";
|
|
544
|
-
static get ReminderDateMustBeBeforeEndDate(): "Das Erinnerungsdatum muss vor dem Enddatum liegen" | "The reminder date must be before the end date" | "La fecha de recordatorio debe ser anterior a la fecha de finalización" | "La date de rappel doit être antérieure à la date de fin" | "A data de lembrete deve ser anterior à data de término" | "La data di promemoria deve essere precedente alla data di fine";
|
|
545
545
|
static get ReminderSetForToday(): "Es gibt eine Erinnerung, die für heute eingestellt ist und bis zum Ablaufdatum gültig ist" | "There is a reminder set for today, valid until the expiration date" | "Hay un recordatorio establecido para hoy, válido hasta la fecha de vencimiento" | "Il y a un rappel réglé pour aujourd'hui, valable jusqu'à la date d'échéance" | "Há um lembrete definido para hoje, válido até à data de expiração" | "È presente un promemoria impostato per oggi, valido fino alla data di scadenza";
|
|
546
546
|
static get Remove(): "Entfernen" | "Remove" | "Quitar" | "Supprime" | "Remover" | "Rimuovi";
|
|
547
547
|
static get RemoveAll(): "Alle entfernen" | "Remove all" | "Eliminar todo" | "Supprime tout" | "Remover todos" | "Rimuovi tutto";
|
|
@@ -4578,6 +4578,16 @@ export class SDKUI_Localizator {
|
|
|
4578
4578
|
default: return "Filtro su {@UserName} (Contiene)";
|
|
4579
4579
|
}
|
|
4580
4580
|
}
|
|
4581
|
+
static get PaginationInfo() {
|
|
4582
|
+
switch (this._cultureID) {
|
|
4583
|
+
case CultureIDs.De_DE: return "Seite {{0}} von {{1}} ({{2}} Elemente)";
|
|
4584
|
+
case CultureIDs.En_US: return "Page {{0}} of {{1}} ({{2}} items)";
|
|
4585
|
+
case CultureIDs.Es_ES: return "Página {{0}} de {{1}} ({{2}} elementos)";
|
|
4586
|
+
case CultureIDs.Fr_FR: return "Page {{0}} sur {{1}} ({{2}} éléments)";
|
|
4587
|
+
case CultureIDs.Pt_PT: return "Página {{0}} de {{1}} ({{2}} itens)";
|
|
4588
|
+
default: return "Pagina {{0}} di {{1}} ({{2}} elementi)";
|
|
4589
|
+
}
|
|
4590
|
+
}
|
|
4581
4591
|
static get Participants() {
|
|
4582
4592
|
switch (this._cultureID) {
|
|
4583
4593
|
case CultureIDs.De_DE: return "Teilnehmer";
|
|
@@ -5381,16 +5391,6 @@ export class SDKUI_Localizator {
|
|
|
5381
5391
|
default: return "Promemoria";
|
|
5382
5392
|
}
|
|
5383
5393
|
}
|
|
5384
|
-
static get ReminderDateMustBeBeforeEndDate() {
|
|
5385
|
-
switch (this._cultureID) {
|
|
5386
|
-
case CultureIDs.De_DE: return "Das Erinnerungsdatum muss vor dem Enddatum liegen";
|
|
5387
|
-
case CultureIDs.En_US: return "The reminder date must be before the end date";
|
|
5388
|
-
case CultureIDs.Es_ES: return "La fecha de recordatorio debe ser anterior a la fecha de finalización";
|
|
5389
|
-
case CultureIDs.Fr_FR: return "La date de rappel doit être antérieure à la date de fin";
|
|
5390
|
-
case CultureIDs.Pt_PT: return "A data de lembrete deve ser anterior à data de término";
|
|
5391
|
-
default: return "La data di promemoria deve essere precedente alla data di fine";
|
|
5392
|
-
}
|
|
5393
|
-
}
|
|
5394
5394
|
static get ReminderSetForToday() {
|
|
5395
5395
|
switch (this._cultureID) {
|
|
5396
5396
|
case CultureIDs.De_DE: return "Es gibt eine Erinnerung, die für heute eingestellt ist und bis zum Ablaufdatum gültig ist";
|
package/lib/helper/helpers.js
CHANGED
|
@@ -17,6 +17,7 @@ const calcResponsiveSizes = (deviceType, desktopSize, tabletSize, mobileSize) =>
|
|
|
17
17
|
const taskModalSizes = (deviceType, formMode) => {
|
|
18
18
|
switch (formMode) {
|
|
19
19
|
case FormModes.Create:
|
|
20
|
+
case FormModes.Duplicate:
|
|
20
21
|
return {
|
|
21
22
|
width: calcResponsiveSizes(deviceType, '500px', '90%', '95%'),
|
|
22
23
|
height: calcResponsiveSizes(deviceType, '600px', '90%', '95%'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topconsultnpm/sdkui-react",
|
|
3
|
-
"version": "6.20.0-dev2.
|
|
3
|
+
"version": "6.20.0-dev2.52",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"lib"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@topconsultnpm/sdk-ts": "6.20.0-dev2.
|
|
43
|
+
"@topconsultnpm/sdk-ts": "6.20.0-dev2.13",
|
|
44
44
|
"buffer": "^6.0.3",
|
|
45
45
|
"devextreme": "25.2.4",
|
|
46
46
|
"devextreme-react": "25.2.4",
|