Skip to content
Snippets Groups Projects
Commit d3e8df32 authored by Maximilian Hofmann's avatar Maximilian Hofmann
Browse files

merge with master

parents dd58f1f5 84056c69
No related branches found
No related tags found
No related merge requests found
Showing
with 124 additions and 21 deletions
......@@ -4416,8 +4416,8 @@
<name>TYPE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="100" />
<columnType v="1" />
<size v="36" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
......@@ -4430,8 +4430,8 @@
<name>NAME</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="1" />
<size v="36" />
<columnType v="12" />
<size v="100" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
......@@ -4618,6 +4618,20 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>OBJECT_TITLE</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="12" />
<size v="123" />
<scale v="0" />
<notNull v="true" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
......@@ -6,5 +6,5 @@ var cond = SqlCondition.begin()
.andPrepareVars("ACTIVITYLINK.OBJECT_ROWID", "$param.ObjectRowid_param")
.andPrepareVars("ACTIVITYLINK.OBJECT_TYPE", "$param.ObjectType_param");
//TODO: use a preparedCondition when available
//TODO: use a preparedCondition when available #1030812 #1034026
result.string(db.translateCondition(cond.build("1 = 1")));
\ No newline at end of file
......@@ -16,6 +16,6 @@ if(vars.exists("$param.OnlyInnate_param") && vars.get("$param.OnlyInnate_param")
cond.andPrepare("ACTIVITY.CREATOR", vars.get("$sys.user"));
}
//TODO: use a preparedCondition when available
//TODO: use a preparedCondition when available #1030812 #1034026
var resCond = db.translateCondition(cond.build("1 = 1"));
result.string(resCond);
......@@ -4,7 +4,7 @@ import("system.translate");
import("system.result");
import("Sql_lib");
//TODO: temporary testing code
//TODO: temporary testing code -> will be replaced with title-mechanic
var isoCode = vars.get("$field.COUNTRY");
var countryName = db.cell(SqlCondition.begin().andPrepare("AB_COUNTRYINFO.ISO2", isoCode).buildSql("select AB_COUNTRYINFO.NAME_LATIN from AB_COUNTRYINFO"));
countryName = translate.text(countryName);
......
......@@ -10,6 +10,6 @@ var zipCode = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.ZIP"));
var message = "";
var isValid = AddressValidationUtils.isValidZip(countryCode, zipCode);
if (!isValid)
message = translate.text("ZIP code is not valid");//TODO: better message text
message = translate.text("The ZIP code does not match the format of the country.");
result.string(message);
\ No newline at end of file
......@@ -41,6 +41,9 @@
</entityDependency>
</dependencies>
</entityProvider>
<entityField>
<name>OBJECT_TITLE</name>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -73,6 +76,10 @@
<name>OBJECTTYPE.value</name>
<recordfield>APPOINTMENTLINK.OBJECT_TYPE</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>OBJECT_TITLE.value</name>
<recordfield>APPOINTMENTLINK.OBJECT_TITLE</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
......@@ -5,5 +5,5 @@ import("Sql_lib");
var cond = SqlCondition.begin()
.andPrepareVars("APPOINTMENTLINK.APPOINTMENT_ID", "$param.AppointmentId_param")
//TODO: use a preparedCondition when available
//TODO: use a preparedCondition when available #1030812 #1034026
result.string(db.translateCondition(cond.build("1 = 1")));
\ No newline at end of file
......@@ -120,7 +120,10 @@
<name>ATTENDEESLENGTH</name>
</entityField>
<entityField>
<name>LINKS</name>
<name>LINKOBJECT</name>
<title>Linkobject</title>
<consumer>Objects</consumer>
<linkedContext>Object_context</linkedContext>
</entityField>
<entityField>
<name>ICON</name>
......@@ -164,10 +167,32 @@
<children>
<entityParameter>
<name>ContextId_param</name>
<code>%aditoprj%/entity/Appointment_entity/entityfields/contexts/children/contextid_param/code.js</code>
<documentation>%aditoprj%/entity/Appointment_entity/entityfields/contexts/children/contextid_param/documentation.adoc</documentation>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>Objects</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Object_entity</entityName>
<fieldName>#PROVIDER</fieldName>
</dependency>
<children>
<entityParameter>
<name>ObjectType_param</name>
<code>%aditoprj%/entity/Appointment_entity/entityfields/objects/children/objecttype_param/code.js</code>
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>LINKTYPE</name>
<title>Linktype</title>
<consumer>Contexts</consumer>
<linkedContext>Context_context</linkedContext>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
import("system.vars");
import("system.result");
result.string(vars.get("$field.LINKTYPE"))
\ No newline at end of file
......@@ -50,6 +50,12 @@
<fieldName>Attributes</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>236a52d8-830d-4e46-bf9b-7ffaeef25477</name>
<entityName>Attribute_entity</entityName>
<fieldName>AttributeChildren</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityParameter>
......
......@@ -12,7 +12,7 @@
<entityField>
<name>OBJECT_TYPE</name>
<title>Context</title>
<possibleItemsProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/object_type/possibleItemsProcess.js</possibleItemsProcess>
<consumer>Contexts</consumer>
</entityField>
<entityField>
<name>AB_ATTRIBUTEUSAGEID</name>
......@@ -55,6 +55,15 @@
<searchable v="false" />
<onValidation>%aditoprj%/entity/AttributeUsage_entity/entityfields/max_count/onValidation.js</onValidation>
</entityField>
<entityConsumer>
<name>Contexts</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Context_entity</entityName>
<fieldName>Context</fieldName>
</dependency>
</entityConsumer>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.result");
//TODO: when available, use a function to get the possible contexts
result.object([["Organisation", "Org"]]);
\ No newline at end of file
......@@ -14,6 +14,7 @@
<name>ATTRIBUTE_NAME</name>
<title>Name</title>
<mandatory v="true" />
<displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_name/displayValueProcess.js</displayValueProcess>
</entityField>
<entityField>
<name>ATTRIBUTE_TYPE</name>
......@@ -23,26 +24,47 @@
</entityField>
<entityField>
<name>AB_ATTRIBUTEID</name>
<searchable v="false" />
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/ab_attributeid/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>ATTRIBUTE_PARENT_ID</name>
<title>Parent Attribute</title>
<consumer>AttributeChildren</consumer>
<linkedContext>Attribute_context</linkedContext>
<groupable v="true" />
<valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attribute_parent_id/displayValueProcess.js</displayValueProcess>
</entityField>
<entityConsumer>
<name>AttributeChildren</name>
<title>Attributes</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<fieldName></fieldName>
<entityName>Attribute_entity</entityName>
<fieldName>AttributeParent</fieldName>
</dependency>
<children>
<entityParameter>
<name>attrParentId_param</name>
<code>%aditoprj%/entity/Attribute_entity/entityfields/attributechildren/children/attrparentid_param/code.js</code>
<triggerRecalculation v="true" />
<mandatory v="false" />
</entityParameter>
</children>
</entityConsumer>
<entityProvider>
<name>AttributeParent</name>
<fieldType>DEPENDENCY_IN</fieldType>
<recordContainer>db</recordContainer>
<dependencies>
<entityDependency>
<name>18bd148d-bed3-429f-ba54-c5eac76c5083</name>
<entityName>Attribute_entity</entityName>
<fieldName>AttributeChildren</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityParameter>
<name>attrParentId_param</name>
......@@ -108,10 +130,6 @@
<name>AB_ATTRIBUTEID.value</name>
<recordfield>AB_ATTRIBUTE.AB_ATTRIBUTEID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ATTRIBUTE_NAME.value</name>
<recordfield>AB_ATTRIBUTE.ATTRIBUTE_NAME</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ATTRIBUTE_PARENT_ID.value</name>
<recordfield>AB_ATTRIBUTE.ATTRIBUTE_PARENT_ID</recordfield>
......@@ -128,6 +146,10 @@
<name>ATTRIBUTE_TYPE.displayValue</name>
<expression>%aditoprj%/entity/Attribute_entity/recordcontainers/db/recordfieldmappings/attribute_type.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>ATTRIBUTE_NAME.value</name>
<recordfield>AB_ATTRIBUTE.ATTRIBUTE_NAME</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
import("system.vars");
import("system.result");
import("Attribute_lib");
result.string(AttributeUtil.getAttributeNameById(vars.get("$field.AB_ATTRIBUTEID")));
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
import("Attribute_lib");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.attrParentId_param") && vars.get("$param.attrParentId_param"))
result.string(AttributeUtil.getAttributeNameById(vars.get("$param.attrParentId_param")));
import("system.neon");
import("system.logging");
import("system.result");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.attrParentId_param") && vars.get("$param.attrParentId_param"))
result.string(vars.get("$param.attrParentId_param"));
\ No newline at end of file
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