diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js index da6fd5283abd2daf5d3b8c08591f3bc87cde12e1..353aa9f3676bc0c8d4a823b2944a5794acbb4677 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js @@ -3,13 +3,21 @@ import("system.neon"); import("system.result"); var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); -var found = false; -contextList.forEach(function (context) +if (contextList) { - if(context == "Campaign") - found = true; -}); -if(found) - result.string(neon.COMPONENTSTATE_AUTO); + var found = false; + + contextList.forEach(function (context) + { + if(context == "Campaign") + found = true; + }); + if(found) + result.string(neon.COMPONENTSTATE_AUTO); + else + result.string(neon.COMPONENTSTATE_INVISIBLE); +} else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +{ + result.string(neon.COMPONENTSTATE_INVISIBLE); +} \ No newline at end of file diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js index fc6fedaff886e1b4b13e066605063f5c595b795b..f1cfb310581815a99377b7da0152c0483f24d9d5 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newcontract/stateProcess.js @@ -3,13 +3,20 @@ import("system.vars"); import("system.neon"); var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); -var found = false; -contextList.forEach(function (context) +if (contextList) { - if(context == "Contract") - found = true; -}); -if(found) - result.string(neon.COMPONENTSTATE_AUTO); + var found = false; + contextList.forEach(function (context) + { + if(context == "Contract") + found = true; + }); + if(found) + result.string(neon.COMPONENTSTATE_AUTO); + else + result.string(neon.COMPONENTSTATE_INVISIBLE); +} else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +{ + result.string(neon.COMPONENTSTATE_INVISIBLE); +} \ No newline at end of file diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js index 43eff24495608393dc02b1e5d9bfd2c0cae8e116..02a2b07b699e399fed77114a8841d76b2d0d35b1 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newoffer/stateProcess.js @@ -3,13 +3,20 @@ import("system.neon"); import("system.result"); var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); -var found = false; -contextList.forEach(function (context) +if (contextList) { - if(context == "Offer") - found = true; -}); -if(found) - result.string(neon.COMPONENTSTATE_AUTO); + var found = false; + contextList.forEach(function (context) + { + if(context == "Offer") + found = true; + }); + if(found) + result.string(neon.COMPONENTSTATE_AUTO); + else + result.string(neon.COMPONENTSTATE_INVISIBLE); +} else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +{ + result.string(neon.COMPONENTSTATE_INVISIBLE); +} \ No newline at end of file diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js index faec2ba794559373ea139bc95e18d782c01164d0..f23023f7d177f0f5d7eec62b42371db2b0289173 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js @@ -3,13 +3,21 @@ import("system.neon"); import("system.result"); var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); -var found = false; -contextList.forEach(function (context) +if (contextList) { - if(context == "Salesproject") - found = true; -}); -if(found) - result.string(neon.COMPONENTSTATE_AUTO); + var found = false; + + contextList.forEach(function (context) + { + if(context == "Salesproject") + found = true; + }); + if(found) + result.string(neon.COMPONENTSTATE_AUTO); + else + result.string(neon.COMPONENTSTATE_INVISIBLE); +} else - result.string(neon.COMPONENTSTATE_INVISIBLE); \ No newline at end of file +{ + result.string(neon.COMPONENTSTATE_INVISIBLE); +} diff --git a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js index 5f91637c836c317480dc04958cdc4563b0da8611..545b0cad0f767f9840e56bcda691232e22976cf0 100644 --- a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js @@ -1,3 +1,4 @@ +import("system.logging"); import("system.util"); import("system.db"); import("system.vars"); @@ -19,7 +20,7 @@ if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param" filter.childs.forEach(function(child) { if(child.name === "ACTIVE") - active = JSON.parse(child.key); + active = child.key; }); } } diff --git a/neonContext/ClassificationAdmin/ClassificationAdmin.aod b/neonContext/ClassificationAdmin/ClassificationAdmin.aod index 39b6239be4602b6dca174ef368b0b7bd0facd5c1..7c257e5c23a2f1b64a7c1fbf96eff5a866c472f8 100644 --- a/neonContext/ClassificationAdmin/ClassificationAdmin.aod +++ b/neonContext/ClassificationAdmin/ClassificationAdmin.aod @@ -2,6 +2,7 @@ <neonContext 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/neonContext/1.1.0"> <name>ClassificationAdmin</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:ABACUS</icon> <mainview>ClassificationAdminMain_view</mainview> <filterview>ClassificationAdminFilter_view</filterview> <entity>ClassificationAdmin_entity</entity> diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index f38b695d457b6dc8dd07faa2471bd421f816a524..959bffccf44603462d46438732a9c62fbd09f2d0 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -451,9 +451,9 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc activeStates.forEach(function (state) { if(pActive) - condSub.orPrepare(ownContextSelector.tableName + "." + ownContextSelector.stateField, state) + condSub.orPrepare(ownContextSelector.getFullField(ownContextSelector.stateField), state) else - condSub.andPrepare(ownContextSelector.tableName + "." + ownContextSelector.stateField, state, "# != ?") + condSub.andPrepare(ownContextSelector.getFullField(ownContextSelector.stateField), state, "# != ?") }); cond.andSqlCondition(condSub); } @@ -473,10 +473,10 @@ ContextUtils.getContextDataSql = function(pContextId, pContactId, pWithDate, pAc var dateColumn = ""; if (pWithDate === true) - dateColumn = ", " + (ownContextSelector.creationDateField || "''"); + dateColumn = ", " + (ownContextSelector.getFullField(ownContextSelector.creationDateField) || "''"); var stateColumn = ""; if (pWithState === true) - stateColumn = ", " + (ownContextSelector.stateField || "''"); + stateColumn = ", " + (ownContextSelector.getFullField(ownContextSelector.stateField) || "''"); if (ownContextSelector.condition) cond.andSqlCondition(ownContextSelector.condition); var res = cond.buildSql("select " + ownContextSelector.getFullIdField() + ", " + ownContextSelector.titleExpression + dateColumn + stateColumn