From 75805b66cf14b6cf1bd0c7482ab618a92b49dba1 Mon Sep 17 00:00:00 2001 From: "a.schindlbeck" <a.schindlbeck@adito.de> Date: Thu, 18 Jul 2019 14:19:44 +0200 Subject: [PATCH] Notification Dashlet --- .../entityfields/end/valueProcess.js | 28 ++-- .../children/accept/onActionProcess.js | 44 +++--- .../_____LANGUAGE_de/_____LANGUAGE_de.aod | 25 ---- .../NotificationFilter_view.aod | 138 +++++++++--------- 4 files changed, 105 insertions(+), 130 deletions(-) diff --git a/entity/Appointment_entity/entityfields/end/valueProcess.js b/entity/Appointment_entity/entityfields/end/valueProcess.js index 3ed796fe837..1276bc19ec2 100644 --- a/entity/Appointment_entity/entityfields/end/valueProcess.js +++ b/entity/Appointment_entity/entityfields/end/valueProcess.js @@ -1,15 +1,15 @@ -import("system.neon"); -import("system.vars"); -import("system.calendars"); -import("system.result"); - -/** - * Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate - */ -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param")) -{ - var event = JSON.parse(vars.getString("$param.Entry_param")); - - if(event[calendars.DTEND]) - result.string(event[calendars.DTEND]); +import("system.neon"); +import("system.vars"); +import("system.calendars"); +import("system.result"); + +/** + * Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate + */ +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param")) +{ + var event = JSON.parse(vars.getString("$param.Entry_param")); + + if(event[calendars.DTEND]) + result.string(event[calendars.DTEND]); } \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/onActionProcess.js b/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/onActionProcess.js index dfd62b94a11..d8b40a8d06c 100644 --- a/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/onActionProcess.js +++ b/entity/Appointment_entity/entityfields/partstatactiongroup/children/accept/onActionProcess.js @@ -1,22 +1,22 @@ -import("system.calendars"); -import("system.vars"); -import("system.text"); -import("system.neon"); -import("Appointment_lib"); - -var currentUserEncodedString = calendars.getCalendarUser(vars.getString("$sys.user")); -var currentUserDecodedArray = text.decodeMS(currentUserEncodedString); -var currentUserUri = currentUserDecodedArray[0]; - -var newState = "ACCEPTED"; - -if(calendars.getBackendType() == calendars.BACKEND_EXCHANGEWS) -{ - AppointmentUtils.sendExchangedAction(vars.getString("$param.Entry_param"), newState); -} -else -{ - var currentAttendees = vars.get("$field.ATTENDEES"); - var updatedAttendees = AppointmentUtils.setPartStat(currentUserUri, currentAttendees, newState); - neon.setFieldValue("$field.ATTENDEES", updatedAttendees); -} +import("system.calendars"); +import("system.vars"); +import("system.text"); +import("system.neon"); +import("Appointment_lib"); + +var currentUserEncodedString = calendars.getCalendarUser(vars.getString("$sys.user")); +var currentUserDecodedArray = text.decodeMS(currentUserEncodedString); +var currentUserUri = currentUserDecodedArray[0]; + +var newState = "ACCEPTED"; + +if(calendars.getBackendType() == calendars.BACKEND_EXCHANGEWS) +{ + AppointmentUtils.sendExchangedAction(vars.getString("$param.Entry_param"), newState); +} +else +{ + var currentAttendees = vars.get("$field.ATTENDEES"); + var updatedAttendees = AppointmentUtils.setPartStat(currentUserUri, currentAttendees, newState); + neon.setFieldValue("$field.ATTENDEES", updatedAttendees); +} diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index d7a7cb3f651..ed9b16adbd4 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -70,14 +70,6 @@ <key>Update campaign step</key> <value>Aktualisieren des Kampagnenschrittes</value> </entry> - <entry> - <key>Categorization</key> - <value>Einordnung</value> - </entry> - <entry> - <key>Milestones Phase</key> - <value>Meilensteine Phase</value> - </entry> <entry> <key>Names</key> <value>Namen</value> @@ -114,10 +106,6 @@ <key>consent</key> <value>Zustimmung</value> </entry> - <entry> - <key>Phase progression</key> - <value>Phasenverlauf</value> - </entry> <entry> <key>Information Report</key> <value>Informationsbericht</value> @@ -3361,10 +3349,6 @@ <key>Virgin Islands (U.S.)</key> <value>Jungferninseln (US)</value> </entry> - <entry> - <key>Occurrence</key> - <value>Ereignis</value> - </entry> <entry> <key>New Zealand</key> <value>Neuseeland</value> @@ -3457,10 +3441,6 @@ <key>Dominican Republic</key> <value>Dominikanische Republik</value> </entry> - <entry> - <key>Milestones Status</key> - <value>Meilensteine Status</value> - </entry> <entry> <key>MAL</key> </entry> @@ -3938,10 +3918,6 @@ <key>Partner</key> <value>Partner</value> </entry> - <entry> - <key>Occurrences</key> - <value>Ereignisse</value> - </entry> <entry> <key>Protected</key> <value>Geschützt</value> @@ -5002,7 +4978,6 @@ </entry> <entry> <key>Salutations</key> - <value>Anreden</value> </entry> <entry> <key>Paymentterm</key> diff --git a/neonView/NotificationFilter_view/NotificationFilter_view.aod b/neonView/NotificationFilter_view/NotificationFilter_view.aod index fa132dfd7ff..25d7ebf1bd5 100644 --- a/neonView/NotificationFilter_view/NotificationFilter_view.aod +++ b/neonView/NotificationFilter_view/NotificationFilter_view.aod @@ -1,69 +1,69 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>NotificationFilter_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="true" /> - <dashletConfigurations> - <neonDashletConfiguration> - <name>neonDashletConfiguration</name> - <title>Notifications</title> - <fragment>Notification/filter?search=W3sibmFtZSI6IlNUQVRFIiwib3BlcmF0b3IiOiJFUVVBTCIsInZhbHVlIjoiVU5TRUVOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiwiY29udGVudFR5cGUiOiJURVhUIn0seyJuYW1lIjoiU1RBVEUiLCJvcGVyYXRvciI6IkVRVUFMIiwidmFsdWUiOiJTRUVOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiLCJjb250ZW50VHlwZSI6IlRFWFQifV0%253D</fragment> - <singleton v="true" /> - <storeRoles /> - <icon>VAADIN:BELL</icon> - <categories> - <neonDashletCategory> - <name>Notifications</name> - <title>Notifications</title> - </neonDashletCategory> - </categories> - </neonDashletConfiguration> - </dashletConfigurations> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <tableViewTemplate> - <name>Table</name> - <favoriteActionGroup1>setNotificationState</favoriteActionGroup1> - <inlineEdit v="true" /> - <entryAction>rowClickAction</entryAction> - <iconField>ICON</iconField> - <titleField>CAPTION</titleField> - <subtitleField>RESOLVEDPRIORITY</subtitleField> - <descriptionField>DESCRIPTION</descriptionField> - <entityField>#ENTITY</entityField> - <isEditable v="false" /> - <showHeader v="true" /> - <isSaveable v="false" /> - <columns> - <neonTableColumn> - <name>1cff3be1-523d-4a5a-b7d1-389d7cbb726f</name> - <entityField>ICON</entityField> - </neonTableColumn> - <neonTableColumn> - <name>ebf8b6d5-1057-425d-a57b-d02e25dbd2a4</name> - <entityField>TYPECODE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>0ed20b46-be6a-424c-a583-a3f7496ec3f9</name> - <entityField>CREATIONDATE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>3bf425ed-227c-4768-b339-4794aa0d6063</name> - <entityField>CAPTION</entityField> - </neonTableColumn> - <neonTableColumn> - <name>ff33a6c1-7ac6-4acd-a083-e56a36f89977</name> - <entityField>DESCRIPTION</entityField> - </neonTableColumn> - <neonTableColumn> - <name>5cb09de4-4413-41e5-8a7c-4970a3cf6a62</name> - <entityField>STATE</entityField> - </neonTableColumn> - </columns> - </tableViewTemplate> - </children> -</neonView> +<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>NotificationFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <dashletConfigurations> + <neonDashletConfiguration> + <name>neonDashletConfiguration</name> + <title>Notifications</title> + <fragment>Notification/filter?search=eyJ0eXBlIjoiZ3JvdXAiLCJvcGVyYXRvciI6Ik9SIiwiY2hpbGRzIjpbeyJ0eXBlIjoicm93IiwibmFtZSI6IlNUQVRFIiwib3BlcmF0b3IiOiJFUVVBTCIsInZhbHVlIjoiVU5TRUVOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiwia2V5IjoiIiwiY29udGVudHR5cGUiOiJURVhUIn0seyJ0eXBlIjoicm93IiwibmFtZSI6IlNUQVRFIiwib3BlcmF0b3IiOiJFUVVBTCIsInZhbHVlIjoiU0VFTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiwia2V5IjoiIiwiY29udGVudHR5cGUiOiJURVhUIn1dfQ%253D%253D</fragment> + <singleton v="true" /> + <storeRoles /> + <icon>VAADIN:BELL</icon> + <categories> + <neonDashletCategory> + <name>Notifications</name> + <title>Notifications</title> + </neonDashletCategory> + </categories> + </neonDashletConfiguration> + </dashletConfigurations> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>Table</name> + <favoriteActionGroup1>setNotificationState</favoriteActionGroup1> + <inlineEdit v="true" /> + <entryAction>rowClickAction</entryAction> + <iconField>ICON</iconField> + <titleField>CAPTION</titleField> + <subtitleField>RESOLVEDPRIORITY</subtitleField> + <descriptionField>DESCRIPTION</descriptionField> + <entityField>#ENTITY</entityField> + <isEditable v="false" /> + <showHeader v="true" /> + <isSaveable v="false" /> + <columns> + <neonTableColumn> + <name>1cff3be1-523d-4a5a-b7d1-389d7cbb726f</name> + <entityField>ICON</entityField> + </neonTableColumn> + <neonTableColumn> + <name>ebf8b6d5-1057-425d-a57b-d02e25dbd2a4</name> + <entityField>TYPECODE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>0ed20b46-be6a-424c-a583-a3f7496ec3f9</name> + <entityField>CREATIONDATE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>3bf425ed-227c-4768-b339-4794aa0d6063</name> + <entityField>CAPTION</entityField> + </neonTableColumn> + <neonTableColumn> + <name>ff33a6c1-7ac6-4acd-a083-e56a36f89977</name> + <entityField>DESCRIPTION</entityField> + </neonTableColumn> + <neonTableColumn> + <name>5cb09de4-4413-41e5-8a7c-4970a3cf6a62</name> + <entityField>STATE</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> -- GitLab