Skip to content
Snippets Groups Projects
Commit db2bd3aa authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Revert "Merge commit '8b813edc'"

This reverts merge request !1542
parent 5d9b9c1c
No related branches found
No related tags found
No related merge requests found
Showing
with 1300 additions and 705 deletions
This diff is collapsed.
This diff is collapsed.
......@@ -16,12 +16,6 @@ var res = {
"connectionField":"TASK_REQUESTOR_CONTACT_ID",
"setGroupBy":"NameFor360"
},
"Campaign": {
"subContext":"CampaignParticipant",
"childField":"CAMPAIGN_ID",
"parentField":"CAMPAIGNID",
"contactIdField":"CONTACT_ID"
},
"Advertising": {},
"BulkMail": {
"subContext":"BulkMailRecipient",
......
......@@ -2,9 +2,4 @@ import("system.result");
import("system.vars");
import("system.text");
// Remove all linebreaks
let info = vars.get("$field.INFO").replace(/\n/ig, "");
// Remove all styles --> styles have no effect on the later text and they and these cause problems when converting
info = info.replace(/style=\".*\"/ig, "");
result.string(text.html2text(info));
result.string(text.html2text(vars.get("$field.INFO")));
\ No newline at end of file
......@@ -4,9 +4,6 @@
<title>Advertising item</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/AdvertisingItem_entity/documentation.adoc</documentation>
<grantCreateProcess>%aditoprj%/entity/AdvertisingItem_entity/grantCreateProcess.js</grantCreateProcess>
<grantUpdateProcess>%aditoprj%/entity/AdvertisingItem_entity/grantUpdateProcess.js</grantUpdateProcess>
<grantDeleteProcess>%aditoprj%/entity/AdvertisingItem_entity/grantDeleteProcess.js</grantDeleteProcess>
<iconId>VAADIN:PACKAGE</iconId>
<titlePlural>Advertising items</titlePlural>
<recordContainer>db</recordContainer>
......@@ -90,6 +87,18 @@
<onValueChange>%aditoprj%/entity/AdvertisingItem_entity/entityfields/quantity/onValueChange.js</onValueChange>
<onValidation>%aditoprj%/entity/AdvertisingItem_entity/entityfields/quantity/onValidation.js</onValidation>
</entityField>
<entityField>
<name>SENT</name>
<title>Sent</title>
<contentType>BOOLEAN</contentType>
<mandatory v="false" />
<valueProcess>%aditoprj%/entity/AdvertisingItem_entity/entityfields/sent/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>STATUS</name>
<title>Status</title>
<mandatory v="false" />
</entityField>
<entityField>
<name>TARGETAMOUNT</name>
<title>Target amount</title>
......@@ -291,6 +300,14 @@
<name>QUANTITY.value</name>
<recordfield>ADVERTISINGITEM.QUANTITY</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>SENT.value</name>
<recordfield>ADVERTISINGITEM.SENT</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>STATUS.value</name>
<recordfield>ADVERTISINGITEM.STATUS</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>TARGETAMOUNT.value</name>
<recordfield>ADVERTISINGITEM.TARGETAMOUNT</recordfield>
......
import("KeywordRegistry_basic");
import("system.neon");
import("system.vars");
import("system.result");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value") == null)
{
var ret = 0;
//when an item was handover personal the item is already at its destination
if(vars.get("$field.DELIVERY") == $KeywordRegistry.advertisingDelivery$personal())
{
ret = 1;
}
result.string(ret);
}
\ No newline at end of file
import("Advertising_lib");
import("system.vars");
import("system.result");
result.string(AdvertisingUtils.isEditable(AdvertisingUtils.getStatus(vars.get("$param.AdvertisingId_param"))));
\ No newline at end of file
import("Advertising_lib");
import("system.vars");
import("system.result");
result.string(AdvertisingUtils.isEditable(AdvertisingUtils.getStatus(vars.get("$param.AdvertisingId_param"))));
\ No newline at end of file
import("Advertising_lib");
import("system.vars");
import("system.result");
result.string(AdvertisingUtils.isEditable(AdvertisingUtils.getStatus(vars.get("$param.AdvertisingId_param"))));
\ No newline at end of file
......@@ -262,7 +262,6 @@
<fromClauseProcess>%aditoprj%/entity/Advertising_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess>
<conditionProcess>%aditoprj%/entity/Advertising_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<orderClauseProcess>%aditoprj%/entity/Advertising_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
<onDBDelete>%aditoprj%/entity/Advertising_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
<alias>Data_alias</alias>
<recordFieldMappings>
<dbRecordFieldMapping>
......
import("Sql_lib");
newWhere("ADVERTISINGITEM.ADVERTISING_ID", "$field.ADVERTISINGID")
.deleteData();
\ No newline at end of file
import("Employee_lib");
import("system.db");
import("system.result");
import("Sql_lib");
import("KeywordRegistry_basic");
var contactId = EmployeeUtils.getCurrentContactId();
var departmentId = EmployeeUtils.getUsersDepartment(contactId, false);
var opentask = newSelect("count(TASKID)")
.from("TASK")
.join("TASKATTENDEES","TASKATTENDEES.TASK_ID = TASK.TASKID")
.where(
newWhere("TASKATTENDEES.CONTACT_ID", contactId)
.or("TASKATTENDEES.DEPARTMENT_ID",departmentId)
)
.and("TASK.STATUS", $KeywordRegistry.taskStatus$new())
.cell();
.where("TASK.STATUS", $KeywordRegistry.taskStatus$new())
.and ("TASK.KIND", "TASK")
.and("TASK.EDITOR_CONTACT_ID", EmployeeUtils.getCurrentContactId())
.cell();
result.string(opentask || 0);
\ No newline at end of file
This diff is collapsed.
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