moved and updated e-mail msg templates

This commit is contained in:
Daniel Schick 2024-12-16 08:31:38 +01:00
parent 02947ce6e5
commit 3e2b9f649c
5 changed files with 56 additions and 19 deletions

View File

@ -48,13 +48,6 @@ class PierSide(IntEnum):
PORTSIDE = 0 # Port/Backbord PORTSIDE = 0 # Port/Backbord
STARBOARD_SIDE = 1 # Starboard / Steuerbord STARBOARD_SIDE = 1 # Starboard / Steuerbord
class NotificationType(IntFlag):
"""determines the method by which a notification is distributed to users. Flagging allows selecting multiple notification types."""
UNDEFINED = 0
EMAIL = 1
POPUP = 2
MESSENGER = 4
class ParticipantFlag(IntFlag): class ParticipantFlag(IntFlag):
""" """
| 1 | If this flag is set on a shipcall record with participant type Agency (8), | 1 | If this flag is set on a shipcall record with participant type Agency (8),

View File

@ -0,0 +1,37 @@
[
{
"type" : 1,
"color" : "#0867ec",
"name" : "assignment",
"link" : "https://www.bremen-calling.de/",
"msg_text" : "Nominierung"
},
{
"type" : 2,
"color" : "#ea5c00",
"name" : "next24h",
"link" : "https://www.bremen-calling.de/",
"msg_text" : "Morgenrunde relevant"
},
{
"type" : 3,
"color" : "#f34336",
"name" : "time_conflict",
"link" : "https://www.bremen-calling.de/",
"msg_text" : "Zeitlicher Konflikt"
},
{
"type" : 4,
"color" : "#28b532",
"name" : "time_conflict_resolved",
"link" : "https://www.bremen-calling.de/",
"msg_text" : "Zeitlicher Konflikt gelöst"
},
{
"type" : 5,
"color" : "#f8f8f8",
"name" : "unassigned",
"link" : "https://www.bremen-calling.de/",
"msg_text" : "Nominierung abgewählt"
}
]

View File

@ -5,7 +5,9 @@
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;"> <table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
<tbody> <tbody>
<tr> <tr>
<td style="font-family: Helvetica, sans-serif; font-size: 16px; vertical-align: top; border-radius: 4px; text-align: center; background-color: #0867ec;" valign="top" align="center" bgcolor="#0867ec"> <a href="https://www.bremen-calling.de" target="_blank" style="border: solid 2px #0867ec; border-radius: 4px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 16px; font-weight: bold; margin: 0; padding: 12px 24px; text-decoration: none; text-transform: capitalize; background-color: #0867ec; border-color: #0867ec; color: #ffffff;">Call To Action</a> </td> <td style="font-family: Helvetica, sans-serif; font-size: 16px; vertical-align: top; border-radius: 4px; text-align: center; background-color: [[color]];" valign="top" align="center" bgcolor="[[color]]">
<a href="[[link]]" target="_blank" style="border: solid 2px [[color]]; border-radius: 4px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 16px; font-weight: bold; margin: 0; padding: 12px 24px; text-decoration: none; text-transform: capitalize; background-color: #0867ec; border-color: [[color]]; color: #ffffff;">[[text]]</a>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -104,7 +104,11 @@
<p style="font-family: Helvetica, sans-serif; font-size: 16px; font-weight: normal; margin: 0; margin-bottom: 16px;">Hallo,</p> <p style="font-family: Helvetica, sans-serif; font-size: 16px; font-weight: normal; margin: 0; margin-bottom: 16px;">Hallo,</p>
<p style="font-family: Helvetica, sans-serif; font-size: 16px; font-weight: normal; margin: 0; margin-bottom: 16px;">Sie erhalten eine oder mehrere Benachrichtigungen von Bremen calling:</p> <p style="font-family: Helvetica, sans-serif; font-size: 16px; font-weight: normal; margin: 0; margin-bottom: 16px;">Sie erhalten eine oder mehrere Benachrichtigungen von Bremen calling:</p>
<!--[[NOTIFICATION_ELEMENTS]]--> <!-- notifications begin -->
[[NOTIFICATION_ELEMENTS]]
<!-- notifications end -->
<p style="font-family: Helvetica, sans-serif; font-size: 16px; font-weight: normal; margin: 0; margin-bottom: 16px;">Wenn Sie diese E-Mails nicht länger erhalten wollen, loggen Sie sich bitte in der Bremen Calling App ein. Im Bereich "Passwort ändern" <p style="font-family: Helvetica, sans-serif; font-size: 16px; font-weight: normal; margin: 0; margin-bottom: 16px;">Wenn Sie diese E-Mails nicht länger erhalten wollen, loggen Sie sich bitte in der Bremen Calling App ein. Im Bereich "Passwort ändern"
können Sie auch die Benachrichtungen anpassen. können Sie auch die Benachrichtungen anpassen.

View File

@ -71,10 +71,11 @@ class NotificationType(IntEnum):
It can be understood as an event type It can be understood as an event type
""" """
assignment = 0 assignment = 1
next24h = 1 next24h = 2
time_conflict = 2 time_conflict = 3
time_conflict_resolved = 3 time_conflict_resolved = 4
unassigned = 5
@classmethod @classmethod
def _missing_(cls, value): def _missing_(cls, value):