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

removed database specific query parts

campaign end date now displays the correct value
the display of campaignsteps in a campaign is now in a grouplayout. One can switch between table and gantt view
parent 3eef35fe
No related branches found
No related tags found
No related merge requests found
......@@ -5,9 +5,9 @@
<description></description>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<groupLayout>
<name>layout</name>
</boxLayout>
</groupLayout>
</layout>
<children>
<tableViewTemplate>
......@@ -41,5 +41,14 @@
</neonTableColumn>
</columns>
</tableViewTemplate>
<ganttViewTemplate>
<name>StepGantt</name>
<beginDateField>DATE_START</beginDateField>
<endDateField>DATE_END</endDateField>
<titleField>NAME</titleField>
<descriptionField>DESCRIPTION</descriptionField>
<uidField>CAMPAIGNSTEPID</uidField>
<entityField>#ENTITY</entityField>
</ganttViewTemplate>
</children>
</neonView>
......@@ -177,10 +177,9 @@ CampaignUtils.getDefaultCampaignStep = function(pCampaignId)
*/
CampaignUtils.getCampaignStartDate = function(pCapmaignId)
{
var campaignIdCondition = SqlCondition.begin()
let campaignIdCondition = SqlCondition.begin()
.andPrepare("CAMPAIGNSTEP.CAMPAIGN_ID", pCapmaignId);
// TODO: Fetch first 1 rows only will not work with all dbms! Maybe just remove it, because db.cell always uses only the first row
return db.cell(campaignIdCondition.buildSql("SELECT DATE_START, SORTING FROM ADITO.CAMPAIGNSTEP", "1=2", "order by SORTING ASC FETCH FIRST 1 ROWS ONLY"));
return db.cell(campaignIdCondition.buildSql("SELECT DATE_START, SORTING FROM ADITO.CAMPAIGNSTEP", "1=2", "order by SORTING ASC"));
}
/**
......@@ -188,11 +187,10 @@ CampaignUtils.getCampaignStartDate = function(pCapmaignId)
*/
CampaignUtils.getCampaignEndDate = function(pCapmaignId)
{
var campaignIdCondition = SqlCondition.begin()
let campaignIdCondition = SqlCondition.begin()
.andPrepare("CAMPAIGNSTEP.CAMPAIGN_ID", pCapmaignId);
// TODO: Fetch first 1 rows only will not work with all dbms! Maybe just remove it, because db.cell always uses only the first row
return db.cell(campaignIdCondition.buildSql("SELECT DATE_END, SORTING FROM CAMPAIGNSTEP", "1=2", "order by SORTING ASC FETCH FIRST 1 ROWS ONLY"));
return db.cell(campaignIdCondition.buildSql("SELECT DATE_END, SORTING FROM CAMPAIGNSTEP", "1=2", "order by SORTING DESC"));
}
/**
......
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