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 @@ ...@@ -2,4 +2,6 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" <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"> 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="update_attribute_Ticket_Support_Product.xml"/>
<include relativeToChangelogFile="true" file="alter_SerialLetter.xml"/>
</databaseChangeLog> </databaseChangeLog>
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<name>NAME</name> <name>NAME</name>
<title>Name</title> <title>Name</title>
<mandatory v="true" /> <mandatory v="true" />
<valueProcess>%aditoprj%/entity/BulkMail_entity/entityfields/name/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>SUBJECT</name> <name>SUBJECT</name>
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
<entityField> <entityField>
<name>DESCRIPTION</name> <name>DESCRIPTION</name>
<title>Description</title> <title>Description</title>
<contentType>LONG_TEXT</contentType>
</entityField> </entityField>
<entityField> <entityField>
<name>DOCUMENTTEMPLATE_ID</name> <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"); ...@@ -8,7 +8,6 @@ import("system.vars");
if (vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) if (vars.get("$this.value") == null && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{ {
var upload = vars.get("$field.bindata"); var upload = vars.get("$field.bindata");
var template;
if (upload) if (upload)
{ {
var binData = DocumentUtil.getBindataFromUpload(upload); var binData = DocumentUtil.getBindataFromUpload(upload);
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
<name>TITLE</name> <name>TITLE</name>
<title>Title</title> <title>Title</title>
<mandatory v="true" /> <mandatory v="true" />
<valueProcess>%aditoprj%/entity/SerialLetter_entity/entityfields/title/valueProcess.js</valueProcess>
</entityField> </entityField>
<entityField> <entityField>
<name>DESCRIPTION</name> <name>DESCRIPTION</name>
...@@ -97,6 +98,17 @@ ...@@ -97,6 +98,17 @@
<name>bindata</name> <name>bindata</name>
<contentType>FILE</contentType> <contentType>FILE</contentType>
</entityField> </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> </entityFields>
<recordContainers> <recordContainers>
<dbRecordContainer> <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("DocumentTemplate_lib");
import("system.result"); import("system.result");
import("system.vars"); import("system.vars");
......
...@@ -15,8 +15,6 @@ var template = DocumentTemplate.fromUpload(bindata); ...@@ -15,8 +15,6 @@ var template = DocumentTemplate.fromUpload(bindata);
if (template.content) if (template.content)
{ {
if (!template.filename)
template.filename = bulkMailName + ".html";
let sysAlias = SqlUtils.getSystemAlias(); let sysAlias = SqlUtils.getSystemAlias();
var binaryId = db.cell(SqlCondition.begin(sysAlias) var binaryId = db.cell(SqlCondition.begin(sysAlias)
.andPrepareVars("ASYS_BINARIES.ROW_ID", "$local.uid") .andPrepareVars("ASYS_BINARIES.ROW_ID", "$local.uid")
......
import("Util_lib"); import("Util_lib");
import("system.vars"); import("system.vars");
import("system.db"); import("system.db");
import("ActivityTask_lib") import("ActivityTask_lib")
CodeUtils.setCode(vars.get("$local.uid"), "TICKET", "TICKETID", "CODE"); ConsecutiveCodeUtils.setCode(vars.get("$local.uid"), "TICKET", "TICKETID", "CODE");
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -25,10 +25,6 @@ ...@@ -25,10 +25,6 @@
<name>e363bda2-d8bf-456e-bcae-d1870408022a</name> <name>e363bda2-d8bf-456e-bcae-d1870408022a</name>
<entityField>NAME</entityField> <entityField>NAME</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink>
<name>06f08869-5a81-41cb-8c7e-51be6a7041a7</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>c73d0fb7-b740-48ac-8f3e-fd4199f169da</name> <name>c73d0fb7-b740-48ac-8f3e-fd4199f169da</name>
<entityField>SUBJECT</entityField> <entityField>SUBJECT</entityField>
...@@ -41,6 +37,10 @@ ...@@ -41,6 +37,10 @@
<name>d9b91083-948e-4a0f-a29c-4962ddd78b41</name> <name>d9b91083-948e-4a0f-a29c-4962ddd78b41</name>
<entityField>CREATEACTIVITIES</entityField> <entityField>CREATEACTIVITIES</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink>
<name>06f08869-5a81-41cb-8c7e-51be6a7041a7</name>
<entityField>DESCRIPTION</entityField>
</entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>0a67f430-dbcd-4605-b626-ee6d715ab248</name> <name>0a67f430-dbcd-4605-b626-ee6d715ab248</name>
<entityField>content</entityField> <entityField>content</entityField>
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <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> <name>BulkMailPreview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode> <majorModelMode>DISTRIBUTED</majorModelMode>
<layout> <layout>
<headerFooterLayout> <headerFooterLayout>
<name>layout</name> <name>layout</name>
<header>Card</header> <header>Card</header>
</headerFooterLayout> </headerFooterLayout>
</layout> </layout>
<children> <children>
<cardViewTemplate> <cardViewTemplate>
<name>Card</name> <name>Card</name>
<iconField>ICON</iconField> <iconField>ICON</iconField>
<titleField>NAME</titleField> <titleField>NAME</titleField>
<descriptionField>STATUS</descriptionField> <descriptionField>STATUS</descriptionField>
<favoriteAction1>sendMail</favoriteAction1> <favoriteAction1>sendMail</favoriteAction1>
<entityField>#ENTITY</entityField> <entityField>#ENTITY</entityField>
</cardViewTemplate> </cardViewTemplate>
<genericViewTemplate> <genericViewTemplate>
<name>Generic</name> <name>Generic</name>
<showDrawer v="true" /> <showDrawer v="true" />
<entityField>#ENTITY</entityField> <entityField>#ENTITY</entityField>
<fields> <fields>
<entityFieldLink> <entityFieldLink>
<name>524c32f8-99d8-453d-afe5-b72a322a4555</name> <name>524c32f8-99d8-453d-afe5-b72a322a4555</name>
<entityField>SUBJECT</entityField> <entityField>SUBJECT</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>9ef1ecd4-063a-4c18-9def-d395f59a64dc</name> <name>9ef1ecd4-063a-4c18-9def-d395f59a64dc</name>
<entityField>SENDER</entityField> <entityField>SENDER</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>28c1e091-0fea-4324-8fb8-1893388354b7</name> <name>28c1e091-0fea-4324-8fb8-1893388354b7</name>
<entityField>STATUS</entityField> <entityField>STATUS</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>edbeea4d-019f-4661-b0d7-c07468e747cc</name> <name>edbeea4d-019f-4661-b0d7-c07468e747cc</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField> <entityField>DOCUMENTTEMPLATE_ID</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>8bb72d39-3348-4bd6-b57d-f7f5ae573e73</name> <name>514d0861-ad00-4d32-9c56-6be0443e03e3</name>
<entityField>DESCRIPTION</entityField> <entityField>CREATEACTIVITIES</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>514d0861-ad00-4d32-9c56-6be0443e03e3</name> <name>8bb72d39-3348-4bd6-b57d-f7f5ae573e73</name>
<entityField>CREATEACTIVITIES</entityField> <entityField>DESCRIPTION</entityField>
</entityFieldLink> </entityFieldLink>
</fields> </fields>
</genericViewTemplate> </genericViewTemplate>
<genericViewTemplate> <genericViewTemplate>
<name>Testing</name> <name>Testing</name>
<showDrawer v="true" /> <showDrawer v="true" />
<drawerCaption>Testing</drawerCaption> <drawerCaption>Testing</drawerCaption>
<entityField>#ENTITY</entityField> <entityField>#ENTITY</entityField>
<fields> <fields>
<entityFieldLink> <entityFieldLink>
<name>ea406803-6189-4de0-aa41-f09f7e1b2336</name> <name>ea406803-6189-4de0-aa41-f09f7e1b2336</name>
<entityField>TESTING_CONTACT_ID</entityField> <entityField>TESTING_CONTACT_ID</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>f8963199-c89b-48e5-a92c-8f655c05acab</name> <name>f8963199-c89b-48e5-a92c-8f655c05acab</name>
<entityField>TESTING_EMAIL_ADDRESS</entityField> <entityField>TESTING_EMAIL_ADDRESS</entityField>
</entityFieldLink> </entityFieldLink>
</fields> </fields>
</genericViewTemplate> </genericViewTemplate>
</children> </children>
</neonView> </neonView>
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
<editMode v="true" /> <editMode v="true" />
<entityField>#ENTITY</entityField> <entityField>#ENTITY</entityField>
<fields> <fields>
<entityFieldLink>
<name>b33a8886-75b0-4644-890d-97a8133079ea</name>
<entityField>TITLE</entityField>
</entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>98b1c32e-8f7e-45f9-bbc8-048851133048</name> <name>98b1c32e-8f7e-45f9-bbc8-048851133048</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField> <entityField>DOCUMENTTEMPLATE_ID</entityField>
...@@ -25,6 +21,10 @@ ...@@ -25,6 +21,10 @@
<name>057f064d-53fd-4d80-a43e-20a4a40d4ffb</name> <name>057f064d-53fd-4d80-a43e-20a4a40d4ffb</name>
<entityField>bindata</entityField> <entityField>bindata</entityField>
</entityFieldLink> </entityFieldLink>
<entityFieldLink>
<name>b33a8886-75b0-4644-890d-97a8133079ea</name>
<entityField>TITLE</entityField>
</entityFieldLink>
<entityFieldLink> <entityFieldLink>
<name>1845ae78-7132-4efc-aba0-737dc4d7fc9b</name> <name>1845ae78-7132-4efc-aba0-737dc4d7fc9b</name>
<entityField>DESCRIPTION</entityField> <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