Skip to content
Snippets Groups Projects
Commit 3b646d7f authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1030169][Einführung von Aktivitäten und Task]

parent 64f29bd2
No related branches found
No related tags found
No related merge requests found
Showing with 130 additions and 5 deletions
......@@ -8,6 +8,15 @@
<entityFields>
<entityIncomingField>
<name>#INCOMING</name>
<recordContainer>jdito</recordContainer>
<dependencies>
<entityDependency>
<name>6bbed1fb-7f22-420d-988e-7f9413c0b294</name>
<entityName>Task_entity</entityName>
<fieldName>MainDocument_dfo</fieldName>
<isOutgoing v="false" />
</entityDependency>
</dependencies>
</entityIncomingField>
<entityField>
<name>NAME</name>
......
......@@ -49,7 +49,7 @@
<name>EDITOR_RELATION_ID</name>
<title>{$TASK_EDITOR}</title>
<linkedContext>Pers_context</linkedContext>
<outgoingField>EditorPers_dfo</outgoingField>
<outgoingField>PersEditor_dfo</outgoingField>
</entityField>
<entityField>
<name>START_DATE</name>
......@@ -126,11 +126,36 @@
<fieldName>#INCOMING</fieldName>
</dependency>
</entityOutgoingField>
<entityOutgoingField>
<name>MainDocument_dfo</name>
<title>Documents</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Document_entity</entityName>
<fieldName>#INCOMING</fieldName>
</dependency>
<children>
<entityParameter>
<name>AssignmentName_param</name>
<code>%aditoprj%/entity/Task_entity/entityfields/maindocument_dfo/children/assignmentname_param/code.js</code>
</entityParameter>
<entityParameter>
<name>AssignmentRowId_param</name>
<code>%aditoprj%/entity/Task_entity/entityfields/maindocument_dfo/children/assignmentrowid_param/code.js</code>
</entityParameter>
<entityParameter>
<name>AssignmentTable_param</name>
<code>%aditoprj%/entity/Task_entity/entityfields/maindocument_dfo/children/assignmenttable_param/code.js</code>
</entityParameter>
</children>
</entityOutgoingField>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<alias>Data_alias</alias>
<onDBInsert>%aditoprj%/entity/Task_entity/recordcontainers/db/onDBInsert.js</onDBInsert>
<linkInformation>
<linkInformation>
<name>47e1b4a5-6901-48b0-85ba-bec39b86a2d7</name>
......
import("system.result");
result.string("DOCUMENT");
\ No newline at end of file
import("system.result");
import("system.vars");
result.string(vars.get("$field.TASKID"));//TODO: sys.uid or similar?
\ No newline at end of file
import("system.result");
result.string("TASK");
\ No newline at end of file
import("system.db");
import("system.vars");
import("system.neon");
import("Sql_lib");
if (!vars.get("$field.CODE"))
{
var maskingHelper = new SqlMaskingUtils();
var newCodeNumber = db.cell("select " + maskingHelper.max("TASK.CODE") + " from TASK");
newCodeNumber = Number(newCodeNumber);//if no number exists till no, start value will be 1 (due to: ++0)
if (isNaN(newCodeNumber))
throw new TypeError();//TODO:add Message
neon.setFieldValue("$field.CODE", ++newCodeNumber);
}
\ No newline at end of file
......@@ -1705,6 +1705,7 @@
</entry>
<entry>
<key>private</key>
<value>privat</value>
</entry>
<entry>
<key>waiting</key>
......
......@@ -5,6 +5,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/neonContext/Task_context/documentation.adoc</documentation>
<icon>VAADIN:TASKS</icon>
<mainview>TaskMain_view</mainview>
<filterview>TaskFilter_view</filterview>
<editview>TaskEdit_view</editview>
<preview>TaskPreview_view</preview>
......@@ -22,5 +23,9 @@
<name>b9bd19b5-2a67-47a4-83cd-41ba30e81888</name>
<view>TaskEdit_view</view>
</neonViewReference>
<neonViewReference>
<name>83309ef0-d1c0-4f74-bb44-41fd8e054b4b</name>
<view>TaskMain_view</view>
</neonViewReference>
</references>
</neonContext>
<?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.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1">
<name>TaskMain_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<masterSlaveLayout>
<name>layout</name>
<master>c8294ae1-65d8-4cee-a003-931a4759c619</master>
</masterSlaveLayout>
</layout>
<children>
<neonViewReference>
<name>c8294ae1-65d8-4cee-a003-931a4759c619</name>
<entityField>#ENTITY</entityField>
<view>TaskPreview_view</view>
</neonViewReference>
<genericViewTemplate>
<name>details</name>
<entityField>#ENTITY</entityField>
<title>details</title>
<fields>
<entityFieldLink>
<name>fea59f13-750b-427d-bf33-cc1bead95446</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
<name>6846f680-84ef-46da-a0ea-6797044cf693</name>
<entityField>MainDocument_dfo</entityField>
<view>DocumentFilter_view</view>
</neonViewReference>
</children>
</neonView>
......@@ -17,6 +17,7 @@
</cardViewTemplate>
<genericViewTemplate>
<name>extendedData</name>
<showDrawer v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
......@@ -39,6 +40,10 @@
<name>ebdffed8-4999-4ec1-ac4d-c22514dfed0c</name>
<entityField>PRIORITY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>d9e4daef-84df-415c-9be7-3238c2760c07</name>
<entityField>PROTECTIONLEVEL</entityField>
</entityFieldLink>
<entityFieldLink>
<name>5bcbaa89-0826-4ef8-872d-bd68dbd8ef77</name>
<entityField>TYPE</entityField>
......@@ -51,10 +56,6 @@
<name>bbf1a736-acf9-4b41-9df9-5675fc6d8943</name>
<entityField>EDITOR_RELATION_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>590d0c95-9cc6-44f7-9b64-37a3990531d2</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
......
......@@ -505,6 +505,31 @@ SqlMaskingUtils.prototype.trim = function(field) {
return resultStr;
}
/**
* returns the max-value sql expressions depending on the database behind the given alias
* note that this function does not verifiy if the field (and type) usage is valid at all
*
* @param {String} field expression
*
* @return {String} sql-part that can be used in a select
*/
SqlMaskingUtils.prototype.max = function(field)
{
return "max(" + field + ")";
}
/**
* returns the min-value sql expressions depending on the database behind the given alias
* note that this function does not verifiy if the field (and type) usage is valid at all
*
* @param {String} field expression
*
* @return {String} sql-part that can be used in a select
*/
SqlMaskingUtils.prototype.min = function(field)
{
return "min(" + field + ")";
}
/**
* masks the function cast of standard sql
......
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