diff --git a/entity/Notification_entity/Notification_entity.aod b/entity/Notification_entity/Notification_entity.aod index c6d31ac7fdd70706d675966e937757d9e2957097..6a17ff596ef4d47e3c5c791cd8b8c722ef41ded6 100644 --- a/entity/Notification_entity/Notification_entity.aod +++ b/entity/Notification_entity/Notification_entity.aod @@ -120,9 +120,6 @@ <tooltip></tooltip> <tooltipProcess>%aditoprj%/entity/Notification_entity/entityfields/setnotificationstate/children/setnew/tooltipProcess.js</tooltipProcess> </entityActionField> - <entityActionField> - <name>getNotification</name> - </entityActionField> </children> </entityActionGroup> <entityField> diff --git a/entity/Notification_entity/entityfields/setnotificationstate/children/archive/onActionProcess.js b/entity/Notification_entity/entityfields/setnotificationstate/children/archive/onActionProcess.js index d90098a01f6be9f474f4608d3fcd62454ce20c2f..a11db05fbf8b23cf18b4826418d8318a040260ba 100644 --- a/entity/Notification_entity/entityfields/setnotificationstate/children/archive/onActionProcess.js +++ b/entity/Notification_entity/entityfields/setnotificationstate/children/archive/onActionProcess.js @@ -9,4 +9,4 @@ var selectedNotifications = vars.get("$sys.selection"); for(var i = 0; i < selectedNotifications.length; i++) notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_ARCHIVE); -neon.refresh(); \ No newline at end of file +neon.refreshAll(); \ No newline at end of file diff --git a/entity/Notification_entity/entityfields/setnotificationstate/children/setnew/onActionProcess.js b/entity/Notification_entity/entityfields/setnotificationstate/children/setnew/onActionProcess.js index 9769ec5519b73d33625204f7d7c935bc64a233a1..3010398e4cb612bcd1a8300a878eecb52fad86db 100644 --- a/entity/Notification_entity/entityfields/setnotificationstate/children/setnew/onActionProcess.js +++ b/entity/Notification_entity/entityfields/setnotificationstate/children/setnew/onActionProcess.js @@ -9,4 +9,4 @@ var selectedNotifications = vars.get("$sys.selection"); for(var i = 0; i < selectedNotifications.length; i++) notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_UNSEEN); -neon.refresh(); \ No newline at end of file +neon.refreshAll(); \ No newline at end of file diff --git a/entity/Notification_entity/entityfields/setnotificationstate/children/setread/onActionProcess.js b/entity/Notification_entity/entityfields/setnotificationstate/children/setread/onActionProcess.js index b852c1b08913071a50ffe07144d41b38bb75d0d7..f28870eaa227a906700250efe1924529d0e49417 100644 --- a/entity/Notification_entity/entityfields/setnotificationstate/children/setread/onActionProcess.js +++ b/entity/Notification_entity/entityfields/setnotificationstate/children/setread/onActionProcess.js @@ -8,14 +8,18 @@ import("KeywordRegistry_basic"); var user = tools.getCurrentUser(); var selectedNotifications = vars.get("$sys.selection"); -if (selectedNotifications.length == 0){ +if (selectedNotifications.length == 0) +{ + let userid = tools.getCurrentUser()["name"]; + selectedNotifications = newSelect("ASYS_NOTIFICATIONS.ID") .from("ASYS_NOTIFICATIONS") .where("ASYS_NOTIFICATIONS.STATE", [notification.STATE_SEEN.toString(), notification.STATE_UNSEEN.toString()], SqlBuilder.IN()) + .and("ASYS_NOTIFICATIONS.USERID", userid, SqlBuilder.EQUAL()) .arrayColumn(); } for(var i = 0; i < selectedNotifications.length; i++) notification.updateUserNotificationState(user["name"], selectedNotifications[i], notification.STATE_CONFIRMED); -//neon.refreshAll(); \ No newline at end of file +neon.refreshAll(); \ No newline at end of file diff --git a/entity/Notification_entity/recordcontainers/db/orderClauseProcess.js b/entity/Notification_entity/recordcontainers/db/orderClauseProcess.js index 86103719abde99edd46ff3be4155f6acc4e3219a..72450da3054601b74ab35a77ebb66ce6172a35e0 100644 --- a/entity/Notification_entity/recordcontainers/db/orderClauseProcess.js +++ b/entity/Notification_entity/recordcontainers/db/orderClauseProcess.js @@ -2,6 +2,6 @@ import("system.result"); import("system.db"); result.object({ - "ASYS_NOTIFICATIONS.STATE": db.DESCENDING, - "ASYS_NOTIFICATIONCONTENTS.CREATEDATE": db.DESCENDING + "ASYS_NOTIFICATIONCONTENTS.CREATEDATE": db.DESCENDING, + "ASYS_NOTIFICATIONS.STATE": db.DESCENDING }); \ No newline at end of file