Skip to content
Snippets Groups Projects
Commit c357d8fb authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Merge branch 'm_1083583_campaign_changes' into '2021.1'

[Projekt: xRM-Marketing][TicketNr.: 1044537][Kampagne - Kontakt oder Firma zu...

See merge request xrm/basic!1137
parents 848be9f9 7c92acd7
No related branches found
No related tags found
No related merge requests found
Showing
with 55 additions and 14 deletions
......@@ -60,6 +60,12 @@
<entityName>Campaign_entity</entityName>
<fieldName>Campaigns</fieldName>
</dependency>
<children>
<entityParameter>
<name>OnlyActive_param</name>
<valueProcess>%aditoprj%/entity/CampaignAddParticipants_entity/entityfields/campaignconsumer/children/onlyactive_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
<name>CampaignStepConsumer</name>
......
......@@ -26,7 +26,13 @@ if(contactIds != null && contactIds.length > 0)
neon.refreshAll();
if (!vars.exists("$param.currentCampaignId_param") || !vars.get("$param.currentCampaignId_param"))
neon.openContext("Campaign", "CampaignMain_view", [campaignId], neon.OPERATINGSTATE_VIEW, null);
{
neon.openContext("Campaign", "CampaignMain_view", [campaignId], neon.OPERATINGSTATE_VIEW, null);
}
else
{
neon.closeImage(vars.get("$sys.currentimage"), true);
}
......
import("system.result");
result.string(true)
\ No newline at end of file
result.string("true");
\ No newline at end of file
......@@ -19,6 +19,8 @@
</entityProvider>
<entityProvider>
<name>CampaignParticipantsProvider</name>
<targetContextField>CONTACTCONTEXT</targetContextField>
<targetIdField>CONTACT_ID</targetIdField>
<documentation>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaignparticipantsprovider/documentation.adoc</documentation>
<recordContainer>db</recordContainer>
<children>
......@@ -127,14 +129,14 @@
<fieldName>ContactsByIds</fieldName>
</dependency>
<children>
<entityParameter>
<name>OnlyPers_param</name>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/anycontacts/children/onlypers_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>WithPrivatePersons_param</name>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/anycontacts/children/withprivatepersons_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>IgnoreContactStates_param</name>
<valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/anycontacts/children/ignorecontactstates_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
......
import("system.result");
import("KeywordRegistry_basic");
result.string(JSON.stringify([
$KeywordRegistry.contactStatus$inactive(),
$KeywordRegistry.contactStatus$markToDelete()
]));
\ No newline at end of file
......@@ -606,6 +606,10 @@
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
<name>OnlyActive_param</name>
<expose v="true" />
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("system.result");
import("Campaign_lib");
import("system.neon");
result.string(CampaignUtils.getNextProjectNumber());
\ No newline at end of file
if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
result.string(CampaignUtils.getNextProjectNumber());
\ No newline at end of file
import("KeywordRegistry_basic");
import("system.db");
import("system.neon");
import("system.result");
import("system.vars");
import("Employee_lib");
import("Sql_lib");
import("Util_lib");
import("system.SQLTYPES")
var recordState = vars.get("$sys.recordstate");
var cond = newWhere();
var sqlHelper = new SqlMaskingUtils();
if(vars.get("$param.ShowOnlyCurrentUsersCampaigns_param") == 'true')
if(Utils.toBoolean(vars.get("$param.ShowOnlyCurrentUsersCampaigns_param")))
{
cond.and("CAMPAIGN.EMPLOYEE_CONTACT_ID", EmployeeUtils.getCurrentContactId());
}
if(Utils.toBoolean(vars.get("$param.OnlyActive_param")))
{
cond.and("CAMPAIGN.STATUS",$KeywordRegistry.campaignState$completed(),SqlBuilder.NOT_EQUAL());
cond.and(newSelect(sqlHelper.max("CAMPAIGNSTEP.DATE_END"))
.from("CAMPAIGNSTEP")
.where("CAMPAIGNSTEP.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID")
,vars.get("$sys.date"),SqlBuilder.GREATER_OR_EQUAL(),SQLTYPES.DATE)
}
result.string(cond.toString());
\ No newline at end of file
......@@ -1016,7 +1016,7 @@
</entry>
<entry>
<key>Update campaign step</key>
<value>Aktualisieren des Kampagnenschrittes</value>
<value>Kampagnenstufe ändern</value>
</entry>
<entry>
<key>Serial letters</key>
......@@ -1521,7 +1521,7 @@
</entry>
<entry>
<key>Participants</key>
<value>Teilnehmer/innen</value>
<value>Teilnehmer</value>
</entry>
<entry>
<key>Contact Management</key>
......@@ -1577,7 +1577,7 @@
</entry>
<entry>
<key>Add participants to Campaign</key>
<value>Kampagnenteilnehmer/innen hinzufügen</value>
<value>Kampagnenteilnehmer hinzufügen</value>
</entry>
<entry>
<key>Firstname</key>
......@@ -4406,7 +4406,7 @@
</entry>
<entry>
<key>Add participant to Campaign</key>
<value>Kampagnenteilnehmer/in hinzufügen</value>
<value>Kampagnenteilnehmer hinzufügen</value>
</entry>
<entry>
<key>Relationtype</key>
......
......@@ -13,6 +13,7 @@
<titleField>NAME</titleField>
<highlightingField>CurrentMaxParticipantsInfo</highlightingField>
<entityField>#ENTITY</entityField>
<isEditable v="false" />
<columns>
<neonTitledListTableColumn>
<name>4ea71a13-4108-47a5-9a28-2256618fdc2c</name>
......
......@@ -176,6 +176,7 @@ $KeywordRegistry.contactContactrole = function(){return "ContactContactrole";};
$KeywordRegistry.campaignState = function(){return "CampaignManagementStates";};
$KeywordRegistry.campaignState$planning = function(){return "PLANNING";};
$KeywordRegistry.campaignState$approved = function(){return "APPROVED";};
$KeywordRegistry.campaignState$completed = function(){return "COMPLETED";};
$KeywordRegistry.campaignStepState = function(){return "CampaignManagementStepStates";};
$KeywordRegistry.campaignStepState$open = function(){return "OPEN";};
......
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