From 95385409b0d432cd926284bb2b2a40b5d6ab783d Mon Sep 17 00:00:00 2001
From: "S.Listl" <S.Listl@SLISTL.aditosoftware.local>
Date: Mon, 15 Apr 2019 15:21:43 +0200
Subject: [PATCH] =?UTF-8?q?[Projekt:=20Entwicklung=20-=20Neon][TicketNr.:?=
 =?UTF-8?q?=201035483][Bei=20der=20Neuanlage=20eines=20Datensatzes,=20welc?=
 =?UTF-8?q?her=20Attribute=20nutzt=20m=C3=B6chte=20ich=20diese=20direkt=20?=
 =?UTF-8?q?eingeben=20k=C3=B6nnen]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 entity/Attribute_entity/Attribute_entity.aod           |  1 +
 .../entityfields/attributechildren/stateProcess.js     | 10 ++++++++++
 neonView/ActivityEdit_view/ActivityEdit_view.aod       |  5 +++++
 neonView/ContractEdit_view/ContractEdit_view.aod       |  5 +++++
 neonView/EmployeeEdit_view/EmployeeEdit_view.aod       |  5 +++++
 neonView/ProductEdit_view/ProductEdit_view.aod         |  5 +++++
 6 files changed, 31 insertions(+)
 create mode 100644 entity/Attribute_entity/entityfields/attributechildren/stateProcess.js

diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod
index f5e38e3f94..48ab217a1d 100644
--- a/entity/Attribute_entity/Attribute_entity.aod
+++ b/entity/Attribute_entity/Attribute_entity.aod
@@ -52,6 +52,7 @@
       <name>AttributeChildren</name>
       <title>Attributes</title>
       <fieldType>DEPENDENCY_OUT</fieldType>
+      <stateProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/stateProcess.js</stateProcess>
       <dependency>
         <name>dependency</name>
         <entityName>Attribute_entity</entityName>
diff --git a/entity/Attribute_entity/entityfields/attributechildren/stateProcess.js b/entity/Attribute_entity/entityfields/attributechildren/stateProcess.js
new file mode 100644
index 0000000000..9dd65f6721
--- /dev/null
+++ b/entity/Attribute_entity/entityfields/attributechildren/stateProcess.js
@@ -0,0 +1,10 @@
+import("system.neon");
+import("system.result");
+import("system.vars");
+import("Attribute_lib");
+
+var type = vars.get("$field.ATTRIBUTE_TYPE").trim();
+if (type == $AttributeTypes.GROUP || type == $AttributeTypes.COMBO)
+    result.string(neon.COMPONENTSTATE_EDITABLE);
+else
+    result.string(neon.COMPONENTSTATE_INVISIBLE);
\ No newline at end of file
diff --git a/neonView/ActivityEdit_view/ActivityEdit_view.aod b/neonView/ActivityEdit_view/ActivityEdit_view.aod
index 5c306e04cb..2e264c062b 100644
--- a/neonView/ActivityEdit_view/ActivityEdit_view.aod
+++ b/neonView/ActivityEdit_view/ActivityEdit_view.aod
@@ -47,5 +47,10 @@
       <entityField>Links</entityField>
       <view>ActivityLinkMultiEdit_view</view>
     </neonViewReference>
+    <neonViewReference>
+      <name>7fcf9c09-189a-47b7-a171-9975676ed704</name>
+      <entityField>Attributes</entityField>
+      <view>AttributeRelationEdit_view</view>
+    </neonViewReference>
   </children>
 </neonView>
diff --git a/neonView/ContractEdit_view/ContractEdit_view.aod b/neonView/ContractEdit_view/ContractEdit_view.aod
index ec6443f7b5..21e04e53a2 100644
--- a/neonView/ContractEdit_view/ContractEdit_view.aod
+++ b/neonView/ContractEdit_view/ContractEdit_view.aod
@@ -51,5 +51,10 @@
         </entityFieldLink>
       </fields>
     </genericViewTemplate>
+    <neonViewReference>
+      <name>49eafd04-4d72-4a11-8818-97407e0fe154</name>
+      <entityField>Attributes</entityField>
+      <view>AttributeRelationEdit_view</view>
+    </neonViewReference>
   </children>
 </neonView>
diff --git a/neonView/EmployeeEdit_view/EmployeeEdit_view.aod b/neonView/EmployeeEdit_view/EmployeeEdit_view.aod
index 71614eff59..8e719f0f4e 100644
--- a/neonView/EmployeeEdit_view/EmployeeEdit_view.aod
+++ b/neonView/EmployeeEdit_view/EmployeeEdit_view.aod
@@ -56,5 +56,10 @@
       <entityField>EmployeeRoles</entityField>
       <view>EmployeeRoleEdit_view</view>
     </neonViewReference>
+    <neonViewReference>
+      <name>07e77840-e140-4ba0-ac09-d8e10e7d88a2</name>
+      <entityField>Attributes</entityField>
+      <view>AttributeRelationEdit_view</view>
+    </neonViewReference>
   </children>
 </neonView>
diff --git a/neonView/ProductEdit_view/ProductEdit_view.aod b/neonView/ProductEdit_view/ProductEdit_view.aod
index 687d513b1e..04a5f765b8 100644
--- a/neonView/ProductEdit_view/ProductEdit_view.aod
+++ b/neonView/ProductEdit_view/ProductEdit_view.aod
@@ -59,5 +59,10 @@
         </entityFieldLink>
       </fields>
     </genericViewTemplate>
+    <neonViewReference>
+      <name>34659538-e8a5-4f76-9710-a322548885ef</name>
+      <entityField>Attributes</entityField>
+      <view>AttributeRelationEdit_view</view>
+    </neonViewReference>
   </children>
 </neonView>
-- 
GitLab