@topconsultnpm/sdkui-react 6.19.0-dev2.23 → 6.19.0-dev2.25
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/features/tasks/TMTaskForm.js +2 -2
- package/lib/components/features/tasks/TMTasksAgenda.js +1 -1
- package/lib/components/features/tasks/TMTasksCalendar.js +1 -1
- package/lib/components/features/tasks/TMTasksUtils.d.ts +1 -0
- package/lib/components/features/tasks/TMTasksUtils.js +17 -2
- package/lib/components/features/tasks/TMTasksUtilsView.js +2 -2
- package/lib/components/features/tasks/TMTasksView.js +11 -5
- package/lib/components/features/workflow/TMWorkflowPopup.js +2 -2
- package/lib/helper/SDKUI_Localizator.d.ts +1 -0
- package/lib/helper/SDKUI_Localizator.js +10 -0
- package/package.json +1 -1
|
@@ -373,12 +373,12 @@ const TMTaskForm = (props) => {
|
|
|
373
373
|
if (formData.pdG !== PdGs.None)
|
|
374
374
|
e.currentTarget.style.backgroundColor = '#f5f5f7';
|
|
375
375
|
}, children: [_jsx("span", { style: { display: 'flex', alignItems: 'center' }, children: getPdgsIconMap().get(formData.pdG) }), _jsx("span", { children: getOriginLabel(formData.pdG, formData.iD1Name) })] }) }) }) }) })), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.Name, value: formData?.name ?? '', readOnly: fieldsReadOnly.name, autoFocus: true, maxLength: 100, isModifiedWhen: formData?.name !== formDataOrig?.name, onValueChanged: (e) => { setFormData({ ...formData ?? {}, name: e.target.value }); }, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.Name) }) }) }), _jsx("div", { style: { width: '100%' }, 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 }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: (formMode === FormModes.Create || !areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID)) ?
|
|
376
|
-
_jsx("div", { id: "assignedToAnotherUserField", style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMUserChooser, { dataSource: usersList ?? undefined, allowMultipleSelection: false, label: SDKUI_Localizator.
|
|
376
|
+
_jsx("div", { id: "assignedToAnotherUserField", style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMUserChooser, { dataSource: usersList ?? undefined, allowMultipleSelection: false, label: SDKUI_Localizator.AssignedTo_Female, readOnly: fieldsReadOnly.assignedTO, values: formData?.toID ? [formData?.toID] : [], isModifiedWhen: formData?.toID !== formDataOrig?.toID, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.AssignedTo_Female), onValueChanged: (newValue) => {
|
|
377
377
|
if (newValue === undefined)
|
|
378
378
|
return;
|
|
379
379
|
setFormData({ ...formData ?? {}, toID: newValue[0] });
|
|
380
380
|
} }) })
|
|
381
|
-
: formMode === FormModes.Update && _jsxs(_Fragment, { children: [areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedBy, value: formData?.fromName ?? '', readOnly: true }) }), areDifferentIDs(formDataOrig?.toID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.
|
|
381
|
+
: formMode === FormModes.Update && _jsxs(_Fragment, { children: [areDifferentIDs(formDataOrig?.fromID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedBy, value: formData?.fromName ?? '', readOnly: true }) }), areDifferentIDs(formDataOrig?.toID, SDK_Globals.tmSession?.SessionDescr?.userID) && _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMTextBox, { label: SDKUI_Localizator.AssignedTo_Female, value: formData?.toName ?? '', readOnly: true }) })] }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsxs(_Fragment, { children: [_jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: _jsx(TMDropDown, { label: SDKUI_Localizator.Status, value: formData?.state, dataSource: getStatusLocalizatorValues(), isModifiedWhen: formData?.state !== formDataOrig?.state, onValueChanged: onStatusValueChange, readOnly: fieldsReadOnly.status }) }), _jsx("div", { style: { width: isMobile ? '100%' : '50%' }, children: !fieldsReadOnly.priority ? _jsx(TMDropDown, { label: SDKUI_Localizator.Priority, value: formData?.priority, dataSource: getPriorityLocalizatorValues(), isModifiedWhen: formData?.priority !== formDataOrig?.priority, onValueChanged: onPriorityValueChange })
|
|
382
382
|
: _jsx(TMTextBox, { label: SDKUI_Localizator.Priority, value: getPriorityLocalizatorValue(formData?.priority ?? Priorities.Low), readOnly: true }) })] }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 10 }, children: children }), children: _jsxs(_Fragment, { children: [_jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, children: !fieldsReadOnly.startDate ? _jsx(TMDateBox, { id: "start-date", resetTimeToZeroOnKeyPress: false, label: SDKUI_Localizator.StartDate, dateDisplayType: DateDisplayTypes.DateTime, value: formData?.startTime, isModifiedWhen: formData?.startTime !== formDataOrig?.startTime, validationItems: validationItems?.filter(o => o.PropertyName === SDKUI_Localizator.ErrorStartEndDate), onContentReady: handleStartTimeContentReady, onValueChange: (value) => { setFormData({ ...formData ?? {}, startTime: value }); }, showClearButton: true }) : _jsx(TMTextBox, { label: SDKUI_Localizator.StartDate, value: formData?.startTime ? formatDate(formData?.startTime) : '', readOnly: true }) }), _jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, children: !fieldsReadOnly.startDate ? _jsx(TMDateBox, { id: "end-date", resetTimeToZeroOnKeyPress: false, label: SDKUI_Localizator.Expiration, 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: handleEndTimeContentReady, onValueChange: (value) => { setFormData({ ...formData ?? {}, endTime: value }); }, showClearButton: true, readOnly: fieldsReadOnly.endDate }) : _jsx(TMTextBox, { label: SDKUI_Localizator.Expiration, value: formData?.endTime ? formatDate(formData?.endTime) : '', readOnly: true }) })] }) }), _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 3 }, children: children }), children: _jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, 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 }) }) }), (formData?.state && [Task_States.Completed, Task_States.Waiting, Task_States.Deferred].includes(formData?.state) ||
|
|
383
383
|
(formData?.response ?? "") !== "") && _jsx(TMConditionalWrapper, { condition: !isMobile, wrapper: children => _jsx("div", { style: { display: 'flex', flexDirection: 'row', width: '100%', gap: 3 }, children: children }), children: _jsx("div", { style: { width: isMobile ? '100%' : '50%', marginTop: 10 }, children: _jsxs(ResponseCommentWrapper, { children: [_jsx(ResponseCommentTextArea, { id: "responseId", name: "response", "$isValid": true, value: formData?.response ?? '', onChange: onAnswerChange, "$isModifiedWhen": formData?.response !== formDataOrig?.response, disabled: (formData?.response ?? "") !== "" &&
|
|
384
384
|
(formData?.state && ![Task_States.Completed, Task_States.Waiting, Task_States.Deferred].includes(formData?.state)) }), _jsxs(ResponseCommentLabel, { htmlFor: "responseId", children: [SDKUI_Localizator.Answer, _jsxs(TMTooltip, { content: SDKUI_Localizator.AnswerTooltip, children: [" ", _jsx("i", { className: 'dx-icon-info' }), " "] })] }), _jsx(ResponseCommentCharacterCounter, { children: `${500 - (formData?.response ?? '').length} ${SDKUI_Localizator.CharactersRemaining}` })] }) }) })] }) }) }), (showDcmtForm && formData?.iD1 && formData?.iD2) &&
|
|
@@ -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) => {
|
|
@@ -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
|
|
@@ -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) {
|
|
@@ -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"],
|
|
@@ -1,6 +1,6 @@
|
|
|
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";
|
|
@@ -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 }),
|
|
@@ -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] });
|
|
@@ -54,6 +54,7 @@ export declare class SDKUI_Localizator {
|
|
|
54
54
|
static get AssignedBy(): "Zugewiesen von" | "Assigned by" | "Asignado por" | "Assigné par" | "Atribuído por" | "Assegnata da";
|
|
55
55
|
static get AssignedByMe(): "Von mir zugewiesene" | "Assigned by me" | "Por mí" | "Que j'ai assignées" | "Atribuídas por mim" | "Assegnate da me";
|
|
56
56
|
static get AssignedTo(): string;
|
|
57
|
+
static get AssignedTo_Female(): string;
|
|
57
58
|
static get AssignedToMe(): "Mir zugewiesene" | "Assigned to me" | "Asignadas a mí" | "Qui me sont assignées" | "Atribuídas a mim" | "Assegnate a me";
|
|
58
59
|
static get AttachDocument(): "Dokument anhängen" | "Attach Document" | "Adjuntar documento" | "Joindre un document" | "Anexar documento" | "Allega documento";
|
|
59
60
|
static get AttachingDocuments(): "Dokumente werden angehängt..." | "Attaching documents..." | "Adjuntando documentos..." | "Pièces jointes en cours..." | "Anexando documentos..." | "Allegando documenti...";
|
|
@@ -494,6 +494,16 @@ export class SDKUI_Localizator {
|
|
|
494
494
|
default: return "Assegnato a";
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
+
static get AssignedTo_Female() {
|
|
498
|
+
switch (this._cultureID) {
|
|
499
|
+
case CultureIDs.De_DE: return "Zugewiesen an";
|
|
500
|
+
case CultureIDs.En_US: return "Assigned to";
|
|
501
|
+
case CultureIDs.Es_ES: return "Asignada a";
|
|
502
|
+
case CultureIDs.Fr_FR: return "Attribuée à";
|
|
503
|
+
case CultureIDs.Pt_PT: return "Atribuída a";
|
|
504
|
+
default: return "Assegnata a";
|
|
505
|
+
}
|
|
506
|
+
}
|
|
497
507
|
static get AssignedToMe() {
|
|
498
508
|
switch (this._cultureID) {
|
|
499
509
|
case CultureIDs.De_DE: return "Mir zugewiesene";
|