Commit Graph

502 Commits

Author SHA1 Message Date
Max Metz
ed7d04b584 Merge branch 'feature/notifier' of github.com:puls200/brecal into feature/notifier 2024-07-31 18:59:07 +02:00
Max Metz
d8d75afc6b Created an HTML-based Email notification template, which is adaptive to error messages. It includes a logo file from the local repository (logo_bremen_calling.png). Refactoring methods and clearing old methods. Created a one-line function to connect to the Email server. Included the Notifier's sending method in the routine will be executed every 15 minutes and includes those shipcalls, which have been evaluated at least 10 minutes ago. Located the logo file and email template in a resources/ folder within the library. Manually overwriting the Emailaddress of all notification recipients, so the BSMD mail is used throughout testing. 2024-07-31 18:58:39 +02:00
Max Metz
b9df88b34a refactoring: provided a more understandable variant of the notifier. Will create a BPMN-diagram to depict the process soon. 2024-07-31 18:37:51 +02:00
Max Metz
267b53aa91 resolving conflicts between the PR (remote version of feature/notifier) and feature/notifier. 2024-07-31 17:05:08 +02:00
Max Metz
982420dd34 properly integrating validation rules 0005A and 0005B, which consider the amount of similar shipcall times (eta&etd) 2024-07-31 16:59:30 +02:00
Max Metz
be14e3ee1a including evaluation_times and evaluation_notifications_sent 2024-07-31 16:45:52 +02:00
Max Metz
2485a894a1 again, overwriting the previous email assignment. Unless the testing phase is completed, no mails shall be sent to users except for the test-mail of bsmd 2024-07-31 16:45:52 +02:00
Max Metz
e2c532bd64 instead of overwriting the recipient's addresses, the bsmd address will simply (always) be added to the list of recipients. 2024-07-31 16:45:52 +02:00
Max Metz
1f4dd21f3c manually overwritting the email address of all recipients of an Email notification with the proxy-mail 'bremencalling@bsmd.de'. This is useful to test the feature before enabling it to the live-system. 2024-07-31 16:45:52 +02:00
Max Metz
4848df4d7e the evaluation function (traffic-light validation) additionally performs the notification function to generate notifications. Integrated within the scheduler. 2024-07-31 16:45:52 +02:00
Max Metz
431608cd62 refactored the account-data of the Email-server, so it can be easily adapted later on. Decoupled into a novel file notifications/accounts.py with some simple unit tests. 2024-07-31 16:45:52 +02:00
Max Metz
9709b06196 creating only one notification per notification_type, even if multiple users request the same notification_type. 2024-07-31 16:45:52 +02:00
Max Metz
bc6d391094 relocating logo_bremen_calling.png and default_email_template to a novel folder in the library: resources. Adapted the dynamic path functions in the library. Created tests, which assert, when the files are missing. Relocating functions from stubs/email_template.py to the email_handling.py to avoid confusion. 2024-07-31 16:45:52 +02:00
Max Metz
9efabf6367 found the bremen_calling_logo.png file within the client's resources. Mapping towards that file when creating email notifications. This alleviates an additional dependency. 2024-07-31 16:45:52 +02:00
Max Metz
2ea37bde56 adding the Notifier to schedule routines with an execution routine of 15 minutes. Notifications must be at least 10 minutes old and still relevant to be sent. 2024-07-31 16:45:52 +02:00
Max Metz
4b7a098286 included the Notifier in the routine. Will be executed every 15 minutes for notifications, which are at least 10 minutes old. 2024-07-31 16:45:51 +02:00
Max Metz
8cd6afbb69 clearing older methods of the Notifier class. There is now a one-line function, which connects to the Email-server, populates candidates for notifications, creates those notifications one-by-one and sends them. Finally, the database is updated, so a notification is sent only once. 2024-07-31 16:45:51 +02:00
Max Metz
f344588f89 creating an HTML Email template for notifications, which includes a logo file (#TODO: store logo within BreCal git). Built out most of the Notifier. Provided suitable SQLQueries and updated the EmailHandler. 2024-07-31 16:45:51 +02:00
Max Metz
7c546f5ab7 building out and preparing the EmailHandler's adaptive content. Using HTML formatting. 2024-07-31 16:45:51 +02:00
Max Metz
84a93646d9 removed a comment. Notification types in the User's schema will remain booleans (email, whatsapp, signal, popup). Daniel clarified that some time ago. 2024-07-31 16:45:51 +02:00
Max Metz
ab0b69f337 Created Notifier object, which provides the logic to create notifications and issue them to the respective users, depending on the type of notification they have selected. Building the skeleton, where the methods will be filled functionally soon. Adapted the History-schema. 2024-07-31 16:45:51 +02:00
Max Metz
e10e9ef88b Added input validation for API requests. Refactored some methods, added docstrings. Solved marshmallow-warnings in BreCal.schemas.model. Added unit tests, now totaling 215. Added proposals to refactor all SQL queries into an object at BreCal.database.sql_queries.SQLQuery for better standardization. Created a helper-object to handle Emails, which prepares the notification-feature. 2024-07-31 16:45:51 +02:00
Max Metz
29b611c780 instead of overwriting the recipient's addresses, the bsmd address will simply (always) be added to the list of recipients. 2024-07-31 15:30:06 +02:00
Max Metz
0d13ffd626 manually overwritting the email address of all recipients of an Email notification with the proxy-mail 'bremencalling@bsmd.de'. This is useful to test the feature before enabling it to the live-system. 2024-07-31 15:18:47 +02:00
Max Metz
0de0baf1d4 the evaluation function (traffic-light validation) additionally performs the notification function to generate notifications. Integrated within the scheduler. 2024-07-31 14:13:41 +02:00
Max Metz
b078386520 refactored the account-data of the Email-server, so it can be easily adapted later on. Decoupled into a novel file notifications/accounts.py with some simple unit tests. 2024-07-31 12:30:37 +02:00
Max Metz
0de47e2627 creating only one notification per notification_type, even if multiple users request the same notification_type. 2024-07-31 12:05:48 +02:00
Max Metz
fae07bdadf relocating logo_bremen_calling.png and default_email_template to a novel folder in the library: resources. Adapted the dynamic path functions in the library. Created tests, which assert, when the files are missing. Relocating functions from stubs/email_template.py to the email_handling.py to avoid confusion. 2024-07-31 11:49:44 +02:00
Max Metz
19b4f34fee found the bremen_calling_logo.png file within the client's resources. Mapping towards that file when creating email notifications. This alleviates an additional dependency. 2024-07-31 09:04:35 +02:00
Max Metz
40393fd476 adding the Notifier to schedule routines with an execution routine of 15 minutes. Notifications must be at least 10 minutes old and still relevant to be sent. 2024-07-31 08:35:40 +02:00
Max Metz
3d1391ed45 included the Notifier in the routine. Will be executed every 15 minutes for notifications, which are at least 10 minutes old. 2024-07-31 08:28:44 +02:00
Max Metz
1bdfa8997f clearing older methods of the Notifier class. There is now a one-line function, which connects to the Email-server, populates candidates for notifications, creates those notifications one-by-one and sends them. Finally, the database is updated, so a notification is sent only once. 2024-07-30 17:43:17 +02:00
Max Metz
9cef84a5a8 creating an HTML Email template for notifications, which includes a logo file (#TODO: store logo within BreCal git). Built out most of the Notifier. Provided suitable SQLQueries and updated the EmailHandler. 2024-07-30 17:20:51 +02:00
Max Metz
cea615fe63 building out and preparing the EmailHandler's adaptive content. Using HTML formatting. 2024-07-30 11:41:46 +02:00
e33833235d Bugfix for comparer when times value is null and DateTime.Now is inconsistent 2024-07-25 10:41:22 +02:00
d4903b80d4 Updated postman collection 2024-07-25 08:14:36 +02:00
d7de35236c Version bump to 1.4 2024-07-22 10:40:08 +02:00
14569ad7bc Reset values button on times and times terminal dialog boxes to completely undo entries.
Also fixed bug where clear context menu was disabled and wouldn't disappear
2024-07-22 08:51:20 +02:00
9bf84f8baa remove required fields for Times and Times Terminal 2024-07-22 08:22:09 +02:00
31c54f9d8f ETD is always enabled if user is bsmd group (was typo? can't recall) 2024-07-22 07:06:41 +02:00
ad16ae4945 Bugfix: ATA/ATD values do not get changed when already displayed 2024-07-18 07:22:25 +02:00
1a5591cc39 even more small fixes 2024-07-14 15:12:49 +02:00
e30309bca2 fixed more small things and version bump to 1.3.0.3 2024-07-13 19:18:41 +02:00
64977d5819 Small-time fixes to things previously changed and version bump to 1.3.0.2 2024-07-12 16:29:32 +02:00
9d017524ef Added shifting sequence number, storage hidden in flags. This is a prototype. 2024-07-12 09:32:09 +02:00
24138fc1e9 Fixed an error regarding berth display in AGENT/TERMINAL and set to+from berth info for shifting shipcalls 2024-07-11 11:39:12 +02:00
ec0eb3cbfa Switched visibility and position of ETA/ETD in shipcall dialog depending on type 2024-07-11 08:08:33 +02:00
e03c8dc7df User-Filter Settings now on a per-user basis, saved as a dictionary in user space.
This is for the case of people using the same windows account but with several different BC users.
2024-07-10 10:35:40 +02:00
ac8b6ba491 Hide some controls depending on arrival/departure 2024-07-10 09:28:36 +02:00
e3000e1f16 Removed ETA from times dialog if shifting shipcall 2024-07-10 09:05:45 +02:00