@topconsultnpm/sdkui-react 6.21.0-dev1.23 → 6.21.0-dev1.24
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.
|
@@ -132,12 +132,24 @@ const TMFormulaEditor = (props) => {
|
|
|
132
132
|
const renderTreeViewItem = useCallback((item) => {
|
|
133
133
|
return (_jsxs(StyledDivHorizontal, { style: { display: 'flex', gap: '5px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }, children: [renderFormulaIcon(item.icon, item.tid, item.md), _jsx("p", { style: { verticalAlign: 'middle', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }, children: item.text })] }));
|
|
134
134
|
}, []);
|
|
135
|
+
const translateDescInFormula = (text) => {
|
|
136
|
+
switch (text) {
|
|
137
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithoutLogin})`:
|
|
138
|
+
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
139
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`:
|
|
140
|
+
return `[dbo].[TM_GetViewLink](NULL, 'ASKLOGIN', NULL, 0, {@TID}, {@DID}, 1, NULL, 0)`;
|
|
141
|
+
case `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`:
|
|
142
|
+
return `[dbo].[TM_GetViewLink](NULL, NULL, NULL, 0, {@TID}, {@DID}, 1, CONVERT(VARCHAR, {@CreationTime}+30, 126), 0)`;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
return text;
|
|
146
|
+
};
|
|
135
147
|
const handleTreeViewItemClick = (e) => {
|
|
136
148
|
if (!e)
|
|
137
149
|
return;
|
|
138
150
|
if (e.itemData?.hasItems)
|
|
139
151
|
return;
|
|
140
|
-
insertText(e.itemData?.text);
|
|
152
|
+
insertText(translateDescInFormula(e.itemData?.text));
|
|
141
153
|
};
|
|
142
154
|
return (_jsx(TMApplyForm, { isModal: props.isModal, formMode: props.formMode, isModified: formData.expression !== formDataOrig.expression, exception: exception, validationItems: validationItems, title: SDKUI_Localizator.Formula, hasNavigation: false, showBack: props.showBack, height: '600px', width: '800px', onApply: () => applyData(), onClose: props.onClose, onUndo: () => {
|
|
143
155
|
setFormData(formDataOrig);
|
|
@@ -705,19 +717,19 @@ export class FormulaHelper {
|
|
|
705
717
|
static jsonItems_LoadFunctions_Link() {
|
|
706
718
|
let items = [{
|
|
707
719
|
id: '3_4_1',
|
|
708
|
-
text: `
|
|
720
|
+
text: `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithoutLogin})`,
|
|
709
721
|
icon: FormulaIconTypes.Function,
|
|
710
722
|
expanded: false,
|
|
711
723
|
hasItems: false,
|
|
712
724
|
}, {
|
|
713
725
|
id: '3_4_2',
|
|
714
|
-
text: `
|
|
726
|
+
text: `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithLogin})`,
|
|
715
727
|
icon: FormulaIconTypes.Function,
|
|
716
728
|
expanded: false,
|
|
717
729
|
hasItems: false,
|
|
718
730
|
}, {
|
|
719
731
|
id: '3_4_3',
|
|
720
|
-
text: `
|
|
732
|
+
text: `TM_GetViewLink (${SDKUI_Localizator.FormulaEditor_Function_TM_GetViewLink_WithDate})`,
|
|
721
733
|
icon: FormulaIconTypes.Function,
|
|
722
734
|
expanded: false,
|
|
723
735
|
hasItems: false,
|