From 2af22c4d527bb40c67d23c40627cebbf7a268d1a Mon Sep 17 00:00:00 2001
From: "a.mayr" <a.mayr@adito.de>
Date: Tue, 27 Oct 2020 12:24:22 +0100
Subject: [PATCH] =?UTF-8?q?#1062936:=20Unterst=C3=BCtzung=20f=C3=BCr=20Per?=
 =?UTF-8?q?sonal=20Access=20Tokens?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../EmployeeToken_entity.aod                  | 131 ++++++++++++++++++
 .../group_id/displayValueProcess.js           |   5 +
 .../entityfields/group_id/dropDownProcess.js  |  16 +++
 .../entityfields/group_id/stateProcess.js     |   8 ++
 .../entityfields/group_id/valueProcess.js     |  12 ++
 .../group_id_display/displayValueProcess.js   |   4 +
 .../group_id_display/stateProcess.js          |  13 ++
 .../login_user_id/valueProcess.js             |   9 ++
 .../entityfields/valid/valueProcess.js        |   8 ++
 .../entityfields/valid_from/valueProcess.js   |   9 ++
 .../valid_status_icon/colorProcess.js         |  13 ++
 .../valid_status_icon/displayValueProcess.js  |  12 ++
 .../recordcontainers/db/conditionProcess.js   |  23 +++
 entity/Employee_entity/Employee_entity.aod    |  15 ++
 .../children/employeeid_param/valueProcess.js |   4 +
 .../_____LANGUAGE_de/_____LANGUAGE_de.aod     |  12 ++
 .../_____LANGUAGE_en/_____LANGUAGE_en.aod     |  12 ++
 neonContext/EmployeeToken/EmployeeToken.aod   |  18 +++
 .../EmployeeMain_view/EmployeeMain_view.aod   |   5 +
 .../EmployeeTokenEdit_view.aod                |  38 +++++
 .../EmployeeTokenFilter_view.aod              |  41 ++++++
 21 files changed, 408 insertions(+)
 create mode 100644 entity/EmployeeToken_entity/EmployeeToken_entity.aod
 create mode 100644 entity/EmployeeToken_entity/entityfields/group_id/displayValueProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/group_id/dropDownProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/group_id/stateProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/group_id/valueProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/group_id_display/displayValueProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/group_id_display/stateProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/login_user_id/valueProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/valid/valueProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/valid_from/valueProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/valid_status_icon/colorProcess.js
 create mode 100644 entity/EmployeeToken_entity/entityfields/valid_status_icon/displayValueProcess.js
 create mode 100644 entity/EmployeeToken_entity/recordcontainers/db/conditionProcess.js
 create mode 100644 entity/Employee_entity/entityfields/employeetokens/children/employeeid_param/valueProcess.js
 create mode 100644 neonContext/EmployeeToken/EmployeeToken.aod
 create mode 100644 neonView/EmployeeTokenEdit_view/EmployeeTokenEdit_view.aod
 create mode 100644 neonView/EmployeeTokenFilter_view/EmployeeTokenFilter_view.aod

diff --git a/entity/EmployeeToken_entity/EmployeeToken_entity.aod b/entity/EmployeeToken_entity/EmployeeToken_entity.aod
new file mode 100644
index 0000000000..0303a7a0bc
--- /dev/null
+++ b/entity/EmployeeToken_entity/EmployeeToken_entity.aod
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17">
+  <name>EmployeeToken_entity</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <title>User token</title>
+  <titlePlural>User tokens</titlePlural>
+  <recordContainer>db</recordContainer>
+  <entityFields>
+    <entityProvider>
+      <name>#PROVIDER</name>
+    </entityProvider>
+    <entityProvider>
+      <name>#PROVIDER_AGGREGATES</name>
+      <useAggregates v="true" />
+    </entityProvider>
+    <entityField>
+      <name>ID</name>
+      <title>Token</title>
+    </entityField>
+    <entityField>
+      <name>VALID_STATUS_ICON</name>
+      <title>Valid</title>
+      <colorProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/valid_status_icon/colorProcess.js</colorProcess>
+      <contentType>IMAGE</contentType>
+      <mandatory v="false" />
+      <displayValueProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/valid_status_icon/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityField>
+      <name>VALID_TO</name>
+      <title>Valid to</title>
+      <contentType>DATE</contentType>
+      <mandatory v="false" />
+    </entityField>
+    <entityField>
+      <name>GROUP_ID</name>
+      <title>Group</title>
+      <mandatory v="true" />
+      <dropDownProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/group_id/dropDownProcess.js</dropDownProcess>
+      <textInputAllowed v="true" />
+      <stateProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/group_id/stateProcess.js</stateProcess>
+      <valueProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/group_id/valueProcess.js</valueProcess>
+      <displayValueProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/group_id/displayValueProcess.js</displayValueProcess>
+    </entityField>
+    <entityField>
+      <name>LOGIN_USER_ID</name>
+      <title>User</title>
+      <valueProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/login_user_id/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>VALID_FROM</name>
+      <title>Valid from</title>
+      <contentType>DATE</contentType>
+      <mandatory v="false" />
+      <valueProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/valid_from/valueProcess.js</valueProcess>
+    </entityField>
+    <entityProvider>
+      <name>EmployeeTokenProvider</name>
+      <dependencies>
+        <entityDependency>
+          <name>08c3e88c-5119-477e-8374-3f89bbc4ded0</name>
+          <entityName>Employee_entity</entityName>
+          <fieldName>EmployeeTokens</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+    </entityProvider>
+    <entityParameter>
+      <name>employeeId_param</name>
+      <expose v="true" />
+    </entityParameter>
+    <entityField>
+      <name>VALID</name>
+      <title>Valid</title>
+      <contentType>BOOLEAN</contentType>
+      <mandatory v="true" />
+      <valueProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/valid/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>GROUP_ID_DISPLAY</name>
+      <title>Group</title>
+      <stateProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/group_id_display/stateProcess.js</stateProcess>
+      <displayValueProcess>%aditoprj%/entity/EmployeeToken_entity/entityfields/group_id_display/displayValueProcess.js</displayValueProcess>
+    </entityField>
+  </entityFields>
+  <recordContainers>
+    <dbRecordContainer>
+      <name>db</name>
+      <alias>_____SYSTEMALIAS</alias>
+      <conditionProcess>%aditoprj%/entity/EmployeeToken_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
+      <linkInformation>
+        <linkInformation>
+          <name>98f70a7c-4e43-4984-ad69-44339150f1ee</name>
+          <tableName>ASYS_USERTOKEN</tableName>
+          <primaryKey>ID</primaryKey>
+          <isUIDTable v="true" />
+          <readonly v="false" />
+        </linkInformation>
+      </linkInformation>
+      <recordFieldMappings>
+        <dbRecordFieldMapping>
+          <name>ID.value</name>
+          <recordfield>ASYS_USERTOKEN.ID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>VALID_STATUS_ICON.value</name>
+          <recordfield>ASYS_USERTOKEN.VALID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>VALID_TO.value</name>
+          <recordfield>ASYS_USERTOKEN.VALID_TO</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>GROUP_ID.value</name>
+          <recordfield>ASYS_USERTOKEN.GROUP_ID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>LOGIN_USER_ID.value</name>
+          <recordfield>ASYS_USERTOKEN.LOGIN_USER_ID</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>VALID_FROM.value</name>
+          <recordfield>ASYS_USERTOKEN.VALID_FROM</recordfield>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>VALID.value</name>
+          <recordfield>ASYS_USERTOKEN.VALID</recordfield>
+        </dbRecordFieldMapping>
+      </recordFieldMappings>
+    </dbRecordContainer>
+  </recordContainers>
+</entity>
diff --git a/entity/EmployeeToken_entity/entityfields/group_id/displayValueProcess.js b/entity/EmployeeToken_entity/entityfields/group_id/displayValueProcess.js
new file mode 100644
index 0000000000..b8857b8ffd
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/group_id/displayValueProcess.js
@@ -0,0 +1,5 @@
+import("system.vars");
+import("system.translate");
+import("system.result");
+
+result.string(translate.text(vars.get("$this.value")));
diff --git a/entity/EmployeeToken_entity/entityfields/group_id/dropDownProcess.js b/entity/EmployeeToken_entity/entityfields/group_id/dropDownProcess.js
new file mode 100644
index 0000000000..623334e4f6
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/group_id/dropDownProcess.js
@@ -0,0 +1,16 @@
+import("system.vars");
+import("system.logging");
+import("system.translate");
+import("system.result");
+
+
+var rawElements = ["#login"];
+
+var resultName = [[]];
+
+for (var i = 0; i < rawElements.length; i++)
+{​​​​​
+    var translation = translate.text(rawElements[i]);
+    resultName[i] = [rawElements[i], translation];
+}​​​​​
+result.object(resultName);
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/entityfields/group_id/stateProcess.js b/entity/EmployeeToken_entity/entityfields/group_id/stateProcess.js
new file mode 100644
index 0000000000..95a51884cf
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/group_id/stateProcess.js
@@ -0,0 +1,8 @@
+import("system.result");
+import("system.vars");
+import("system.neon");
+
+if (vars.get("$this.value") == "#rememberme")
+{
+  result.object(neon.COMPONENTSTATE_INVISIBLE);
+}
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/entityfields/group_id/valueProcess.js b/entity/EmployeeToken_entity/entityfields/group_id/valueProcess.js
new file mode 100644
index 0000000000..0a5687a871
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/group_id/valueProcess.js
@@ -0,0 +1,12 @@
+import("system.translate");
+import("system.datetime");
+import("system.neon");
+import("system.result");
+import("system.vars");
+
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
+{
+     result.string("#login");
+}
+
+   
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/entityfields/group_id_display/displayValueProcess.js b/entity/EmployeeToken_entity/entityfields/group_id_display/displayValueProcess.js
new file mode 100644
index 0000000000..bcdae240e8
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/group_id_display/displayValueProcess.js
@@ -0,0 +1,4 @@
+import("system.translate");
+import("system.result");
+
+result.string(translate.text("#rememberme"));
diff --git a/entity/EmployeeToken_entity/entityfields/group_id_display/stateProcess.js b/entity/EmployeeToken_entity/entityfields/group_id_display/stateProcess.js
new file mode 100644
index 0000000000..3193715cde
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/group_id_display/stateProcess.js
@@ -0,0 +1,13 @@
+import("system.translate");
+import("system.result");
+import("system.vars");
+import("system.neon");
+
+if (vars.get("$field.GROUP_ID") == "#rememberme")
+{
+    vars.set("$field.GROUP_ID_DISPLAY", translate.text("#rememberme"));
+    result.object(neon.COMPONENTSTATE_READONLY);
+    
+} else {
+    result.object(neon.COMPONENTSTATE_INVISIBLE);
+}
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/entityfields/login_user_id/valueProcess.js b/entity/EmployeeToken_entity/entityfields/login_user_id/valueProcess.js
new file mode 100644
index 0000000000..3559d3173e
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/login_user_id/valueProcess.js
@@ -0,0 +1,9 @@
+import("system.util");
+import("system.neon");
+import("system.result");
+import("system.vars");
+
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) // &&!vars.get("$this.value"))
+{
+  result.string(vars.get("$param.employeeId_param"));
+}
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/entityfields/valid/valueProcess.js b/entity/EmployeeToken_entity/entityfields/valid/valueProcess.js
new file mode 100644
index 0000000000..365ab4d8ed
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/valid/valueProcess.js
@@ -0,0 +1,8 @@
+import("system.neon");
+import("system.result");
+import("system.vars");
+
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
+{
+     result.string("1");
+}
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/entityfields/valid_from/valueProcess.js b/entity/EmployeeToken_entity/entityfields/valid_from/valueProcess.js
new file mode 100644
index 0000000000..0859e9d5c4
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/valid_from/valueProcess.js
@@ -0,0 +1,9 @@
+import("system.datetime");
+import("system.neon");
+import("system.result");
+import("system.vars");
+
+if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
+{
+     result.object(datetime.date());
+}
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/entityfields/valid_status_icon/colorProcess.js b/entity/EmployeeToken_entity/entityfields/valid_status_icon/colorProcess.js
new file mode 100644
index 0000000000..deb8250eda
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/valid_status_icon/colorProcess.js
@@ -0,0 +1,13 @@
+import("system.result");
+import("system.vars");
+import("system.neon");
+                
+if(vars.get("$field.VALID") == 1)
+{
+    result.string(neon.PRIORITY_LOW_COLOR);
+}
+else
+{
+    result.string(neon.PRIORITY_HIGH_COLOR);
+}
+
diff --git a/entity/EmployeeToken_entity/entityfields/valid_status_icon/displayValueProcess.js b/entity/EmployeeToken_entity/entityfields/valid_status_icon/displayValueProcess.js
new file mode 100644
index 0000000000..db3e32fd16
--- /dev/null
+++ b/entity/EmployeeToken_entity/entityfields/valid_status_icon/displayValueProcess.js
@@ -0,0 +1,12 @@
+import("system.result");
+import("system.vars");
+
+// Now show warning always, if any commrestriction exists. No matter which medium the current step has.
+if (vars.get("$field.VALID") == 1)
+{
+    result.string("VAADIN:CHECK");
+}
+else
+{
+    result.string("VAADIN:CLOSE");
+}
\ No newline at end of file
diff --git a/entity/EmployeeToken_entity/recordcontainers/db/conditionProcess.js b/entity/EmployeeToken_entity/recordcontainers/db/conditionProcess.js
new file mode 100644
index 0000000000..1fdb9ffc99
--- /dev/null
+++ b/entity/EmployeeToken_entity/recordcontainers/db/conditionProcess.js
@@ -0,0 +1,23 @@
+import("system.db");
+import("system.neon");
+import("system.result");
+import("system.vars");
+import("Employee_lib");
+import("Sql_lib");
+
+
+var userTitle = vars.get("$param.employeeId_param");
+if(userTitle)
+{
+    result.string(newWhere("ASYS_USERTOKEN.LOGIN_USER_ID", vars.get("$param.employeeId_param")).toString());
+//} else if (recordState != neon.OPERATINGSTATE_NEW && recordState != neon.OPERATINGSTATE_EDIT) {
+//    var condition = new SqlBuilder()
+//        .whereIfSet("STEPDATESTART_TABLEALIAS.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID")
+//        .andIfSet("STEPDATEEND_TABLEALIAS.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID")
+//        ;
+//
+//    result.string(condition.toString());
+//} else {
+//    
+//    result.string(newWhere().toString());
+}
\ No newline at end of file
diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod
index 60ea8401f6..05094e443d 100644
--- a/entity/Employee_entity/Employee_entity.aod
+++ b/entity/Employee_entity/Employee_entity.aod
@@ -4,6 +4,7 @@
   <majorModelMode>DISTRIBUTED</majorModelMode>
   <documentation>%aditoprj%/entity/Employee_entity/documentation.adoc</documentation>
   <title>Employee</title>
+  <siblings />
   <grantDeleteProcess>%aditoprj%/entity/Employee_entity/grantDeleteProcess.js</grantDeleteProcess>
   <contentTitleProcess>%aditoprj%/entity/Employee_entity/contentTitleProcess.js</contentTitleProcess>
   <afterUiInit>%aditoprj%/entity/Employee_entity/afterUiInit.js</afterUiInit>
@@ -394,6 +395,20 @@
       <name>DepartmentAttrIdByEmployeeContactId_param</name>
       <expose v="true" />
     </entityParameter>
+    <entityConsumer>
+      <name>EmployeeTokens</name>
+      <dependency>
+        <name>dependency</name>
+        <entityName>EmployeeToken_entity</entityName>
+        <fieldName>EmployeeTokenProvider</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>employeeId_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employeetokens/children/employeeid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
   </entityFields>
   <recordContainers>
     <jDitoRecordContainer>
diff --git a/entity/Employee_entity/entityfields/employeetokens/children/employeeid_param/valueProcess.js b/entity/Employee_entity/entityfields/employeetokens/children/employeeid_param/valueProcess.js
new file mode 100644
index 0000000000..470eab86ed
--- /dev/null
+++ b/entity/Employee_entity/entityfields/employeetokens/children/employeeid_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("system.vars");
+
+result.string(vars.get("$field.TITLE"));
diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
index f2aba5d40f..832e590ff5 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -1327,6 +1327,10 @@
       <key>Healthcare</key>
       <value>Gesundheitswesen</value>
     </entry>
+    <entry>
+      <key>Valid</key>
+      <value>Gültig</value>
+    </entry>
     <entry>
       <key>Valid from</key>
       <value>gültig ab</value>
@@ -9662,6 +9666,14 @@ Bitte Datumseingabe prüfen</value>
       <key>Probability in %</key>
       <value>Wahrscheinlichkeit in %</value>
     </entry>
+    <entry>
+      <key>#rememberme</key>
+      <value>Angemeldet bleiben</value>
+    </entry>
+    <entry>
+      <key>#login</key>
+      <value>Login Token</value>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
index b09cc03cde..d8a0023073 100644
--- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
+++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod
@@ -204,6 +204,10 @@
     <entry>
       <key>Developer</key>
     </entry>
+    <entry>
+      <key>Valid</key>
+      <value>Valid</value>
+    </entry>
     <entry>
       <key>Valid until</key>
     </entry>
@@ -7365,6 +7369,14 @@
     <entry>
       <key>Probability in %</key>
     </entry>
+    <entry>
+      <key>#rememberme</key>
+      <value>Stay logged in</value>
+    </entry>
+    <entry>
+      <key>#login</key>
+      <value>Login token</value>
+    </entry>
   </keyValueMap>
   <font name="Dialog" style="0" size="11" />
 </language>
diff --git a/neonContext/EmployeeToken/EmployeeToken.aod b/neonContext/EmployeeToken/EmployeeToken.aod
new file mode 100644
index 0000000000..61348f1c4b
--- /dev/null
+++ b/neonContext/EmployeeToken/EmployeeToken.aod
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.1">
+  <name>EmployeeToken</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <filterView>EmployeeTokenFilter_view</filterView>
+  <editView>EmployeeTokenEdit_view</editView>
+  <entity>EmployeeToken_entity</entity>
+  <references>
+    <neonViewReference>
+      <name>3ba4cdfb-ed9e-4bdf-bb03-4a9106ef67d6</name>
+      <view>EmployeeTokenEdit_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>88ca4edd-e890-4052-b66a-ec277956853f</name>
+      <view>EmployeeTokenFilter_view</view>
+    </neonViewReference>
+  </references>
+</neonContext>
diff --git a/neonView/EmployeeMain_view/EmployeeMain_view.aod b/neonView/EmployeeMain_view/EmployeeMain_view.aod
index f52e1c289c..94d73c9fd2 100644
--- a/neonView/EmployeeMain_view/EmployeeMain_view.aod
+++ b/neonView/EmployeeMain_view/EmployeeMain_view.aod
@@ -34,5 +34,10 @@
       <entityField>#ENTITY</entityField>
       <view>EmployeePermission_view</view>
     </neonViewReference>
+    <neonViewReference>
+      <name>6d6a2677-8be1-41a8-923a-030a72e370cd</name>
+      <entityField>EmployeeTokens</entityField>
+      <view>EmployeeTokenFilter_view</view>
+    </neonViewReference>
   </children>
 </neonView>
diff --git a/neonView/EmployeeTokenEdit_view/EmployeeTokenEdit_view.aod b/neonView/EmployeeTokenEdit_view/EmployeeTokenEdit_view.aod
new file mode 100644
index 0000000000..9a0bad8cea
--- /dev/null
+++ b/neonView/EmployeeTokenEdit_view/EmployeeTokenEdit_view.aod
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6">
+  <name>EmployeeTokenEdit_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <genericViewTemplate>
+      <name>EditForm</name>
+      <editMode v="true" />
+      <fields>
+        <entityFieldLink>
+          <name>516cda4b-3ea2-4631-ad90-cbaeb778830b</name>
+          <entityField>VALID</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>08577880-9ef5-4c54-bf5f-599125407904</name>
+          <entityField>VALID_FROM</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>b2e11525-ad9a-4efc-90ee-1bfd4d00a13c</name>
+          <entityField>VALID_TO</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>82c4cfd3-8448-4758-af64-553a3d64ddf3</name>
+          <entityField>GROUP_ID</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>542417a1-2ec7-472f-99fa-359d1e7d3ae3</name>
+          <entityField>GROUP_ID_DISPLAY</entityField>
+        </entityFieldLink>
+      </fields>
+    </genericViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/EmployeeTokenFilter_view/EmployeeTokenFilter_view.aod b/neonView/EmployeeTokenFilter_view/EmployeeTokenFilter_view.aod
new file mode 100644
index 0000000000..852a0eed7c
--- /dev/null
+++ b/neonView/EmployeeTokenFilter_view/EmployeeTokenFilter_view.aod
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6">
+  <name>EmployeeTokenFilter_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <filterable v="true" />
+  <layout>
+    <groupLayout>
+      <name>layout</name>
+    </groupLayout>
+  </layout>
+  <children>
+    <tableViewTemplate>
+      <name>TokenTable</name>
+      <linkedColumns />
+      <fixedFilterFields />
+      <title>Token</title>
+      <columns>
+        <neonTableColumn>
+          <name>eee2b9fd-89c2-454c-a589-6b5b83e4f538</name>
+          <entityField>VALID_STATUS_ICON</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>b89778da-071e-4a8c-8009-582d5cd31f1a</name>
+          <entityField>VALID_FROM</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>7ae721f4-21d9-4b71-a414-abf1cd411c01</name>
+          <entityField>VALID_TO</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>c6e2c00a-368d-4f16-aef3-579876a236a5</name>
+          <entityField>GROUP_ID</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>e511fc55-3c97-4230-a816-38613e448376</name>
+          <entityField>ID</entityField>
+        </neonTableColumn>
+      </columns>
+    </tableViewTemplate>
+  </children>
+</neonView>
-- 
GitLab