Skip to content
Snippets Groups Projects
Commit 388898f9 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

#1064666 initFilter check for presentationmode

parent a1a543f3
No related branches found
No related tags found
No related merge requests found
import("system.neon");
import("system.vars");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER)
{
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
result.string(JSON.stringify(filter));
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER)
{
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
result.string(JSON.stringify(filter));
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.result");
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER)
{
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
}
\ No newline at end of file
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.result");
import("system.vars");
import("system.neon");
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER)
{
var statusInactive = $KeywordRegistry.contactStatus$inactive();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusInactive,
value: KeywordUtils.getViewValue($KeywordRegistry.contactStatus(), statusInactive)
}]
};
result.string(JSON.stringify(filter));
}
\ No newline at end of file
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.neon");
import("system.vars");
var statusEnded = $KeywordRegistry.taskStatus$ended();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusEnded,
value: KeywordUtils.getViewValue($KeywordRegistry.taskStatus(), statusEnded)
}]
};
if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER)
{
var statusEnded = $KeywordRegistry.taskStatus$ended();
var filter = {
type: "group",
operator: "AND",
childs: [{
type: "row",
name: "STATUS",
operator: "NOT_EQUAL",
contenttype: "TEXT",
key: statusEnded,
value: KeywordUtils.getViewValue($KeywordRegistry.taskStatus(), statusEnded)
}]
};
result.string(JSON.stringify(filter));
\ No newline at end of file
result.string(JSON.stringify(filter));
}
\ No newline at end of file
import("system.neon");
import("system.vars");
import("system.result");
import("system.translate");
var filterOnlyUnfinished = {
type : "group",
operator : "AND",
childs : [{
type : "row",
name : "ISFINISHED",
operator : "EQUAL",
value : translate.text("No"),
key : "false",
contenttype : "BOOLEAN"
}]
};
if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER)
{
var filterOnlyUnfinished = {
type : "group",
operator : "AND",
childs : [{
type : "row",
name : "ISFINISHED",
operator : "EQUAL",
value : translate.text("No"),
key : "false",
contenttype : "BOOLEAN"
}]
};
result.string(JSON.stringify(filterOnlyUnfinished));
\ No newline at end of file
result.string(JSON.stringify(filterOnlyUnfinished));
}
\ No newline at end of file
......@@ -897,7 +897,14 @@ _DuplicateScannerUtils._filterToScanPattern = function(filterString) {
if (filterString == null || filterString.trim() == "")
return "";
let filter = JSON.parse(filterString);
try
{
var filter = JSON.parse(filterString);
}
catch (err)
{
return "";
}
return _DuplicateScannerUtils._filterChildsToScanPattern(filter.filter.childs, filter.filter.operator);
}
......
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