From 2743dee8d23ca035ae401df1592b13619416e1e8 Mon Sep 17 00:00:00 2001 From: "m.kuhn" <m.kuhn@mkuhn.aditosoftware.local> Date: Fri, 22 Mar 2019 12:50:26 +0100 Subject: [PATCH] LogHistory Filterview --- .../LogHistory_entity/LogHistory_entity.aod | 22 ++++++++----------- .../recordcontainers/db/conditionProcess.js | 2 ++ .../date_new.value/expression.js | 0 .../Organisation_entity.aod | 1 + .../children/tablename_param/valueProcess.js | 2 +- entity/Person_entity/Person_entity.aod | 1 + .../children/tablename_param/valueProcess.js | 2 +- .../LogHistoryFilter_view.aod | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 entity/LogHistory_entity/recordcontainers/db/recordfieldmappings/date_new.value/expression.js diff --git a/entity/LogHistory_entity/LogHistory_entity.aod b/entity/LogHistory_entity/LogHistory_entity.aod index b1ef598782..d2a3bbfd5d 100644 --- a/entity/LogHistory_entity/LogHistory_entity.aod +++ b/entity/LogHistory_entity/LogHistory_entity.aod @@ -4,6 +4,7 @@ <title>LogHistory</title> <majorModelMode>DISTRIBUTED</majorModelMode> <iconId>NEON:HISTORY</iconId> + <imageProcess>%aditoprj%/entity/LogHistory_entity/imageProcess.js</imageProcess> <recordContainer>db</recordContainer> <entityFields> <entityProvider> @@ -68,16 +69,20 @@ <name>LOGHISTORYID</name> <mandatory v="true" /> </entityField> + <entityField> + <name>ICON</name> + <valueProcess>%aditoprj%/entity/LogHistory_entity/entityfields/icon/valueProcess.js</valueProcess> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> <name>db</name> - <title>LogHistory</title> + <title>db</title> <alias>Data_alias</alias> <conditionProcess>%aditoprj%/entity/LogHistory_entity/recordcontainers/db/conditionProcess.js</conditionProcess> <linkInformation> <linkInformation> - <name>8833847a-8371-4cd4-a67e-f56daa2a11b2</name> + <name>6becd235-2c53-4ddb-916c-e25da8fc59f5</name> <tableName>AB_LOGHISTORY</tableName> <primaryKey>AB_LOGHISTORYID</primaryKey> <isUIDTable v="true" /> @@ -88,28 +93,19 @@ <dbRecordFieldMapping> <name>DATE_NEW.value</name> <recordfield>AB_LOGHISTORY.DATE_NEW</recordfield> - <expression>%aditoprj%/entity/LogHistory_entity/recordcontainers/db/recordfieldmappings/date_new.value/expression.js</expression> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>DESCRIPTION.value</name> <recordfield>AB_LOGHISTORY.DESCRIPTION</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> - <name>TABLENAME.value</name> - <recordfield>AB_LOGHISTORY.TABLENAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>TABLENAMEID.value</name> - <recordfield>AB_LOGHISTORY.TABLENAMEID</recordfield> + <name>LOGHISTORYID.value</name> + <recordfield>AB_LOGHISTORY.AB_LOGHISTORYID</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>USER_NEW.value</name> <recordfield>AB_LOGHISTORY.USER_NEW</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>LOGHISTORYID.value</name> - <recordfield>AB_LOGHISTORY.AB_LOGHISTORYID</recordfield> - </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/LogHistory_entity/recordcontainers/db/conditionProcess.js b/entity/LogHistory_entity/recordcontainers/db/conditionProcess.js index 64d80196ab..14f2595687 100644 --- a/entity/LogHistory_entity/recordcontainers/db/conditionProcess.js +++ b/entity/LogHistory_entity/recordcontainers/db/conditionProcess.js @@ -1,7 +1,9 @@ +import("system.logging"); import("system.vars"); import("system.result"); var sql = "(TABLENAMEID = '" + vars.get("$param.tablenameId_param") + "' and TABLENAME = '" + vars.get("$param.tablename_param") + "') " + "or (TABLENAMEID = '" + vars.get("$param.contactId_param") + "' " + "and (TABLENAME='CONTACT' or TABLENAME='COMMUNICATION' or TABLENAME='ADDRESS' or TABLENAME='AB_ATTRIBUTERELATION'))"; +logging.log(sql); result.string(sql); \ No newline at end of file diff --git a/entity/LogHistory_entity/recordcontainers/db/recordfieldmappings/date_new.value/expression.js b/entity/LogHistory_entity/recordcontainers/db/recordfieldmappings/date_new.value/expression.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod index b735b1f2fd..47ee981a8d 100644 --- a/entity/Organisation_entity/Organisation_entity.aod +++ b/entity/Organisation_entity/Organisation_entity.aod @@ -616,6 +616,7 @@ </entityActionField> <entityConsumer> <name>LogHistoryConsumer</name> + <title>LogHistory</title> <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> diff --git a/entity/Organisation_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js b/entity/Organisation_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js index 4e58df9aba..14d6871393 100644 --- a/entity/Organisation_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js +++ b/entity/Organisation_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js @@ -1,4 +1,4 @@ import("system.result"); import("Context_lib"); -result.string(ContextUtils.getContextName(ContextUtils.getCurrentContextId())); \ No newline at end of file +result.string(ContextUtils.getContextName(ContextUtils.getCurrentContextId()).toUpperCase()); \ No newline at end of file diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index 507970ed26..c8e62e3e26 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -715,6 +715,7 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact </entityField> <entityConsumer> <name>LogHistoryConsumer</name> + <title>LogHistory</title> <fieldType>DEPENDENCY_OUT</fieldType> <dependency> <name>dependency</name> diff --git a/entity/Person_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js b/entity/Person_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js index 4e58df9aba..14d6871393 100644 --- a/entity/Person_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js +++ b/entity/Person_entity/entityfields/loghistoryconsumer/children/tablename_param/valueProcess.js @@ -1,4 +1,4 @@ import("system.result"); import("Context_lib"); -result.string(ContextUtils.getContextName(ContextUtils.getCurrentContextId())); \ No newline at end of file +result.string(ContextUtils.getContextName(ContextUtils.getCurrentContextId()).toUpperCase()); \ No newline at end of file diff --git a/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod b/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod index 6f6197446f..f38a82a471 100644 --- a/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod +++ b/neonView/LogHistoryFilter_view/LogHistoryFilter_view.aod @@ -2,7 +2,7 @@ <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.0"> <name>LogHistoryFilter_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="true" /> + <filterable v="false" /> <layout> <boxLayout> <name>layout</name> -- GitLab