fix formula

This commit is contained in:
Yuri Kuznetsov
2023-07-15 10:42:35 +03:00
parent 9490623d54
commit ef16795ea7
2 changed files with 6 additions and 6 deletions
@@ -188,7 +188,7 @@ define('views/fields/complex-expression', ['views/fields/text'], function (Dep)
return item.insertText;
});
var attributeList = this.getAttributeList();
var attributeList = this.getFormulaAttributeList();
var languageTools = ace.require("ace/ext/language_tools");
@@ -247,7 +247,7 @@ define('views/fields/complex-expression', ['views/fields/text'], function (Dep)
this.editor.completers = [completer];
},
getAttributeList: function () {
getFormulaAttributeList: function () {
if (!this.targetEntityType) {
return [];
}
@@ -304,7 +304,7 @@ define('views/fields/complex-expression', ['views/fields/text'], function (Dep)
addAttribute: function () {
this.createView('dialog', 'views/admin/formula/modals/add-attribute', {
scope: this.targetEntityType,
attributeList: this.getAttributeList(),
attributeList: this.getFormulaAttributeList(),
}, view => {
view.render();
+3 -3
View File
@@ -204,7 +204,7 @@ class FormulaFieldView extends TextFieldView {
addAttribute() {
this.createView('dialog', 'views/admin/formula/modals/add-attribute', {
scope: this.targetEntityType
scope: this.targetEntityType,
}, view => {
view.render();
@@ -256,7 +256,7 @@ class FormulaFieldView extends TextFieldView {
initAutocomplete() {
let functionItemList = this.getFunctionDataList().filter(item => item.insertText);
let attributeList = this.getAttributeList();
let attributeList = this.getFormulaAttributeList();
ace.require('ace/ext/language_tools');
@@ -343,7 +343,7 @@ class FormulaFieldView extends TextFieldView {
this.editor.completers = [completer];
}
getAttributeList() {
getFormulaAttributeList() {
if (!this.targetEntityType) {
return [];
}