From 13c5d65f5035d97fd73de90673d0fcef9027f01b Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 6 Oct 2023 10:53:58 +0300 Subject: [PATCH] fix formula add attributes --- client/src/views/admin/formula/fields/attribute.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/views/admin/formula/fields/attribute.js b/client/src/views/admin/formula/fields/attribute.js index 0ad031e918..4fda722dee 100644 --- a/client/src/views/admin/formula/fields/attribute.js +++ b/client/src/views/admin/formula/fields/attribute.js @@ -40,18 +40,18 @@ function (Dep, /** module:ui/multi-select */MultiSelect) { return; } - let attributeList = this.getFieldManager() + const attributeList = this.getFieldManager() .getEntityTypeAttributeList(this.options.scope) .concat(['id']) .sort(); - let links = this.getMetadata().get(['entityDefs', this.options.scope, 'links']) || {}; + const links = this.getMetadata().get(['entityDefs', this.options.scope, 'links']) || {}; - let linkList = []; + const linkList = []; Object.keys(links).forEach(link => { - var type = links[link].type; - let scope = links[link].entity; + const type = links[link].type; + const scope = links[link].entity; if (!type) { return; @@ -76,6 +76,8 @@ function (Dep, /** module:ui/multi-select */MultiSelect) { linkList.sort(); linkList.forEach(link => { + const scope = links[link].entity; + let linkAttributeList = this.getFieldManager() .getEntityTypeAttributeList(scope) .sort();