From ed1d5b43ddddafe77a8c1c96ac13b26e9fabda5c Mon Sep 17 00:00:00 2001
From: "a.schindlbeck" <a.schindlbeck@adito.de>
Date: Thu, 16 Jul 2020 16:07:41 +0200
Subject: [PATCH] #1060647 Favorites: all Contexts favorable

---
 entity/Campaign_entity/Campaign_entity.aod           |  4 ++++
 .../entityfields/campaign_obejcttype/valueProcess.js |  3 +++
 .../DocumentTemplate_entity.aod                      |  4 ++++
 .../documenttemplate_objecttype/valueProcess.js      |  3 +++
 entity/Employee_entity/Employee_entity.aod           |  4 ++++
 .../entityfields/employee_objecttype/valueProcess.js |  3 +++
 .../ExportTemplate_entity/ExportTemplate_entity.aod  |  4 ++++
 .../exporttemplate_objecttype/valueProcess.js        |  3 +++
 entity/Leadimport_entity/Leadimport_entity.aod       |  4 ++++
 .../leadimport_objecttype/valueProcess.js            |  3 +++
 entity/SupportTicket_entity/SupportTicket_entity.aod |  7 ++++---
 .../supportticket_objecttype/valueProcess.js         |  3 +++
 .../WorkflowDefinition_entity.aod                    |  4 ++++
 .../workflowdefinition_objecttype/valueProcess.js    |  3 +++
 .../CampaignPreview_view/CampaignPreview_view.aod    |  7 +++++++
 .../DocumentTemplatePreview_view.aod                 |  7 +++++++
 .../EmployeePreview_view/EmployeePreview_view.aod    |  7 +++++++
 .../ExportTemplatePreview_view.aod                   |  7 +++++++
 .../LeadimportPreview_view.aod                       | 12 ++++++++++++
 .../SupportTicketPreview_view.aod                    |  7 +++++++
 .../WorkflowDefinitionPreview_view.aod               |  7 +++++++
 21 files changed, 103 insertions(+), 3 deletions(-)
 create mode 100644 entity/Campaign_entity/entityfields/campaign_obejcttype/valueProcess.js
 create mode 100644 entity/DocumentTemplate_entity/entityfields/documenttemplate_objecttype/valueProcess.js
 create mode 100644 entity/Employee_entity/entityfields/employee_objecttype/valueProcess.js
 create mode 100644 entity/ExportTemplate_entity/entityfields/exporttemplate_objecttype/valueProcess.js
 create mode 100644 entity/Leadimport_entity/entityfields/leadimport_objecttype/valueProcess.js
 create mode 100644 entity/SupportTicket_entity/entityfields/supportticket_objecttype/valueProcess.js
 create mode 100644 entity/WorkflowDefinition_entity/entityfields/workflowdefinition_objecttype/valueProcess.js

diff --git a/entity/Campaign_entity/Campaign_entity.aod b/entity/Campaign_entity/Campaign_entity.aod
index d67763b95c..6704823320 100644
--- a/entity/Campaign_entity/Campaign_entity.aod
+++ b/entity/Campaign_entity/Campaign_entity.aod
@@ -517,6 +517,10 @@
         </entityParameter>
       </children>
     </entityConsumer>
+    <entityField>
+      <name>CAMPAIGN_OBEJCTTYPE</name>
+      <valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/campaign_obejcttype/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/Campaign_entity/entityfields/campaign_obejcttype/valueProcess.js b/entity/Campaign_entity/entityfields/campaign_obejcttype/valueProcess.js
new file mode 100644
index 0000000000..2377055cd4
--- /dev/null
+++ b/entity/Campaign_entity/entityfields/campaign_obejcttype/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("Campaign");
\ No newline at end of file
diff --git a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod
index 3e4bbba2ab..3e357fa976 100644
--- a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod
+++ b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod
@@ -339,6 +339,10 @@
       <name>ComingFrom_param</name>
       <expose v="true" />
     </entityParameter>
+    <entityField>
+      <name>DOCUMENTTEMPLATE_OBJECTTYPE</name>
+      <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documenttemplate_objecttype/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/DocumentTemplate_entity/entityfields/documenttemplate_objecttype/valueProcess.js b/entity/DocumentTemplate_entity/entityfields/documenttemplate_objecttype/valueProcess.js
new file mode 100644
index 0000000000..1889e3e2e5
--- /dev/null
+++ b/entity/DocumentTemplate_entity/entityfields/documenttemplate_objecttype/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("DocumentTemplate");
\ No newline at end of file
diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod
index 36806cbf40..d3ae09d5ec 100644
--- a/entity/Employee_entity/Employee_entity.aod
+++ b/entity/Employee_entity/Employee_entity.aod
@@ -378,6 +378,10 @@
         <element>MASK</element>
       </onValueChangeTypes>
     </entityField>
+    <entityField>
+      <name>EMPLOYEE_OBJECTTYPE</name>
+      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employee_objecttype/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <jDitoRecordContainer>
diff --git a/entity/Employee_entity/entityfields/employee_objecttype/valueProcess.js b/entity/Employee_entity/entityfields/employee_objecttype/valueProcess.js
new file mode 100644
index 0000000000..a78f6195ba
--- /dev/null
+++ b/entity/Employee_entity/entityfields/employee_objecttype/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("Employee");
\ No newline at end of file
diff --git a/entity/ExportTemplate_entity/ExportTemplate_entity.aod b/entity/ExportTemplate_entity/ExportTemplate_entity.aod
index becc0bf70e..2ab97cfd7f 100644
--- a/entity/ExportTemplate_entity/ExportTemplate_entity.aod
+++ b/entity/ExportTemplate_entity/ExportTemplate_entity.aod
@@ -140,6 +140,10 @@
       <dropDownProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/fielddelimiter/dropDownProcess.js</dropDownProcess>
       <textInputAllowed v="true" />
     </entityField>
+    <entityField>
+      <name>EXPORTTEMPLATE_OBJECTTYPE</name>
+      <valueProcess>%aditoprj%/entity/ExportTemplate_entity/entityfields/exporttemplate_objecttype/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/ExportTemplate_entity/entityfields/exporttemplate_objecttype/valueProcess.js b/entity/ExportTemplate_entity/entityfields/exporttemplate_objecttype/valueProcess.js
new file mode 100644
index 0000000000..1421e6130d
--- /dev/null
+++ b/entity/ExportTemplate_entity/entityfields/exporttemplate_objecttype/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("ExportTemplate");
\ No newline at end of file
diff --git a/entity/Leadimport_entity/Leadimport_entity.aod b/entity/Leadimport_entity/Leadimport_entity.aod
index b794f161e4..6f7be5e2f8 100644
--- a/entity/Leadimport_entity/Leadimport_entity.aod
+++ b/entity/Leadimport_entity/Leadimport_entity.aod
@@ -313,6 +313,10 @@
       <state>INVISIBLE</state>
       <stateProcess>%aditoprj%/entity/Leadimport_entity/entityfields/leadimportreset/stateProcess.js</stateProcess>
     </entityActionField>
+    <entityField>
+      <name>LEADIMPORT_OBJECTTYPE</name>
+      <valueProcess>%aditoprj%/entity/Leadimport_entity/entityfields/leadimport_objecttype/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
diff --git a/entity/Leadimport_entity/entityfields/leadimport_objecttype/valueProcess.js b/entity/Leadimport_entity/entityfields/leadimport_objecttype/valueProcess.js
new file mode 100644
index 0000000000..a6c90ee2e7
--- /dev/null
+++ b/entity/Leadimport_entity/entityfields/leadimport_objecttype/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("Leadimport");
\ No newline at end of file
diff --git a/entity/SupportTicket_entity/SupportTicket_entity.aod b/entity/SupportTicket_entity/SupportTicket_entity.aod
index db8daa732b..8438598fe4 100644
--- a/entity/SupportTicket_entity/SupportTicket_entity.aod
+++ b/entity/SupportTicket_entity/SupportTicket_entity.aod
@@ -395,6 +395,10 @@
       <name>RowId_param</name>
       <expose v="true" />
     </entityParameter>
+    <entityField>
+      <name>SUPPORTTICKET_OBJECTTYPE</name>
+      <valueProcess>%aditoprj%/entity/SupportTicket_entity/entityfields/supportticket_objecttype/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
@@ -483,9 +487,6 @@
           <name>TASK_REQUESTOR_CONTACT_ID.displayValue</name>
           <expression>%aditoprj%/entity/SupportTicket_entity/recordcontainers/db/recordfieldmappings/task_requestor_contact_id.displayvalue/expression.js</expression>
         </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>TASK_PRIORITY.displayValue</name>
-        </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>TASK_PROGRESS.value</name>
           <recordfield>TASK.PROGRESS</recordfield>
diff --git a/entity/SupportTicket_entity/entityfields/supportticket_objecttype/valueProcess.js b/entity/SupportTicket_entity/entityfields/supportticket_objecttype/valueProcess.js
new file mode 100644
index 0000000000..b111482e01
--- /dev/null
+++ b/entity/SupportTicket_entity/entityfields/supportticket_objecttype/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("SupportTicket");
\ No newline at end of file
diff --git a/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod b/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod
index 155a2f033d..8af4e2662c 100644
--- a/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod
+++ b/entity/WorkflowDefinition_entity/WorkflowDefinition_entity.aod
@@ -214,6 +214,10 @@
       <iconId>VAADIN:EDIT</iconId>
       <tooltip>Edit workflow</tooltip>
     </entityActionField>
+    <entityField>
+      <name>WORKFLOWDEFINITION_OBJECTTYPE</name>
+      <valueProcess>%aditoprj%/entity/WorkflowDefinition_entity/entityfields/workflowdefinition_objecttype/valueProcess.js</valueProcess>
+    </entityField>
   </entityFields>
   <recordContainers>
     <jDitoRecordContainer>
diff --git a/entity/WorkflowDefinition_entity/entityfields/workflowdefinition_objecttype/valueProcess.js b/entity/WorkflowDefinition_entity/entityfields/workflowdefinition_objecttype/valueProcess.js
new file mode 100644
index 0000000000..10f8662348
--- /dev/null
+++ b/entity/WorkflowDefinition_entity/entityfields/workflowdefinition_objecttype/valueProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.string("WorkflowDefinition");
\ No newline at end of file
diff --git a/neonView/CampaignPreview_view/CampaignPreview_view.aod b/neonView/CampaignPreview_view/CampaignPreview_view.aod
index b0af52feaa..a85780112d 100644
--- a/neonView/CampaignPreview_view/CampaignPreview_view.aod
+++ b/neonView/CampaignPreview_view/CampaignPreview_view.aod
@@ -22,6 +22,13 @@
       <entityField>#ENTITY</entityField>
       <title></title>
     </cardViewTemplate>
+    <favoriteViewTemplate>
+      <name>Favorites</name>
+      <objectType>CAMPAIGN_OBEJCTTYPE</objectType>
+      <rowId>#UID</rowId>
+      <entityField>#ENTITY</entityField>
+      <title>favorites</title>
+    </favoriteViewTemplate>
     <genericViewTemplate>
       <name>TimespanGeneric</name>
       <showDrawer v="true" />
diff --git a/neonView/DocumentTemplatePreview_view/DocumentTemplatePreview_view.aod b/neonView/DocumentTemplatePreview_view/DocumentTemplatePreview_view.aod
index 58d8c23792..5c4100bd63 100644
--- a/neonView/DocumentTemplatePreview_view/DocumentTemplatePreview_view.aod
+++ b/neonView/DocumentTemplatePreview_view/DocumentTemplatePreview_view.aod
@@ -18,6 +18,13 @@
       <entityField>#ENTITY</entityField>
       <title>Document Template</title>
     </cardViewTemplate>
+    <favoriteViewTemplate>
+      <name>Favorites</name>
+      <objectType>DOCUMENTTEMPLATE_OBJECTTYPE</objectType>
+      <rowId>#UID</rowId>
+      <entityField>#ENTITY</entityField>
+      <title>favorties</title>
+    </favoriteViewTemplate>
     <neonViewReference>
       <name>0da2cc6b-86c9-4455-b5b2-edc54b30e793</name>
       <entityField>Documents</entityField>
diff --git a/neonView/EmployeePreview_view/EmployeePreview_view.aod b/neonView/EmployeePreview_view/EmployeePreview_view.aod
index 576e510759..ce68cd2619 100644
--- a/neonView/EmployeePreview_view/EmployeePreview_view.aod
+++ b/neonView/EmployeePreview_view/EmployeePreview_view.aod
@@ -16,6 +16,13 @@
       <subtitleField>TITLE</subtitleField>
       <entityField>#ENTITY</entityField>
     </cardViewTemplate>
+    <favoriteViewTemplate>
+      <name>Favorite</name>
+      <objectType>EMPLOYEE_OBJECTTYPE</objectType>
+      <rowId>SHORT_UID</rowId>
+      <entityField>#ENTITY</entityField>
+      <title>favorite</title>
+    </favoriteViewTemplate>
     <genericViewTemplate>
       <name>Info</name>
       <showDrawer v="true" />
diff --git a/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod b/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod
index 8e87cf2946..06bcfe9edf 100644
--- a/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod
+++ b/neonView/ExportTemplatePreview_view/ExportTemplatePreview_view.aod
@@ -15,6 +15,13 @@
       <subtitleField>ISOLANGUAGE</subtitleField>
       <entityField>#ENTITY</entityField>
     </cardViewTemplate>
+    <favoriteViewTemplate>
+      <name>Favorites</name>
+      <objectType>EXPORTTEMPLATE_OBJECTTYPE</objectType>
+      <rowId>#UID</rowId>
+      <entityField>#ENTITY</entityField>
+      <title>favorites</title>
+    </favoriteViewTemplate>
     <genericViewTemplate>
       <name>generic</name>
       <entityField>#ENTITY</entityField>
diff --git a/neonView/LeadimportPreview_view/LeadimportPreview_view.aod b/neonView/LeadimportPreview_view/LeadimportPreview_view.aod
index 7c0a2ef406..1280e17697 100644
--- a/neonView/LeadimportPreview_view/LeadimportPreview_view.aod
+++ b/neonView/LeadimportPreview_view/LeadimportPreview_view.aod
@@ -18,6 +18,18 @@
       <entityField>#ENTITY</entityField>
       <informationField>SENTENCESEPERATOR</informationField>
     </cardViewTemplate>
+    <favoriteViewTemplate>
+      <name>Favorites</name>
+      <objectType>LEADIMPORT_OBJECTTYPE</objectType>
+      <rowId>#UID</rowId>
+      <entityField>#ENTITY</entityField>
+      <title>favorites</title>
+      <devices>
+        <element>MOBILE</element>
+        <element>TABLET</element>
+        <element>DESKTOP</element>
+      </devices>
+    </favoriteViewTemplate>
     <genericViewTemplate>
       <name>info</name>
       <editMode v="false" />
diff --git a/neonView/SupportTicketPreview_view/SupportTicketPreview_view.aod b/neonView/SupportTicketPreview_view/SupportTicketPreview_view.aod
index 502655061d..48b48a2a48 100644
--- a/neonView/SupportTicketPreview_view/SupportTicketPreview_view.aod
+++ b/neonView/SupportTicketPreview_view/SupportTicketPreview_view.aod
@@ -17,6 +17,13 @@
       <favoriteAction1>newActivity</favoriteAction1>
       <entityField>#ENTITY</entityField>
     </cardViewTemplate>
+    <favoriteViewTemplate>
+      <name>Favorites</name>
+      <objectType>SUPPORTTICKET_OBJECTTYPE</objectType>
+      <rowId>#UID</rowId>
+      <entityField>#ENTITY</entityField>
+      <title>favorites</title>
+    </favoriteViewTemplate>
     <genericViewTemplate>
       <name>Info</name>
       <showDrawer v="true" />
diff --git a/neonView/WorkflowDefinitionPreview_view/WorkflowDefinitionPreview_view.aod b/neonView/WorkflowDefinitionPreview_view/WorkflowDefinitionPreview_view.aod
index de087d4217..0d2cd46224 100644
--- a/neonView/WorkflowDefinitionPreview_view/WorkflowDefinitionPreview_view.aod
+++ b/neonView/WorkflowDefinitionPreview_view/WorkflowDefinitionPreview_view.aod
@@ -17,6 +17,13 @@
       <entityField>#ENTITY</entityField>
       <isEditable v="false" />
     </cardViewTemplate>
+    <favoriteViewTemplate>
+      <name>Favorites</name>
+      <objectType>WORKFLOWDEFINITION_OBJECTTYPE</objectType>
+      <rowId>#UID</rowId>
+      <entityField>#ENTITY</entityField>
+      <title>favorites</title>
+    </favoriteViewTemplate>
     <genericViewTemplate>
       <name>Generic</name>
       <showDrawer v="true" />
-- 
GitLab