Skip to content
Snippets Groups Projects
Commit bf41b2e3 authored by David Büchler's avatar David Büchler
Browse files

In der Preview der Stufe gibt es nun einen Verweis auf die dazugehörige Kampagne

Die Preview der Kampagne hat nun drei Kerninfos per Scorecard in der Preview angezeigt
parent 1d3b24c3
No related branches found
No related tags found
No related merge requests found
import("system.logging");
import("system.result");
import("system.db");
import("system.vars");
......@@ -6,5 +5,4 @@ import("Campaign_lib");
var campaignId = vars.get("$field.CAMPAIGN_ID");
var campaignName = CampaignUtils.getCampaignNameById(campaignId);
logging.log("CampaignAddParticipants: CAPMAIGN_ID displayValueProcess -> " + campaignName);
result.string(campaignName);
\ No newline at end of file
import("system.result");
import("system.vars");
import("Campaign_lib");
var campaignId = vars.get("$this.value");
var campaignName = CampaignUtils.getCampaignNameById(campaignId)
result.string(campaignName);
\ No newline at end of file
......@@ -218,6 +218,16 @@
</entityParameter>
</children>
</entityConsumer>
<entityField>
<name>stepCount</name>
<title>Steps</title>
<valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/stepcount/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>participantCount</name>
<title>Participants</title>
<valueProcess>%aditoprj%/entity/Campaign_entity/entityfields/participantcount/valueProcess.js</valueProcess>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.result");
import("system.vars");
import("Campaign_lib");
result.string(CampaignUtils.getParticipantCount(vars.get("$field.CAMPAIGNID")));
\ No newline at end of file
......@@ -5,9 +5,11 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>VAADIN:GROUP</icon>
<layout>
<boxLayout>
<headerFooterLayout>
<name>layout</name>
</boxLayout>
<header>Header</header>
<footer>ScoreCard</footer>
</headerFooterLayout>
</layout>
<children>
<cardViewTemplate>
......@@ -31,11 +33,25 @@
<name>a52607c9-da9c-4894-acc6-f31024510d6d</name>
<entityField>DATE_END</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<scoreCardViewTemplate>
<name>ScoreCard</name>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>87b03a62-3508-4267-afd6-95428f0d1f8d</name>
<name>df1b29fd-0d20-4be0-b6a3-785dadb8a35b</name>
<entityField>COST</entityField>
</entityFieldLink>
<entityFieldLink>
<name>1cdf9373-790e-47ae-a6ce-d7673cb8cdb2</name>
<entityField>participantCount</entityField>
</entityFieldLink>
<entityFieldLink>
<name>b689668f-1d48-4ff1-95d9-2e217547c853</name>
<entityField>stepCount</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</scoreCardViewTemplate>
</children>
</neonView>
......@@ -94,6 +94,18 @@ CampaignUtils.getMaxParticipantCountForStep = function(pCampaignStepId)
return _CampaignUtils._loadSingleValueFromDb(selectQuery, conditionField, pCampaignStepId, defaultValue);
}
/**
* todo
*/
CampaignUtils.getStepCount = function(pCampaignId)
{
let selectQuery = "select count(*) from CAMPAIGNSTEP";
let conditionField = "CAMPAIGNSTEP.CAMPAIGN_ID";
let defaultValue = 0;
return _CampaignUtils._loadSingleValueFromDb(selectQuery, conditionField, pCampaignId, defaultValue);
}
/**
* todo
*/
......
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