@topconsultnpm/sdkui-react 6.20.0-dev2.58 → 6.20.0-dev2.59
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/Styled.d.ts +3 -1
- package/lib/components/base/Styled.js +1 -1
- package/lib/components/features/documents/TMDcmtForm.js +18 -4
- package/lib/components/features/tasks/TMTaskForm.js +2 -6
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +1 -1
- package/lib/components/features/tasks/TMTaskFormUtils.js +27 -9
- package/lib/components/features/tasks/TMTasksView.js +3 -1
- package/lib/components/features/workflow/TMWorkflowPopup.js +1 -1
- package/lib/components/grids/TMBlogsPostUtils.js +2 -2
- package/lib/helper/SDKUI_Localizator.d.ts +1 -0
- package/lib/helper/SDKUI_Localizator.js +10 -0
- package/lib/helper/TMUtils.d.ts +5 -0
- package/lib/helper/TMUtils.js +8 -3
- package/package.json +1 -1
|
@@ -8,7 +8,9 @@ export declare const StyledMultiViewPanel: import("styled-components/dist/types"
|
|
|
8
8
|
export declare const StyledParagraph: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
|
|
9
9
|
export declare const StyledToolbarForm: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
10
|
export declare const ReferencesContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
-
export declare const StyledReferenceButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
11
|
+
export declare const StyledReferenceButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
|
|
12
|
+
$bgColor?: string;
|
|
13
|
+
}>> & string;
|
|
12
14
|
export declare const StyledPanelPage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
13
15
|
$isOpen?: boolean;
|
|
14
16
|
$padding?: string;
|
|
@@ -52,7 +52,7 @@ export const StyledReferenceButton = styled.button `
|
|
|
52
52
|
padding: 10px 25px;
|
|
53
53
|
border-radius: 20px;
|
|
54
54
|
border: none;
|
|
55
|
-
background-color: ${TMColors.button_floating_background};
|
|
55
|
+
background-color: ${({ $bgColor }) => $bgColor || TMColors.button_floating_background};
|
|
56
56
|
color: white;
|
|
57
57
|
font-size: 0.95rem;
|
|
58
58
|
font-weight: 500;
|
|
@@ -8,7 +8,7 @@ import { DeviceType, useDeviceType } from '../../base/TMDeviceProvider';
|
|
|
8
8
|
import { useDcmtOperations } from '../../../hooks/useDcmtOperations';
|
|
9
9
|
import { useRelatedDocuments } from '../../../hooks/useRelatedDocuments';
|
|
10
10
|
import { getWorkItemSetIDAsync, handleArchiveVisibility, searchResultToMetadataValues } from '../../../helper/queryHelper';
|
|
11
|
-
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch, deepCompare, IconCheck, IconActivity, TMImageLibrary, IconStar, IconRelation, IconInfo, IconArchiveDoc, IconDelete, IconPair, IconUnpair, IconArchiveMaster, IconArchiveDetail, getExceptionMessage, isApprovalWorkflowView, getDcmtCicoStatus, IconFileDots, IconCustom, buildWorkItemsFromWFCtrl, IconLock, getDcmtFormToolbarVisibility, TASK_MORE_INFO_PREFIX_NAME, taskModalSizes } from '../../../helper';
|
|
11
|
+
import { genUniqueId, IconShow, SDKUI_Localizator, updateMruTids, IconBoard, IconDcmtTypeSys, IconDetailDcmts, IconDownload, calcIsModified, IconMenuVertical, Globalization, getListMaxItems, getSystemMetadata, IconBoxArchiveIn, IconClear, IconUndo, SDKUI_Globals, IconPreview, isTaskMoreInfo, IconWorkflow, IconSearch, deepCompare, IconCheck, IconActivity, TMImageLibrary, IconStar, IconRelation, IconInfo, IconArchiveDoc, IconDelete, IconPair, IconUnpair, IconArchiveMaster, IconArchiveDetail, getExceptionMessage, isApprovalWorkflowView, getDcmtCicoStatus, IconFileDots, IconCustom, buildWorkItemsFromWFCtrl, IconLock, getDcmtFormToolbarVisibility, TASK_MORE_INFO_PREFIX_NAME, taskModalSizes, PDGS_COLORS } from '../../../helper';
|
|
12
12
|
import { hasDetailRelations, hasMasterRelations, isXMLFileExt } from '../../../helper/dcmtsHelper';
|
|
13
13
|
import { Gutters, TMColors } from '../../../utils/theme';
|
|
14
14
|
import { ReferencesContainer, StyledFormButtonsContainer, StyledLoadingContainer, StyledModalContainer, StyledReferenceButton, StyledSpinner, StyledToolbarCardContainer } from '../../base/Styled';
|
|
@@ -1899,11 +1899,25 @@ const TMDcmtFormActionButtons = (props) => {
|
|
|
1899
1899
|
}, children: `Ci sono ${moreInfoTasks?.length ?? 0} richieste di maggiori informazioni. ${SDKUI_Localizator.ManageFromTaskPanel}` }))), hasMoreInfo && hasApprove && _jsx(Divider, {}), hasApprove && (workItems.length === 1 ?
|
|
1900
1900
|
_jsx(WorkFlowOperationButtons, { dtd: fromDTD, deviceType: deviceType, onApprove: () => setShowApprovePopup(true), onSignApprove: handleSignApprove, onReject: () => setShowRejectPopup(true), onReAssign: () => setShowReAssignPopup(true), onMoreInfo: () => setShowMoreInfoPopup(true) })
|
|
1901
1901
|
:
|
|
1902
|
-
_jsxs("div", { style: { padding: 10, color: 'white', maxWidth: '180px', borderRadius: 10, background: '#1B1464 0% 0% no-repeat padding-box', border: '1px solid #FFFFFF' }, children: [`Questo documento è associato a ${workItems.length} workitem.`, _jsx("br", {}), `Per approvare, vai alla pagina "Approvazione workflow".`] })), (hasApprove && hasReferences) || (hasMoreInfo && !hasApprove && hasReferences) ? (_jsx(Divider, {})) : null, hasReferences && (_jsx(ReferencesContainer, { children: dcmtReferences
|
|
1903
|
-
?.filter(ref => ref.objClass === ObjectClasses.Dossier || ref.objClass === ObjectClasses.WorkingGroup)
|
|
1902
|
+
_jsxs("div", { style: { padding: 10, color: 'white', maxWidth: '180px', borderRadius: 10, background: '#1B1464 0% 0% no-repeat padding-box', border: '1px solid #FFFFFF' }, children: [`Questo documento è associato a ${workItems.length} workitem.`, _jsx("br", {}), `Per approvare, vai alla pagina "Approvazione workflow".`] })), (hasApprove && hasReferences) || (hasMoreInfo && !hasApprove && hasReferences) ? (_jsx(Divider, {})) : null, hasReferences && (_jsx(ReferencesContainer, { children: dcmtReferences?.filter(ref => ref.objClass === ObjectClasses.Dossier || ref.objClass === ObjectClasses.WorkingGroup)
|
|
1904
1903
|
.map((ref, index) => {
|
|
1905
1904
|
const mapEntry = referenceActionMap[String(ref.objClass)];
|
|
1906
1905
|
const label = mapEntry?.label ?? 'Vai a riferimento';
|
|
1907
|
-
|
|
1906
|
+
let backgroundColor;
|
|
1907
|
+
switch (ref.objClass) {
|
|
1908
|
+
case ObjectClasses.WorkingGroup:
|
|
1909
|
+
backgroundColor = PDGS_COLORS.WORKING_GROUP;
|
|
1910
|
+
break;
|
|
1911
|
+
case ObjectClasses.Dossier:
|
|
1912
|
+
backgroundColor = PDGS_COLORS.DOSSIER;
|
|
1913
|
+
break;
|
|
1914
|
+
case ObjectClasses.Document:
|
|
1915
|
+
backgroundColor = PDGS_COLORS.DOCUMENT;
|
|
1916
|
+
break;
|
|
1917
|
+
default:
|
|
1918
|
+
backgroundColor = "#C2388B";
|
|
1919
|
+
break;
|
|
1920
|
+
}
|
|
1921
|
+
return (_jsxs(StyledReferenceButton, { onClick: () => handleNavigateToReference(ref), onDoubleClick: (e) => { e.preventDefault(); e.stopPropagation(); }, "$bgColor": backgroundColor, children: [_jsx("span", { children: label }), _jsx("span", { children: `"${ref.objName}"` })] }, `ref-${index}-${ref.objID}`));
|
|
1908
1922
|
}) }))] });
|
|
1909
1923
|
};
|
|
@@ -285,15 +285,11 @@ const TMTaskForm = (props) => {
|
|
|
285
285
|
console.warn(`Unhandled object type: ${ref.objClass}`);
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
|
-
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: [(
|
|
288
|
+
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, requestMoreInfo: requestMoreInfo }), _jsx(RenderDescriptionField, { fieldsReadOnly: fieldsReadOnly, setFormData: setFormData, formData: formData, formDataOrig: formDataOrig, validationItems: validationItems }), _jsx(TaskAssigneeField, { label: requestMoreInfo ? SDKUI_Localizator.RequestTo : undefined, formMode: formMode, formData: formData, formDataOrig: formDataOrig, taskContext: taskContext, validationItems: validationItems, fieldsReadOnly: fieldsReadOnly, usersList: usersList, onValueChanged: (newValue) => {
|
|
289
289
|
if (newValue === undefined)
|
|
290
290
|
return;
|
|
291
291
|
setFormData({ ...formData ?? {}, toID: newValue[0] });
|
|
292
|
-
} }), _jsx(
|
|
293
|
-
if (newValue === undefined)
|
|
294
|
-
return;
|
|
295
|
-
setFormData({ ...formData ?? {}, toID: newValue[0] });
|
|
296
|
-
} }), _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 })] }), (!requestMoreInfo && 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) => {
|
|
292
|
+
} }), _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) => {
|
|
297
293
|
if (newValue === undefined)
|
|
298
294
|
return;
|
|
299
295
|
setFormData({ ...formData ?? {}, toID: newValue[0] });
|
|
@@ -50,7 +50,7 @@ interface RenderDateFieldProps extends RenderFieldProps {
|
|
|
50
50
|
label?: string;
|
|
51
51
|
onContentReady?: () => void;
|
|
52
52
|
}
|
|
53
|
-
export declare const RenderNameField: ({ requestMoreInfo,
|
|
53
|
+
export declare const RenderNameField: ({ requestMoreInfo, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }: RenderFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
export declare const RenderDescriptionField: ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }: RenderFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
export declare const RenderPriorityField: ({ formData, formDataOrig, fieldsReadOnly, onPriorityValueChange }: RenderPriorityFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
56
|
export declare const RenderStartDateField: ({ label, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }: RenderDateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
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
|
-
import { calcResponsiveSizes, DateDisplayTypes, getPdgsIconMap, IconSave, SDKUI_Localizator, TASK_MORE_INFO_PREFIX_NAME } from "../../../helper";
|
|
5
|
+
import { calcResponsiveSizes, DateDisplayTypes, getPdgsIconMap, IconSave, PDGS_COLORS, SDKUI_Localizator, TASK_MORE_INFO_PREFIX_NAME } from "../../../helper";
|
|
6
6
|
import { areDifferentIDs, formatDate, getOriginLabel, getPriorityLocalizatorValue, getPriorityLocalizatorValues, getStatusLocalizatorValue } from "./TMTasksUtils";
|
|
7
7
|
import TMTooltip from "../../base/TMTooltip";
|
|
8
8
|
import TMTextBox from "../../editors/TMTextBox";
|
|
@@ -134,8 +134,28 @@ export const TaskFormContextualAttachments = (props) => {
|
|
|
134
134
|
};
|
|
135
135
|
const TaskPdgOriginNavigator = (props) => {
|
|
136
136
|
const { formMode, formData, isMobile, gotoPDGExtendedLabelClickCallback } = props;
|
|
137
|
+
let backgroundColor;
|
|
138
|
+
let backgroundHoverColor;
|
|
139
|
+
switch (formData?.pdG) {
|
|
140
|
+
case PdGs.WG:
|
|
141
|
+
backgroundColor = PDGS_COLORS.WORKING_GROUP;
|
|
142
|
+
backgroundHoverColor = "#007300";
|
|
143
|
+
break;
|
|
144
|
+
case PdGs.CF:
|
|
145
|
+
backgroundColor = PDGS_COLORS.DOSSIER;
|
|
146
|
+
backgroundHoverColor = "#b94700";
|
|
147
|
+
break;
|
|
148
|
+
case PdGs.DT:
|
|
149
|
+
backgroundColor = PDGS_COLORS.DOCUMENT;
|
|
150
|
+
backgroundHoverColor = "#8c6700";
|
|
151
|
+
break;
|
|
152
|
+
default:
|
|
153
|
+
backgroundColor = "#C2388B";
|
|
154
|
+
backgroundHoverColor = "#A12D78";
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
137
157
|
return formMode === FormModes.Update && formData?.pdG && formData?.iD1Name && (_jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 16, padding: '8px 0' }, children: _jsx("div", { style: { width: "100%", display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: _jsxs("div", { onClick: () => formData.pdG !== PdGs.None ? gotoPDGExtendedLabelClickCallback() : null, style: {
|
|
138
|
-
backgroundColor:
|
|
158
|
+
backgroundColor: backgroundColor,
|
|
139
159
|
color: "#fff",
|
|
140
160
|
padding: "10px 16px",
|
|
141
161
|
borderRadius: "20px",
|
|
@@ -151,11 +171,11 @@ const TaskPdgOriginNavigator = (props) => {
|
|
|
151
171
|
gap: "8px",
|
|
152
172
|
}, onMouseEnter: e => {
|
|
153
173
|
if (formData.pdG !== PdGs.None)
|
|
154
|
-
e.currentTarget.style.backgroundColor =
|
|
174
|
+
e.currentTarget.style.backgroundColor = backgroundHoverColor;
|
|
155
175
|
e.currentTarget.style.transform = 'scale(1.05)';
|
|
156
176
|
}, onMouseLeave: e => {
|
|
157
177
|
if (formData.pdG !== PdGs.None)
|
|
158
|
-
e.currentTarget.style.backgroundColor =
|
|
178
|
+
e.currentTarget.style.backgroundColor = backgroundColor;
|
|
159
179
|
e.currentTarget.style.transform = 'scale(1)';
|
|
160
180
|
}, children: [_jsxs("span", { style: {
|
|
161
181
|
flex: 1,
|
|
@@ -169,9 +189,7 @@ const TaskPdgOriginNavigator = (props) => {
|
|
|
169
189
|
if (!originLabel)
|
|
170
190
|
return null;
|
|
171
191
|
const maxLength = isMobile ? 10 : 25;
|
|
172
|
-
const displayText = originLabel.length > maxLength
|
|
173
|
-
? originLabel.slice(0, maxLength) + "..."
|
|
174
|
-
: originLabel;
|
|
192
|
+
const displayText = originLabel.length > maxLength ? originLabel.slice(0, maxLength) + "..." : originLabel;
|
|
175
193
|
return _jsxs("span", { children: ["\u201C", displayText, "\u201D"] });
|
|
176
194
|
})()] }), _jsx(TMTooltip, { content: _jsxs("div", { style: { textAlign: "left" }, children: [formData.pdG && (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
|
|
177
195
|
display: "flex",
|
|
@@ -345,10 +363,10 @@ const TaskFormResponseComment = (props) => {
|
|
|
345
363
|
// Stile comune per i container dei campi
|
|
346
364
|
const fieldContainerStyle = { width: '100%' };
|
|
347
365
|
const fieldContainerWithMarginStyle = { width: '100%', marginTop: 10 };
|
|
348
|
-
export const RenderNameField = ({ requestMoreInfo = false,
|
|
366
|
+
export const RenderNameField = ({ requestMoreInfo = false, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }) => {
|
|
349
367
|
// Se requestMoreInfo, il valore viene visualizzato senza prefisso nel campo di input
|
|
350
368
|
const displayValue = requestMoreInfo && formData?.name?.startsWith(TASK_MORE_INFO_PREFIX_NAME) ? formData.name.substring(TASK_MORE_INFO_PREFIX_NAME.length) : formData?.name ?? '';
|
|
351
|
-
return (_jsxs("div", { style: fieldContainerStyle, children: [_jsx(TMTextBox, { label:
|
|
369
|
+
return (_jsxs("div", { style: fieldContainerStyle, children: [_jsx(TMTextBox, { label: SDKUI_Localizator.Subject, value: displayValue, readOnly: fieldsReadOnly.name, autoFocus: true, maxLength: 100, isModifiedWhen: formData?.name !== formDataOrig?.name, onValueChanged: (e) => {
|
|
352
370
|
const newValue = e.target.value;
|
|
353
371
|
if (requestMoreInfo) {
|
|
354
372
|
setFormData({ ...formData ?? {}, name: `${TASK_MORE_INFO_PREFIX_NAME}${newValue}` });
|
|
@@ -195,6 +195,7 @@ const TMTasksView = (props) => {
|
|
|
195
195
|
}
|
|
196
196
|
await deleteTaskByIdsCallback(deletedTaskIds);
|
|
197
197
|
handleSelectionChange([]);
|
|
198
|
+
handleFocusedRowChange(undefined);
|
|
198
199
|
setWaitPanelTextPrimary('');
|
|
199
200
|
setWaitPanelMaxValuePrimary(0);
|
|
200
201
|
setWaitPanelValuePrimary(0);
|
|
@@ -254,6 +255,7 @@ const TMTasksView = (props) => {
|
|
|
254
255
|
}
|
|
255
256
|
await getAllTasks().then(() => {
|
|
256
257
|
handleSelectionChange([]);
|
|
258
|
+
handleFocusedRowChange(undefined);
|
|
257
259
|
setWaitPanelTextPrimary('');
|
|
258
260
|
setWaitPanelMaxValuePrimary(0);
|
|
259
261
|
setWaitPanelValuePrimary(0);
|
|
@@ -460,7 +462,7 @@ const TMTasksView = (props) => {
|
|
|
460
462
|
},
|
|
461
463
|
{
|
|
462
464
|
dataField: "name",
|
|
463
|
-
caption: SDKUI_Localizator.
|
|
465
|
+
caption: SDKUI_Localizator.Subject,
|
|
464
466
|
dataType: 'string',
|
|
465
467
|
cellRender: cellDefaultRender,
|
|
466
468
|
headerCellRender: (e) => _jsx(RenderCustomHeader, { data: e }),
|
|
@@ -310,5 +310,5 @@ export const WorkFlowMoreInfoPopUp = (props) => {
|
|
|
310
310
|
return;
|
|
311
311
|
fetchData();
|
|
312
312
|
}, [TID]);
|
|
313
|
-
return (getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback && handleNavigateToWGs && handleNavigateToDossiers && (_jsx(TMTaskForm, { taskContext: taskContext, id: -1, width: taskModalSizes(deviceType, FormModes.Create).width, height: taskModalSizes(deviceType, FormModes.Create).height, title: SDKUI_Localizator.MoreInformation, isModal: true,
|
|
313
|
+
return (getAllTasks && deleteTaskByIdsCallback && addTaskCallback && editTaskCallback && handleNavigateToWGs && handleNavigateToDossiers && (_jsx(TMTaskForm, { taskContext: taskContext, id: -1, showBackButton: false, width: taskModalSizes(deviceType, FormModes.Create).width, height: taskModalSizes(deviceType, FormModes.Create).height, title: SDKUI_Localizator.MoreInformation, isModal: true, formMode: FormModes.Create, requestMoreInfo: true, isContextualCreate: true, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, visualizedTasks: [], currentTask: null, selectedRowKeys: [], onClose: onClose, usersList: users, onSaved: onSaved })));
|
|
314
314
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { DcmtTypeListCacheService } from "@topconsultnpm/sdk-ts";
|
|
3
|
-
import { getAvatarColor, extractInitialsFromName, SDKUI_Localizator, formatBytes, IconMenuCAWorkingGroups, IconCADossier, Globalization } from "../../helper";
|
|
3
|
+
import { getAvatarColor, extractInitialsFromName, SDKUI_Localizator, formatBytes, IconMenuCAWorkingGroups, IconCADossier, Globalization, PDGS_COLORS } from "../../helper";
|
|
4
4
|
import { TMColors } from "../../utils/theme";
|
|
5
5
|
import TMTooltip from "../base/TMTooltip";
|
|
6
6
|
export const DRAFT_TYPE_TID = 6;
|
|
@@ -167,7 +167,7 @@ export const getDcmtTypeDescriptor = async (blogPosts) => {
|
|
|
167
167
|
};
|
|
168
168
|
export const BlogPostHomeHeader = (header, classId, isSelected, searchText, headerClickCallback) => {
|
|
169
169
|
const isWorkGroup = classId === 'WG';
|
|
170
|
-
const iconColor = isSelected ? '#ffffff' : isWorkGroup ?
|
|
170
|
+
const iconColor = isSelected ? '#ffffff' : isWorkGroup ? PDGS_COLORS.WORKING_GROUP : PDGS_COLORS.DOSSIER;
|
|
171
171
|
return (_jsxs("div", { style: {
|
|
172
172
|
display: "flex",
|
|
173
173
|
alignItems: "center",
|
|
@@ -216,6 +216,7 @@ export declare class SDKUI_Localizator {
|
|
|
216
216
|
static get DuplicateDocument(): string;
|
|
217
217
|
static get DuplicateNameError(): "Der Name existiert bereits in der Anmeldehistorie. Bitte wählen Sie einen anderen Namen" | "The name already exists in the login history. Please choose a different nam" | "El nombre ya existe en el historial de inicio de sesión. Por favor, elija un nombre diferente" | "Le nom existe déjà dans l'historique de connexion. Veuillez choisir un autre nom" | "O nome já existe no histórico de login. Por favor, escolha um nome diferente" | "Il nome esiste già nella cronologia di accesso. Si prega di scegliere un nome diverso";
|
|
218
218
|
static get DuplicationOperationInterrupted(): "Duplikationsvorgang abgebrochen" | "Duplication operation interrupted" | "Operación de duplicación interrumpida" | "Opération de duplication interrompue" | "Operação de duplicação interrompida" | "Operazione di duplicazione interrotta";
|
|
219
|
+
static get DuplicateActivity(): string;
|
|
219
220
|
static get Edit_ConfirmFor1(): "Möchten Sie '{{0}}' ändern?" | "Are you sure you want to modify '{{0}}'?" | "¿Estás seguro de que deseas modificar '{{0}}'?" | "Êtes-vous sûr de vouloir modifier '{{0}}'?" | "Você tem certeza que deseja modificar '{{0}}'?" | "Sei sicuro di voler modificare '{{0}}'?";
|
|
220
221
|
static get Edit_ConfirmForN(): "{{0}} ausgewählte Objekte. Alle ändern?" | "{{0}} selected objects. Modify them all?" | "{{0}} objetos seleccionados. ¿Modificar todos?" | "{{0}} objets sélectionnés. Voulez-vous tous les modifier?" | "{{0}} objetos selecionados. Modificá-los todos?" | "{{0}} oggetti selezionati. Modificare tutti?";
|
|
221
222
|
static get EditorConfiguration(): string;
|
|
@@ -2115,6 +2115,16 @@ export class SDKUI_Localizator {
|
|
|
2115
2115
|
default: return "Operazione di duplicazione interrotta";
|
|
2116
2116
|
}
|
|
2117
2117
|
}
|
|
2118
|
+
static get DuplicateActivity() {
|
|
2119
|
+
switch (this._cultureID) {
|
|
2120
|
+
case CultureIDs.De_DE: return "Aktivität duplizieren";
|
|
2121
|
+
case CultureIDs.En_US: return "Duplicate activity";
|
|
2122
|
+
case CultureIDs.Es_ES: return "Duplicar actividad";
|
|
2123
|
+
case CultureIDs.Fr_FR: return "Dupliquer l'activité";
|
|
2124
|
+
case CultureIDs.Pt_PT: return "Duplicar atividade";
|
|
2125
|
+
default: return "Duplica attività";
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2118
2128
|
static get Edit_ConfirmFor1() {
|
|
2119
2129
|
switch (this._cultureID) {
|
|
2120
2130
|
case CultureIDs.De_DE: return "Möchten Sie '{{0}}' ändern?";
|
package/lib/helper/TMUtils.d.ts
CHANGED
|
@@ -23,6 +23,11 @@ interface TabItemProps {
|
|
|
23
23
|
export declare const StyledTabItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TabItemProps>> & string;
|
|
24
24
|
export declare const StyledTabIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, TabItemProps>> & string;
|
|
25
25
|
export declare const TMCountBadge: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
26
|
+
export declare const PDGS_COLORS: {
|
|
27
|
+
DOSSIER: string;
|
|
28
|
+
DOCUMENT: string;
|
|
29
|
+
WORKING_GROUP: string;
|
|
30
|
+
};
|
|
26
31
|
export declare const getPdgsIconMap: (fontSize?: number) => Map<PdGs, JSX.Element>;
|
|
27
32
|
/**
|
|
28
33
|
* Analizza e configura i parametri delle informazioni di firma per un documento.
|
package/lib/helper/TMUtils.js
CHANGED
|
@@ -201,13 +201,18 @@ export const StyledTabIcon = styled.i `
|
|
|
201
201
|
transition: color 0.2s ease;
|
|
202
202
|
`;
|
|
203
203
|
export const TMCountBadge = styled.div ` background-color: #ff5252; color: white; border-radius: 999px; margin-left: 8px; font-size: 0.7rem; line-height: 1; min-height: 20px; min-width: 20px; display: flex ; align-items: center; justify-content: center; `;
|
|
204
|
+
export const PDGS_COLORS = {
|
|
205
|
+
DOSSIER: '#e65b00',
|
|
206
|
+
DOCUMENT: '#b38600',
|
|
207
|
+
WORKING_GROUP: '#009700',
|
|
208
|
+
};
|
|
204
209
|
export const getPdgsIconMap = (fontSize = 20) => {
|
|
205
210
|
return new Map([
|
|
206
211
|
[PdGs.None, _jsx("span", {}, "PdGs-None")],
|
|
207
|
-
[PdGs.CF, _jsx(IconCADossier, { color:
|
|
208
|
-
[PdGs.DT, _jsx("i", { style: { fontSize, color:
|
|
212
|
+
[PdGs.CF, _jsx(IconCADossier, { color: PDGS_COLORS.DOSSIER, fontSize: 28 }, "PdGs-CF")],
|
|
213
|
+
[PdGs.DT, _jsx("i", { style: { fontSize, color: PDGS_COLORS.DOCUMENT }, className: "dx-icon-file" }, "PdGs-DT")],
|
|
209
214
|
[PdGs.WF, _jsx("i", { style: { fontSize }, className: "dx-icon-box" }, "PdGs-WF")],
|
|
210
|
-
[PdGs.WG, _jsx(IconMenuCAWorkingGroups, { color:
|
|
215
|
+
[PdGs.WG, _jsx(IconMenuCAWorkingGroups, { color: PDGS_COLORS.WORKING_GROUP, fontSize: 28 }, "PdGs-WG")],
|
|
211
216
|
]);
|
|
212
217
|
};
|
|
213
218
|
/**
|