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

grantDelete processes optimized

parent 372ea8e8
No related branches found
No related tags found
No related merge requests found
Showing
with 122 additions and 18 deletions
import("system.vars");
import("KeywordRegistry_basic");
import("system.result");
import("Keyword_lib");
result.string(KeywordUtils.getViewValue($KeywordRegistry.serialLetterStatus(), vars.get("$field.STATUS")));
\ No newline at end of file
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)
{
result.string($KeywordRegistry.serialLetterStatus$notSent());
}
\ No newline at end of file
import("KeywordRegistry_basic");
import("system.result");
result.string($KeywordRegistry.serialLetterStatus());
\ No newline at end of file
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.serialLetterStatus(), "SERIALLETTER.STATUS");
result.string(sql);
......@@ -9,14 +9,28 @@
</layout>
<children>
<genericViewTemplate>
<name>BulkMail</name>
<name>Generic</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>b68c65de-4ecd-4a23-9242-f85e7b708b1e</name>
<name>55842e88-7e2b-41ee-b564-3c2e3fb04125</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<actionsViewTemplate>
<name>Actions</name>
<actions>
<element>downloadTemplate</element>
</actions>
<entityField>#ENTITY</entityField>
</actionsViewTemplate>
<genericViewTemplate>
<name>BulkMail</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>40628318-2c0e-4324-b676-f7bda2740166</name>
<entityField>bindata</entityField>
......
......@@ -29,6 +29,14 @@
<name>9ad2e3dd-5496-43f4-b6ff-5b2b8c1fb6db</name>
<entityField>SUBJECT</entityField>
</neonTableColumn>
<neonTableColumn>
<name>735b4d0d-3730-4bd4-bf29-a3651b5e1e3c</name>
<entityField>STATUS</entityField>
</neonTableColumn>
<neonTableColumn>
<name>6bb9e1df-af54-45a5-a9b5-69bfe45e3491</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
</neonTableColumn>
<neonTableColumn>
<name>d8f9dce6-8c10-4235-b3c3-2d15d01586bc</name>
<entityField>DESCRIPTION</entityField>
......
......@@ -18,8 +18,22 @@
<name>5919fb0b-13d8-4cd3-8110-89722d97f4e1</name>
<entityField>DOCUMENT_TEMPLATE</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<actionsViewTemplate>
<name>Actions</name>
<actions>
<element>downloadTemplate</element>
</actions>
<entityField>#ENTITY</entityField>
</actionsViewTemplate>
<genericViewTemplate>
<name>Generic</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>6513b2f4-d7c8-4bbe-b31a-290cf9bf7ded</name>
<name>352a7304-2308-4eea-8076-72e9d5c02a50</name>
<entityField>bindata</entityField>
</entityFieldLink>
</fields>
......
......@@ -82,8 +82,8 @@
<entityField>LastActivity</entityField>
</entityFieldLink>
<entityFieldLink>
<name>cc143e94-006f-4059-925a-212e91c1ece7</name>
<entityField>CountActivity</entityField>
<name>f367d831-d594-4dc1-8e1e-b7c3bf45e2ad</name>
<entityField>OpenTasks</entityField>
</entityFieldLink>
</fields>
</scoreCardViewTemplate>
......
......@@ -9,22 +9,40 @@
</layout>
<children>
<genericViewTemplate>
<name>Generic</name>
<name>Generic2</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>98b1c32e-8f7e-45f9-bbc8-048851133048</name>
<name>9d341919-1306-40d1-bc3d-5cce3c2d5c04</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<actionsViewTemplate>
<name>Actions</name>
<actions>
<element>downloadTemplate</element>
</actions>
<entityField>#ENTITY</entityField>
</actionsViewTemplate>
<genericViewTemplate>
<name>Generic</name>
<editMode v="true" />
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>057f064d-53fd-4d80-a43e-20a4a40d4ffb</name>
<name>a1a56052-1afa-4fa2-8aa9-1bc22148d8eb</name>
<entityField>bindata</entityField>
</entityFieldLink>
<entityFieldLink>
<name>b33a8886-75b0-4644-890d-97a8133079ea</name>
<entityField>TITLE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>8b6a5de0-d1dc-4cdd-9f3b-a38cddce88ef</name>
<entityField>STATUS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>1845ae78-7132-4efc-aba0-737dc4d7fc9b</name>
<entityField>DESCRIPTION</entityField>
......
......@@ -21,6 +21,10 @@
<name>81088f4a-4ce6-43fc-8dab-7ecf1aec0386</name>
<entityField>TITLE</entityField>
</neonTableColumn>
<neonTableColumn>
<name>73a5b1ea-913f-4562-aed1-95c6e665cd19</name>
<entityField>STATUS</entityField>
</neonTableColumn>
<neonTableColumn>
<name>84aedf68-f90e-479c-912d-55cd499523cb</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
......
......@@ -12,6 +12,7 @@
<name>Card</name>
<iconField>ICON</iconField>
<titleField>TITLE</titleField>
<subtitleField>STATUS</subtitleField>
<favoriteAction1>downloadLetter</favoriteAction1>
<entityField>#ENTITY</entityField>
</cardViewTemplate>
......@@ -24,6 +25,10 @@
<name>b66a9401-6218-4b64-b233-06c878d86b21</name>
<entityField>DOCUMENTTEMPLATE_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>272dc0ad-c6c1-434b-82c2-4bbcd4b4b088</name>
<entityField>STATUS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>c8702eb8-3638-47a6-acf7-402c88c529cd</name>
<entityField>DESCRIPTION</entityField>
......
......@@ -440,7 +440,7 @@ ContextUtils.getSelectMap = function()
], "", false))
.setContactIdField("CONTACT_ID")
.setCreationDateField("SALESORDERDATE")
.setStateField("STATUS")
.setStateField("ORDERSTATUS")
.setActiveStates([$KeywordRegistry.salesorderState$checked, $KeywordRegistry.salesorderState$sent])
,"Product": ContextSelector.create("PRODUCT", "PRODUCTID")
.setTitleExpression(maskingUtils.concat([
......
......@@ -154,7 +154,7 @@ DocumentTemplate.fromUpload = function (pUploadValue)
var type;
//if the mimetype couldn't be determined, check the file extension
if (mimeType == "application/octet-stream")
if (mimeType == MimeTypes.BIN())
type = DocumentTemplate.types.fromFileExtension(DocumentUtil.getFileExtensionFromUpload(filename));
else
type = DocumentTemplate.types.fromMimeType(mimeType);
......
......@@ -212,4 +212,6 @@ $KeywordRegistry.orderType$deliverynote = function(){return $KeywordRegistry._au
$KeywordRegistry.orderType$invoice = function(){return $KeywordRegistry._autoPad("ORDTYPEINVO");};
$KeywordRegistry.orderType$credit = function(){return $KeywordRegistry._autoPad("ORDTYPECRED");};
$KeywordRegistry.orderType$cancellation = function(){return $KeywordRegistry._autoPad("ORDTYPECANC");};
$KeywordRegistry.dunningLevel = function(){return "DunningLevel";};
\ No newline at end of file
$KeywordRegistry.dunningLevel = function(){return "DunningLevel";};
$KeywordRegistry.bulkMailProblem = function(){return "BulkMailProblem";};
\ No newline at end of file
/**
* Object for the enumeration of mime types.
* This includes commonly used ones, if something is missing, feel free to add it.
* This is an incomplete list and includes commonly used types, if something is missing, feel free to add it.
*/
function MimeTypes () {}
/* application */
MimeTypes.BIN = function () {return "application/octet-stream";};
MimeTypes.ODT = function () {return "application/vnd.oasis.opendocument.text";};
MimeTypes.PDF = function () {return "application/pdf";};
MimeTypes.DOC = function () {return "application/msword";};
MimeTypes.DOCX = function() {return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";};
MimeTypes.XLS = function () {return "application/vnd.ms-excel";};
MimeTypes.XLSX = function() {return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";};
MimeTypes.PPT = function () {return "application/vnd.ms-powerpoint";};
MimeTypes.MDB = function () {return "application/x-msaccess";};
MimeTypes.RTF = function () {return "application/rtf";};
......@@ -17,6 +19,8 @@ MimeTypes.JS = function () {return "application/javascript";};
MimeTypes.JSON = function() {return "application/json";};
MimeTypes.ZIP = function () {return "application/zip";};
MimeTypes.MSG = function () {return "application/vnd.ms-outlook";};
MimeTypes.TAR = function () {return "application/x-tar";};
MimeTypes.XHTML = function() {return "application/xhtml+xml";};
/* text */
MimeTypes.TXT = function () {return "text/plain";};
......@@ -37,13 +41,18 @@ MimeTypes.JPEG = function() {return "image/jpeg";};
MimeTypes.TIFF = function() {return "image/tiff";};
MimeTypes.PNG = function () {return "image/png";};
MimeTypes.SVG = function () {return "image/svg+xml";};
MimeTypes.WEBP = function() {return "image/webp";};
/* audio */
MimeTypes.MP3 = function () {return "audio/mpeg";};
MimeTypes.AAC = function () {return "audio/aac";};
MimeTypes.OGG = function () {return "audio/ogg";};
MimeTypes.WAV = function () {return "audio/x-wav";};
MimeTypes.WEBA = function() {return "audio/webm";};
/* video */
MimeTypes.MPEG = function() {return "video/mpeg";};
MimeTypes.MP4 = function () {return "video/mp4";};
MimeTypes.AVI = function () {return "video/x-msvideo";};
MimeTypes.OGV = function () {return "video/ogg";};
MimeTypes.WEBM = function() {return "video/webm";};
......@@ -625,7 +625,7 @@ SqlCondition.equalsNot = function(pField, pValue, pAlternativeCond, pAlias) {
* Object for building sqls. The main purpose of this is to make it
* possible to use SqlCondition objects inside join conditions or sub sqls.
* This can also be useful to build complex sqls where parts should be added
* dynamically while keeping the code clear.
* dynamically while keeping the code clean.
*
* @class
*/
......@@ -658,13 +658,18 @@ function SqlBuilder ()
* .leftJoin("ORGANISATION", SqlCondition.begin()
* .and("CONTACT.ORGANISATION_ID = ORGANISATION.ORGANISATIONID")
* .andPrepare("ORGANISATION.NAME", "S%", "# like ?")
* .build("1=2))
* .build("1=2"))
* .where(SqlCondition.begin()
* .andPrepare("CONTACT.STATUS", $KeywordRegistry.contactStatus$active())
* .build("1=2))
* .build();
*
* var data = db.table(query);
* .build("1=2"));
*
* if (getCountry) //changing and adding parts
* {
* query.select("ORGANISATION.NAME, FIRSTNAME, LASTNAME, COUNTRY");
* query.leftJoin("ADDRESS", "CONTACT.ADDRESS_ID = ADDRESS.ADDRESSID");
* }
*
* var data = db.table(query.build());
*/
SqlBuilder.begin = function ()
{
......
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