@topconsultnpm/sdkui-react 6.20.0-dev2.57 → 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 +28 -7
- package/lib/components/features/search/TMSearchResult.js +3 -3
- package/lib/components/features/tasks/TMTaskForm.d.ts +1 -0
- package/lib/components/features/tasks/TMTaskForm.js +12 -4
- package/lib/components/features/tasks/TMTaskFormUtils.d.ts +8 -3
- package/lib/components/features/tasks/TMTaskFormUtils.js +46 -14
- package/lib/components/features/tasks/TMTasksUtils.d.ts +1 -1
- package/lib/components/features/tasks/TMTasksUtils.js +7 -2
- package/lib/components/features/tasks/TMTasksView.js +3 -1
- package/lib/components/features/workflow/TMWorkflowPopup.d.ts +19 -3
- package/lib/components/features/workflow/TMWorkflowPopup.js +14 -93
- package/lib/components/grids/TMBlogsPost.js +7 -7
- package/lib/components/grids/TMBlogsPostUtils.js +2 -2
- package/lib/helper/SDKUI_Localizator.d.ts +4 -0
- package/lib/helper/SDKUI_Localizator.js +40 -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';
|
|
@@ -1566,6 +1566,13 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1566
1566
|
TMSpinner.hide();
|
|
1567
1567
|
}
|
|
1568
1568
|
}, [moreInfoTasks, onTaskCompleted, onClose]);
|
|
1569
|
+
// Memoized props for TMBlogCommentForm to avoid unnecessary re-renders
|
|
1570
|
+
const blogCommentFormContext = useMemo(() => ({ engine: 'SearchEngine', object: { tid: TID, did: DID } }), [TID, DID]);
|
|
1571
|
+
const handleBlogCommentFormClose = useCallback(() => {
|
|
1572
|
+
setShowCommentForm(false);
|
|
1573
|
+
}, []);
|
|
1574
|
+
const emptyParticipants = useMemo(() => [], []);
|
|
1575
|
+
const emptyArchivedDocumentsFileItems = useMemo(() => [], []);
|
|
1569
1576
|
const handleSignApprove = useCallback(() => {
|
|
1570
1577
|
if (onOpenS4TViewerRequest && TID && DID) {
|
|
1571
1578
|
onOpenS4TViewerRequest([{ TID, DID }]);
|
|
@@ -1636,8 +1643,8 @@ const TMDcmtForm = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTa
|
|
|
1636
1643
|
isEditable: true,
|
|
1637
1644
|
value: FormulaHelper.addFormulaTag(newFormula.expression)
|
|
1638
1645
|
}));
|
|
1639
|
-
} }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowMoreInfoPopup(false), getAllTasks: getAllTasks }), (isModal && onClose) && _jsx("div", { id: "TMDcmtFormShowConfirmForClose-" + id })] }) }), _jsx(TMToppyDraggableHelpCenter, { isVisible: isToppyVisible, content: _jsx(TMDcmtFormActionButtons, { showToppyForApprove: showToppyForApprove, workItems: workItems, deviceType: deviceType, isMobile: isMobile, handleSignApprove: handleSignApprove, setShowApprovePopup: setShowApprovePopup, setShowRejectPopup: setShowRejectPopup, setShowReAssignPopup: setShowReAssignPopup, setShowMoreInfoPopup: setShowMoreInfoPopup, fromDTD: fromDTD, showToppyForCompleteMoreInfo: showToppyForCompleteMoreInfo, moreInfoTasks: moreInfoTasks, setShowCommentForm: setShowCommentForm, showToppyForReferences: showToppyForReferences, dcmtReferences: dcmtReferences, referenceActionMap: referenceActionMap, handleNavigateToReference: handleNavigateToReference, setShowMoreInfoTaskPopup: setShowMoreInfoTaskPopup, setShowMoreInfoTaskTask: setShowMoreInfoTaskTask }) })] }), (showCommentForm && TID && DID) &&
|
|
1640
|
-
_jsx(TMBlogCommentForm, { maxLength: 500, context:
|
|
1646
|
+
} }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { fromDTD: fromDTD, deviceType: deviceType, onCompleted: handleWFOperationCompleted, TID: approvalVID, DID: DID, onClose: () => setShowMoreInfoPopup(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, triggerBlogRefresh: triggerBlogRefresh }), (isModal && onClose) && _jsx("div", { id: "TMDcmtFormShowConfirmForClose-" + id })] }) }), _jsx(TMToppyDraggableHelpCenter, { isVisible: isToppyVisible, content: _jsx(TMDcmtFormActionButtons, { showToppyForApprove: showToppyForApprove, workItems: workItems, deviceType: deviceType, isMobile: isMobile, handleSignApprove: handleSignApprove, setShowApprovePopup: setShowApprovePopup, setShowRejectPopup: setShowRejectPopup, setShowReAssignPopup: setShowReAssignPopup, setShowMoreInfoPopup: setShowMoreInfoPopup, fromDTD: fromDTD, showToppyForCompleteMoreInfo: showToppyForCompleteMoreInfo, moreInfoTasks: moreInfoTasks, setShowCommentForm: setShowCommentForm, showToppyForReferences: showToppyForReferences, dcmtReferences: dcmtReferences, referenceActionMap: referenceActionMap, handleNavigateToReference: handleNavigateToReference, setShowMoreInfoTaskPopup: setShowMoreInfoTaskPopup, setShowMoreInfoTaskTask: setShowMoreInfoTaskTask }) })] }), (showCommentForm && TID && DID) &&
|
|
1647
|
+
_jsx(TMBlogCommentForm, { maxLength: 500, context: blogCommentFormContext, onClose: handleBlogCommentFormClose, onCustomSave: onBlogCommentFormCustomSave, participants: emptyParticipants, showAttachmentsSection: false, allArchivedDocumentsFileItems: emptyArchivedDocumentsFileItems }), isOpenDetails &&
|
|
1641
1648
|
_jsx(StyledModalContainer, { children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, isForMaster: false, inputDcmts: getSelectionDcmtInfo(), allowNavigation: allowNavigation, canNext: canNext, canPrev: canPrev, onNext: onNext, onPrev: onPrev, onBack: () => setIsOpenDetails(false), allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }), isOpenMaster &&
|
|
1642
1649
|
_jsxs(StyledModalContainer, { children: [_jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: getSelectionDcmtInfo(), isForMaster: true, allowNavigation: allowNavigation, canNext: canNext, canPrev: canPrev, onNext: onNext, onPrev: onPrev, onBack: () => setIsOpenMaster(false), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), secondaryMasterDcmts.length > 0 && secondaryMasterDcmts.map((dcmt, index) => {
|
|
1643
1650
|
return (_jsx(StyledModalContainer, { children: _jsx(TMMasterDetailDcmts, { deviceType: deviceType, inputDcmts: [dcmt], isForMaster: true, allowNavigation: false, onBack: () => handleRemoveItem(dcmt.TID, dcmt.DID), appendMasterDcmts: handleAddItem, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }) }, `${index}-${dcmt.DID}`));
|
|
@@ -1890,13 +1897,27 @@ const TMDcmtFormActionButtons = (props) => {
|
|
|
1890
1897
|
gap: '10px',
|
|
1891
1898
|
cursor: 'default',
|
|
1892
1899
|
}, children: `Ci sono ${moreInfoTasks?.length ?? 0} richieste di maggiori informazioni. ${SDKUI_Localizator.ManageFromTaskPanel}` }))), hasMoreInfo && hasApprove && _jsx(Divider, {}), hasApprove && (workItems.length === 1 ?
|
|
1893
|
-
_jsx(WorkFlowOperationButtons, { deviceType: deviceType, onApprove: () => setShowApprovePopup(true), onSignApprove: handleSignApprove, onReject: () => setShowRejectPopup(true), onReAssign: () => setShowReAssignPopup(true), onMoreInfo: () => setShowMoreInfoPopup(true)
|
|
1900
|
+
_jsx(WorkFlowOperationButtons, { dtd: fromDTD, deviceType: deviceType, onApprove: () => setShowApprovePopup(true), onSignApprove: handleSignApprove, onReject: () => setShowRejectPopup(true), onReAssign: () => setShowReAssignPopup(true), onMoreInfo: () => setShowMoreInfoPopup(true) })
|
|
1894
1901
|
:
|
|
1895
|
-
_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
|
|
1896
|
-
?.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)
|
|
1897
1903
|
.map((ref, index) => {
|
|
1898
1904
|
const mapEntry = referenceActionMap[String(ref.objClass)];
|
|
1899
1905
|
const label = mapEntry?.label ?? 'Vai a riferimento';
|
|
1900
|
-
|
|
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}`));
|
|
1901
1922
|
}) }))] });
|
|
1902
1923
|
};
|
|
@@ -617,13 +617,13 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
617
617
|
_jsx(TMLayoutItem, { children: _jsx(TMSearchResultSelector, { searchResults: currentSearchResults, disableAccordionIfSingleCategory: disableAccordionIfSingleCategory, selectedTID: selectedSearchResultTID, selectedSearchResult: selectedSearchResult, autoSelectFirst: !isMobile || currentSearchResults.length === 1, onSelectionChanged: onSearchResultSelectionChanged }) })
|
|
618
618
|
:
|
|
619
619
|
_jsx(_Fragment, {}), _jsx(TMLayoutItem, { children: _jsx(TMSearchResultGrid, { showSearch: showSearch, fromDTD: fromDTD, allUsers: allUsers, inputFocusedItem: focusedItem, inputSelectedItems: selectedItems, searchResult: searchResults.length > 1 ? selectedSearchResult : searchResults[0], lastUpdateSearchTime: lastUpdateSearchTime, openInOffice: openInOffice, onDblClick: () => openFormHandler(LayoutModes.Update), floatingMenuItems: floatingMenuItems, onSelectionChanged: (items) => { setSelectedItems(items); }, onVisibleItemChanged: setVisibleItems, onFocusedItemChanged: setFocusedItem, onDownloadDcmtsAsync: async (inputDcmts, downloadType, downloadMode, _y, confirmAttachments) => await downloadDcmtsAsync(inputDcmts, downloadType, downloadMode, onFileOpened, confirmAttachments), showExportForm: showExportForm, onCloseExportForm: onCloseExportForm }) })] }), allowFloatingBar && showFloatingBar && deviceType !== DeviceType.MOBILE &&
|
|
620
|
-
_jsx(TMFloatingMenuBar, { containerRef: floatingBarContainerRef, contextMenuItems: floatingMenuItems, isConstrained: true, defaultPosition: { x: 1, y: 88 }, defaultPinnedItems: ['rel-det', 'rel-mst', 'dl'], defaultOrientation: 'horizontal', hasContextMenu: false, pinnedItemIds: pinnedItemIds, onPinChange: setPinnedItemIds })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { TID: focusedItem?.TID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: onWFOperationCompleted, onClose: () => setShowMoreInfoPopup(false), getAllTasks: getAllTasks }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${getSelectionDcmtInfo().length} documenti selezionati)`, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
|
620
|
+
_jsx(TMFloatingMenuBar, { containerRef: floatingBarContainerRef, contextMenuItems: floatingMenuItems, isConstrained: true, defaultPosition: { x: 1, y: 88 }, defaultPinnedItems: ['rel-det', 'rel-mst', 'dl'], defaultOrientation: 'horizontal', hasContextMenu: false, pinnedItemIds: pinnedItemIds, onPinChange: setPinnedItemIds })] }), showApprovePopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 0, onClose: () => setShowApprovePopup(false) }), showRejectPopup && _jsx(WorkFlowApproveRejectPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), isReject: 1, onClose: () => setShowRejectPopup(false) }), showReAssignPopup && _jsx(WorkFlowReAssignPopUp, { deviceType: deviceType, onCompleted: onWFOperationCompleted, selectedItems: getSelectedDcmtsOrFocused(selectedItems, focusedItem), onClose: () => setShowReAssignPopup(false) }), showMoreInfoPopup && _jsx(WorkFlowMoreInfoPopUp, { fromDTD: fromDTD, TID: focusedItem?.TID, DID: focusedItem?.DID, deviceType: deviceType, onCompleted: onWFOperationCompleted, onClose: () => setShowMoreInfoPopup(false), getAllTasks: getAllTasks, triggerBlogRefresh: triggerBlogRefresh }), isOpenBatchUpdate && _jsx(TMBatchUpdateForm, { isModal: true, titleModal: `${SDKUI_Localizator.BatchUpdate} (${getSelectionDcmtInfo().length} documenti selezionati)`, inputDcmts: getSelectionDcmtInfo(), TID: focusedItem ? focusedItem?.TID : selectedItems[0]?.TID, DID: focusedItem ? focusedItem?.DID : selectedItems[0]?.DID, onBack: () => {
|
|
621
621
|
setIsOpenBatchUpdate(false);
|
|
622
622
|
}, onSavedCallbackAsync: async () => {
|
|
623
623
|
setIsOpenBatchUpdate(false);
|
|
624
624
|
setIsModifiedBatchUpdate(false);
|
|
625
625
|
await refreshSelectionDataRowsAsync();
|
|
626
|
-
}, onStatusChanged: (isModified) => { setIsModifiedBatchUpdate(isModified); } }), _jsx(TMToppyDraggableHelpCenter, { usePortal: toppyHelpCenterUsePortal, isVisible: isToppyHelpCenterVisible, content: _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: _jsx(WorkFlowOperationButtons, { deviceType: deviceType, onApprove: () => {
|
|
626
|
+
}, onStatusChanged: (isModified) => { setIsModifiedBatchUpdate(isModified); } }), _jsx(TMToppyDraggableHelpCenter, { usePortal: toppyHelpCenterUsePortal, isVisible: isToppyHelpCenterVisible, content: _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '10px' }, children: _jsx(WorkFlowOperationButtons, { dtd: fromDTD, deviceType: deviceType, onApprove: () => {
|
|
627
627
|
setShowApprovePopup(true);
|
|
628
628
|
}, onSignApprove: () => {
|
|
629
629
|
handleSignApprove();
|
|
@@ -633,7 +633,7 @@ const TMSearchResult = ({ allTasks = [], getAllTasks, deleteTaskByIdsCallback, a
|
|
|
633
633
|
setShowReAssignPopup(true);
|
|
634
634
|
}, onMoreInfo: () => {
|
|
635
635
|
setShowMoreInfoPopup(true);
|
|
636
|
-
}, approveDisable: selectedDocs.length === 0, signApproveDisable: disableSignApproveDisable, rejectDisable: selectedDocs.length === 0, reassignDisable: selectedDocs.length === 0, infoDisable: selectedDocs.length !== 1
|
|
636
|
+
}, approveDisable: selectedDocs.length === 0, signApproveDisable: disableSignApproveDisable, rejectDisable: selectedDocs.length === 0, reassignDisable: selectedDocs.length === 0, infoDisable: selectedDocs.length !== 1 }) }) })] }), _jsx(ConfirmFormatDialog, {}), _jsx(ConfirmAttachmentsDialog, {}), customButton && _jsx(TMCustomButton, { button: customButton, formData: currentMetadataValues, selectedItems: selectedItems, onClose: () => setCustomButton(undefined) }), showRelatedDcmtsChooser &&
|
|
637
637
|
_jsx(TMChooserForm, { dataSource: relatedDcmtsChooserDataSource, onChoose: async (selectedRelation) => {
|
|
638
638
|
try {
|
|
639
639
|
setShowRelatedDcmtsChooser(false);
|
|
@@ -13,6 +13,7 @@ export interface TMTaskFormProps {
|
|
|
13
13
|
title: string;
|
|
14
14
|
isModal: boolean;
|
|
15
15
|
formMode: FormModes;
|
|
16
|
+
requestMoreInfo?: boolean;
|
|
16
17
|
visualizedTasks: Array<TaskDescriptor>;
|
|
17
18
|
currentTask: TaskDescriptor | null;
|
|
18
19
|
setCurrentTask?: React.Dispatch<React.SetStateAction<TaskDescriptor | null>>;
|
|
@@ -16,9 +16,9 @@ import { getCurrentUserTaskRole, RenderDescriptionField, RenderEndDateField, Ren
|
|
|
16
16
|
const TMTaskForm = (props) => {
|
|
17
17
|
// Custom hook to manage workflow approval data
|
|
18
18
|
const { refreshWorkflowApprove } = useWorkflowApprove();
|
|
19
|
-
const validator = async (taskDescriptor) => { return await taskValidatorAsync(taskDescriptor); };
|
|
19
|
+
const validator = async (taskDescriptor) => { return await taskValidatorAsync(taskDescriptor, requestMoreInfo); };
|
|
20
20
|
// Destructure the props object to extract individual properties
|
|
21
|
-
const { id, title, isModal, formMode, visualizedTasks, editTaskCallback, currentTask, setCurrentTask, isContextualCreate = false, selectedRowKeys, handleFocusedRowKeyChange, onStatusChanged, onSaved, onClose, onCancel, taskContext, startDate, endDate, showBackButton = true, hasNavigation = true, width = "100%", height = "100%", usersList, onOpenS4TViewerRequest, s4TViewerDialogComponent, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, handleNavigateToWGs, handleNavigateToDossiers } = props;
|
|
21
|
+
const { id, title, isModal, formMode, requestMoreInfo = false, visualizedTasks, editTaskCallback, currentTask, setCurrentTask, isContextualCreate = false, selectedRowKeys, handleFocusedRowKeyChange, onStatusChanged, onSaved, onClose, onCancel, taskContext, startDate, endDate, showBackButton = true, hasNavigation = true, width = "100%", height = "100%", usersList, onOpenS4TViewerRequest, s4TViewerDialogComponent, allTasks, getAllTasks, deleteTaskByIdsCallback, addTaskCallback, handleNavigateToWGs, handleNavigateToDossiers } = props;
|
|
22
22
|
const sfo = new SaveFormOptions();
|
|
23
23
|
sfo.objClass = ObjectClasses.Task;
|
|
24
24
|
const customizeFormData = (task) => {
|
|
@@ -56,6 +56,14 @@ const TMTaskForm = (props) => {
|
|
|
56
56
|
task.iD2 = taskContext.workItem.did;
|
|
57
57
|
task.toID = 0;
|
|
58
58
|
}
|
|
59
|
+
if (requestMoreInfo) {
|
|
60
|
+
task.toID = undefined;
|
|
61
|
+
task.toName = undefined;
|
|
62
|
+
task.startTime = new Date();
|
|
63
|
+
const end = new Date();
|
|
64
|
+
end.setHours(23, 59, 59, 0);
|
|
65
|
+
task.endTime = end;
|
|
66
|
+
}
|
|
59
67
|
return task;
|
|
60
68
|
};
|
|
61
69
|
const { formData, setFormData, formDataOrig, validationItems, exception, saveDataAsync } = useSaveForm(formMode, id, sfo, validator, onSaved, onStatusChanged, customizeFormData);
|
|
@@ -277,7 +285,7 @@ const TMTaskForm = (props) => {
|
|
|
277
285
|
console.warn(`Unhandled object type: ${ref.objClass}`);
|
|
278
286
|
}
|
|
279
287
|
};
|
|
280
|
-
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) => {
|
|
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) => {
|
|
281
289
|
if (newValue === undefined)
|
|
282
290
|
return;
|
|
283
291
|
setFormData({ ...formData ?? {}, toID: newValue[0] });
|
|
@@ -296,7 +304,7 @@ const TMTaskForm = (props) => {
|
|
|
296
304
|
display: 'flex',
|
|
297
305
|
justifyContent: 'flex-end',
|
|
298
306
|
alignItems: 'center'
|
|
299
|
-
}, children: _jsx(TaskFormAssignmentNoticeBadge, { task: formData, users: users }) })), (showDcmtForm && formData?.iD1 && formData?.iD2) &&
|
|
307
|
+
}, children: _jsx(TaskFormAssignmentNoticeBadge, { task: formData, users: users, requestMoreInfo: requestMoreInfo }) })), (showDcmtForm && formData?.iD1 && formData?.iD2) &&
|
|
300
308
|
_jsx(TMDcmtForm, { titleModal: formData.iD1Name ?? '-', isModal: true, TID: formData.iD1, DID: formData.iD2, allowButtonsRefs: true, moreInfoTasks: getMoreInfoTasksForDocument(allTasks, formData?.iD1, formData?.iD2), onWFOperationCompleted: refreshWorkflowApprove, onTaskCompleted: onTaskCompleted, onClose: () => { setShowDcmtForm(false); }, onOpenS4TViewerRequest: onOpenS4TViewerRequest, s4TViewerDialogComponent: s4TViewerDialogComponent, allTasks: allTasks, getAllTasks: getAllTasks, deleteTaskByIdsCallback: deleteTaskByIdsCallback, addTaskCallback: addTaskCallback, editTaskCallback: editTaskCallback, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers, onReferenceClick: handleNavigateToReference })] }), formData && showChangeStateForm && _jsx(TMChangeStateForm, { formData: formData, formDataOrig: formDataOrig, handleShowChangeStateForm: handleShowChangeStateForm, setFormData: setFormData })] }) }));
|
|
301
309
|
};
|
|
302
310
|
export default TMTaskForm;
|
|
@@ -6,6 +6,7 @@ export declare const getCurrentUserTaskRole: (task?: TaskDescriptor) => TaskRole
|
|
|
6
6
|
interface TaskFormAssignmentNoticeSectionProps {
|
|
7
7
|
task: TaskDescriptor;
|
|
8
8
|
users: Array<UserDescriptor>;
|
|
9
|
+
requestMoreInfo?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare const TaskFormAssignmentNoticeBadge: (props: TaskFormAssignmentNoticeSectionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
12
|
interface RenderContextBlockParams {
|
|
@@ -27,6 +28,7 @@ interface TaskFormAssignedToProps {
|
|
|
27
28
|
validationItems: Array<ValidationItem>;
|
|
28
29
|
fieldsReadOnly: IFieldsEditability;
|
|
29
30
|
usersList?: Array<UserDescriptor>;
|
|
31
|
+
label?: string;
|
|
30
32
|
onValueChanged: (newValue: Array<number> | undefined) => void;
|
|
31
33
|
}
|
|
32
34
|
export declare const TaskAssigneeField: (props: TaskFormAssignedToProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -36,6 +38,8 @@ interface RenderFieldBaseProps {
|
|
|
36
38
|
formData?: TaskDescriptor;
|
|
37
39
|
}
|
|
38
40
|
interface RenderFieldProps extends RenderFieldBaseProps {
|
|
41
|
+
requestMoreInfo?: boolean;
|
|
42
|
+
label?: string;
|
|
39
43
|
validationItems?: Array<ValidationItem>;
|
|
40
44
|
setFormData: React.Dispatch<React.SetStateAction<TaskDescriptor | undefined>>;
|
|
41
45
|
}
|
|
@@ -43,13 +47,14 @@ interface RenderPriorityFieldProps extends RenderFieldBaseProps {
|
|
|
43
47
|
onPriorityValueChange: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
44
48
|
}
|
|
45
49
|
interface RenderDateFieldProps extends RenderFieldProps {
|
|
50
|
+
label?: string;
|
|
46
51
|
onContentReady?: () => void;
|
|
47
52
|
}
|
|
48
|
-
export declare const RenderNameField: ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }: RenderFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare const RenderNameField: ({ requestMoreInfo, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }: RenderFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
54
|
export declare const RenderDescriptionField: ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }: RenderFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
50
55
|
export declare const RenderPriorityField: ({ formData, formDataOrig, fieldsReadOnly, onPriorityValueChange }: RenderPriorityFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
export declare const RenderStartDateField: ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }: RenderDateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
export declare const RenderEndDateField: ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }: RenderDateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare const RenderStartDateField: ({ label, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }: RenderDateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare const RenderEndDateField: ({ label, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }: RenderDateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
58
|
export declare const RenderRemindDateField: ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }: RenderFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
59
|
interface RenderTaskFormStateFieldProps {
|
|
55
60
|
formDataOrig: TaskDescriptor | undefined;
|
|
@@ -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 } 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";
|
|
@@ -50,10 +50,12 @@ export const getCurrentUserTaskRole = (task) => {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
export const TaskFormAssignmentNoticeBadge = (props) => {
|
|
53
|
-
const { task, users } = props;
|
|
53
|
+
const { task, users, requestMoreInfo = false } = props;
|
|
54
54
|
const taskRole = useMemo(() => getCurrentUserTaskRole(task), [task?.toID, task?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID]);
|
|
55
55
|
const getMessage = () => {
|
|
56
|
-
const assigneeName = users.find(user => user.id === task.toID)?.name
|
|
56
|
+
const assigneeName = users.find(user => user.id === task.toID)?.name;
|
|
57
|
+
if (requestMoreInfo)
|
|
58
|
+
return assigneeName ? SDKUI_Localizator.MoreInfoRequestedTo.replaceParams(assigneeName) : SDKUI_Localizator.MoreInfoRequested;
|
|
57
59
|
if (taskRole === "personal")
|
|
58
60
|
return SDKUI_Localizator.PersonalTaskAssignmentMessage;
|
|
59
61
|
if (taskRole === "receiver")
|
|
@@ -132,8 +134,28 @@ export const TaskFormContextualAttachments = (props) => {
|
|
|
132
134
|
};
|
|
133
135
|
const TaskPdgOriginNavigator = (props) => {
|
|
134
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
|
+
}
|
|
135
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: {
|
|
136
|
-
backgroundColor:
|
|
158
|
+
backgroundColor: backgroundColor,
|
|
137
159
|
color: "#fff",
|
|
138
160
|
padding: "10px 16px",
|
|
139
161
|
borderRadius: "20px",
|
|
@@ -149,11 +171,11 @@ const TaskPdgOriginNavigator = (props) => {
|
|
|
149
171
|
gap: "8px",
|
|
150
172
|
}, onMouseEnter: e => {
|
|
151
173
|
if (formData.pdG !== PdGs.None)
|
|
152
|
-
e.currentTarget.style.backgroundColor =
|
|
174
|
+
e.currentTarget.style.backgroundColor = backgroundHoverColor;
|
|
153
175
|
e.currentTarget.style.transform = 'scale(1.05)';
|
|
154
176
|
}, onMouseLeave: e => {
|
|
155
177
|
if (formData.pdG !== PdGs.None)
|
|
156
|
-
e.currentTarget.style.backgroundColor =
|
|
178
|
+
e.currentTarget.style.backgroundColor = backgroundColor;
|
|
157
179
|
e.currentTarget.style.transform = 'scale(1)';
|
|
158
180
|
}, children: [_jsxs("span", { style: {
|
|
159
181
|
flex: 1,
|
|
@@ -167,9 +189,7 @@ const TaskPdgOriginNavigator = (props) => {
|
|
|
167
189
|
if (!originLabel)
|
|
168
190
|
return null;
|
|
169
191
|
const maxLength = isMobile ? 10 : 25;
|
|
170
|
-
const displayText = originLabel.length > maxLength
|
|
171
|
-
? originLabel.slice(0, maxLength) + "..."
|
|
172
|
-
: originLabel;
|
|
192
|
+
const displayText = originLabel.length > maxLength ? originLabel.slice(0, maxLength) + "..." : originLabel;
|
|
173
193
|
return _jsxs("span", { children: ["\u201C", displayText, "\u201D"] });
|
|
174
194
|
})()] }), _jsx(TMTooltip, { content: _jsxs("div", { style: { textAlign: "left" }, children: [formData.pdG && (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
|
|
175
195
|
display: "flex",
|
|
@@ -179,7 +199,7 @@ const TaskPdgOriginNavigator = (props) => {
|
|
|
179
199
|
}, children: [_jsx("span", { style: { display: "flex", alignItems: "center" }, children: getPdgsIconMap().get(formData.pdG) }), _jsx("span", { children: formData.pdG === PdGs.WG ? SDKUI_Localizator.WorkGroup : formData.pdG === PdGs.CF ? SDKUI_Localizator.Dossier : formData.pdG === PdGs.DT ? SDKUI_Localizator.Document : "" })] }), _jsx("hr", { style: { margin: "4px 0 8px 0" } })] })), formData.iD1 != null && formData.iD1 !== 0 && (_jsxs("div", { children: [_jsx("b", { children: "ID1" }), ": ", formData.iD1.toString()] })), formData.iD1Name && (_jsxs("div", { children: [_jsx("b", { children: "ID1NAME" }), ": ", formData.iD1Name.toString()] })), formData.iD2 != null && formData.iD2 !== 0 && (_jsxs("div", { children: [_jsx("b", { children: "ID2" }), ": ", formData.iD2.toString()] }))] }), children: _jsx("i", { className: "dx-icon-info", style: { fontSize: "1.3rem", flexShrink: 0 } }) })] }) }) }));
|
|
180
200
|
};
|
|
181
201
|
export const TaskAssigneeField = (props) => {
|
|
182
|
-
const { formMode, formData, taskContext, validationItems, fieldsReadOnly, formDataOrig, usersList, onValueChanged, } = props;
|
|
202
|
+
const { formMode, formData, taskContext, validationItems, fieldsReadOnly, formDataOrig, usersList, label = SDKUI_Localizator.AssignedTo_Female, onValueChanged, } = props;
|
|
183
203
|
const { isCreateMode, isUpdateMode, isAssignedByOtherUser, isAssignedToOtherUser } = useMemo(() => {
|
|
184
204
|
const isCreateMode = formMode === FormModes.Create;
|
|
185
205
|
const isUpdateMode = formMode === FormModes.Update;
|
|
@@ -203,7 +223,7 @@ export const TaskAssigneeField = (props) => {
|
|
|
203
223
|
}, [formData?.toID, formData?.fromID, formMode, SDK_Globals.tmSession?.SessionDescr?.userID]);
|
|
204
224
|
let content = null;
|
|
205
225
|
if (isCreateMode || !isAssignedByOtherUser) {
|
|
206
|
-
content = (_jsx("div", { id: "assignedToAnotherUserField", style: { width: '100%' }, children: _jsx(TMUserChooser, { dataSource: usersList, allowShowAllUsers: !!taskContext?.dossier, allowMultipleSelection: false, label:
|
|
226
|
+
content = (_jsx("div", { id: "assignedToAnotherUserField", style: { width: '100%' }, children: _jsx(TMUserChooser, { dataSource: usersList, allowShowAllUsers: !!taskContext?.dossier, allowMultipleSelection: false, label: label, readOnly: fieldsReadOnly.assignedTO, values: formData?.toID ? [formData?.toID] : [], isModifiedWhen: formData?.toID !== formDataOrig?.toID, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.AssignedTo_Female), onValueChanged: onValueChanged }) }));
|
|
207
227
|
}
|
|
208
228
|
else if (isUpdateMode) {
|
|
209
229
|
content = (_jsxs(_Fragment, { children: [isAssignedByOtherUser && (_jsx("div", { style: { width: '100%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedBy, value: formData?.fromName ?? '', readOnly: true }) })), isAssignedToOtherUser && (_jsx("div", { style: { width: '100%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedTo_Female, value: formData?.toName ?? '', readOnly: true }) }))] }));
|
|
@@ -343,11 +363,23 @@ const TaskFormResponseComment = (props) => {
|
|
|
343
363
|
// Stile comune per i container dei campi
|
|
344
364
|
const fieldContainerStyle = { width: '100%' };
|
|
345
365
|
const fieldContainerWithMarginStyle = { width: '100%', marginTop: 10 };
|
|
346
|
-
export const RenderNameField = ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }) =>
|
|
366
|
+
export const RenderNameField = ({ requestMoreInfo = false, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }) => {
|
|
367
|
+
// Se requestMoreInfo, il valore viene visualizzato senza prefisso nel campo di input
|
|
368
|
+
const displayValue = requestMoreInfo && formData?.name?.startsWith(TASK_MORE_INFO_PREFIX_NAME) ? formData.name.substring(TASK_MORE_INFO_PREFIX_NAME.length) : formData?.name ?? '';
|
|
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) => {
|
|
370
|
+
const newValue = e.target.value;
|
|
371
|
+
if (requestMoreInfo) {
|
|
372
|
+
setFormData({ ...formData ?? {}, name: `${TASK_MORE_INFO_PREFIX_NAME}${newValue}` });
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
setFormData({ ...formData ?? {}, name: newValue });
|
|
376
|
+
}
|
|
377
|
+
}, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Name) }), requestMoreInfo && (_jsx("p", { style: { fontStyle: 'italic', fontSize: '0.9rem', marginTop: '5px' }, children: `${TASK_MORE_INFO_PREFIX_NAME}${displayValue}` }))] }));
|
|
378
|
+
};
|
|
347
379
|
export const RenderDescriptionField = ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }) => (_jsx("div", { style: fieldContainerStyle, children: _jsx(TMTextArea, { label: SDKUI_Localizator.Description, value: formData?.description ?? '', maxLength: 200, readOnly: fieldsReadOnly.description, isModifiedWhen: formData?.description !== formDataOrig?.description, onValueChanged: (e) => setFormData({ ...formData ?? {}, description: e.target.value }), validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Description), resize: false }) }));
|
|
348
380
|
export const RenderPriorityField = ({ formData, formDataOrig, fieldsReadOnly, onPriorityValueChange }) => (_jsx("div", { style: fieldContainerStyle, children: !fieldsReadOnly.priority ? (_jsx(TMDropDown, { label: SDKUI_Localizator.Priority, value: formData?.priority, dataSource: getPriorityLocalizatorValues(), isModifiedWhen: formData?.priority !== formDataOrig?.priority, onValueChanged: onPriorityValueChange })) : (_jsx(TMTextBox, { label: SDKUI_Localizator.Priority, value: getPriorityLocalizatorValue(formData?.priority ?? Priorities.Low), readOnly: true })) }));
|
|
349
|
-
export const RenderStartDateField = ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }) => (_jsx("div", { style: fieldContainerWithMarginStyle, children: !fieldsReadOnly.startDate ? (_jsx(TMDateBox, { id: "start-date", resetTimeToZeroOnKeyPress: false, label:
|
|
350
|
-
export const RenderEndDateField = ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }) => (_jsx("div", { style: fieldContainerWithMarginStyle, children: !fieldsReadOnly.startDate ? (_jsx(TMDateBox, { id: "end-date", resetTimeToZeroOnKeyPress: false, label:
|
|
381
|
+
export const RenderStartDateField = ({ label = SDKUI_Localizator.StartDate, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }) => (_jsx("div", { style: fieldContainerWithMarginStyle, children: !fieldsReadOnly.startDate ? (_jsx(TMDateBox, { id: "start-date", resetTimeToZeroOnKeyPress: false, label: label, dateDisplayType: DateDisplayTypes.DateTime, value: formData?.startTime, isModifiedWhen: formData?.startTime !== formDataOrig?.startTime, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.ErrorStartEndDate), onContentReady: onContentReady, onValueChange: (value) => setFormData({ ...formData ?? {}, startTime: value }), showClearButton: true })) : (_jsx(TMTextBox, { label: SDKUI_Localizator.StartDate, value: formData?.startTime ? formatDate(formData?.startTime) : '', readOnly: true })) }));
|
|
382
|
+
export const RenderEndDateField = ({ label = SDKUI_Localizator.ExpirationDate, validationItems, setFormData, formData, formDataOrig, fieldsReadOnly, onContentReady }) => (_jsx("div", { style: fieldContainerWithMarginStyle, children: !fieldsReadOnly.startDate ? (_jsx(TMDateBox, { id: "end-date", resetTimeToZeroOnKeyPress: false, label: label, dateDisplayType: DateDisplayTypes.DateTime, value: formData?.endTime, isModifiedWhen: formData?.endTime !== formDataOrig?.endTime, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.ErrorStartEndDate || o.PropertyName === SDKUI_Localizator.ErrorEndRemDate), onContentReady: onContentReady, onValueChange: (value) => setFormData({ ...formData ?? {}, endTime: value }), showClearButton: true, readOnly: fieldsReadOnly.endDate })) : (_jsx(TMTextBox, { label: SDKUI_Localizator.ExpirationDate, value: formData?.endTime ? formatDate(formData?.endTime) : '', readOnly: true })) }));
|
|
351
383
|
export const RenderRemindDateField = ({ validationItems, setFormData, formData, formDataOrig, fieldsReadOnly }) => (_jsx("div", { style: fieldContainerWithMarginStyle, children: _jsx(TMDateBox, { id: "alert-time", resetTimeToZeroOnKeyPress: false, label: SDKUI_Localizator.Reminder, dateDisplayType: DateDisplayTypes.DateTime, value: formData?.remTime ?? undefined, isModifiedWhen: formData?.remTime !== formDataOrig?.remTime, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.ErrorEndRemDate), onValueChange: (value) => setFormData({ ...formData ?? {}, remTime: value }), showClearButton: true, readOnly: fieldsReadOnly.remTime }) }));
|
|
352
384
|
export const RenderTaskFormStateField = (props) => {
|
|
353
385
|
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook.
|
|
@@ -96,7 +96,7 @@ export declare const getTaskColor: (taskState: Task_States) => {
|
|
|
96
96
|
export declare const mergeUniqueTasks: (existing: Array<TaskDescriptor>, // Array of existing tasks
|
|
97
97
|
newTasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
|
|
98
98
|
export declare const getOriginLabel: (pdg: PdGs | undefined, ID1Name: string | undefined) => string;
|
|
99
|
-
export declare const taskValidatorAsync: (taskDescriptor: TaskDescriptor) => Promise<ValidationItem[]>;
|
|
99
|
+
export declare const taskValidatorAsync: (taskDescriptor: TaskDescriptor, requestMoreInfo?: boolean) => Promise<ValidationItem[]>;
|
|
100
100
|
export declare const gotoPDGExtendedLabel: (gotoVisible: boolean, pdg: PdGs, iD1Name: string | undefined) => string;
|
|
101
101
|
export declare const convertToSchedulerAppointments: (tasks: Array<TaskDescriptor>) => Array<Appointment>;
|
|
102
102
|
export declare const formatDate: (date: Date) => string;
|
|
@@ -339,7 +339,7 @@ export const getOriginLabel = (pdg, ID1Name) => {
|
|
|
339
339
|
}
|
|
340
340
|
return label;
|
|
341
341
|
};
|
|
342
|
-
export const taskValidatorAsync = async (taskDescriptor) => {
|
|
342
|
+
export const taskValidatorAsync = async (taskDescriptor, requestMoreInfo = false) => {
|
|
343
343
|
let vil = [];
|
|
344
344
|
// Validate task name
|
|
345
345
|
if (!taskDescriptor.name || taskDescriptor.name === "")
|
|
@@ -358,7 +358,12 @@ export const taskValidatorAsync = async (taskDescriptor) => {
|
|
|
358
358
|
// Validate that startTime is less than or equal to endTime
|
|
359
359
|
if (taskDescriptor.startTime && taskDescriptor.endTime) {
|
|
360
360
|
if (taskDescriptor.startTime > taskDescriptor.endTime) {
|
|
361
|
-
|
|
361
|
+
if (requestMoreInfo) {
|
|
362
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.ErrorStartEndDate, `${SDKUI_Localizator.ExpirationDateMustBeAfterCurrentDateTime}`));
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.ErrorStartEndDate, `${SDKUI_Localizator.StartDateMustBeBeforeEndDate}`));
|
|
366
|
+
}
|
|
362
367
|
}
|
|
363
368
|
}
|
|
364
369
|
return vil;
|
|
@@ -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 }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DcmtTypeDescriptor, WFDescriptor } from '@topconsultnpm/sdk-ts';
|
|
1
|
+
import { DcmtTypeDescriptor, HomeBlogPost, TaskDescriptor, WFDescriptor } from '@topconsultnpm/sdk-ts';
|
|
2
2
|
import { DeviceType } from "../../base/TMDeviceProvider";
|
|
3
3
|
import { WorkItemDetail } from "../../../ts";
|
|
4
4
|
interface IWorkflowOperationButtonsProps {
|
|
@@ -14,6 +14,13 @@ interface IWorkflowOperationButtonsProps {
|
|
|
14
14
|
onReject?: () => void;
|
|
15
15
|
onReAssign?: () => void;
|
|
16
16
|
onMoreInfo?: () => void;
|
|
17
|
+
allTasks?: Array<TaskDescriptor>;
|
|
18
|
+
getAllTasks?: () => Promise<void>;
|
|
19
|
+
deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
|
|
20
|
+
addTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
21
|
+
editTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
22
|
+
handleNavigateToWGs?: (value: HomeBlogPost | number) => Promise<void>;
|
|
23
|
+
handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
|
|
17
24
|
}
|
|
18
25
|
export declare const WorkFlowOperationButtons: (props: IWorkflowOperationButtonsProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
26
|
export declare const WorkFlowApproveRejectPopUp: ({ TID, DID, deviceType, isReject, selectedItems, onClose, onCompleted }: {
|
|
@@ -63,12 +70,21 @@ export declare const WorkflowEndInstanceModal: ({ selectedInstances, onClose, on
|
|
|
63
70
|
onClose?: () => void;
|
|
64
71
|
onCompleted?: () => Promise<void>;
|
|
65
72
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
-
|
|
73
|
+
interface IWorkFlowMoreInfoPopUpProps {
|
|
74
|
+
fromDTD?: DcmtTypeDescriptor;
|
|
67
75
|
TID?: number;
|
|
68
76
|
DID?: number;
|
|
69
77
|
deviceType?: DeviceType;
|
|
70
78
|
onClose?: () => void;
|
|
71
79
|
onCompleted?: () => Promise<void>;
|
|
80
|
+
allTasks?: Array<TaskDescriptor>;
|
|
72
81
|
getAllTasks?: () => Promise<void>;
|
|
73
|
-
|
|
82
|
+
deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
|
|
83
|
+
addTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
84
|
+
editTaskCallback?: (task: TaskDescriptor) => Promise<void>;
|
|
85
|
+
handleNavigateToWGs?: (value: HomeBlogPost | number) => Promise<void>;
|
|
86
|
+
handleNavigateToDossiers?: (value: HomeBlogPost | number) => Promise<void>;
|
|
87
|
+
triggerBlogRefresh?: () => Promise<void>;
|
|
88
|
+
}
|
|
89
|
+
export declare const WorkFlowMoreInfoPopUp: (props: IWorkFlowMoreInfoPopUpProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
74
90
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { SDK_Globals, UserListCacheService, WFEvents, WorkflowCacheService } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import styled from "styled-components";
|
|
5
|
-
import { SDKUI_Localizator, IconApply, IconCloseOutline, IconUser, IconInfo,
|
|
5
|
+
import { SDKUI_Localizator, IconApply, IconCloseOutline, IconUser, IconInfo, IconSignaturePencil, isSign4TopEnabled, IconCheck, IconCloseCircle, IconStop, taskModalSizes } from "../../../helper";
|
|
6
6
|
import { TMColors } from "../../../utils/theme";
|
|
7
7
|
import TMButton from "../../base/TMButton";
|
|
8
8
|
import { DeviceType } from "../../base/TMDeviceProvider";
|
|
@@ -10,11 +10,9 @@ import TMModal from "../../base/TMModal";
|
|
|
10
10
|
import { TMExceptionBoxManager } from "../../base/TMPopUp";
|
|
11
11
|
import TMSpinner from "../../base/TMSpinner";
|
|
12
12
|
import TMUserChooser from "../../choosers/TMUserChooser";
|
|
13
|
-
import TMTextBox from "../../editors/TMTextBox";
|
|
14
|
-
import TMTextArea from "../../editors/TMTextArea";
|
|
15
|
-
import TMDropDown from "../../editors/TMDropDown";
|
|
16
|
-
import TMDateBox from "../../editors/TMDateBox";
|
|
17
13
|
import ShowAlert from "../../base/TMAlert";
|
|
14
|
+
import { FormModes } from "../../../ts";
|
|
15
|
+
import TMTaskForm from "../tasks/TMTaskForm";
|
|
18
16
|
const StyledWorkFlowOperationButtonsContainer = styled.div `
|
|
19
17
|
display: flex;
|
|
20
18
|
align-items: center;
|
|
@@ -64,7 +62,7 @@ const StyledHorizontalContainer = styled.div `
|
|
|
64
62
|
/* align-items: flex-end; */
|
|
65
63
|
`;
|
|
66
64
|
export const WorkFlowOperationButtons = (props) => {
|
|
67
|
-
const { dtd = undefined, deviceType = DeviceType.DESKTOP, approveDisable = false, signApproveDisable = false, rejectDisable = false, reassignDisable = false, infoDisable = false, onApprove, onSignApprove, onReject, onReAssign, onMoreInfo } = props;
|
|
65
|
+
const { dtd = undefined, deviceType = DeviceType.DESKTOP, approveDisable = false, signApproveDisable = false, rejectDisable = false, reassignDisable = false, infoDisable = false, onApprove, onSignApprove, onReject, onReAssign, onMoreInfo, } = props;
|
|
68
66
|
const isMobile = deviceType === DeviceType.MOBILE;
|
|
69
67
|
// Calcola direttamente se è un workflow di firma per evitare flickering durante il render
|
|
70
68
|
const isSignWorkflow = useMemo(() => {
|
|
@@ -282,69 +280,20 @@ export const WorkflowEndInstanceModal = ({ selectedInstances, onClose, onComplet
|
|
|
282
280
|
: `${SDKUI_Localizator.WorkflowEndInstance} (${selectedInstances.length} istanze)`;
|
|
283
281
|
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
282
|
};
|
|
285
|
-
export const WorkFlowMoreInfoPopUp = (
|
|
283
|
+
export const WorkFlowMoreInfoPopUp = (props) => {
|
|
284
|
+
const { fromDTD, DID = 0, TID = 0, deviceType = DeviceType.DESKTOP, onClose, onCompleted, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, triggerBlogRefresh } = props;
|
|
285
|
+
const taskContext = useMemo(() => ({ document: { tid: TID, did: DID, name: `${fromDTD?.name ?? '-'} (DID: ${DID})` } }), [TID, DID, fromDTD?.id]);
|
|
286
286
|
const [users, setUsers] = useState([]);
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const validatorMoreInfoAsync = async (taskDescriptor) => {
|
|
293
|
-
let vil = [];
|
|
294
|
-
// Validate task name
|
|
295
|
-
if (!nameInput || nameInput === "")
|
|
296
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Name, `${SDK_Localizator.RequiredField}`));
|
|
297
|
-
// Validate name length (max 100)
|
|
298
|
-
if (taskDescriptor.name && taskDescriptor.name.length > 100) {
|
|
299
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Name, SDKUI_Localizator.ValueTooLong));
|
|
300
|
-
}
|
|
301
|
-
// Validate description length (max 200)
|
|
302
|
-
if (taskDescriptor.description && taskDescriptor.description.length > 200) {
|
|
303
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.Description, SDKUI_Localizator.ValueTooLong));
|
|
304
|
-
}
|
|
305
|
-
// Validate toID
|
|
306
|
-
if (!taskDescriptor.toID || taskDescriptor.toID <= 0)
|
|
307
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.AssignedTo_Female, `${SDK_Localizator.RequiredField}`));
|
|
308
|
-
return vil;
|
|
309
|
-
};
|
|
310
|
-
const requestMoreInfoAsync = async () => {
|
|
311
|
-
try {
|
|
312
|
-
TMSpinner.show();
|
|
313
|
-
// Ensure the task name includes the prefix before sending
|
|
314
|
-
const taskWithPrefix = {
|
|
315
|
-
...task,
|
|
316
|
-
name: `${TASK_MORE_INFO_PREFIX_NAME}${nameInput}`
|
|
317
|
-
};
|
|
318
|
-
await SDK_Globals.tmSession?.NewWorkflowEngine().WorkItem_MoreInfoAsync(TID, DID, taskWithPrefix);
|
|
319
|
-
await getAllTasks?.();
|
|
320
|
-
ShowAlert({ mode: 'success', position: 'TOP_RIGHT', title: SDKUI_Localizator.MoreInformation, message: SDKUI_Localizator.MoreInfoSent, duration: 3000 });
|
|
321
|
-
}
|
|
322
|
-
catch (e) {
|
|
323
|
-
TMExceptionBoxManager.show({ exception: e });
|
|
324
|
-
}
|
|
325
|
-
finally {
|
|
326
|
-
onCompleted?.();
|
|
327
|
-
onClose?.();
|
|
328
|
-
TMSpinner.hide();
|
|
329
|
-
}
|
|
287
|
+
const onSaved = async (newTask) => {
|
|
288
|
+
await getAllTasks?.();
|
|
289
|
+
await triggerBlogRefresh?.();
|
|
290
|
+
await onCompleted?.();
|
|
291
|
+
onClose?.();
|
|
330
292
|
};
|
|
331
293
|
useEffect(() => {
|
|
332
294
|
const fetchData = async () => {
|
|
333
295
|
TMSpinner.show({ description: SDKUI_Localizator.LoadingParticipants });
|
|
334
296
|
try {
|
|
335
|
-
let newTask = TaskEngine.NewTaskDescriptor();
|
|
336
|
-
newTask.toID = 0;
|
|
337
|
-
// Initialize nameInput from task.name if it exists and remove the prefix
|
|
338
|
-
const initialName = newTask.name?.startsWith(TASK_MORE_INFO_PREFIX_NAME)
|
|
339
|
-
? newTask.name.substring(TASK_MORE_INFO_PREFIX_NAME.length)
|
|
340
|
-
: newTask.name || '';
|
|
341
|
-
setNameInput(initialName);
|
|
342
|
-
// Set task name with prefix for internal state consistency if needed by validation,
|
|
343
|
-
// or ensure validation handles it correctly. For now, we'll keep nameInput for the TMTextBox.
|
|
344
|
-
newTask.name = `${TASK_MORE_INFO_PREFIX_NAME}${initialName}`;
|
|
345
|
-
setTask(newTask);
|
|
346
|
-
setTaskOrig(structuredClone(newTask));
|
|
347
|
-
validatorMoreInfoAsync(newTask);
|
|
348
297
|
// Recupera tutti gli utenti (tranne me)
|
|
349
298
|
const allUsers = await UserListCacheService.GetAllAsync();
|
|
350
299
|
const filteredUsers = allUsers.filter(u => u.id !== SDK_Globals.tmSession?.SessionDescr?.userID);
|
|
@@ -361,33 +310,5 @@ export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
|
|
|
361
310
|
return;
|
|
362
311
|
fetchData();
|
|
363
312
|
}, [TID]);
|
|
364
|
-
|
|
365
|
-
if (!task)
|
|
366
|
-
return;
|
|
367
|
-
validatorMoreInfoAsync(task).then((vil) => setValidationItems(vil));
|
|
368
|
-
}, [task]);
|
|
369
|
-
const getPriorityLocalizatorValues = () => {
|
|
370
|
-
// Filtered enum for Low and High values
|
|
371
|
-
const filteredPriorities = { Low: Priorities.Low, High: Priorities.High };
|
|
372
|
-
return Object.values(filteredPriorities).map(priority => {
|
|
373
|
-
switch (priority) {
|
|
374
|
-
case Priorities.High:
|
|
375
|
-
return ({ value: priority, display: SDKUI_Localizator.High });
|
|
376
|
-
default:
|
|
377
|
-
return ({ value: priority, display: SDKUI_Localizator.Low });
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
};
|
|
381
|
-
return (_jsx(TMModal, { title: SDKUI_Localizator.MoreInformation, onClose: onClose, width: deviceType === DeviceType.MOBILE ? '95%' : '640px', height: deviceType === DeviceType.MOBILE ? '60%' : '440px', isModal: true, children: _jsxs(StyledModalBodyWrapper, { children: [_jsxs(StyledModalContentContainer, { children: [_jsx(TMUserChooser, { width: "250px", label: SDKUI_Localizator.RequestTo, dataSource: users, values: task?.toID ? [task.toID] : [], validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.AssignedTo_Female), onValueChanged: (IDs) => {
|
|
382
|
-
if (IDs === undefined)
|
|
383
|
-
return;
|
|
384
|
-
setTask({ ...task ?? {}, toID: IDs?.[0] });
|
|
385
|
-
} }), _jsx(TMTextBox, { label: SDKUI_Localizator.Subject, value: nameInput, isModifiedWhen: nameInput !== (taskOrig?.name?.startsWith(TASK_MORE_INFO_PREFIX_NAME) ? taskOrig.name.substring(TASK_MORE_INFO_PREFIX_NAME.length) : taskOrig?.name || ''), autoFocus: true, maxLength: 100 - TASK_MORE_INFO_PREFIX_NAME.length, onValueChanged: (e) => {
|
|
386
|
-
const newValue = e.target.value;
|
|
387
|
-
setNameInput(newValue);
|
|
388
|
-
// Update task.name with the prefix
|
|
389
|
-
setTask({ ...task ?? {}, name: `${TASK_MORE_INFO_PREFIX_NAME}${newValue}` });
|
|
390
|
-
}, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Name) }), _jsx("p", { style: { fontStyle: 'italic', fontSize: '0.9rem' }, children: `${TASK_MORE_INFO_PREFIX_NAME}${nameInput}` }), _jsx(TMTextArea, { label: SDKUI_Localizator.Description, value: task?.description ?? '', rows: 2, maxLength: 200, isModifiedWhen: task?.description !== task?.description, onValueChanged: (e) => { setTask({ ...task ?? {}, description: e.target.value }); },
|
|
391
|
-
// validationItems={validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Description)}
|
|
392
|
-
resize: false }), _jsxs(StyledHorizontalContainer, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.Priority, width: "250px", value: task?.priority, dataSource: getPriorityLocalizatorValues(), isModifiedWhen: task?.priority !== taskOrig?.priority, onValueChanged: (e) => setTask({ ...task ?? {}, priority: e?.target?.value }) }), _jsx(TMDateBox, { width: "250px", resetTimeToZeroOnKeyPress: false, padding: "10px 0px", label: SDKUI_Localizator.ByDate, dateDisplayType: DateDisplayTypes.DateTime, value: task?.endTime, isModifiedWhen: task?.endTime !== taskOrig?.endTime, onValueChange: (value) => { setTask({ ...task ?? {}, endTime: value }); }, showClearButton: true })] })] }), _jsx(StyledModalFooter, { children: _jsx(TMButton, { btnStyle: 'advanced', showTooltip: false, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Request, disabled: disable, onClick: () => !disable && requestMoreInfoAsync(), advancedColor: TMColors.tertiary }) })] }) }));
|
|
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 })));
|
|
393
314
|
};
|
|
@@ -629,10 +629,10 @@ const TMBlogsPost = (props) => {
|
|
|
629
629
|
console.warn(`Unhandled object type: ${ref.objClass}`);
|
|
630
630
|
}
|
|
631
631
|
};
|
|
632
|
-
return _jsx("div", { ref: containerRef, style: { height: height, width: width }, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: localShowWaitPanel, showWaitPanelPrimary: localShowPrimary, waitPanelTitle: localWaitPanelTitle, waitPanelTextPrimary: localWaitPanelTextPrimary, waitPanelValuePrimary: localWaitPanelValuePrimary, waitPanelMaxValuePrimary: localWaitPanelMaxValuePrimary, isCancelable: true, abortController: localAbortController, children: [_jsx(TMBlogHeader, { isVisible: currentHeader !== undefined && !isHeaderHidden, layoutMode: layoutMode, height: layoutMode === 'extended' ? "40px" : "70px", width: "100%", allPosts: posts, postsToShow: postsToShow, onPostsToShowChange: handlePostsToShowChange, categoryIdDataSource: categoryIdDataSource, appliedCategoryIdFilters: appliedCategoryIdFilters, setAppliedCategoryIdFilters: setAppliedCategoryIdFilters, searchText: searchText, onSearchChange: handleSearchChange }), _jsxs("div", { style: {
|
|
632
|
+
return _jsx("div", { ref: containerRef, style: { height: height, width: width }, children: _jsx(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: showWaitPanel, showWaitPanelPrimary: showPrimary, showWaitPanelSecondary: showSecondary, waitPanelTitle: waitPanelTitle, waitPanelTextPrimary: waitPanelTextPrimary, waitPanelValuePrimary: waitPanelValuePrimary, waitPanelMaxValuePrimary: waitPanelMaxValuePrimary, waitPanelTextSecondary: waitPanelTextSecondary, waitPanelValueSecondary: waitPanelValueSecondary, waitPanelMaxValueSecondary: waitPanelMaxValueSecondary, isCancelable: true, abortController: abortController, children: _jsxs(TMLayoutWaitingContainer, { direction: 'vertical', showWaitPanel: localShowWaitPanel, showWaitPanelPrimary: localShowPrimary, waitPanelTitle: localWaitPanelTitle, waitPanelTextPrimary: localWaitPanelTextPrimary, waitPanelValuePrimary: localWaitPanelValuePrimary, waitPanelMaxValuePrimary: localWaitPanelMaxValuePrimary, isCancelable: true, abortController: localAbortController, children: [_jsx(TMBlogHeader, { isVisible: currentHeader !== undefined && !isHeaderHidden, layoutMode: layoutMode, height: layoutMode === 'extended' ? "40px" : "70px", width: "100%", allPosts: posts, postsToShow: postsToShow, onPostsToShowChange: handlePostsToShowChange, categoryIdDataSource: categoryIdDataSource, appliedCategoryIdFilters: appliedCategoryIdFilters, setAppliedCategoryIdFilters: setAppliedCategoryIdFilters, searchText: searchText, onSearchChange: handleSearchChange }), _jsxs("div", { id: `${id}-blogs-wrapper`, onContextMenu: onContextMenu, style: {
|
|
633
633
|
width: "100%",
|
|
634
634
|
height: currentHeader !== undefined && !isHeaderHidden ? `calc(100% - ${layoutMode === 'extended' ? "40px" : "70px"})` : "100%",
|
|
635
|
-
}, children: [blogPosts.length === 0 && _jsx(TMToppyMessage, { message: searchText.length > 0 ? SDKUI_Localizator.NoMessagesFound : SDKUI_Localizator.NoMessages }), blogPosts.length > 0 && _jsxs("div", { id: `${id}-blogs-container`, tabIndex: 0, onKeyDown: handleKeyDown,
|
|
635
|
+
}, children: [blogPosts.length === 0 && _jsx(TMToppyMessage, { message: searchText.length > 0 ? SDKUI_Localizator.NoMessagesFound : SDKUI_Localizator.NoMessages }), blogPosts.length > 0 && _jsxs("div", { id: `${id}-blogs-container`, tabIndex: 0, onKeyDown: handleKeyDown, style: {
|
|
636
636
|
height: '100%',
|
|
637
637
|
width: '100%',
|
|
638
638
|
outline: "none",
|
|
@@ -680,11 +680,11 @@ const TMBlogsPost = (props) => {
|
|
|
680
680
|
boxShadow: isFocused ? "0 4px 12px rgba(19, 85, 150, 0.6)" : "none",
|
|
681
681
|
cursor: 'pointer',
|
|
682
682
|
}, children: [_jsx(BlogPostTitle, { displayMode: displayMode, layoutMode: layoutMode, blogPost: blogPost, isSelected: isSelected, isOwnComment: isOwnComment, searchText: searchText, isSys: isSys, isHomeBlogPost: isHomeBlogPost, showId: localShowId, handleNavigateToWGs: handleNavigateToWGs, handleNavigateToDossiers: handleNavigateToDossiers }), isNew && _jsx(NewBadge, { layoutMode: layoutMode }), _jsx("div", { style: { fontSize: '1rem', color: "#000", marginTop: "10px", overflow: "hidden" }, children: _jsx(TMHtmlContentDisplay, { markup: blogPost.description ?? '-', searchText: searchText, isSelected: isSelected }) }), showExtendedAttachments && blogPost.attachments && blogPost.attachments.length > 0 && (_jsx(TMBlogAttachments, { attachments: blogPost.attachments, layoutMode: layoutMode, isSelected: isSelected, searchText: searchText, dcmtTypeDescriptors: dcmtTypeDescriptors, treeFs: treeFs, draftLatestInfoMap: draftLatestInfoMap, archivedDocumentMap: archivedDocumentMap, handleAttachmentFocus: handleFocusedAttachment, openDcmtForm: openDcmtForm }))] }, `${id}-blogpost-${blogPost.id}`) })] }, "blog-post-wrapper-" + id + "-" + blogPost.id);
|
|
683
|
-
}), _jsx("div", { ref: bottomRef }), _jsx(TMContextMenu, { items: menuItems, target: `#${id}-blogs-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
683
|
+
}), _jsx("div", { ref: bottomRef })] }), _jsx(TMContextMenu, { items: menuItems, target: `#${id}-blogs-wrapper`, externalControl: {
|
|
684
|
+
visible: menuVisible,
|
|
685
|
+
position: menuPosition,
|
|
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: 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',
|
|
@@ -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;
|
|
@@ -245,6 +246,7 @@ export declare class SDKUI_Localizator {
|
|
|
245
246
|
static get Expected(): "Erwartet" | "Expected" | "Esperado" | "Attendu" | "Atteso";
|
|
246
247
|
static get Expiration(): "Ablaufdatum" | "Expiration" | "Fecha de expiración" | "Date d'expiration" | "Data de expiração" | "Scadenza";
|
|
247
248
|
static get ExpirationDate(): "Ablaufdatum" | "Expiration date" | "Fecha de vencimiento" | "Date d'échéance" | "Data de validade" | "Data di scadenza";
|
|
249
|
+
static get ExpirationDateMustBeAfterCurrentDateTime(): "Das Ablaufdatum muss nach dem aktuellen Datum und der aktuellen Uhrzeit liegen." | "The expiration date must be after the current date and time." | "La fecha de vencimiento debe ser posterior a la fecha y hora actual." | "La date d'expiration doit être postérieure à la date et l'heure actuelles." | "A data de validade deve ser posterior à data e hora atuais." | "La data di scadenza deve essere successiva alla data e ora corrente.";
|
|
248
250
|
static get ExpertMode(): "Expertenmodus" | "Expert mode" | "Modo experto" | "Mode expert" | "Modo especialista" | "Modalità esperto";
|
|
249
251
|
static get Expiring(): "Ablaufend" | "Expiring" | "Por vencer" | "Expirant" | "Vencendo" | "In scadenza";
|
|
250
252
|
static get Export(): "Exportieren" | "Export" | "Exportar" | "Exporter" | "Esporta";
|
|
@@ -642,6 +644,8 @@ export declare class SDKUI_Localizator {
|
|
|
642
644
|
static get SwitchUser(): "Benutzer wechseln" | "Switch user" | "Cambiar usuario" | "Changer d'utilisateur" | "Mudar de usuário" | "Cambia utente";
|
|
643
645
|
static get TargetedSearch(): "Gezielte Suche" | "Targeted search" | "Búsqueda dirigida" | "Recherche ciblée" | "Pesquisa direcionada" | "Ricerca puntuale";
|
|
644
646
|
static get TaskAssignedMessage(): "Aufgabe wurde vom Benutzer \"{{0}}\" zugewiesen." | "Task assigned by user \"{{0}}\"." | "Tarea asignada por el usuario \"{{0}}\"." | "Tâche assignée par l'utilisateur \"{{0}}\"." | "Tarefa atribuída pelo usuário \"{{0}}\"." | "Attività assegnata dall'utente \"{{0}}\".";
|
|
647
|
+
static get MoreInfoRequestedTo(): "Weitere Informationen angefordert von \"{{0}}\"." | "More information requested to \"{{0}}\"." | "Solicitud de más información a \"{{0}}\"." | "Demande d'informations supplémentaires à \"{{0}}\"." | "Pedido de mais informações a \"{{0}}\"." | "Richiesta di maggiori informazioni a \"{{0}}\".";
|
|
648
|
+
static get MoreInfoRequested(): "Weitere Informationen angefordert" | "More information requested" | "Solicitud de más información" | "Demande d'informations supplémentaires" | "Pedido de mais informações" | "Richiesta di maggiori informazioni";
|
|
645
649
|
static get TaskAssignedToUserMessage(): "Aufgabe zugewiesen an den Benutzer \"{{0}}\"" | "Task assigned to user \"{{0}}\"" | "Tarea asignada al usuario \"{{0}}\"" | "Tâche assignée à l'utilisateur \"{{0}}\"" | "Tarefa atribuída ao usuário \"{{0}}\"" | "Attività assegnata all'utente \"{{0}}\"";
|
|
646
650
|
static get TaskConsideredExpiring(): "Die Aufgabe wird als ablaufend betrachtet, wenn" | "The task is considered expiring if" | "La tarea se considera por vencer si" | "La tâche est considérée comme expirante si" | "A tarefa é considerada vencendo se" | "L'attività è considerata in scadenza se";
|
|
647
651
|
static get TasksEmpty(): 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?";
|
|
@@ -2417,6 +2427,16 @@ export class SDKUI_Localizator {
|
|
|
2417
2427
|
default: return "Data di scadenza";
|
|
2418
2428
|
}
|
|
2419
2429
|
}
|
|
2430
|
+
static get ExpirationDateMustBeAfterCurrentDateTime() {
|
|
2431
|
+
switch (this._cultureID) {
|
|
2432
|
+
case CultureIDs.De_DE: return "Das Ablaufdatum muss nach dem aktuellen Datum und der aktuellen Uhrzeit liegen.";
|
|
2433
|
+
case CultureIDs.En_US: return "The expiration date must be after the current date and time.";
|
|
2434
|
+
case CultureIDs.Es_ES: return "La fecha de vencimiento debe ser posterior a la fecha y hora actual.";
|
|
2435
|
+
case CultureIDs.Fr_FR: return "La date d'expiration doit être postérieure à la date et l'heure actuelles.";
|
|
2436
|
+
case CultureIDs.Pt_PT: return "A data de validade deve ser posterior à data e hora atuais.";
|
|
2437
|
+
default: return "La data di scadenza deve essere successiva alla data e ora corrente.";
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2420
2440
|
static get ExpertMode() {
|
|
2421
2441
|
switch (this._cultureID) {
|
|
2422
2442
|
case CultureIDs.De_DE: return "Expertenmodus";
|
|
@@ -6392,6 +6412,26 @@ export class SDKUI_Localizator {
|
|
|
6392
6412
|
default: return "Attività assegnata dall'utente \"{{0}}\".";
|
|
6393
6413
|
}
|
|
6394
6414
|
}
|
|
6415
|
+
static get MoreInfoRequestedTo() {
|
|
6416
|
+
switch (this._cultureID) {
|
|
6417
|
+
case CultureIDs.De_DE: return "Weitere Informationen angefordert von \"{{0}}\".";
|
|
6418
|
+
case CultureIDs.En_US: return "More information requested to \"{{0}}\".";
|
|
6419
|
+
case CultureIDs.Es_ES: return "Solicitud de más información a \"{{0}}\".";
|
|
6420
|
+
case CultureIDs.Fr_FR: return "Demande d'informations supplémentaires à \"{{0}}\".";
|
|
6421
|
+
case CultureIDs.Pt_PT: return "Pedido de mais informações a \"{{0}}\".";
|
|
6422
|
+
default: return "Richiesta di maggiori informazioni a \"{{0}}\".";
|
|
6423
|
+
}
|
|
6424
|
+
}
|
|
6425
|
+
static get MoreInfoRequested() {
|
|
6426
|
+
switch (this._cultureID) {
|
|
6427
|
+
case CultureIDs.De_DE: return "Weitere Informationen angefordert";
|
|
6428
|
+
case CultureIDs.En_US: return "More information requested";
|
|
6429
|
+
case CultureIDs.Es_ES: return "Solicitud de más información";
|
|
6430
|
+
case CultureIDs.Fr_FR: return "Demande d'informations supplémentaires";
|
|
6431
|
+
case CultureIDs.Pt_PT: return "Pedido de mais informações";
|
|
6432
|
+
default: return "Richiesta di maggiori informazioni";
|
|
6433
|
+
}
|
|
6434
|
+
}
|
|
6395
6435
|
static get TaskAssignedToUserMessage() {
|
|
6396
6436
|
switch (this._cultureID) {
|
|
6397
6437
|
case CultureIDs.De_DE: return "Aufgabe zugewiesen an den Benutzer \"{{0}}\"";
|
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
|
/**
|