Skip to content
Snippets Groups Projects
Commit 21f4bbef authored by S.Listl's avatar S.Listl
Browse files

Activity und Task

parent d51b46ef
No related branches found
No related tags found
No related merge requests found
Showing
with 248 additions and 21 deletions
......@@ -3744,6 +3744,20 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>PROGRESS</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......@@ -4006,7 +4020,7 @@
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<index v="true" />
<documentation></documentation>
<title></title>
<description></description>
......@@ -4039,6 +4053,34 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>SORTING</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="4" />
<size v="10" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>ATTRIBUTE_INFO</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......@@ -4734,6 +4776,82 @@
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
<name>TASKLINK</name>
<dbName></dbName>
<idColumn>TASKLINKID</idColumn>
<idGeneratorType v="0" />
<idGeneratorInterval v="1" />
<documentation></documentation>
<title></title>
<description></description>
<auditSyncConfig>
<name>auditSyncConfig</name>
<auditMode v="0" />
<syncActive v="false" />
<syncComplete v="true" />
<syncDirection v="1" />
<syncIds></syncIds>
</auditSyncConfig>
<entityFields>
<entityFieldDb>
<name>OBJECT_ROWID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>OBJECT_TYPE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="63" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>TASKLINKID</name>
<dbName></dbName>
<primaryKey v="true" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="true" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>TASK_ID</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
</entities>
</entityGroup>
</aliasDefDb>
......
......@@ -259,7 +259,7 @@
</entityField>
<entityConsumer>
<name>ModuleTrees</name>
<title>Tree</title>
<title>History</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
......@@ -278,17 +278,17 @@
</children>
</entityConsumer>
<entityActionField>
<name>newActivity_action</name>
<name>newActivity</name>
<fieldType>ACTION</fieldType>
<title>New activity</title>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newactivity_action/onActionProcess.js</onActionProcess>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newactivity/onActionProcess.js</onActionProcess>
<iconId>NEON:HISTORY</iconId>
</entityActionField>
<entityActionField>
<name>newTask_action</name>
<name>newTask</name>
<fieldType>ACTION</fieldType>
<title>New task</title>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newtask_action/onActionProcess.js</onActionProcess>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TASKS</iconId>
</entityActionField>
<entityParameter>
......@@ -334,6 +334,35 @@
<groupable v="true" />
<valueProcess>%aditoprj%/entity/Activity_entity/entityfields/entryday/valueProcess.js</valueProcess>
</entityField>
<entityConsumer>
<name>Attributes</name>
<title>Attributes</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>AttributeRelation_entity</entityName>
<fieldName>RelationsForSpecificObject</fieldName>
</dependency>
<children>
<entityParameter>
<name>objectRowId_param</name>
<code>%aditoprj%/entity/Activity_entity/entityfields/attributes/children/objectrowid_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>objectType_param</name>
<code>%aditoprj%/entity/Activity_entity/entityfields/attributes/children/objecttype_param/code.js</code>
<triggerRecalculation v="true" />
</entityParameter>
</children>
</entityConsumer>
<entityActionField>
<name>newOffer</name>
<fieldType>ACTION</fieldType>
<title>New offer</title>
<onActionProcess>%aditoprj%/entity/Activity_entity/entityfields/newoffer/onActionProcess.js</onActionProcess>
<iconId>VAADIN:CART</iconId>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("system.result");
result.string(vars.get("$field.ACTIVITYID"));
\ No newline at end of file
import("system.result");
import("Context_lib");
result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
import("system.vars");
import("Offer_lib");
OfferUtils.createNewOffer(null, vars.getString("$field.ACTIVITYID"));
\ No newline at end of file
......@@ -2,8 +2,7 @@ import("system.neon");
import("system.vars");
var params = {
"ParentId_param": vars.get("$field.ACTIVITYID"),
"ParentContext_param": "Activity"
"ParentId_param" : vars.get("$field.ACTIVITYID"),
"ParentContext_param" : "Activity"
};
neon.openContext("Task", "TaskEdit_view", null, neon.OPERATINGSTATE_NEW, params)
\ No newline at end of file
neon.openContext("Task", "TaskEdit_view", null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
......@@ -7,9 +7,18 @@ import("Context_lib");
if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param")
&& vars.exists("$param.ObjectId_param") && vars.get("$param.ObjectId_param"))
{
db.insertData(
"ACTIVITYLINK",
["ACTIVITYLINKID", "OBJECT_TYPE", "OBJECT_ROWID", "ACTIVITY_ID"],
null,
[util.getNewUUID(), vars.get("$param.ObjectId_param"), vars.get("$param.RowId_param"), vars.getString("$field.ACTIVITYID")]);
var rowIds = vars.get("$param.RowId_param");
if (/^\[.*\]$/.test(rowIds))
rowIds = JSON.parse(rowIds);
else
rowIds = [rowIds];
rowIds.forEach(function (rowId)
{
//TODO: remove this and use neon.addRecord
db.insertData(
"ACTIVITYLINK",
["ACTIVITYLINKID", "OBJECT_TYPE", "OBJECT_ROWID", "ACTIVITY_ID"],
null,
[util.getNewUUID(), vars.get("$param.ObjectId_param"), rowId, vars.getString("$field.ACTIVITYID")]);
});
}
\ No newline at end of file
......@@ -88,6 +88,12 @@
<fieldName>Attributes</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>f73a57f2-0697-4ebf-abc1-a7eb24d89fe4</name>
<entityName>Activity_entity</entityName>
<fieldName>Attributes</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
......@@ -22,6 +22,12 @@
<fieldName>Contexts</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>2dcb4637-6096-43fc-b07e-d44fb51fbc1b</name>
<entityName>TaskLink_entity</entityName>
<fieldName>Contexts</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityField>
......
......@@ -336,6 +336,12 @@
<fieldName>KeywordState</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>5d9e0e48-ece8-4b8e-ab72-beef77b5dcc3</name>
<entityName>Task_entity</entityName>
<fieldName>KeywordProgress</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
......@@ -86,6 +86,12 @@
<fieldName>Objects</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>445b79b3-e826-40d1-b6c2-46d62daf0818</name>
<entityName>TaskLink_entity</entityName>
<fieldName>Objects</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
......
......@@ -495,6 +495,13 @@
<mandatory v="false" />
<description>PARAMETER</description>
</entityParameter>
<entityActionField>
<name>newTask</name>
<fieldType>ACTION</fieldType>
<title>New task</title>
<onActionProcess>%aditoprj%/entity/Offer_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TASKS</iconId>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("Task_lib");
TaskUtils.createNewTask(vars.get("$field.OFFERID"));
\ No newline at end of file
......@@ -394,6 +394,13 @@
<valueProcess>%aditoprj%/entity/Order_entity/entityfields/offer_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Order_entity/entityfields/offer_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityActionField>
<name>newTask</name>
<fieldType>ACTION</fieldType>
<title>New task</title>
<onActionProcess>%aditoprj%/entity/Order_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TASKS</iconId>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("Task_lib");
TaskUtils.createNewTask(vars.get("$field.SALESORDERID"));
\ No newline at end of file
import("system.vars");
import("system.neon");
import("Context_lib");
import("Task_lib");
var params = {};
params["ObjectType_param"] = ContextUtils.getCurrentContextId();
params["RowId_param"] = vars.get("$field.ORGANISATIONID");
neon.openContext("Task", null, null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
TaskUtils.createNewTask(vars.get("$field.ORGANISATIONID"));
\ No newline at end of file
......@@ -550,6 +550,13 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
</entityParameter>
</children>
</entityConsumer>
<entityActionField>
<name>newTask</name>
<fieldType>ACTION</fieldType>
<title>New task</title>
<onActionProcess>%aditoprj%/entity/Person_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TASKS</iconId>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("Task_lib");
TaskUtils.createNewTask(vars.get("$field.CONTACTID"));
\ No newline at end of file
......@@ -334,6 +334,13 @@
</entityParameter>
</children>
</entityConsumer>
<entityActionField>
<name>newTask</name>
<fieldType>ACTION</fieldType>
<title>New task</title>
<onActionProcess>%aditoprj%/entity/Product_entity/entityfields/newtask/onActionProcess.js</onActionProcess>
<iconId>VAADIN:TASKS</iconId>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment