Skip to content
Snippets Groups Projects
Commit 889dd2e1 authored by Tobias Feldmann's avatar Tobias Feldmann
Browse files

Initial filter for notifications (only new and unread)

parent 3bc089f1
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/Notification_entity/documentation.adoc</documentation>
<title>Notifications</title>
<initFilterProcess>%aditoprj%/entity/Notification_entity/initFilterProcess.js</initFilterProcess>
<iconId>VAADIN:BELL</iconId>
<titlePlural>Notifications</titlePlural>
<recordContainer>db</recordContainer>
......
import("system.logging");
import("system.neon");
import("system.vars");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("system.result");
if (vars.get("$sys.presentationmode") === neon.CONTEXT_PRESENTATIONMODE_FILTER)
{
var statusNew = $KeywordRegistry.notificationState$unseen();
var statusUnread = $KeywordRegistry.notificationState$seen();
var filter = {
type: "group",
operator: "OR",
childs: [{
type: "row",
name: "STATE",
operator: "EQUAL",
contenttype: "TEXT",
key: statusNew,
value: KeywordUtils.getViewValue($KeywordRegistry.notificationState(), statusNew)
},
{
type: "row",
name: "STATE",
operator: "EQUAL",
contenttype: "TEXT",
key: statusUnread,
value: KeywordUtils.getViewValue($KeywordRegistry.notificationState(), statusUnread)
}]
};
result.string(JSON.stringify(filter));
}
\ No newline at end of file
......@@ -292,4 +292,6 @@ $KeywordRegistry.visitRecommendationPrioSource$manual = function(){return "MANUA
$KeywordRegistry.workflowCategory = function(){return "WorkflowCategory";};
$KeywordRegistry.notificationState = function () { return "NotificationState";};
$KeywordRegistry.notificationState = function(){ return "NotificationState";};
$KeywordRegistry.notificationState$unseen = function(){return "UNSEEN";};
$KeywordRegistry.notificationState$seen = function(){return "SEEN";};
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