@topconsultnpm/sdkui-react 6.19.0-dev2.3 → 6.19.0-dev2.30
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/NewComponents/ContextMenu/TMContextMenu.d.ts +4 -0
- package/lib/components/NewComponents/ContextMenu/TMContextMenu.js +187 -0
- package/lib/components/NewComponents/ContextMenu/hooks.d.ts +11 -0
- package/lib/components/NewComponents/ContextMenu/hooks.js +48 -0
- package/lib/components/NewComponents/ContextMenu/index.d.ts +2 -0
- package/lib/components/NewComponents/ContextMenu/index.js +1 -0
- package/lib/components/NewComponents/ContextMenu/styles.d.ts +27 -0
- package/lib/components/NewComponents/ContextMenu/styles.js +308 -0
- package/lib/components/NewComponents/ContextMenu/types.d.ts +26 -0
- package/lib/components/NewComponents/ContextMenu/types.js +1 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.d.ts +4 -0
- package/lib/components/NewComponents/FloatingMenuBar/TMFloatingMenuBar.js +370 -0
- package/lib/components/NewComponents/FloatingMenuBar/index.d.ts +2 -0
- package/lib/components/NewComponents/FloatingMenuBar/index.js +2 -0
- package/lib/components/NewComponents/FloatingMenuBar/styles.d.ts +38 -0
- package/lib/components/NewComponents/FloatingMenuBar/styles.js +267 -0
- package/lib/components/NewComponents/FloatingMenuBar/types.d.ts +30 -0
- package/lib/components/NewComponents/FloatingMenuBar/types.js +1 -0
- package/lib/components/NewComponents/Notification/Notification.d.ts +4 -0
- package/lib/components/NewComponents/Notification/Notification.js +60 -0
- package/lib/components/NewComponents/Notification/NotificationContainer.d.ts +8 -0
- package/lib/components/NewComponents/Notification/NotificationContainer.js +33 -0
- package/lib/components/NewComponents/Notification/index.d.ts +2 -0
- package/lib/components/NewComponents/Notification/index.js +2 -0
- package/lib/components/NewComponents/Notification/styles.d.ts +21 -0
- package/lib/components/NewComponents/Notification/styles.js +180 -0
- package/lib/components/NewComponents/Notification/types.d.ts +18 -0
- package/lib/components/NewComponents/Notification/types.js +1 -0
- package/lib/components/base/TMCustomButton.js +79 -26
- package/lib/components/base/TMDataGridExportForm.d.ts +1 -1
- package/lib/components/base/TMDataGridExportForm.js +9 -3
- package/lib/components/base/TMFileManager.js +12 -3
- package/lib/components/base/TMFileManagerDataGridView.d.ts +2 -0
- package/lib/components/base/TMFileManagerDataGridView.js +11 -2
- package/lib/components/base/TMFileManagerThumbnailItems.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailItems.js +12 -2
- package/lib/components/base/TMFileManagerThumbnailsView.d.ts +2 -0
- package/lib/components/base/TMFileManagerThumbnailsView.js +2 -2
- package/lib/components/base/TMTooltip.d.ts +1 -1
- package/lib/components/base/TMTooltip.js +1 -1
- package/lib/components/choosers/TMDcmtTypeChooser.js +2 -2
- package/lib/components/choosers/TMMetadataChooser.d.ts +4 -1
- package/lib/components/choosers/TMMetadataChooser.js +28 -7
- package/lib/components/editors/TMDateBox.d.ts +1 -1
- package/lib/components/features/documents/TMDcmtForm.js +312 -56
- package/lib/components/features/documents/TMRelationViewer.js +56 -23
- package/lib/components/features/search/TMSavedQuerySelector.js +1 -1
- package/lib/components/features/search/TMSearch.js +2 -2
- package/lib/components/features/search/TMSearchQueryEditor.js +1 -1
- package/lib/components/features/search/TMSearchQueryPanel.js +8 -25
- package/lib/components/features/search/TMSearchResult.js +91 -10
- package/lib/components/features/search/TMSearchResultsMenuItems.d.ts +2 -1
- package/lib/components/features/search/TMSearchResultsMenuItems.js +97 -51
- package/lib/components/features/tasks/TMTaskForm.js +5 -4
- package/lib/components/features/tasks/TMTasksAgenda.js +4 -4
- package/lib/components/features/tasks/TMTasksCalendar.js +2 -2
- package/lib/components/features/tasks/TMTasksHeader.js +1 -1
- package/lib/components/features/tasks/TMTasksUtils.d.ts +2 -1
- package/lib/components/features/tasks/TMTasksUtils.js +18 -3
- package/lib/components/features/tasks/TMTasksUtilsView.js +26 -4
- package/lib/components/features/tasks/TMTasksView.js +12 -6
- package/lib/components/features/workflow/TMWorkflowPopup.js +3 -3
- package/lib/components/features/workflow/diagram/DiagramItemForm.js +11 -6
- package/lib/components/features/workflow/diagram/RecipientList.js +1 -1
- package/lib/components/forms/TMResultDialog.js +8 -2
- package/lib/components/grids/TMBlogsPost.d.ts +1 -0
- package/lib/components/grids/TMBlogsPost.js +20 -4
- package/lib/components/grids/TMBlogsPostUtils.js +5 -3
- package/lib/components/grids/TMRecentsManager.js +1 -1
- package/lib/components/layout/panelManager/TMPanelManagerContainer.d.ts +1 -0
- package/lib/components/layout/panelManager/TMPanelManagerContainer.js +2 -2
- package/lib/components/layout/panelManager/TMPanelManagerContext.js +0 -1
- package/lib/components/layout/panelManager/TMPanelManagerToolbar.js +2 -1
- package/lib/components/layout/panelManager/types.d.ts +1 -0
- package/lib/components/pages/TMPage.js +1 -1
- package/lib/components/query/TMQuerySummary.d.ts +1 -0
- package/lib/components/query/TMQuerySummary.js +3 -3
- package/lib/components/settings/SettingsAppearance.js +5 -5
- package/lib/components/viewers/TMDataListItemViewer.d.ts +1 -1
- package/lib/components/viewers/TMMidViewer.d.ts +1 -1
- package/lib/components/viewers/TMTidViewer.d.ts +1 -1
- package/lib/helper/GlobalStyles.d.ts +2 -0
- package/lib/helper/GlobalStyles.js +10 -0
- package/lib/helper/Globalization.d.ts +1 -0
- package/lib/helper/Globalization.js +30 -0
- package/lib/helper/SDKUI_Localizator.d.ts +34 -2
- package/lib/helper/SDKUI_Localizator.js +342 -22
- package/lib/helper/TMCustomSearchBar.js +1 -1
- package/lib/helper/TMIcons.d.ts +2 -1
- package/lib/helper/TMIcons.js +4 -1
- package/lib/helper/TMUtils.d.ts +1 -4
- package/lib/helper/TMUtils.js +18 -23
- package/lib/helper/dcmtsHelper.d.ts +2 -1
- package/lib/helper/dcmtsHelper.js +19 -13
- package/lib/helper/helpers.js +2 -1
- package/lib/helper/index.d.ts +1 -0
- package/lib/helper/index.js +1 -0
- package/lib/hooks/useRelatedDocuments.js +35 -26
- package/lib/ts/types.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect, useState } from "react";
|
|
3
3
|
import ArrayStore from "devextreme/data/array_store";
|
|
4
|
-
import Scheduler from "devextreme-react/
|
|
4
|
+
import Scheduler from "devextreme-react/scheduler";
|
|
5
5
|
import { calculateNumberOfDays, highlightTaskText, priorityLegend, renderTaskIcons } from "./TMTasksUtilsView";
|
|
6
6
|
import { Priorities, Task_States } from "@topconsultnpm/sdk-ts";
|
|
7
7
|
import { checkIfNew, convertToSchedulerAppointments, findTasksBySearch, formatDate, getPriorityColor, getStatusLocalizatorValue } from "./TMTasksUtils";
|
|
8
|
-
import ScrollView from "devextreme-react/
|
|
9
|
-
import LoadIndicator from "devextreme-react/
|
|
8
|
+
import ScrollView from "devextreme-react/scroll-view";
|
|
9
|
+
import LoadIndicator from "devextreme-react/load-indicator";
|
|
10
10
|
import { FormModes } from "../../../ts";
|
|
11
11
|
import { SDKUI_Localizator } from "../../../helper";
|
|
12
12
|
import TMCustomSearchBar from "../../../helper/TMCustomSearchBar";
|
|
@@ -55,7 +55,7 @@ const TMTasksAgenda = React.memo((props) => {
|
|
|
55
55
|
let bgColor = 'transparent';
|
|
56
56
|
if (priority)
|
|
57
57
|
bgColor = getPriorityColor(priority);
|
|
58
|
-
return _jsx("div", { style: { width: "100%", height: "100%", display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-end', backgroundColor: bgColor }, children: _jsx(ScrollView, { width: "100%", height: "100%", direction: "both", useNative: true, children: _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', width: '100%', fontWeight: isNew ? 'bold' : 'normal' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [showId && _jsxs("span", { children: [highlightTaskText(currentTask.id.toString(), searchText, currentTask.id), " - "] }), renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }), "\u00A0", _jsx("span", { style: { fontWeight: "bold" }, children: highlightTaskText(currentTask.name ?? '', searchText, currentTask.id) })] }), _jsxs("div", { children: [startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime), " - \u00A0"] })), endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] }))] })] }), fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.
|
|
58
|
+
return _jsx("div", { style: { width: "100%", height: "100%", display: 'flex', flexDirection: 'column', justifyContent: 'flex-start', alignItems: 'flex-end', backgroundColor: bgColor }, children: _jsx(ScrollView, { width: "100%", height: "100%", direction: "both", useNative: true, children: _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', width: '100%', fontWeight: isNew ? 'bold' : 'normal' }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start' }, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center' }, children: [showId && _jsxs("span", { children: [highlightTaskText(currentTask.id.toString(), searchText, currentTask.id), " - "] }), renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }), "\u00A0", _jsx("span", { style: { fontWeight: "bold" }, children: highlightTaskText(currentTask.name ?? '', searchText, currentTask.id) })] }), _jsxs("div", { children: [startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime), " - \u00A0"] })), endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] }))] })] }), fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedTo_Female, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.toName ?? '', searchText, currentTask.id), (showId && currentTask.toID) && _jsxs("span", { children: ["(", currentTask.toID, ")"] })] })] })] }) }) });
|
|
59
59
|
}, [visualizedTasks, searchText]);
|
|
60
60
|
// handle appointment click handler
|
|
61
61
|
const handleAppointmentClick = useCallback((e) => {
|
|
@@ -5,7 +5,7 @@ import { Priorities, Task_States } from "@topconsultnpm/sdk-ts";
|
|
|
5
5
|
import Scheduler, { Resource } from 'devextreme-react/scheduler';
|
|
6
6
|
import { calculateNumberOfDays, highlightTaskText, priorityLegend, renderTaskIcons, taskStateIconMap, TMActionCalendar } from './TMTasksUtilsView';
|
|
7
7
|
import { checkIfNew, convertToSchedulerAppointments, findTasksBySearch, formatDate, getPriorityColor, getPriorityLocalizatorValue, getStatusLocalizatorValue, prioritiesResourceData } from './TMTasksUtils';
|
|
8
|
-
import LoadIndicator from 'devextreme-react/
|
|
8
|
+
import LoadIndicator from 'devextreme-react/load-indicator';
|
|
9
9
|
import { FormModes } from '../../../ts';
|
|
10
10
|
import { SDKUI_Localizator } from '../../../helper';
|
|
11
11
|
import TMTooltip from '../../base/TMTooltip';
|
|
@@ -144,7 +144,7 @@ const TMTasksCalendar = (props) => {
|
|
|
144
144
|
const ID1Name = currentTask.iD1Name || '';
|
|
145
145
|
const isNew = checkIfNew(currentTask.fromID, currentTask.isNew);
|
|
146
146
|
const numberOfDays = calculateNumberOfDays(startTime, endTime);
|
|
147
|
-
return _jsxs("div", { className: "dx-tooltip-appointment-item", onClick: (e) => { e.preventDefault(); e.stopPropagation(); }, style: { backgroundColor: getPriorityColor(currentTask.priority ?? Priorities.None) }, children: [_jsxs("div", { className: "dx-tooltip-appointment-item-content", style: { width: '70%', cursor: 'auto' }, children: [_jsx("div", { style: { display: "flex" }, children: renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [" ", showId && _jsxs("span", { children: [highlightTaskText(appointmentData.id.toString(), searchText, appointmentData.id), " - "] }), " ", highlightTaskText(appointmentData.text ?? '', searchText, currentTask.id)] }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime)] })) }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] })) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [SDKUI_Localizator.Priority, ": ", highlightTaskText(priority, searchText, currentTask.id)] }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.
|
|
147
|
+
return _jsxs("div", { className: "dx-tooltip-appointment-item", onClick: (e) => { e.preventDefault(); e.stopPropagation(); }, style: { backgroundColor: getPriorityColor(currentTask.priority ?? Priorities.None) }, children: [_jsxs("div", { className: "dx-tooltip-appointment-item-content", style: { width: '70%', cursor: 'auto' }, children: [_jsx("div", { style: { display: "flex" }, children: renderTaskIcons({ stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays }) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [" ", showId && _jsxs("span", { children: [highlightTaskText(appointmentData.id.toString(), searchText, appointmentData.id), " - "] }), " ", highlightTaskText(appointmentData.text ?? '', searchText, currentTask.id)] }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: startTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.StartDate, ": ", formatDate(startTime)] })) }), _jsx("div", { className: "dx-tooltip-appointment-item-content-date", children: endTime !== undefined && (_jsxs("span", { children: [SDKUI_Localizator.Expiration, ": ", formatDate(endTime)] })) }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [SDKUI_Localizator.Priority, ": ", highlightTaskText(priority, searchText, currentTask.id)] }), _jsxs("div", { className: "dx-tooltip-appointment-item-content-subject", children: [fromCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedBy, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.fromName ?? '', searchText, currentTask.id), (showId && currentTask.fromID) && _jsxs("span", { children: ["(", currentTask.fromID, ")"] })] })] }), toCell && _jsxs("div", { style: { display: 'flex', alignItems: 'center', alignSelf: 'flex-end' }, children: [_jsxs("span", { children: [SDKUI_Localizator.AssignedTo_Female, ":"] }), "\u00A0", _jsxs("div", { children: [highlightTaskText(currentTask.toName ?? '', searchText, currentTask.id), (showId && currentTask.toID) && _jsxs("span", { children: ["(", currentTask.toID, ")"] })] })] })] })] }), _jsx(TMActionCalendar, { currentTask: currentTask, openTaskForm: openTaskForm, onDeleteCallback: onDeleteCallback })] });
|
|
148
148
|
};
|
|
149
149
|
const onCurrentCalendarDateChange = (value) => {
|
|
150
150
|
// Exit early if it's not a valid Date
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { treeFilterDataSource } from './TMTasksUtilsView';
|
|
4
4
|
import { FilterCategoryId, TaskView } from './TMTasksUtils';
|
|
5
5
|
import { useEffect, useRef, useState } from 'react';
|
|
6
|
-
import ScrollView from 'devextreme-react/
|
|
6
|
+
import ScrollView from 'devextreme-react/scroll-view';
|
|
7
7
|
import TMTooltip from '../../base/TMTooltip';
|
|
8
8
|
import { SDKUI_Localizator } from '../../../helper';
|
|
9
9
|
import TMDropDown from '../../editors/TMDropDown';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Appointment } from 'devextreme/ui/scheduler';
|
|
2
|
-
import { ContextMenuTypes } from 'devextreme-react/
|
|
2
|
+
import { ContextMenuTypes } from 'devextreme-react/context-menu';
|
|
3
3
|
import { TaskDescriptor, Task_States, PdGs, Priorities, ValidationItem } from '@topconsultnpm/sdk-ts';
|
|
4
4
|
import { FormModes, TaskContext } from '../../../ts';
|
|
5
5
|
import { TMDataGridContextMenuItem } from '../../base/TMDataGrid';
|
|
@@ -61,6 +61,7 @@ export declare const getTaskAssignedToMe: (tasks: Array<TaskDescriptor>) => Arra
|
|
|
61
61
|
export declare const getTaskNotPersonalAssignedToMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
|
|
62
62
|
export declare const getTaskPersonalAssignedToMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
|
|
63
63
|
export declare const getTaskAssignedByMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
|
|
64
|
+
export declare const getTaskNotCompletedAssignedByMe: (tasks: Array<TaskDescriptor>) => Array<TaskDescriptor>;
|
|
64
65
|
export declare const getHeaderStatusFilterConfig: () => {
|
|
65
66
|
enabled: boolean;
|
|
66
67
|
dataSource: {
|
|
@@ -210,6 +210,21 @@ export const getTaskAssignedByMe = (tasks) => {
|
|
|
210
210
|
const userID = SDK_Globals.tmSession?.SessionDescr?.userID;
|
|
211
211
|
return tasks.filter((task) => task.toID !== undefined && task.toID !== userID);
|
|
212
212
|
};
|
|
213
|
+
export const getTaskNotCompletedAssignedByMe = (tasks) => {
|
|
214
|
+
const userID = SDK_Globals.tmSession?.SessionDescr?.userID;
|
|
215
|
+
return tasks
|
|
216
|
+
.filter((task) => task.toID !== undefined &&
|
|
217
|
+
task.toID !== userID &&
|
|
218
|
+
task.state !== Task_States.Completed).sort((a, b) => {
|
|
219
|
+
if (!a.endTime && !b.endTime)
|
|
220
|
+
return 0;
|
|
221
|
+
if (!a.endTime)
|
|
222
|
+
return 1;
|
|
223
|
+
if (!b.endTime)
|
|
224
|
+
return -1;
|
|
225
|
+
return a.endTime.getTime() - b.endTime.getTime();
|
|
226
|
+
});
|
|
227
|
+
};
|
|
213
228
|
export const getHeaderStatusFilterConfig = () => ({
|
|
214
229
|
enabled: true,
|
|
215
230
|
dataSource: getStatusLocalizatorValues().map(item => ({
|
|
@@ -298,7 +313,7 @@ export const taskValidatorAsync = async (taskDescriptor) => {
|
|
|
298
313
|
}
|
|
299
314
|
// Validate toID
|
|
300
315
|
if (!taskDescriptor.toID || taskDescriptor.toID <= 0)
|
|
301
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.
|
|
316
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.AssignedTo_Female, `${SDK_Localizator.RequiredField}`));
|
|
302
317
|
// Validate that startTime is less than or equal to endTime
|
|
303
318
|
if (taskDescriptor.startTime && taskDescriptor.endTime) {
|
|
304
319
|
if (taskDescriptor.startTime > taskDescriptor.endTime) {
|
|
@@ -318,7 +333,7 @@ const getPDGExtended = (pdg) => {
|
|
|
318
333
|
case PdGs.WG:
|
|
319
334
|
return SDKUI_Localizator.WorkGroup;
|
|
320
335
|
case PdGs.CF:
|
|
321
|
-
return SDKUI_Localizator.
|
|
336
|
+
return SDKUI_Localizator.Dossier;
|
|
322
337
|
case PdGs.DT:
|
|
323
338
|
return SDKUI_Localizator.Document;
|
|
324
339
|
case PdGs.WF:
|
|
@@ -426,7 +441,7 @@ export const createTasksMenuItems = (taskDescriptor, showId, setShowId, showSear
|
|
|
426
441
|
operationType: 'multiRow',
|
|
427
442
|
disabled: fromDatagrid ? false : !isTaskDescriptorDefined,
|
|
428
443
|
items: [
|
|
429
|
-
{ icon: '
|
|
444
|
+
{ icon: 'product', text: SDKUI_Localizator.NewFemale, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.NotStarted) },
|
|
430
445
|
{ icon: 'refresh', text: SDKUI_Localizator.InProgress, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.InProgress) },
|
|
431
446
|
{ icon: 'check', text: SDKUI_Localizator.Completed, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.Completed) },
|
|
432
447
|
{ icon: 'taskstop', text: SDKUI_Localizator.Pending, operationType: 'multiRow', onClick: (rowIds) => markAsStatus(rowIds, Task_States.Waiting) },
|
|
@@ -7,8 +7,8 @@ import { FormModes } from "../../../ts";
|
|
|
7
7
|
import TMTooltip from "../../base/TMTooltip";
|
|
8
8
|
const taskStateIconClassMap = () => {
|
|
9
9
|
return new Map([
|
|
10
|
-
[Task_States.None, "dx-icon-
|
|
11
|
-
[Task_States.NotStarted, "dx-icon-
|
|
10
|
+
[Task_States.None, "dx-icon-product"],
|
|
11
|
+
[Task_States.NotStarted, "dx-icon-product"],
|
|
12
12
|
[Task_States.InProgress, "dx-icon-refresh"],
|
|
13
13
|
[Task_States.Completed, "dx-icon-check"],
|
|
14
14
|
[Task_States.Waiting, "dx-icon-taskstop"],
|
|
@@ -35,7 +35,28 @@ export const calculateNumberOfDays = (startTime, endTime) => {
|
|
|
35
35
|
};
|
|
36
36
|
export const renderTaskIcons = (taskData) => {
|
|
37
37
|
const { stateLabel, stateTooltipLabel, pdg, ID1Name, endTime, remTime, isNew, numberOfDays } = taskData;
|
|
38
|
-
return (_jsxs(
|
|
38
|
+
return (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [_jsx(TMTooltip, { content: stateTooltipLabel, children: _jsx("div", { className: "task-icon", children: taskStateIconMap().get(stateLabel) }) }), (stateLabel !== Task_States.Completed && endTime && taskIsExpiringSoon(endTime, remTime)) &&
|
|
39
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.Expiring, children: _jsx("i", { className: "dx-icon-warning task-icon" }) }), _jsx(TMTooltip, { content: gotoPDGExtendedLabel(false, pdg ?? PdGs.None, ID1Name), children: _jsx("div", { className: "task-icon", style: {
|
|
40
|
+
marginLeft: pdg === PdGs.CF || pdg === PdGs.WG ? "-4px" : undefined,
|
|
41
|
+
marginRight: pdg === PdGs.CF || pdg === PdGs.WG ? "-4px" : undefined,
|
|
42
|
+
}, children: getPdgsIconMap().get(pdg) }) }), numberOfDays > 1 &&
|
|
43
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.ActivityOverMultipleDays.replaceParams(numberOfDays), children: _jsx("div", { className: "task-icon", style: {
|
|
44
|
+
display: "inline-flex",
|
|
45
|
+
alignItems: "center",
|
|
46
|
+
justifyContent: "center",
|
|
47
|
+
minWidth: "20px",
|
|
48
|
+
height: "20px",
|
|
49
|
+
padding: "0 4px",
|
|
50
|
+
borderRadius: "12px",
|
|
51
|
+
border: "1px solid #0078d4",
|
|
52
|
+
backgroundColor: "rgba(0, 120, 212, 0.08)",
|
|
53
|
+
color: "#0078d4",
|
|
54
|
+
fontSize: "11px",
|
|
55
|
+
fontWeight: 600,
|
|
56
|
+
lineHeight: 1,
|
|
57
|
+
boxSizing: "border-box"
|
|
58
|
+
}, children: numberOfDays > 99 ? "99+" : numberOfDays }) }), isNew &&
|
|
59
|
+
_jsx(TMTooltip, { content: SDKUI_Localizator.NewAssignedActivity, children: _jsx("i", { className: "dx-icon-bell task-icon" }) })] }));
|
|
39
60
|
};
|
|
40
61
|
export const TMActionCalendar = (props) => {
|
|
41
62
|
const { currentTask, openTaskForm, onDeleteCallback } = props;
|
|
@@ -72,7 +93,8 @@ export const priorityLegend = () => _jsx("div", { style: { display: 'flex', alig
|
|
|
72
93
|
export const highlightTaskText = (text, search, taskId) => {
|
|
73
94
|
if (!search)
|
|
74
95
|
return text;
|
|
75
|
-
const
|
|
96
|
+
const escapedSearchText = search.trim().replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
97
|
+
const regex = new RegExp(`(${escapedSearchText})`, 'gi');
|
|
76
98
|
const parts = text.split(regex);
|
|
77
99
|
return parts.map((part, index) => part.toLowerCase() === search.toLowerCase() ? (_jsx("span", { style: { color: "#fff", backgroundColor: '#0f6cbd' }, children: part }, taskId + "-" + index)) : (part));
|
|
78
100
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useState } from "react";
|
|
3
|
-
import { AssignedTab, checkIfNew, createTasksMenuItems, getHeaderPriorityFilterConfig, getHeaderStatusFilterConfig, getMondayOfCurrentWeek, getNewTaskCount, getStatusLocalizatorValue, isTaskAssignedToAnotherUser, TaskView, TEXT_NOT_SELECTED_COLOR } from "./TMTasksUtils";
|
|
3
|
+
import { AssignedTab, checkIfNew, createTasksMenuItems, getHeaderPriorityFilterConfig, getHeaderStatusFilterConfig, getMondayOfCurrentWeek, getNewTaskCount, getStatusLocalizatorValue, isTaskAssignedToAnotherUser, LIGTH_CYAN, LIGTH_RED_ORGANGE, TaskView, TEXT_NOT_SELECTED_COLOR } from "./TMTasksUtils";
|
|
4
4
|
import { TabPanel, Item } from 'devextreme-react/tab-panel';
|
|
5
5
|
import { Priorities, ResultTypes, SDK_Globals, Task_States } from "@topconsultnpm/sdk-ts";
|
|
6
6
|
import { calculateNumberOfDays, renderTaskIcons } from "./TMTasksUtilsView";
|
|
7
7
|
import { getPriorityLocalizatorValue } from "../tasks/TMTasksUtils";
|
|
8
|
-
import ContextMenu from 'devextreme-react/
|
|
8
|
+
import ContextMenu from 'devextreme-react/context-menu';
|
|
9
9
|
import { calcResponsiveSizes, getExceptionMessage, SDKUI_Localizator, StyledTabItem, TMCountBadge } from "../../../helper";
|
|
10
10
|
import { useDeviceType } from "../../base/TMDeviceProvider";
|
|
11
11
|
import { FormModes } from "../../../ts";
|
|
@@ -362,11 +362,17 @@ const TMTasksView = (props) => {
|
|
|
362
362
|
const isCompleted = state === Task_States.Completed;
|
|
363
363
|
const isExpired = endTime && endTime < new Date();
|
|
364
364
|
const isNewTask = checkIfNew(fromID, isNew);
|
|
365
|
-
|
|
365
|
+
const priorityColor = cellData.value === Priorities.High ? LIGTH_RED_ORGANGE : LIGTH_CYAN;
|
|
366
|
+
return (_jsx("div", { style: {
|
|
367
|
+
display: 'flex',
|
|
368
|
+
alignItems: 'center',
|
|
369
|
+
borderLeft: `4px solid ${priorityColor}`,
|
|
370
|
+
paddingLeft: '8px',
|
|
366
371
|
color: isCompleted ? '#000' : (isExpired ? 'red' : '#000'),
|
|
367
372
|
textDecoration: isCompleted ? 'line-through' : 'none',
|
|
368
|
-
fontWeight: isNewTask ? 'bold' : 'normal'
|
|
369
|
-
|
|
373
|
+
fontWeight: isNewTask ? 'bold' : 'normal',
|
|
374
|
+
height: '100%'
|
|
375
|
+
}, children: priorityLabel }));
|
|
370
376
|
}, []);
|
|
371
377
|
const cellDatetimeRender = useCallback((cellData) => {
|
|
372
378
|
const data = cellData.data;
|
|
@@ -503,7 +509,7 @@ const TMTasksView = (props) => {
|
|
|
503
509
|
},
|
|
504
510
|
{
|
|
505
511
|
dataField: "toName",
|
|
506
|
-
caption: SDKUI_Localizator.
|
|
512
|
+
caption: SDKUI_Localizator.AssignedTo_Female,
|
|
507
513
|
dataType: 'string',
|
|
508
514
|
cellRender: cellToRender,
|
|
509
515
|
headerCellRender: (e) => _jsx(RenderCustomHeader, { data: e }),
|
|
@@ -80,7 +80,7 @@ export const WorkFlowOperationButtons = (props) => {
|
|
|
80
80
|
setIsSignWorkflow(false);
|
|
81
81
|
}
|
|
82
82
|
}, [dtd]);
|
|
83
|
-
return (_jsx(StyledWorkFlowOperationButtonsContainer, { "$isMobile": isMobile, children: isSignWorkflow ? (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconSignaturePencil, {}), caption: SDKUI_Localizator.SignatureAndApprove, width: "160px", disabled: signApproveDisable, onClick: () => !signApproveDisable && onSignApprove?.(), advancedColor:
|
|
83
|
+
return (_jsx(StyledWorkFlowOperationButtonsContainer, { "$isMobile": isMobile, children: isSignWorkflow ? (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconSignaturePencil, {}), caption: SDKUI_Localizator.SignatureAndApprove, width: "160px", disabled: signApproveDisable, onClick: () => !signApproveDisable && onSignApprove?.(), advancedColor: "#1a9a49", color: "success" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: rejectDisable, onClick: () => !rejectDisable && onReject?.(), advancedColor: TMColors.error, color: "error" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), advancedColor: TMColors.info, color: "info" })] })) : (_jsxs(_Fragment, { children: [_jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconApply, {}), caption: SDKUI_Localizator.Approve, disabled: approveDisable, onClick: () => !approveDisable && onApprove?.(), advancedColor: "#1a9a49", color: "success" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconCloseOutline, {}), caption: SDKUI_Localizator.Reject, disabled: rejectDisable, onClick: () => !rejectDisable && onReject?.(), advancedColor: TMColors.error, color: "error" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconUser, { fontSize: 16 }), caption: SDKUI_Localizator.Reassign, disabled: reassignDisable, onClick: () => !reassignDisable && onReAssign?.(), advancedColor: TMColors.tertiary, color: "tertiary" }), _jsx(TMButton, { btnStyle: isMobile ? 'toolbar' : 'advanced', showTooltip: isMobile, icon: _jsx(IconInfo, { fontSize: 16 }), caption: SDKUI_Localizator.MoreInformation, width: "180px", disabled: infoDisable, onClick: () => !infoDisable && onMoreInfo?.(), advancedColor: TMColors.info, color: "info" })] })) }));
|
|
84
84
|
};
|
|
85
85
|
export const WorkFlowApproveRejectPopUp = ({ TID = 0, DID = 0, deviceType = DeviceType.DESKTOP, isReject, selectedItems = [], onClose, onCompleted }) => {
|
|
86
86
|
const [commentValue, setCommentValue] = useState('');
|
|
@@ -198,7 +198,7 @@ export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
|
|
|
198
198
|
}
|
|
199
199
|
// Validate toID
|
|
200
200
|
if (!taskDescriptor.toID || taskDescriptor.toID <= 0)
|
|
201
|
-
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.
|
|
201
|
+
vil.push(new ValidationItem(ResultTypes.ERROR, SDKUI_Localizator.AssignedTo_Female, `${SDK_Localizator.RequiredField}`));
|
|
202
202
|
return vil;
|
|
203
203
|
};
|
|
204
204
|
const requestMoreInfoAsync = async () => {
|
|
@@ -271,7 +271,7 @@ export const WorkFlowMoreInfoPopUp = ({ DID = 0, TID = 0, deviceType = DeviceTyp
|
|
|
271
271
|
}
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
|
-
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.
|
|
274
|
+
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) => {
|
|
275
275
|
if (IDs === undefined)
|
|
276
276
|
return;
|
|
277
277
|
setTask({ ...task ?? {}, toID: IDs?.[0] });
|
|
@@ -107,7 +107,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
107
107
|
case DiagramItemTypes.Approval:
|
|
108
108
|
case DiagramItemTypes.DataEntry:
|
|
109
109
|
width = '700px';
|
|
110
|
-
height = '
|
|
110
|
+
height = '530px';
|
|
111
111
|
break;
|
|
112
112
|
case DiagramItemTypes.ExecTask:
|
|
113
113
|
width = '700px';
|
|
@@ -130,6 +130,11 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
130
130
|
width = '700px';
|
|
131
131
|
height = '700px';
|
|
132
132
|
break;
|
|
133
|
+
case DiagramItemTypes.WorkGroup_AddParts:
|
|
134
|
+
case DiagramItemTypes.CaseFlow_AddParts:
|
|
135
|
+
width = '700px';
|
|
136
|
+
height = '530px';
|
|
137
|
+
break;
|
|
133
138
|
default:
|
|
134
139
|
width = '50%';
|
|
135
140
|
height = '50%';
|
|
@@ -383,7 +388,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
383
388
|
};
|
|
384
389
|
// Function to render Condition-specific fields
|
|
385
390
|
const renderConditionFields = () => {
|
|
386
|
-
return (_jsx(TMQuerySummary, { qd: localItem.QD, validateSelect: true, validateOrderBy: false, validationItems: validationItems.filter(v => v.PropertyScopes.includes(DiagramItemProps.QD)), onValueChanged: handleQDChange }));
|
|
391
|
+
return (_jsx(TMQuerySummary, { qd: localItem.QD, showDistinct: true, validateSelect: true, validateOrderBy: false, validationItems: validationItems.filter(v => v.PropertyScopes.includes(DiagramItemProps.QD)), onValueChanged: handleQDChange }));
|
|
387
392
|
};
|
|
388
393
|
// Function to render Status-specific fields
|
|
389
394
|
const renderStatusFields = () => {
|
|
@@ -404,7 +409,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
404
409
|
return qd;
|
|
405
410
|
};
|
|
406
411
|
const qdForRecipientsEditor = localItem.QD ?? newQD();
|
|
407
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMLocalizedTextBox, { label: SDKUI_Localizator.Description, value: localItem.Description, value_IT: localItem.Description_IT, value_EN: localItem.Description_EN, value_FR: localItem.Description_FR, value_PT: localItem.Description_PT, value_ES: localItem.Description_ES, value_DE: localItem.Description_DE, isModifiedWhen: localItem.Description !== localItemOrig.Description, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), onValueChanged: handleLocalizedDescriptionChange }), _jsx(WorkitemRecipientsEditor, { tos: localItem.Tos ?? '', mTID: wf?.MTID, qd: qdForRecipientsEditor, onTosChange: handleTosChange, onQDChange: handleSetRuleQDChange }), _jsx(TMVilViewer, { vil: validationItems.filter(v => v.PropertyName === DiagramItemProps.Tos) }), _jsxs(FlexContainer, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.WorkflowRecipientSetRule, elementStyle: { width: '320px' }, dataSource: SET_RULE_DATASOURCE, value: localItem.SetRule, isModifiedWhen: localItem.SetRule !== localItemOrig.SetRule, onValueChanged: (e) => { handleSetRuleChange(e.target.value); } }), _jsx(TMCheckBox, { value: localItem.AllowZeroTos ?? 0, label: SDKUI_Localizator.WorkflowAllowZeroTos, isModifiedWhen: localItem.AllowZeroTos !== localItemOrig.AllowZeroTos, onValueChanged: handleAllowZeroTosChange })] }), localItem.Type === DiagramItemTypes.ExecTask &&
|
|
412
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMLocalizedTextBox, { label: SDKUI_Localizator.Description, value: localItem.Description, value_IT: localItem.Description_IT, value_EN: localItem.Description_EN, value_FR: localItem.Description_FR, value_PT: localItem.Description_PT, value_ES: localItem.Description_ES, value_DE: localItem.Description_DE, isModifiedWhen: localItem.Description !== localItemOrig.Description, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), onValueChanged: handleLocalizedDescriptionChange }), _jsx(TMTextBox, { label: "SetID", value: localItem.ID ?? '', readOnly: true }), _jsx(WorkitemRecipientsEditor, { tos: localItem.Tos ?? '', mTID: wf?.MTID, qd: qdForRecipientsEditor, onTosChange: handleTosChange, onQDChange: handleSetRuleQDChange }), _jsx(TMVilViewer, { vil: validationItems.filter(v => v.PropertyName === DiagramItemProps.Tos) }), _jsxs(FlexContainer, { children: [_jsx(TMDropDown, { label: SDKUI_Localizator.WorkflowRecipientSetRule, elementStyle: { width: '320px' }, dataSource: SET_RULE_DATASOURCE, value: localItem.SetRule, isModifiedWhen: localItem.SetRule !== localItemOrig.SetRule, onValueChanged: (e) => { handleSetRuleChange(e.target.value); } }), _jsx(TMCheckBox, { value: localItem.AllowZeroTos ?? 0, label: SDKUI_Localizator.WorkflowAllowZeroTos, isModifiedWhen: localItem.AllowZeroTos !== localItemOrig.AllowZeroTos, onValueChanged: handleAllowZeroTosChange })] }), localItem.Type === DiagramItemTypes.ExecTask &&
|
|
408
413
|
_jsxs(BoxContainer, { children: [_jsx(HeaderContainer, { children: _jsx("span", { children: SDKUI_Localizator.Application }) }), renderAppFields()] })] }));
|
|
409
414
|
};
|
|
410
415
|
// Function to render UpdateDcmt-specific fields
|
|
@@ -562,7 +567,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
562
567
|
const newTos = actorsToTos(updatedRecipients);
|
|
563
568
|
handleTos2Change(newTos);
|
|
564
569
|
}, [localItem.Tos2, handleTos2Change]);
|
|
565
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.
|
|
570
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjDescr, valueOrig: localItemOrig.PlatformObjDescr, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjDescr ?? '') !== (localItemOrig.PlatformObjDescr ?? ''), onValueChanged: handlePlatformObjDescrChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.CommentText} (${SDKUI_Localizator.BlogCase})`, placeHolder: 'Inserisci il valore', rows: 2, value: localItem.Value1asString, valueOrig: localItemOrig.Value1asString, tid: wf?.MTID, isModifiedWhen: (localItem.Value1asString ?? '') !== (localItemOrig.Value1asString ?? ''), onValueChanged: handleValue1asStringChange }), _jsx(TMCheckBox, { value: localItem.Value1asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDraftToWg, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(TMCheckBox, { value: localItem.Value2asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtToWg, isModifiedWhen: localItem.Value2asInt !== localItemOrig.Value2asInt, onValueChanged: handleValue2asIntChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsxs(RecipientsContainer, { children: [_jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient }), _jsx(RecipientList, { recipients: tos2Recipients, title: SDKUI_Localizator.Participants, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTos2Recipients(newRecipients, 0), onRemove: handleRemoveTos2Recipient })] })] }));
|
|
566
571
|
};
|
|
567
572
|
const renderCaseFlowCreateFields = () => {
|
|
568
573
|
const [dossierTypes, setDossierTypes] = useState([]);
|
|
@@ -606,7 +611,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
606
611
|
const newTos = actorsToTos(updatedRecipients);
|
|
607
612
|
handleTos2Change(newTos);
|
|
608
613
|
}, [localItem.Tos2, handleTos2Change]);
|
|
609
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.
|
|
614
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMDropDown, { dataSource: dossierTypes, label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Dossier})`, value: localItem.Value3asInt, isModifiedWhen: (localItem.Value3asInt ?? 0) !== (localItemOrig.Value3asInt ?? 0), onValueChanged: (e) => { handleValue3asIntChange(e.target.value); } }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Dossier})`, value: localItem.PlatformObjDescr, valueOrig: localItemOrig.PlatformObjDescr, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjDescr ?? '') !== (localItemOrig.PlatformObjDescr ?? ''), onValueChanged: handlePlatformObjDescrChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.CommentText} (${SDKUI_Localizator.BlogCase})`, placeHolder: 'Inserisci il valore', rows: 2, value: localItem.Value1asString, valueOrig: localItemOrig.Value1asString, tid: wf?.MTID, isModifiedWhen: (localItem.Value1asString ?? '') !== (localItemOrig.Value1asString ?? ''), onValueChanged: handleValue1asStringChange }), _jsx(TMCheckBox, { value: localItem.Value1asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtAsAttachment, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(TMCheckBox, { value: localItem.Value2asInt ?? 0, label: SDKUI_Localizator.WorkflowAddDcmtToDossier, isModifiedWhen: localItem.Value2asInt !== localItemOrig.Value2asInt, onValueChanged: handleValue2asIntChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsxs(RecipientsContainer, { children: [_jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient }), _jsx(RecipientList, { recipients: tos2Recipients, title: SDKUI_Localizator.Participants, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTos2Recipients(newRecipients, 0), onRemove: handleRemoveTos2Recipient })] })] }));
|
|
610
615
|
};
|
|
611
616
|
const renderAddPartsFields = () => {
|
|
612
617
|
const { andRecipients: tosRecipients } = useMemo(() => {
|
|
@@ -624,7 +629,7 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
624
629
|
const newTos = actorsToTos(updatedRecipients);
|
|
625
630
|
handleTosChange(newTos);
|
|
626
631
|
}, [localItem.Tos, handleTosChange]);
|
|
627
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${localItem.Type === DiagramItemTypes.CaseFlow_AddParts ? SDKUI_Localizator.
|
|
632
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${localItem.Type === DiagramItemTypes.CaseFlow_AddParts ? SDKUI_Localizator.Dossier : SDKUI_Localizator.WorkGroup})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMCheckBox, { value: localItem.Trunc ?? 0, label: SDKUI_Localizator.TruncateString, isModifiedWhen: localItem.Trunc !== localItemOrig.Trunc, onValueChanged: handleTruncChange }), _jsx(TMRadioButton, { label: SDKUI_Localizator.OperationType, dataSource: [
|
|
628
633
|
{ value: 1, display: SDKUI_Localizator.Add },
|
|
629
634
|
{ value: 0, display: SDKUI_Localizator.Remove },
|
|
630
635
|
], value: localItem.Value1asInt, isModifiedWhen: localItem.Value1asInt !== localItemOrig.Value1asInt, onValueChanged: handleValue1asIntChange }), _jsx(RecipientList, { recipients: tosRecipients, title: SDKUI_Localizator.OwnerName, tid: wf?.MTID, onAdd: (newRecipients) => handleAddTosRecipients(newRecipients, 0), onRemove: handleRemoveTosRecipient })] }));
|
|
@@ -199,6 +199,6 @@ const RecipientList = ({ recipients, title, tid, qd, onAdd, onRemove, onQDChange
|
|
|
199
199
|
onRemove(recipient);
|
|
200
200
|
setUiState(prevState => ({ ...prevState, selectedRecipientIndex: null })); // Resetta la selezione
|
|
201
201
|
} }), renderActorViewer(recipient)] }, index))) }), uiState.showUserChooser && _jsx(TMUserChooserForm, { allowMultipleSelection: true, allowSorting: true, onClose: () => setUiState(prevState => ({ ...prevState, showUserChooser: false })), onChoose: (IDs) => handleUserChosen(IDs) }), uiState.showGroupChooser && _jsx(TMGroupChooserForm, { allowMultipleSelection: true, allowSorting: true, onClose: () => setUiState(prevState => ({ ...prevState, showGroupChooser: false })), onChoose: (IDs) => handleGroupChosen(IDs) }), uiState.showMetadataChooser && tid && _jsx(TMMetadataChooserForm, { allowMultipleSelection: true, allowSorting: true, tids: [tid], onClose: () => setUiState(prevState => ({ ...prevState, showMetadataChooser: false })), onChoose: (IDs) => handleMetadataChosen(IDs) }), uiState.showQdEditor &&
|
|
202
|
-
_jsx(TMModal, { title: SDKUI_Localizator.QueryDefine, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })), children: _jsx(TMQueryEditor, { inputData: qd, formMode: FormModes.Update, onApplied: handleQdChosen, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })) }) })] }));
|
|
202
|
+
_jsx(TMModal, { title: SDKUI_Localizator.QueryDefine, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })), children: _jsx(TMQueryEditor, { inputData: qd, formMode: FormModes.Update, showDistinct: true, onApplied: handleQdChosen, onClose: () => setUiState(prevState => ({ ...prevState, showQdEditor: false })) }) })] }));
|
|
203
203
|
};
|
|
204
204
|
export default RecipientList;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ResultTypes } from '@topconsultnpm/sdk-ts';
|
|
3
|
-
import DataGrid, { Column, HeaderFilter, Pager, Paging, Scrolling } from 'devextreme-react/
|
|
3
|
+
import DataGrid, { Column, HeaderFilter, Pager, Paging, Scrolling } from 'devextreme-react/data-grid';
|
|
4
4
|
import ReactDOM from 'react-dom/client';
|
|
5
5
|
import { IconSuccessCirlce, IconWarning, IconCloseCircle, IconInfo, SDKUI_Globals, SDKUI_Localizator } from '../../helper';
|
|
6
6
|
import { TMColors } from '../../utils/theme';
|
|
@@ -8,6 +8,7 @@ import ShowAlert from '../base/TMAlert';
|
|
|
8
8
|
import { TMDeviceProvider } from '../base/TMDeviceProvider';
|
|
9
9
|
import TMLayoutContainer from '../base/TMLayout';
|
|
10
10
|
import TMModal from '../base/TMModal';
|
|
11
|
+
import { TMExceptionBoxManager } from '../base/TMPopUp';
|
|
11
12
|
const cellRender = (cellData) => {
|
|
12
13
|
const resultType = cellData.data.resultType;
|
|
13
14
|
switch (resultType) {
|
|
@@ -19,7 +20,12 @@ const cellRender = (cellData) => {
|
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
const TMResultDialog = ({ title, result, id1Caption, id2Caption }) => {
|
|
22
|
-
|
|
23
|
+
const handleRowDblClick = (e) => {
|
|
24
|
+
if (e.data && e.data.description) {
|
|
25
|
+
TMExceptionBoxManager.show({ exception: e.data.description });
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return (_jsx(TMModal, { height: '65%', width: '75%', title: `${SDKUI_Localizator.OperationResult} - ${title}`, children: _jsxs(TMLayoutContainer, { children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: '5px', padding: '5px', justifyContent: 'center', alignItems: 'center' }, children: [_jsx("p", { children: `${SDKUI_Localizator.ProcessedItems}: ${result.length}` }), _jsx(IconSuccessCirlce, { fontSize: 22, color: TMColors.success }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.SUCCESS).length ?? 0 }), _jsx(IconWarning, { fontSize: 22, color: TMColors.warning }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.WARNING).length ?? 0 }), _jsx(IconCloseCircle, { fontSize: 22, color: TMColors.error }), _jsx("p", { children: result.filter(o => o.resultType == ResultTypes.ERROR).length ?? 0 })] }), _jsxs(DataGrid, { dataSource: result.filter(o => o.resultType != ResultTypes.SUCCESS), showColumnLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showRowLines) === 1, showRowLines: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.showColumnLines) === 1, keyExpr: "rowIndex", width: "100%", height: "100%", columnResizingMode: "widget", allowColumnResizing: true, focusedRowEnabled: true, hoverStateEnabled: true, rowAlternationEnabled: true, onRowDblClick: handleRowDblClick, children: [_jsx(Column, { dataField: 'resultType', caption: '', width: "5%", allowResizing: true, allowSorting: true, cellRender: cellRender }), _jsx(Column, { dataField: 'id1', caption: id1Caption, width: "10%" }), id2Caption && _jsx(Column, { dataField: 'id2', caption: id2Caption, width: "10%" }), _jsx(Column, { dataField: 'description', allowResizing: true, caption: SDKUI_Localizator.Description, allowSorting: true, width: id2Caption ? "75%" : "85%" }), _jsx(HeaderFilter, { visible: true }), _jsx(Paging, { enabled: true, pageSize: 30 }), _jsx(Pager, { visible: true, showInfo: true, showNavigationButtons: true }), _jsx(Scrolling, { mode: 'standard', useNative: Number(SDKUI_Globals.userSettings?.themeSettings.gridSettings.useNativeScrollbar) === 1 })] })] }) }));
|
|
23
29
|
};
|
|
24
30
|
export default TMResultDialog;
|
|
25
31
|
export class TMResultManager {
|
|
@@ -74,6 +74,7 @@ interface TMBlogsPostProps {
|
|
|
74
74
|
externalBlogPost?: BlogPost;
|
|
75
75
|
/** Optional function to reset the external blog post */
|
|
76
76
|
resetExternalBlogPost?: () => void;
|
|
77
|
+
visible?: boolean;
|
|
77
78
|
allTasks?: Array<TaskDescriptor>;
|
|
78
79
|
getAllTasks?: () => Promise<void>;
|
|
79
80
|
deleteTaskByIdsCallback?: (deletedTaskIds: Array<number>) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import { LayoutModes, ResultTypes, SDK_Globals, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
3
|
+
import { DossierEngine, LayoutModes, ResultTypes, SDK_Globals, WorkingGroupEngine } from "@topconsultnpm/sdk-ts";
|
|
4
4
|
import { ContextMenu } from "devextreme-react";
|
|
5
5
|
import { SDKUI_Localizator, Globalization, getExceptionMessage, TMConditionalWrapper } from "../../helper";
|
|
6
6
|
import TMToppyMessage from "../../helper/TMToppyMessage";
|
|
@@ -30,7 +30,7 @@ const TMBlogsPost = (props) => {
|
|
|
30
30
|
isRestoreEnabled: false,
|
|
31
31
|
isRefreshEnabled: false,
|
|
32
32
|
isCreateContextualTask: false,
|
|
33
|
-
}, showFloatingCommentButton = false, showCommentFormCallback, showTaskFormCallback, refreshCallback, showId, setShowId, refreshHomePageNews, markBlogAsRead, externalBlogPost, resetExternalBlogPost, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, } = props;
|
|
33
|
+
}, showFloatingCommentButton = false, showCommentFormCallback, showTaskFormCallback, refreshCallback, showId, setShowId, refreshHomePageNews, markBlogAsRead, externalBlogPost, resetExternalBlogPost, visible = true, allTasks = [], getAllTasks, deleteTaskByIdsCallback, addTaskCallback, editTaskCallback, handleNavigateToWGs, handleNavigateToDossiers, } = props;
|
|
34
34
|
const { abortController, showWaitPanel, waitPanelTitle, showPrimary, waitPanelTextPrimary, waitPanelValuePrimary, waitPanelMaxValuePrimary, showSecondary, waitPanelTextSecondary, waitPanelValueSecondary, waitPanelMaxValueSecondary, downloadDcmtsAsync } = useDcmtOperations();
|
|
35
35
|
const bottomRef = useRef(null);
|
|
36
36
|
const containerRef = useRef(null);
|
|
@@ -222,6 +222,11 @@ const TMBlogsPost = (props) => {
|
|
|
222
222
|
if (setShowId)
|
|
223
223
|
setShowId(localShowId);
|
|
224
224
|
}, [localShowId]);
|
|
225
|
+
useEffect(() => {
|
|
226
|
+
if (!visible) {
|
|
227
|
+
closeContextMenu();
|
|
228
|
+
}
|
|
229
|
+
}, [visible]);
|
|
225
230
|
const toggleHeaderClick = () => {
|
|
226
231
|
setCurrentHeader(prevState => {
|
|
227
232
|
if (prevState === undefined) {
|
|
@@ -320,6 +325,16 @@ const TMBlogsPost = (props) => {
|
|
|
320
325
|
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
321
326
|
});
|
|
322
327
|
break;
|
|
328
|
+
case 'DS':
|
|
329
|
+
const dossierEngine = new DossierEngine(SDK_Globals.tmSession);
|
|
330
|
+
await dossierEngine.FollowAddOrRemoveAsync(currentBlog.id, true).then(async () => {
|
|
331
|
+
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, description: SDKUI_Localizator.OperationSuccess, resultType: ResultTypes.SUCCESS });
|
|
332
|
+
refreshHomePageNews?.();
|
|
333
|
+
})
|
|
334
|
+
.catch((err) => {
|
|
335
|
+
result.push({ rowIndex: currentBlog.id, id1: currentBlog.id, id2: currentBlog.id, resultType: ResultTypes.ERROR, description: getExceptionMessage(err) });
|
|
336
|
+
});
|
|
337
|
+
break;
|
|
323
338
|
default:
|
|
324
339
|
ShowAlert({ message: 'TODO', mode: 'warning', title: SDKUI_Localizator.Unfollow, duration: 3000 });
|
|
325
340
|
break;
|
|
@@ -500,11 +515,12 @@ const TMBlogsPost = (props) => {
|
|
|
500
515
|
beginGroup: true
|
|
501
516
|
});
|
|
502
517
|
}
|
|
503
|
-
|
|
518
|
+
console.log('classId', classId);
|
|
519
|
+
if (targetItem && Boolean(classId && (classId === 'WG' || classId === 'DS'))) {
|
|
504
520
|
menuItems.push({
|
|
505
521
|
icon: "eyeclose",
|
|
506
522
|
text: SDKUI_Localizator.Unfollow,
|
|
507
|
-
onClick: () => targetItem && classId && unFollowCallback(targetItem, classId),
|
|
523
|
+
onClick: () => (targetItem && classId) && unFollowCallback(targetItem, classId),
|
|
508
524
|
});
|
|
509
525
|
}
|
|
510
526
|
if (contextMenuParams.isShowHideFilterEnabled) {
|
|
@@ -159,18 +159,20 @@ export const getDcmtTypeDescriptor = async (blogPosts) => {
|
|
|
159
159
|
export const BlogPostHomeHeader = (header, classId, isSelected, searchText, headerClickCallback) => {
|
|
160
160
|
const isWorkGroup = classId === 'WG';
|
|
161
161
|
const iconColor = isSelected ? '#ffffff' : isWorkGroup ? '#009700' : '#e65b00';
|
|
162
|
-
return (_jsxs("div", {
|
|
162
|
+
return (_jsxs("div", { style: {
|
|
163
163
|
display: "flex",
|
|
164
164
|
alignItems: "center",
|
|
165
165
|
cursor: "pointer",
|
|
166
166
|
fontWeight: "bold",
|
|
167
167
|
color: isSelected ? "#fff" : TMColors.primary,
|
|
168
168
|
gap: "4px",
|
|
169
|
-
}, children: [_jsx(TMTooltip, { content: isWorkGroup ? SDKUI_Localizator.WorkGroup : SDKUI_Localizator.
|
|
169
|
+
}, children: [_jsx(TMTooltip, { content: isWorkGroup ? SDKUI_Localizator.WorkGroup : SDKUI_Localizator.Dossier, children: isWorkGroup ? (_jsx(IconMenuCAWorkingGroups, { color: iconColor, fontSize: 28, onClick: headerClickCallback })) : (_jsx(IconCADossier, { color: iconColor, fontSize: 28, onClick: headerClickCallback })) }), _jsx("div", { onClick: headerClickCallback, style: {
|
|
170
170
|
whiteSpace: "nowrap",
|
|
171
171
|
overflow: "hidden",
|
|
172
172
|
textOverflow: "ellipsis",
|
|
173
|
-
|
|
173
|
+
display: "inline-block",
|
|
174
|
+
cursor: "pointer",
|
|
175
|
+
maxWidth: "100%",
|
|
174
176
|
}, children: highlightText(header ?? "", searchText, isSelected) })] }));
|
|
175
177
|
};
|
|
176
178
|
export const isHeaderFullyHidden = (header) => {
|
|
@@ -3,7 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { useCallback, useEffect, useState } from 'react';
|
|
4
4
|
import ReactDOMServer from 'react-dom/server';
|
|
5
5
|
import { DcmtTypeListCacheService } from '@topconsultnpm/sdk-ts';
|
|
6
|
-
import ContextMenu from 'devextreme-react/
|
|
6
|
+
import ContextMenu from 'devextreme-react/context-menu';
|
|
7
7
|
import { IconDelete, SDKUI_Localizator, IconApply, IconInfo, IconCloseOutline } from '../../helper';
|
|
8
8
|
import { TMColors } from '../../utils/theme';
|
|
9
9
|
import { DeviceType } from '../base/TMDeviceProvider';
|
|
@@ -4,6 +4,7 @@ interface TMPanelManagerContainerProps {
|
|
|
4
4
|
showToolbar: boolean;
|
|
5
5
|
direction: TMPanelDirection;
|
|
6
6
|
parentId?: string;
|
|
7
|
+
minPanelSizePx?: number;
|
|
7
8
|
}
|
|
8
9
|
declare const TMPanelManagerContainer: (props: TMPanelManagerContainerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
10
|
export default TMPanelManagerContainer;
|
|
@@ -24,7 +24,7 @@ const StyledResizerGutter = styled.div `
|
|
|
24
24
|
z-index: 10;
|
|
25
25
|
`;
|
|
26
26
|
const TMPanelManagerContainer = (props) => {
|
|
27
|
-
const { panels, showToolbar, direction, parentId } = props;
|
|
27
|
+
const { panels, showToolbar, direction, parentId, minPanelSizePx = 150 } = props;
|
|
28
28
|
const { panelVisibility, setPanelDimensionsById, hasVisiblePanels, maximizedPanels, updateIsResizingActive } = useTMPanelManagerContext();
|
|
29
29
|
// Get the current device type (e.g., mobile, tablet, desktop) using a custom hook
|
|
30
30
|
const deviceType = useDeviceType();
|
|
@@ -73,7 +73,7 @@ const TMPanelManagerContainer = (props) => {
|
|
|
73
73
|
let newCurrent = initialCurrent + deltaPercent;
|
|
74
74
|
let newNext = initialNext - deltaPercent;
|
|
75
75
|
// Set a minimum size threshold (to prevent panels from collapsing)
|
|
76
|
-
const minPercent = (
|
|
76
|
+
const minPercent = (minPanelSizePx / containerSize) * 100;
|
|
77
77
|
// Correct sizes if they go below the minimum
|
|
78
78
|
if (newCurrent < minPercent) {
|
|
79
79
|
newCurrent = minPercent;
|
|
@@ -118,7 +118,6 @@ export const TMPanelManagerProvider = (props) => {
|
|
|
118
118
|
const maximizePanel = useCallback((id) => {
|
|
119
119
|
// Get all parent panel IDs recursively for the given panel ID
|
|
120
120
|
const parents = showParentRecursively(id, hierarchyMap).map(([pid]) => pid);
|
|
121
|
-
4;
|
|
122
121
|
// Combine parents and the current panel ID into one array to maximize
|
|
123
122
|
const toMaximize = [...parents, id];
|
|
124
123
|
// Update state to track which panels are maximized
|
|
@@ -76,7 +76,8 @@ const TMPanelManagerToolbar = (props) => {
|
|
|
76
76
|
const isActive = panelVisibility[visibleLeafPanel.id];
|
|
77
77
|
const isDisabled = toolbarButtonsDisabled[visibleLeafPanel.id];
|
|
78
78
|
const count = visibleLeafPanel.toolbarOptions?.count ?? 0;
|
|
79
|
-
|
|
79
|
+
const tooltip = visibleLeafPanel.toolbarOptions?.tooltip ?? '';
|
|
80
|
+
return _jsx(TMTooltip, { content: tooltip || (visibleLeafPanel.name + (count > 0 ? ": " + count : '')), position: isMobile ? 'top' : 'left', children: _jsxs(StyledToolbarButton, { disabled: isDisabled, "$isDisabled": isDisabled, onClick: () => onClickCallback(visibleLeafPanel.id, isActive), "$isActive": isActive || visibleLeafPanel.toolbarOptions?.alwaysActiveColor, children: [typeof visibleLeafPanel.toolbarOptions?.icon === 'string' ? (_jsx("i", { className: `dx-icon dx-icon-${visibleLeafPanel.toolbarOptions?.icon}` })) : (visibleLeafPanel.toolbarOptions?.icon), (!isActive && count > 0) && _jsxs(Badge, { "$background": visibleLeafPanel.toolbarOptions?.countBackgroundColor, children: [" ", formatCount(count), " "] })] }, visibleLeafPanel.id) }, visibleLeafPanel.id);
|
|
80
81
|
}) }));
|
|
81
82
|
};
|
|
82
83
|
export default TMPanelManagerToolbar;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState, useEffect } from "react";
|
|
3
3
|
import { SDK_Globals, ObjectClasses, ResultTypes } from "@topconsultnpm/sdk-ts";
|
|
4
|
-
import DataGrid, { Column, GroupPanel, Grouping, HeaderFilter, LoadPanel, Pager, Paging, Scrolling, SearchPanel, Selection } from "devextreme-react/
|
|
4
|
+
import DataGrid, { Column, GroupPanel, Grouping, HeaderFilter, LoadPanel, Pager, Paging, Scrolling, SearchPanel, Selection } from "devextreme-react/data-grid";
|
|
5
5
|
import { PlatformObjectService } from "../../services/platform_services";
|
|
6
6
|
import { FormModes } from "../../ts";
|
|
7
7
|
import { Globalization, IconAdd, IconColumns, IconCopy, IconDelete, IconDuplicate, IconHide, IconMail, IconMenuVertical, IconOpenInNew, IconRefresh, IconShow, SDKUI_Globals, SDKUI_Localizator, calcSaveFormTitle, canNext, canPrev, dialogConfirmOperation, getExceptionMessage, getNext, getPrev } from "../../helper";
|