@topconsultnpm/sdkui-react-beta 6.16.46 → 6.16.48
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.
|
@@ -9,7 +9,7 @@ import ShowAlert from './TMAlert';
|
|
|
9
9
|
import { IconCopy } from '../../helper';
|
|
10
10
|
import ReactDOM from 'react-dom/client';
|
|
11
11
|
import { SDK_Globals } from '@topconsultnpm/sdk-ts-beta';
|
|
12
|
-
import TMLayoutContainer, {
|
|
12
|
+
import TMLayoutContainer, { TMLayoutItem } from './TMLayout';
|
|
13
13
|
import { Popup } from 'devextreme-react';
|
|
14
14
|
import TMTabGroup, { TMTab } from './TMTab';
|
|
15
15
|
import { DeviceType, TMDeviceProvider, useDeviceType } from './TMDeviceProvider';
|
|
@@ -39,12 +39,25 @@ const StyledMessageToolbar = styled.div `
|
|
|
39
39
|
flex-direction: row;
|
|
40
40
|
justify-content: flex-end;
|
|
41
41
|
align-items: center;
|
|
42
|
-
gap: 5px;
|
|
43
|
-
padding: 5px;
|
|
42
|
+
gap: clamp(2px, 1vw, 5px);
|
|
43
|
+
padding: clamp(3px, 1vw, 5px);
|
|
44
44
|
user-select: none;
|
|
45
45
|
border-top: 1px solid #f3f3f3;
|
|
46
46
|
background-color: #ffffff;
|
|
47
47
|
z-index: 100;
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
|
|
50
|
+
@media (max-width: 200px) {
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
gap: 2px;
|
|
53
|
+
padding: 3px;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (max-width: 150px) {
|
|
58
|
+
padding: 2px;
|
|
59
|
+
gap: 1px;
|
|
60
|
+
}
|
|
48
61
|
`;
|
|
49
62
|
const TabContextContainer = styled.div `
|
|
50
63
|
padding: 10px;
|
|
@@ -77,14 +90,97 @@ const Message = ({ msg }) => {
|
|
|
77
90
|
}, []);
|
|
78
91
|
return (_jsx("div", { ref: containerRef }));
|
|
79
92
|
};
|
|
93
|
+
const ResponsiveMessageContainer = styled.div `
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
height: 100%;
|
|
97
|
+
width: 100%;
|
|
98
|
+
background-color: #ffffff;
|
|
99
|
+
`;
|
|
100
|
+
const ResponsiveMessageContent = styled.div `
|
|
101
|
+
flex: 1;
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
gap: clamp(8px, 2vw, 20px);
|
|
107
|
+
padding: clamp(8px, 3vw, 25px) clamp(5px, 2vw, 30px);
|
|
108
|
+
min-height: clamp(80px, 15vh, 120px);
|
|
109
|
+
|
|
110
|
+
@media (min-width: 300px) {
|
|
111
|
+
flex-direction: ${props => props.$isMobile ? 'column' : 'row'};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@media (max-width: 200px) {
|
|
115
|
+
padding: 5px;
|
|
116
|
+
gap: 5px;
|
|
117
|
+
min-height: 60px;
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
const ResponsiveToppyImage = styled.img `
|
|
121
|
+
width: clamp(25px, 8vw, 60px);
|
|
122
|
+
height: clamp(31px, 10vw, 75px);
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
transform: ${props => props.$isMobile ? 'none' : 'translateY(8px)'};
|
|
125
|
+
|
|
126
|
+
@media (max-width: 200px) {
|
|
127
|
+
width: 20px;
|
|
128
|
+
height: 25px;
|
|
129
|
+
transform: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (min-width: 300px) {
|
|
133
|
+
transform: ${props => props.$isMobile ? 'none' : 'translateY(8px)'};
|
|
134
|
+
}
|
|
135
|
+
`;
|
|
136
|
+
const ResponsiveMessageText = styled.div `
|
|
137
|
+
flex: 1;
|
|
138
|
+
text-align: center;
|
|
139
|
+
font-size: clamp(12px, 2.5vw, 14px);
|
|
140
|
+
line-height: clamp(1.2, 1.4, 1.4);
|
|
141
|
+
color: #333;
|
|
142
|
+
word-wrap: break-word;
|
|
143
|
+
overflow-wrap: break-word;
|
|
144
|
+
hyphens: auto;
|
|
145
|
+
min-width: 0;
|
|
146
|
+
|
|
147
|
+
@media (min-width: 300px) {
|
|
148
|
+
text-align: ${props => props.$isMobile ? 'center' : 'left'};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@media (max-width: 150px) {
|
|
152
|
+
font-size: 8px;
|
|
153
|
+
line-height: 1.1;
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
156
|
+
const ResponsiveButton = styled(TMButton) `
|
|
157
|
+
font-size: ${props => props.fontSize || 'clamp(12px, 2vw, 1.1rem)'} !important;
|
|
158
|
+
padding: clamp(2px, 1vw, 8px) clamp(4px, 2vw, 12px) !important;
|
|
159
|
+
min-width: clamp(30px, 10vw, 60px) !important;
|
|
160
|
+
white-space: nowrap !important;
|
|
161
|
+
|
|
162
|
+
@media (max-width: 200px) {
|
|
163
|
+
padding: 2px 4px !important;
|
|
164
|
+
min-width: 25px !important;
|
|
165
|
+
font-size: 8px !important;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@media (max-width: 150px) {
|
|
169
|
+
padding: 1px 3px !important;
|
|
170
|
+
min-width: 20px !important;
|
|
171
|
+
font-size: 7px !important;
|
|
172
|
+
}
|
|
173
|
+
`;
|
|
174
|
+
const ResponsiveMessageBody = ({ message, isMobile, MessageToolbar }) => {
|
|
175
|
+
return (_jsxs(ResponsiveMessageContainer, { children: [_jsxs(ResponsiveMessageContent, { "$isMobile": isMobile, children: [_jsx(ResponsiveToppyImage, { "$isMobile": isMobile, src: toppy, alt: "Toppy" }), _jsx(ResponsiveMessageText, { "$isMobile": isMobile, children: typeof message === 'string' ? _jsx(Message, { msg: message }) : message })] }), _jsx(MessageToolbar, {})] }));
|
|
176
|
+
};
|
|
80
177
|
const TMMessageBox = ({ resizable = false, onButtonClick, title = 'TopMedia', message = '', buttons, onClose }) => {
|
|
81
178
|
let deviceType = useDeviceType();
|
|
82
179
|
const isMobile = useMemo(() => { return deviceType === DeviceType.MOBILE; }, [deviceType]);
|
|
83
|
-
const [initialWidth, setInitialWidth] = useState(
|
|
180
|
+
const [initialWidth, setInitialWidth] = useState('clamp(100px, 90vw, 400px)');
|
|
84
181
|
const [initialHeight, setInitialHeight] = useState('auto');
|
|
85
182
|
const [isVisible, setIsVisible] = useState(true);
|
|
86
183
|
const [btns, setBtns] = useState(buttons || []);
|
|
87
|
-
const [isResizing, setIsResizing] = useState(false);
|
|
88
184
|
useEffect(() => {
|
|
89
185
|
let arr = [];
|
|
90
186
|
if (buttons) {
|
|
@@ -95,21 +191,29 @@ const TMMessageBox = ({ resizable = false, onButtonClick, title = 'TopMedia', me
|
|
|
95
191
|
}
|
|
96
192
|
}, [buttons]);
|
|
97
193
|
const MessageToolbar = () => {
|
|
98
|
-
return (_jsxs(StyledMessageToolbar, { children: [(btns.includes(ButtonNames.OK) || btns.includes(ButtonNames.YES)) &&
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
194
|
+
return (_jsxs(StyledMessageToolbar, { children: [(btns.includes(ButtonNames.OK) || btns.includes(ButtonNames.YES)) &&
|
|
195
|
+
_jsx(ResponsiveButton, { fontSize: 'clamp(8px, 2vw, 1.1rem)', color: 'primaryOutline', btnStyle: 'text', onClick: () => {
|
|
196
|
+
onButtonClick && btns.includes(ButtonNames.YES) ? onButtonClick(ButtonNames.YES) : onButtonClick && onButtonClick(ButtonNames.OK);
|
|
197
|
+
setIsVisible(false);
|
|
198
|
+
}, caption: btns.includes(ButtonNames.YES) ? SDKUI_Localizator.Yes : 'OK', showTooltip: false }), btns.includes(ButtonNames.NO) &&
|
|
199
|
+
_jsx(ResponsiveButton, { fontSize: 'clamp(8px, 2vw, 1.1rem)', btnStyle: 'text', onClick: () => {
|
|
200
|
+
onButtonClick && onButtonClick(ButtonNames.NO);
|
|
201
|
+
setIsVisible(false);
|
|
202
|
+
}, caption: SDKUI_Localizator.No, showTooltip: false, color: 'error' }), btns.includes(ButtonNames.CANCEL) &&
|
|
203
|
+
_jsx(ResponsiveButton, { fontSize: 'clamp(8px, 2vw, 1.1rem)', btnStyle: 'text', onClick: () => {
|
|
204
|
+
onButtonClick && onButtonClick(ButtonNames.CANCEL);
|
|
205
|
+
setIsVisible(false);
|
|
206
|
+
}, caption: SDKUI_Localizator.Cancel, showTooltip: false, color: 'error' })] }));
|
|
102
207
|
};
|
|
103
208
|
const handleResizeEnd = (e) => {
|
|
104
|
-
setIsResizing(false);
|
|
105
209
|
setInitialWidth(e.width.toString());
|
|
106
210
|
setInitialHeight(e.height.toString());
|
|
107
211
|
};
|
|
108
|
-
return (_jsx(Popup, { animation: undefined, visible: isVisible, showCloseButton: true, width: initialWidth, height: initialHeight, minHeight: '180px', title: title, onHidden: () => { onClose?.(); setIsVisible(false); }, resizeEnabled: resizable,
|
|
212
|
+
return (_jsx(Popup, { animation: undefined, visible: isVisible, showCloseButton: true, width: initialWidth, height: initialHeight, minHeight: 'clamp(100px, 20vh, 180px)', title: title, onHidden: () => { onClose?.(); setIsVisible(false); }, resizeEnabled: resizable, onResizeEnd: handleResizeEnd, wrapperAttr: { id: 'tm-messagebox-wrapper' }, onShown: () => {
|
|
109
213
|
const el = document.getElementById('tm-messagebox-wrapper');
|
|
110
214
|
if (el)
|
|
111
215
|
el.style.zIndex = '20000';
|
|
112
|
-
}, children:
|
|
216
|
+
}, children: _jsx(ResponsiveMessageBody, { message: message, isMobile: isMobile, MessageToolbar: MessageToolbar }) }));
|
|
113
217
|
};
|
|
114
218
|
const TMExceptionBox = ({ resizable = false, exception, title = `${SDK_Globals.appModule} v. ${SDK_Globals.appVersion}` }) => {
|
|
115
219
|
const [isVisible, setIsVisible] = useState(true);
|
|
@@ -567,9 +567,9 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
567
567
|
handleSetRuleQDChange(undefined);
|
|
568
568
|
}
|
|
569
569
|
}, [localItem]);
|
|
570
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: SDKUI_Localizator.Description, placeHolder: 'Inserire il testo della notifica...', rows: 3, value: localItem.Description, tid: wf?.MTID, isModifiedWhen: (localItem.Description ?? '') !== (localItemOrig.Description ?? ''), onValueChanged: (newValue) => handleLocalizedDescriptionChange(CultureIDs.None, newValue ?? ''), validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), valueOrig: undefined }), _jsx(TMDropDown, { label:
|
|
570
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: SDKUI_Localizator.Description, placeHolder: 'Inserire il testo della notifica...', rows: 3, value: localItem.Description, tid: wf?.MTID, isModifiedWhen: (localItem.Description ?? '') !== (localItemOrig.Description ?? ''), onValueChanged: (newValue) => handleLocalizedDescriptionChange(CultureIDs.None, newValue ?? ''), validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Description), valueOrig: undefined }), _jsx(TMDropDown, { label: SDKUI_Localizator.Severity, dataSource: SEVERITY_DATASOURCE, value: localItem.Severity, isModifiedWhen: localItem.Severity !== localItemOrig.Severity, validationItems: validationItems.filter(v => v.PropertyName === DiagramItemProps.Severity), onValueChanged: (e) => setLocalItem(prevLocalItem => ({ ...prevLocalItem, Severity: e.target.value })) }), _jsx(TMCultureIDPicker, { label: SDKUI_Localizator.Format, selectedValue: localItem.FormatCultureID, isModifiedWhen: localItem.FormatCultureID !== localItemOrig.FormatCultureID, openChooserBySingleClick: true, onSelectCultureID: handleFormatCultureIDChange }), _jsx(TMCheckBox, { value: localItem.RegAsWfInstPart ?? 0, label: "Registra i destinatari della notifica come partecipanti dell'istanza di flusso", isModifiedWhen: localItem.RegAsWfInstPart !== localItemOrig.RegAsWfInstPart, onValueChanged: handleRegAsWfInstPartChange }), _jsx(RecipientList, { recipients: andRecipients, title: SDKUI_Localizator.Recipients, tid: wf?.MTID, qd: qdForRecipientsEditor, onQDChange: (newQd) => newQd && handleQDChosen(newQd, 0), onAdd: (newRecipients) => handleAddRecipients(newRecipients, 0), onRemove: handleRemoveRecipient }), _jsx(TMVilViewer, { vil: validationItems.filter(v => v.PropertyName === DiagramItemProps.Tos) })] }));
|
|
571
571
|
};
|
|
572
|
-
const
|
|
572
|
+
const renderWorkingGroupCreateFields = () => {
|
|
573
573
|
// Gestione di Tos e Tos2
|
|
574
574
|
const { andRecipients: tosRecipients } = useMemo(() => {
|
|
575
575
|
return tosToActors(localItem.Tos ?? '');
|
|
@@ -601,9 +601,54 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
601
601
|
const newTos = actorsToTos(updatedRecipients);
|
|
602
602
|
handleTos2Change(newTos);
|
|
603
603
|
}, [localItem.Tos2, handleTos2Change]);
|
|
604
|
-
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.
|
|
604
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.Practice})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.Practice})`, 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 })] })] }));
|
|
605
605
|
};
|
|
606
|
-
const
|
|
606
|
+
const renderCaseFlowCreateFields = () => {
|
|
607
|
+
const [dossierTypes, setDossierTypes] = useState([]);
|
|
608
|
+
useEffect(() => {
|
|
609
|
+
SDK_Globals.tmSession?.NewDossierTypeEngine().RetrieveAllAsync().then((list) => {
|
|
610
|
+
const formattedList = (list ?? []).map(dossierType => ({
|
|
611
|
+
value: dossierType.id,
|
|
612
|
+
display: dossierType.name ?? ''
|
|
613
|
+
}));
|
|
614
|
+
setDossierTypes(formattedList);
|
|
615
|
+
});
|
|
616
|
+
}, [localItem.Type]);
|
|
617
|
+
// Gestione di Tos e Tos2
|
|
618
|
+
const { andRecipients: tosRecipients } = useMemo(() => {
|
|
619
|
+
return tosToActors(localItem.Tos ?? '');
|
|
620
|
+
}, [localItem.Tos]);
|
|
621
|
+
const { andRecipients: tos2Recipients } = useMemo(() => {
|
|
622
|
+
return tosToActors(localItem.Tos2 ?? '');
|
|
623
|
+
}, [localItem.Tos2]);
|
|
624
|
+
const handleAddTosRecipients = useCallback((newRecipients, orValue) => {
|
|
625
|
+
const { andRecipients } = tosToActors(localItem.Tos ?? '');
|
|
626
|
+
const updatedRecipients = [...andRecipients, ...newRecipients.map(r => ({ ...r, Or: orValue }))];
|
|
627
|
+
const newTos = actorsToTos(updatedRecipients);
|
|
628
|
+
handleTosChange(newTos);
|
|
629
|
+
}, [localItem.Tos, handleTosChange]);
|
|
630
|
+
const handleRemoveTosRecipient = useCallback((recipientToRemove) => {
|
|
631
|
+
const { andRecipients } = tosToActors(localItem.Tos ?? '');
|
|
632
|
+
const updatedRecipients = andRecipients.filter(r => r.ActorType !== recipientToRemove.ActorType || r.ActorID !== recipientToRemove.ActorID);
|
|
633
|
+
const newTos = actorsToTos(updatedRecipients);
|
|
634
|
+
handleTosChange(newTos);
|
|
635
|
+
}, [localItem.Tos, handleTosChange]);
|
|
636
|
+
const handleAddTos2Recipients = useCallback((newRecipients, orValue) => {
|
|
637
|
+
const { andRecipients } = tosToActors(localItem.Tos2 ?? '');
|
|
638
|
+
const updatedRecipients = [...andRecipients, ...newRecipients.map(r => ({ ...r, Or: orValue }))];
|
|
639
|
+
const newTos = actorsToTos(updatedRecipients);
|
|
640
|
+
handleTos2Change(newTos);
|
|
641
|
+
}, [localItem.Tos2, handleTos2Change]);
|
|
642
|
+
const handleRemoveTos2Recipient = useCallback((recipientToRemove) => {
|
|
643
|
+
const { andRecipients } = tosToActors(localItem.Tos2 ?? '');
|
|
644
|
+
const updatedRecipients = andRecipients.filter(r => r.ActorType !== recipientToRemove.ActorType || r.ActorID !== recipientToRemove.ActorID);
|
|
645
|
+
const newTos = actorsToTos(updatedRecipients);
|
|
646
|
+
handleTos2Change(newTos);
|
|
647
|
+
}, [localItem.Tos2, handleTos2Change]);
|
|
648
|
+
return (_jsxs(_Fragment, { children: [_jsx(TMTextExpression, { label: `${SDKUI_Localizator.Name} (${SDKUI_Localizator.WorkGroup})`, value: localItem.PlatformObjName, valueOrig: localItemOrig.PlatformObjName, tid: wf?.MTID, isModifiedWhen: (localItem.PlatformObjName ?? '') !== (localItemOrig.PlatformObjName ?? ''), onValueChanged: handlePlatformObjNameChange }), localItem.Type === DiagramItemTypes.CaseFlow_Create &&
|
|
649
|
+
_jsx(TMDropDown, { dataSource: dossierTypes, label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.WorkGroup})`, value: localItem.Value3asInt ?? 0, isModifiedWhen: (localItem.Value3asInt ?? 0) !== (localItemOrig.Value3asInt ?? 0) }), _jsx(TMTextExpression, { label: `${SDKUI_Localizator.Description} (${SDKUI_Localizator.WorkGroup})`, 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 })] })] }));
|
|
650
|
+
};
|
|
651
|
+
const renderAddPartsFields = () => {
|
|
607
652
|
const { andRecipients: tosRecipients } = useMemo(() => {
|
|
608
653
|
return tosToActors(localItem.Tos ?? '');
|
|
609
654
|
}, [localItem.Tos]);
|
|
@@ -657,11 +702,14 @@ const DiagramItemForm = ({ itemToEdit, wf, onClose, onApply }) => {
|
|
|
657
702
|
specificFields = renderNotificationFields();
|
|
658
703
|
break;
|
|
659
704
|
case DiagramItemTypes.WorkGroup_Create:
|
|
660
|
-
specificFields =
|
|
705
|
+
specificFields = renderWorkingGroupCreateFields();
|
|
706
|
+
break;
|
|
707
|
+
case DiagramItemTypes.CaseFlow_Create:
|
|
708
|
+
specificFields = renderCaseFlowCreateFields();
|
|
661
709
|
break;
|
|
662
710
|
case DiagramItemTypes.CaseFlow_AddParts:
|
|
663
711
|
case DiagramItemTypes.WorkGroup_AddParts:
|
|
664
|
-
specificFields =
|
|
712
|
+
specificFields = renderAddPartsFields();
|
|
665
713
|
break;
|
|
666
714
|
default:
|
|
667
715
|
specificFields = null;
|