diff --git a/.liquibase/Data_alias/basic/2019.2/CampaignManagement/create_campaignParticipantLog.xml b/.liquibase/Data_alias/basic/2019.2/CampaignManagement/create_campaignParticipantLog.xml index 9efbc598fb6169c31d981128c4a362ea3b1e72b6..9aecc0e95b24a922d05c9c724087a8a6a3d18236 100644 --- a/.liquibase/Data_alias/basic/2019.2/CampaignManagement/create_campaignParticipantLog.xml +++ b/.liquibase/Data_alias/basic/2019.2/CampaignManagement/create_campaignParticipantLog.xml @@ -5,7 +5,7 @@ <column name="CAMPAIGNPARTICIPANTLOGID" type="CHAR(36)"> <constraints primaryKey="true" primaryKeyName="PK_CAMPAIGNPARTICIPANTLOG_CAMPAIGNPARTICIPANTLOGID"/> </column> - <column name="CONTACT_ID" type="CHAR(36)"> + <column name="CAMPAIGNPARTICIPANT_ID" type="CHAR(36)"> <constraints nullable="false"/> </column> <column name="CAMPAIGN_ID" type="CHAR(36)"> diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index b541a63604568f96ca5af924ff5725964efd9208..72714b6c2dca0c5a437bf28d1f98a763f09a8d23 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -6523,20 +6523,6 @@ <title></title> <description></description> </entityFieldDb> - <entityFieldDb> - <name>CONTACT_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> <entityFieldDb> <name>DATE_NEW</name> <dbName></dbName> @@ -6607,6 +6593,20 @@ <title></title> <description></description> </entityFieldDb> + <entityFieldDb> + <name>CAMPAIGNPARTICIPANT_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> diff --git a/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js b/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js index 2b00a9a7e37895a2608ce021896b3bbcb90d4b92..da6fd5283abd2daf5d3b8c08591f3bc87cde12e1 100644 --- a/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js +++ b/entity/360Degree_entity/entityfields/newmodule/children/newcampaignparticipant/stateProcess.js @@ -6,7 +6,7 @@ var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); var found = false; contextList.forEach(function (context) { - if(context == "CampaignParticipant") + if(context == "Campaign") found = true; }); if(found) diff --git a/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod b/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod index 69a4b13e4fa6b07ba2dab7178d974f54a3f6b80c..cd1b0c0648c58b8f01043229821fbd15ade30649 100644 --- a/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod +++ b/entity/CampaignAddParticipants_entity/CampaignAddParticipants_entity.aod @@ -34,7 +34,6 @@ <state>EDITABLE</state> <valueProcess>%aditoprj%/entity/CampaignAddParticipants_entity/entityfields/campaignstep_id/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/CampaignAddParticipants_entity/entityfields/campaignstep_id/displayValueProcess.js</displayValueProcess> - <onValueChange>%aditoprj%/entity/CampaignAddParticipants_entity/entityfields/campaignstep_id/onValueChange.js</onValueChange> </entityField> <entityField> <name>campaignParticipantMessage</name> @@ -111,6 +110,16 @@ </entityParameter> </children> </entityConsumer> + <entityField> + <name>campaignStepCurrentParticipantCount</name> + <title>Current participants</title> + <displayValueProcess>%aditoprj%/entity/CampaignAddParticipants_entity/entityfields/campaignstepcurrentparticipantcount/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>campaignStepMaxParticipantCount</name> + <title>Max participants</title> + <displayValueProcess>%aditoprj%/entity/CampaignAddParticipants_entity/entityfields/campaignstepmaxparticipantcount/displayValueProcess.js</displayValueProcess> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> @@ -118,7 +127,6 @@ <jDitoRecordAlias>Data_alias</jDitoRecordAlias> <contentProcess>%aditoprj%/entity/CampaignAddParticipants_entity/recordcontainers/jdito/contentProcess.js</contentProcess> <onInsert>%aditoprj%/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onInsert.js</onInsert> - <onUpdate>%aditoprj%/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onUpdate.js</onUpdate> <recordFields> <element>UID.value</element> </recordFields> diff --git a/entity/CampaignAddParticipants_entity/entityfields/campaign_id/onValueChange.js b/entity/CampaignAddParticipants_entity/entityfields/campaign_id/onValueChange.js index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2646a9a9ec38d931b9cddee46091ffcf15611f12 100644 --- a/entity/CampaignAddParticipants_entity/entityfields/campaign_id/onValueChange.js +++ b/entity/CampaignAddParticipants_entity/entityfields/campaign_id/onValueChange.js @@ -0,0 +1,3 @@ +import("system.neon"); + +//neon.setFieldValue("CAMPAIGNSTEP_ID", "") \ No newline at end of file diff --git a/entity/CampaignAddParticipants_entity/entityfields/campaignanalyses/children/campaignstepid_param/valueProcess.js b/entity/CampaignAddParticipants_entity/entityfields/campaignanalyses/children/campaignstepid_param/valueProcess.js index 2dc31c4f5fed95b660c89609cac84f23106b6b5b..1ad18e3c6c373a202e9d9bafb9748d57338dc5ec 100644 --- a/entity/CampaignAddParticipants_entity/entityfields/campaignanalyses/children/campaignstepid_param/valueProcess.js +++ b/entity/CampaignAddParticipants_entity/entityfields/campaignanalyses/children/campaignstepid_param/valueProcess.js @@ -1,7 +1,4 @@ -import("system.logging"); import("system.vars"); import("system.result"); -logging.log("hui: " + vars.get("$field.CAMPAIGNSTEP_ID")); - result.string(vars.get("$field.CAMPAIGNSTEP_ID")); \ No newline at end of file diff --git a/entity/CampaignAddParticipants_entity/entityfields/campaignstep_id/onValueChange.js b/entity/CampaignAddParticipants_entity/entityfields/campaignstep_id/onValueChange.js deleted file mode 100644 index 7ac67dbef303bcb1b314de9eb3c45fe87ef073ac..0000000000000000000000000000000000000000 --- a/entity/CampaignAddParticipants_entity/entityfields/campaignstep_id/onValueChange.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.neon"); - -neon.refreshAll(); \ No newline at end of file diff --git a/entity/CampaignAddParticipants_entity/entityfields/campaignstepcurrentparticipantcount/displayValueProcess.js b/entity/CampaignAddParticipants_entity/entityfields/campaignstepcurrentparticipantcount/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d001f813402438ca1481d4c2fd03c94b4b341de6 --- /dev/null +++ b/entity/CampaignAddParticipants_entity/entityfields/campaignstepcurrentparticipantcount/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Campaign_lib"); + +result.string(CampaignUtils.getParticipantCountForStep(vars.get("$field.CAMPAIGNSTEP_ID"))); \ No newline at end of file diff --git a/entity/CampaignAddParticipants_entity/entityfields/campaignstepmaxparticipantcount/displayValueProcess.js b/entity/CampaignAddParticipants_entity/entityfields/campaignstepmaxparticipantcount/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..cc8e454b27deee27b34ccb9e12c08f4e767c065f --- /dev/null +++ b/entity/CampaignAddParticipants_entity/entityfields/campaignstepmaxparticipantcount/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.vars"); +import("Campaign_lib"); + +result.string(CampaignUtils.getMaxParticipantCountForStep(vars.get("$field.CAMPAIGNSTEP_ID"))); \ No newline at end of file diff --git a/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onInsert.js b/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onInsert.js index 4d9ef8e565bd0d57142a62e84df3182f61071e8c..0455f5402f498bf4186b3a968a1c07de738491a0 100644 --- a/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onInsert.js +++ b/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onInsert.js @@ -21,10 +21,10 @@ var cols = []; if(isUpdate == "true") { - cols = [ "CAMPAIGNSTEP_ID", - "USER_EDIT", - "DATE_EDIT" - ]; + cols = [ "CAMPAIGNSTEP_ID", + "USER_EDIT", + "DATE_EDIT" + ]; } else { @@ -38,9 +38,10 @@ else } var statementArray = []; - +logging.log("isUpdate -> " + isUpdate); for (participant in participants) { + var campaignParticipantLogId = util.getNewUUID(); if(isUpdate == "true") { let updatedValues = [newCampaignStepId, @@ -48,11 +49,11 @@ for (participant in participants) vars.get("$sys.date")]; let condition = "CAMPAIGNPARTICIPANTID = '" + participants[participant] + "'"; - - // new Array(campaignId, newCampaignStepId, participants[participant], campaignParticipantId, vars.get("$sys.user"), vars.get("$sys.date")); - var valsCampaignParticipantLog = new Array(campaignId, newCampaignStepId, "contactid", participants[participant], vars.get("$sys.user"), vars.get("$sys.date")); + logging.log("condition -> " + condition); + let valsCampaignParticipantLog = new Array(participants[participant], campaignId, newCampaignStepId, campaignParticipantLogId, vars.get("$sys.user"), vars.get("$sys.date")); statementArray.push(["CAMPAIGNPARTICIPANT", cols, null, updatedValues, condition]); + statementArray.push(["CAMPAIGNPARTICIPANTLOG", colNamesCampaignParticipantLog, null, valsCampaignParticipantLog]); } else { @@ -66,7 +67,7 @@ for (participant in participants) , vars.get("$sys.date") ]; - var valsCampaignParticipantLog = new Array(campaignId, newCampaignStepId, participants[participant], campaignParticipantId, vars.get("$sys.user"), vars.get("$sys.date")); + let valsCampaignParticipantLog = new Array(campaignParticipantId, campaignId, newCampaignStepId, campaignParticipantLogId, vars.get("$sys.user"), vars.get("$sys.date")); statementArray.push(["CAMPAIGNPARTICIPANT", cols, null, valsCampaignParticipant]); statementArray.push(["CAMPAIGNPARTICIPANTLOG", colNamesCampaignParticipantLog, null, valsCampaignParticipantLog]); diff --git a/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onUpdate.js b/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onUpdate.js deleted file mode 100644 index 0ac5d73051b0a7dde1556bff74ab18a21959d718..0000000000000000000000000000000000000000 --- a/entity/CampaignAddParticipants_entity/recordcontainers/jdito/onUpdate.js +++ /dev/null @@ -1,38 +0,0 @@ -import("Campaign_lib"); -import("system.vars"); -import("system.db"); -import("system.logging"); - -logging.log("CampaignAddParticipants_entity_onUpdate"); - - -var campaignId = vars.getString("$field.CAMPAIGN_ID"); -var campaignStepId = vars.getString("$field.CAMPAIGNSTEP_ID"); -var participants = JSON.parse(vars.getString("$param.campaignParticipants_param")); - -var colNamesCampaignParticipantLog = CampaignUtils.getParticipantLogInsertColumnNames(); -var colTypesCampaignParticipantLog = CampaignUtils.getParticipantLogInsertColumnTypes(); -let colsUpdate = [ "CAMPAIGNSTEP_ID", - "USER_EDIT", - "DATE_EDIT" - ]; -let colTypesUpdate = db.getColumnTypes("CAMPAIGNPARTICIPANT", colsUpdate); - - -var dataArray = []; - -for (participant in participants) -{ - //var campaignParticipantId = - //var valsCampaignParticipantLog = new Array(campaignId, campaignStepId, participants[participant], , vars.get("$sys.user"), vars.get("$sys.date")); - let updatedValues = [campaignStepId, - vars.get("$sys.user"), - vars.get("$sys.date")]; - - let condition = "CAMPAIGNSTEP_ID = '" + campaignStepId + "' and CONTACT_ID = '" + participants[participant] + "'"; - - dataArray.push(["CAMPAIGNPARTICIPANT", colsUpdate, colTypesUpdate, updatedValues, condition]); - //dataArray.push(["CAMPAIGNPARTICIPANTLOG", colNamesCampaignParticipantLog, colTypesCampaignParticipantLog, valsCampaignParticipantLog]); -} -logging.log("dataArray" + JSON.stringify(dataArray)); -db.updates(dataArray); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js b/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js index 4a050a91642fe70c482b21a19d91ea55f5b80ab0..4e09ec798a27900e7e2ffeb2cb819458feb470a4 100644 --- a/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/filterviewactiongroup/children/setsteptoparticipantselection/onActionProcess.js @@ -2,11 +2,13 @@ import("system.logging"); import("system.vars"); import("system.neon"); import("Campaign_lib"); - +logging.log("inOnAction -> "); + logging.log("sys selection -> " + vars.get("$sys.selection")); if(vars.exists("$sys.selection")) //selektierte IDs als Array { logging.log("campaignid -> " + vars.get("$field.CAMPAIGN_ID")); logging.log("campaignstepid -> " + vars.get("$field.CAMPAIGNSTEP_ID")); logging.log("contact id -> " + vars.get("$field.CONTACT_ID")); + logging.log("sys selection -> " + vars.get("$sys.selection")); CampaignUtils.openSetCampaignStepView(vars.get("$sys.selection"), vars.get("$field.CAMPAIGN_ID"), vars.get("$field.CAMPAIGNSTEP_ID")); } \ No newline at end of file diff --git a/entity/CampaignStep_entity/CampaignStep_entity.aod b/entity/CampaignStep_entity/CampaignStep_entity.aod index afc75ece587f85bbcdbd419f4721983b3e9c4c1c..5e95b151c57e6973ab83627cdffd4c4b527e4bc7 100644 --- a/entity/CampaignStep_entity/CampaignStep_entity.aod +++ b/entity/CampaignStep_entity/CampaignStep_entity.aod @@ -137,12 +137,14 @@ <entityField> <name>MAXPARTICIPANTS</name> <title>Max participants</title> + <contentType>NUMBER</contentType> <mandatory v="true" /> </entityField> <entityConsumer> <name>CampaignParticipantsConsumer</name> <title>Participants</title> <fieldType>DEPENDENCY_OUT</fieldType> + <selectionMode>MULTI</selectionMode> <dependency> <name>dependency</name> <entityName>CampaignParticipant_entity</entityName> diff --git a/entity/CampaignStep_entity/entityfields/campaign_id/valueProcess.js b/entity/CampaignStep_entity/entityfields/campaign_id/valueProcess.js index 0a46eaaae9f7bf4bc91ccb88e819ea8ce76499e4..9e7628a2cbd9b8acde9cf67636e0fdeb5843bf83 100644 --- a/entity/CampaignStep_entity/entityfields/campaign_id/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/campaign_id/valueProcess.js @@ -1,6 +1,8 @@ +import("system.neon"); import("system.logging"); import("system.result"); import("system.vars"); -if(vars.exists("$param.campaignId_param") && vars.get("$param.campaignId_param")) +//For creation of new Step in CampaignMainView +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.campaignId_param") && vars.get("$param.campaignId_param")) result.string(vars.get("$param.campaignId_param")); \ No newline at end of file diff --git a/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignid_param/valueProcess.js b/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignid_param/valueProcess.js index 4865a661b404c0c99163d3eceee245990be9c5fe..9dd7e44f4ea3fc9d60c8a5dcbb9d208feb770fab 100644 --- a/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignid_param/valueProcess.js +++ b/entity/CampaignStep_entity/entityfields/campaignparticipantsconsumer/children/campaignid_param/valueProcess.js @@ -1,4 +1,4 @@ import("system.result"); import("system.vars"); -result.string(vars.get("$param.campaignId_param")); \ No newline at end of file +result.string(vars.get("$field.CAMPAIGN_ID")); \ No newline at end of file diff --git a/entity/Campaign_entity/Campaign_entity.aod b/entity/Campaign_entity/Campaign_entity.aod index 6f1e76900876010557002c6dad9ddb84f26684a4..79b2552edc4188f415af9af411c8cdb9e4be20f1 100644 --- a/entity/Campaign_entity/Campaign_entity.aod +++ b/entity/Campaign_entity/Campaign_entity.aod @@ -138,6 +138,7 @@ <name>CampaignParticipants</name> <title>Participants</title> <fieldType>DEPENDENCY_OUT</fieldType> + <selectionMode>MULTI</selectionMode> <dependency> <name>dependency</name> <entityName>CampaignParticipant_entity</entityName> @@ -173,6 +174,7 @@ <dbRecordContainer> <name>db</name> <alias>Data_alias</alias> + <onDBInsert>%aditoprj%/entity/Campaign_entity/recordcontainers/db/onDBInsert.js</onDBInsert> <linkInformation> <linkInformation> <name>f3893829-3af2-4e55-ae85-c3a24411a8b8</name> diff --git a/entity/Campaign_entity/recordcontainers/db/onDBInsert.js b/entity/Campaign_entity/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..671b8177755d54e27c89f8f22b3592b9be2bcfc7 --- /dev/null +++ b/entity/Campaign_entity/recordcontainers/db/onDBInsert.js @@ -0,0 +1,35 @@ +import("Employee_lib"); +import("system.translate"); +import("KeywordRegistry_basic"); +import("system.util"); +import("system.vars"); +import("system.logging"); +import("system.db"); +import("system.datetime"); + +var threeWeeks = datetime.ONE_WEEK * 3; +var inThreeWeeks = datetime.date() + threeWeeks; + +var campaignId = vars.get("$field.CAMPAIGNID"); +var campaignStepId = util.getNewUUID(); +var campaignStepName = translate.text("Added"); + +var dateNew = vars.get("$sys.date"); +var userNew = vars.get("$sys.user"); + +var dateStart = dateNew; +var dateEnd = inThreeWeeks; + +var description = ""; +var maxParticipants = 100; +var state = $KeywordRegistry.campaignStepState$open(); +var sorting = 0; +var employeeContactId = vars.get("$field.EMPLOYEE_CONTACT_ID"); + + +var columns = ["CAMPAIGN_ID", "CAMPAIGNSTEPID", "NAME", "DATE_NEW", "USER_NEW", + "DATE_START", "DATE_END", "DESCRIPTION", "MAXPARTICIPANTS", "STATE", "SORTING", "EMPLOYEE_CONTACT_ID"]; +var values = [campaignId, campaignStepId, campaignStepName, dateNew, userNew, + dateStart, dateEnd, description, maxParticipants, state, sorting, employeeContactId]; + +db.insertData("CAMPAIGNSTEP", columns, null, values); \ No newline at end of file diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod index bd40b44a11b1920bb4f75febd9933345c6472eb9..c231e6327e4c62cc931593839fa8618f6536ad87 100644 --- a/entity/Person_entity/Person_entity.aod +++ b/entity/Person_entity/Person_entity.aod @@ -203,9 +203,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <fieldName>WithPersonIdFilter</fieldName> </dependency> <children> - <entityParameter> - <name>WithPrivate_param</name> - </entityParameter> <entityParameter> <name>ExcludeOrganisationsByPersonId</name> <valueProcess>%aditoprj%/entity/Person_entity/entityfields/organisations/children/excludeorganisationsbypersonid/valueProcess.js</valueProcess> diff --git a/entity/Person_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/onActionProcess.js b/entity/Person_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/onActionProcess.js index 104558a4d9b4ed76ef4e24ae184815401dbc2749..4272aa62116b561dd4c1afe4ed5dd86663d57988 100644 --- a/entity/Person_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/onActionProcess.js +++ b/entity/Person_entity/entityfields/campaignactiongroup/children/addtocampaignfromtable/onActionProcess.js @@ -1,9 +1,8 @@ import("system.vars"); import("system.logging"); -import("system.logging"); import("system.neon"); import("Campaign_lib"); - + logging.log("sys selection -> " + vars.get("$sys.selection")); if(vars.exists("$sys.selection")) //selektierte IDs als Array { CampaignUtils.addParticipants(vars.getString("$sys.selection")); diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 79fd40e3aa9d6958072613ef9fe1d586428770c7..80500ad7d4e9466b7d358dfab7a541e3aa0d9824 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -2964,6 +2964,15 @@ <entry> <key>Steps</key> </entry> + <entry> + <key>CampaignStep</key> + </entry> + <entry> + <key>Added</key> + </entry> + <entry> + <key>Current participants</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 36435df4c6e216d04468f89ed44515cbd9467be5..cf3c88bfb26694a3b8cfb774e96ff224966da918 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -3798,6 +3798,14 @@ <entry> <key>protected</key> </entry> + <entry> + <key>Added</key> + <value>Hinzugefügt</value> + </entry> + <entry> + <key>Current participants</key> + <value>Aktuelle Teilenhmer</value> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index 10a969da395dd418eec80fbe1405e52edf4043f3..1372b43c6b7be5f24b9332414e8c0f7906afe481 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -2995,6 +2995,15 @@ <entry> <key>Steps</key> </entry> + <entry> + <key>CampaignStep</key> + </entry> + <entry> + <key>Added</key> + </entry> + <entry> + <key>Current participants</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> </language> diff --git a/neonContext/CampaignAddParticipants/CampaignAddParticipants.aod b/neonContext/CampaignAddParticipants/CampaignAddParticipants.aod index 816f72e8f475aa2a46a708599345b3ff011fb647..28d85596318e2b2c9ead40ee288098f4e00d2461 100644 --- a/neonContext/CampaignAddParticipants/CampaignAddParticipants.aod +++ b/neonContext/CampaignAddParticipants/CampaignAddParticipants.aod @@ -9,5 +9,9 @@ <name>c4f11246-9c24-4c1c-8e53-96acabf04bab</name> <view>CampaignAddParticipantsEdit_view</view> </neonViewReference> + <neonViewReference> + <name>87d572bd-f2ce-4283-8db0-a7d9f9441fa0</name> + <view>campaignParticipantMessage_view</view> + </neonViewReference> </references> </neonContext> diff --git a/neonView/CampaignAddParticipantsEdit_view/CampaignAddParticipantsEdit_view.aod b/neonView/CampaignAddParticipantsEdit_view/CampaignAddParticipantsEdit_view.aod index fd5c2ec2f37a4ffe4b187e3dcd5332cf3babe379..21e641b9fe997dd594d73aac0565d0909caefeaa 100644 --- a/neonView/CampaignAddParticipantsEdit_view/CampaignAddParticipantsEdit_view.aod +++ b/neonView/CampaignAddParticipantsEdit_view/CampaignAddParticipantsEdit_view.aod @@ -4,9 +4,11 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <isSmall v="true" /> <layout> - <boxLayout> + <headerFooterLayout> <name>layout</name> - </boxLayout> + <header>campaignDetail</header> + <footer>SelectedCampaignInfosScore</footer> + </headerFooterLayout> </layout> <children> <genericViewTemplate> @@ -22,16 +24,21 @@ <name>b9016725-1345-4526-88eb-2b05fb4089c8</name> <entityField>CAMPAIGNSTEP_ID</entityField> </entityFieldLink> + </fields> + </genericViewTemplate> + <scoreCardViewTemplate> + <name>SelectedCampaignInfosScore</name> + <entityField>#ENTITY</entityField> + <fields> <entityFieldLink> - <name>7ed79b46-ebb3-4a63-911b-ed7d4051af25</name> - <entityField>campaignParticipantMessage</entityField> + <name>5fb2164c-9433-480a-9d55-726a2b05a549</name> + <entityField>campaignStepCurrentParticipantCount</entityField> + </entityFieldLink> + <entityFieldLink> + <name>d0820091-352f-431f-8d7a-71cb5b576853</name> + <entityField>campaignStepMaxParticipantCount</entityField> </entityFieldLink> </fields> - </genericViewTemplate> - <neonViewReference> - <name>cbae33c2-7eec-47ab-810e-9ac59b1ec575</name> - <entityField>CampaignAnalyses</entityField> - <view>CampaignStepCurrentMaxParticipants_view</view> - </neonViewReference> + </scoreCardViewTemplate> </children> </neonView> diff --git a/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod b/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod index 2146216bedd0443006c2c0f56d68f4df663ce3fe..cb62a6a056152b5bd834a2fad1f1451cd0c85b1c 100644 --- a/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod +++ b/neonView/CampaignParticipantFilter_view/CampaignParticipantFilter_view.aod @@ -4,6 +4,7 @@ <title></title> <description></description> <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="false" /> <layout> <boxLayout> <name>layout</name> @@ -12,7 +13,8 @@ <children> <tableViewTemplate> <name>ParticipantsTable</name> - <favoriteActionGroup2>FilterViewActionGroup</favoriteActionGroup2> + <favoriteActionGroup1>FilterViewActionGroup</favoriteActionGroup1> + <favoriteActionGroup2></favoriteActionGroup2> <entityField>#ENTITY</entityField> <columns> <neonTableColumn> diff --git a/neonView/campaignParticipantMessage_view/campaignParticipantMessage_view.aod b/neonView/campaignParticipantMessage_view/campaignParticipantMessage_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..2ed214ff37cc2b033dba2655cd3f551364924647 --- /dev/null +++ b/neonView/campaignParticipantMessage_view/campaignParticipantMessage_view.aod @@ -0,0 +1,23 @@ +<?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.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>campaignParticipantMessage_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <noneLayout> + <name>layout</name> + </noneLayout> + </layout> + <children> + <genericViewTemplate> + <name>Message_view</name> + <hideLabels v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>bc1db862-a448-47f6-b534-2ce28dc993a8</name> + <entityField>campaignParticipantMessage</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/process/Campaign_lib/process.js b/process/Campaign_lib/process.js index 56850c02747ec01631a4b56583c89ccad6540aa8..40cdf86ca7f9a5dbe2f714fadf4c2569e86d1824 100644 --- a/process/Campaign_lib/process.js +++ b/process/Campaign_lib/process.js @@ -70,6 +70,18 @@ CampaignUtils.getParticipantCountForStep = function(pCampaignStepId) return _CampaignUtils._loadSingleValueFromDb(selectQuery, conditionField, pCampaignStepId, defaultValue); } +/** + * todo + */ +CampaignUtils.getMaxParticipantCountForStep = function(pCampaignStepId) +{ + let selectQuery = "select MAXPARTICIPANTS from CAMPAIGNSTEP"; + let conditionField = "CAMPAIGNSTEP.CAMPAIGNSTEPID"; + let defaultValue = 0; + + return _CampaignUtils._loadSingleValueFromDb(selectQuery, conditionField, pCampaignStepId, defaultValue); +} + /** * todo */ @@ -102,7 +114,7 @@ CampaignUtils.createLogEntry = function(pCampaignId, pCampaignStepId, pContactId */ CampaignUtils.getParticipantLogInsertColumnNames = function() { - return new Array("CAMPAIGN_ID", "CAMPAIGNSTEP_ID", "CONTACT_ID", "CAMPAIGNPARTICIPANTLOGID", "USER_NEW", "DATE_NEW"); + return new Array("CAMPAIGNPARTICIPANT_ID", "CAMPAIGN_ID", "CAMPAIGNSTEP_ID", "CAMPAIGNPARTICIPANTLOGID", "USER_NEW", "DATE_NEW"); } /** @@ -151,7 +163,7 @@ _CampaignUtils._openAddParticipantContext = function(pContext, pRowIds, pEntityP params["isUpdate_param"] = false; logging.log("pRowsIds" + pRowIds); - neon.openContext(pContext, pView, null, neon.OPERATINGSTATE_NEW, params); + neon.openContext(pContext, null, null, neon.OPERATINGSTATE_NEW, params); } /**