Skip to content
Snippets Groups Projects
Commit 9ea3b3b4 authored by S.Listl's avatar S.Listl
Browse files

SerialLetter download template action

parent c95f6b0d
No related branches found
No related tags found
No related merge requests found
Showing
with 16831 additions and 16731 deletions
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<changeSet author="s.listl" id="f1a65325-8a60-409e-9271-512c14b5e1b7">
<addColumn tableName="SERIALLETER">
<column name="STATUS" type="CHAR(36)"/>
</addColumn>
</changeSet>
</databaseChangeLog>
......@@ -2,4 +2,6 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<include relativeToChangelogFile="true" file="update_attribute_Ticket_Support_Product.xml"/>
<include relativeToChangelogFile="true" file="alter_SerialLetter.xml"/>
</databaseChangeLog>
......@@ -27,6 +27,7 @@
<name>NAME</name>
<title>Name</title>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/name/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>SUBJECT</name>
......@@ -36,6 +37,7 @@
<entityField>
<name>DESCRIPTION</name>
<title>Description</title>
<contentType>LONG_TEXT</contentType>
</entityField>
<entityField>
<name>DOCUMENTTEMPLATE_ID</name>
......
import("system.result");
import("Document_lib");
import("system.neon");
import("system.vars");
if (vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
var upload = vars.get("$field.bindata");
if (upload)
{
var filename = DocumentUtil.getFilenameFromUpload(upload);
result.string(filename.split(".")[0]);
}
}
\ No newline at end of file
......@@ -8,7 +8,6 @@ import("system.vars");
if (vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
var upload = vars.get("$field.bindata");
var template;
if (upload)
{
var binData = DocumentUtil.getBindataFromUpload(upload);
......
......@@ -66,6 +66,7 @@
<name>TITLE</name>
<title>Title</title>
<mandatory v="true" />
<valueProcess>%aditoprj%/entity/SerialLetter_entity/entityfields/title/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>DESCRIPTION</name>
......@@ -97,6 +98,17 @@
<name>bindata</name>
<contentType>FILE</contentType>
</entityField>
<entityField>
<name>STATUS</name>
<title>Status</title>
</entityField>
<entityActionField>
<name>downloadTemplate</name>
<title>Download template</title>
<onActionProcess>%aditoprj%/entity/SerialLetter_entity/entityfields/downloadtemplate/onActionProcess.js</onActionProcess>
<iconId>VAADIN:FILE_FONT</iconId>
<stateProcess>%aditoprj%/entity/SerialLetter_entity/entityfields/downloadtemplate/stateProcess.js</stateProcess>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.neon");
import("system.vars");
import("DocumentTemplate_lib");
var template = DocumentTemplate.loadTemplate(vars.get("$field.DOCUMENTTEMPLATE_ID"));
if (template.type)
neon.download(template.content, template.filename);
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result");
if (vars.get("$field.DOCUMENTTEMPLATE_ID"))
result.string(neon.COMPONENTSTATE_EDITABLE);
else
result.string(neon.COMPONENTSTATE_DISABLED);
\ No newline at end of file
import("system.result");
import("Document_lib");
import("system.neon");
import("system.vars");
if (vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
var upload = vars.get("$field.bindata");
if (upload)
{
var filename = DocumentUtil.getFilenameFromUpload(upload);
result.string(filename.split(".")[0]);
}
}
\ No newline at end of file
import("Sql_lib");
import("DocumentTemplate_lib");
import("system.result");
import("system.vars");
......
......@@ -15,8 +15,6 @@ var template = DocumentTemplate.fromUpload(bindata);
if (template.content)
{
if (!template.filename)
template.filename = bulkMailName + ".html";
let sysAlias = SqlUtils.getSystemAlias();
var binaryId = db.cell(SqlCondition.begin(sysAlias)
.andPrepareVars("ASYS_BINARIES.ROW_ID", "$local.uid")
......
import("Util_lib");
import("system.vars");
import("system.db");
import("ActivityTask_lib")
CodeUtils.setCode(vars.get("$local.uid"), "TICKET", "TICKETID", "CODE");
\ No newline at end of file
import("Util_lib");
import("system.vars");
import("system.db");
import("ActivityTask_lib")
ConsecutiveCodeUtils.setCode(vars.get("$local.uid"), "TICKET", "TICKETID", "CODE");
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -25,10 +25,6 @@
<name>e363bda2-d8bf-456e-bcae-d1870408022a</name>
<entityField>NAME</entityField>
</entityFieldLink>
<entityFieldLink>
<name>06f08869-5a81-41cb-8c7e-51be6a7041a7</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>c73d0fb7-b740-48ac-8f3e-fd4199f169da</name>
<entityField>SUBJECT</entityField>
......@@ -41,6 +37,10 @@
<name>d9b91083-948e-4a0f-a29c-4962ddd78b41</name>
<entityField>CREATEACTIVITIES</entityField>
</entityFieldLink>
<entityFieldLink>
<name>06f08869-5a81-41cb-8c7e-51be6a7041a7</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>0a67f430-dbcd-4605-b626-ee6d715ab248</name>
<entityField>content</entityField>
......
<?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.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.2">
<name>BulkMailPreview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<headerFooterLayout>
<name>layout</name>
<header>Card</header>
</headerFooterLayout>
</layout>
<children>
<cardViewTemplate>
<name>Card</name>
<iconField>ICON</iconField>
<titleField>NAME</titleField>
<descriptionField>STATUS</descriptionField>
<favoriteAction1>sendMail</favoriteAction1>
<entityField>#ENTITY</entityField>
</cardViewTemplate>
<genericViewTemplate>
<name>Generic</name>
<showDrawer v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>524c32f8-99d8-453d-afe5-b72a322a4555</name>
<entityField>SUBJECT</entityField>
</entityFieldLink>
<entityFieldLink>
<name>9ef1ecd4-063a-4c18-9def-d395f59a64dc</name>
<entityField>SENDER</entityField>
</entityFieldLink>
<entityFieldLink>
<name>28c1e091-0fea-4324-8fb8-1893388354b7</name>
<entityField>STATUS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>edbeea4d-019f-4661-b0d7-c07468e747cc</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>8bb72d39-3348-4bd6-b57d-f7f5ae573e73</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>514d0861-ad00-4d32-9c56-6be0443e03e3</name>
<entityField>CREATEACTIVITIES</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<genericViewTemplate>
<name>Testing</name>
<showDrawer v="true" />
<drawerCaption>Testing</drawerCaption>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>ea406803-6189-4de0-aa41-f09f7e1b2336</name>
<entityField>TESTING_CONTACT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>f8963199-c89b-48e5-a92c-8f655c05acab</name>
<entityField>TESTING_EMAIL_ADDRESS</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
</neonView>
<?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.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.2">
<name>BulkMailPreview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<headerFooterLayout>
<name>layout</name>
<header>Card</header>
</headerFooterLayout>
</layout>
<children>
<cardViewTemplate>
<name>Card</name>
<iconField>ICON</iconField>
<titleField>NAME</titleField>
<descriptionField>STATUS</descriptionField>
<favoriteAction1>sendMail</favoriteAction1>
<entityField>#ENTITY</entityField>
</cardViewTemplate>
<genericViewTemplate>
<name>Generic</name>
<showDrawer v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>524c32f8-99d8-453d-afe5-b72a322a4555</name>
<entityField>SUBJECT</entityField>
</entityFieldLink>
<entityFieldLink>
<name>9ef1ecd4-063a-4c18-9def-d395f59a64dc</name>
<entityField>SENDER</entityField>
</entityFieldLink>
<entityFieldLink>
<name>28c1e091-0fea-4324-8fb8-1893388354b7</name>
<entityField>STATUS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>edbeea4d-019f-4661-b0d7-c07468e747cc</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>514d0861-ad00-4d32-9c56-6be0443e03e3</name>
<entityField>CREATEACTIVITIES</entityField>
</entityFieldLink>
<entityFieldLink>
<name>8bb72d39-3348-4bd6-b57d-f7f5ae573e73</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<genericViewTemplate>
<name>Testing</name>
<showDrawer v="true" />
<drawerCaption>Testing</drawerCaption>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>ea406803-6189-4de0-aa41-f09f7e1b2336</name>
<entityField>TESTING_CONTACT_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>f8963199-c89b-48e5-a92c-8f655c05acab</name>
<entityField>TESTING_EMAIL_ADDRESS</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
</neonView>
......@@ -13,10 +13,6 @@
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>b33a8886-75b0-4644-890d-97a8133079ea</name>
<entityField>TITLE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>98b1c32e-8f7e-45f9-bbc8-048851133048</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
......@@ -25,6 +21,10 @@
<name>057f064d-53fd-4d80-a43e-20a4a40d4ffb</name>
<entityField>bindata</entityField>
</entityFieldLink>
<entityFieldLink>
<name>b33a8886-75b0-4644-890d-97a8133079ea</name>
<entityField>TITLE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>1845ae78-7132-4efc-aba0-737dc4d7fc9b</name>
<entityField>DESCRIPTION</entityField>
......
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