From a8113aed9552db5d2c11c07cddc96cf74445f792 Mon Sep 17 00:00:00 2001 From: "p.neub" <p.neub@adito.de> Date: Tue, 16 Nov 2021 16:03:38 +0100 Subject: [PATCH] [Projekt: xRM-Sales][TicketNr.: 2001143][Offer: Attributes-Reiter erscheint nur bisweilen, ohne Verwendbarkeit] --- .../entityfields/attributes/stateProcess.js | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/entity/Offer_entity/entityfields/attributes/stateProcess.js b/entity/Offer_entity/entityfields/attributes/stateProcess.js index 0a6a6c21d2..0fbe4590d5 100644 --- a/entity/Offer_entity/entityfields/attributes/stateProcess.js +++ b/entity/Offer_entity/entityfields/attributes/stateProcess.js @@ -1,20 +1,17 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); import("Context_lib"); import("Attribute_lib"); import("Offer_lib"); -import("Sql_lib"); -import("system.vars"); -import("system.db"); -import("system.neon"); -import("system.result"); -if (OfferUtils.isEditable(vars.get("$field.STATUS"))) +var state = neon.COMPONENTSTATE_INVISIBLE; +if(AttributeUtil.hasAttributes(ContextUtils.getCurrentContextId())) { - if (AttributeUtil.hasAttributes(ContextUtils.getCurrentContextId())) - result.string(neon.COMPONENTSTATE_EDITABLE); - else - result.string(neon.COMPONENTSTATE_INVISIBLE); + state = neon.COMPONENTSTATE_READONLY; + if(OfferUtils.isEditable(vars.get("$field.STATUS"))) + { + state = neon.COMPONENTSTATE_EDITABLE; + } } -else -{ - result.string(neon.COMPONENTSTATE_READONLY); -} \ No newline at end of file +result.string(state); -- GitLab