changed e-mail formatting to direct url at actual notified shipcall
This commit is contained in:
parent
2a1570d9f5
commit
6d8b86280c
@ -3,49 +3,42 @@
|
|||||||
"type" : 1,
|
"type" : 1,
|
||||||
"color" : "#0867ec",
|
"color" : "#0867ec",
|
||||||
"name" : "assignment",
|
"name" : "assignment",
|
||||||
"link" : "https://www.bremen-calling.de/",
|
|
||||||
"msg_text" : "Nominierung"
|
"msg_text" : "Nominierung"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type" : 2,
|
"type" : 2,
|
||||||
"color" : "#ea5c00",
|
"color" : "#ea5c00",
|
||||||
"name" : "next24h",
|
"name" : "next24h",
|
||||||
"link" : "https://www.bremen-calling.de/",
|
|
||||||
"msg_text" : "Morgenrunde relevant"
|
"msg_text" : "Morgenrunde relevant"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type" : 3,
|
"type" : 3,
|
||||||
"color" : "#f34336",
|
"color" : "#f34336",
|
||||||
"name" : "time_conflict",
|
"name" : "time_conflict",
|
||||||
"link" : "https://www.bremen-calling.de/",
|
|
||||||
"msg_text" : "Zeitlicher Konflikt"
|
"msg_text" : "Zeitlicher Konflikt"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type" : 4,
|
"type" : 4,
|
||||||
"color" : "#28b532",
|
"color" : "#28b532",
|
||||||
"name" : "time_conflict_resolved",
|
"name" : "time_conflict_resolved",
|
||||||
"link" : "https://www.bremen-calling.de/",
|
|
||||||
"msg_text" : "Zeitlicher Konflikt gelöst"
|
"msg_text" : "Zeitlicher Konflikt gelöst"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type" : 5,
|
"type" : 5,
|
||||||
"color" : "#a8a8a8",
|
"color" : "#a8a8a8",
|
||||||
"name" : "unassigned",
|
"name" : "unassigned",
|
||||||
"link" : "https://www.bremen-calling.de/",
|
|
||||||
"msg_text" : "Nominierung abgewählt"
|
"msg_text" : "Nominierung abgewählt"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type" : 6,
|
"type" : 6,
|
||||||
"color" : "#a8a800",
|
"color" : "#a8a800",
|
||||||
"name" : "missing_data",
|
"name" : "missing_data",
|
||||||
"link" : "https://www.bremen-calling.de/",
|
|
||||||
"msg_text" : "Fehlende Daten"
|
"msg_text" : "Fehlende Daten"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type" : 7,
|
"type" : 7,
|
||||||
"color" : "#808070",
|
"color" : "#808070",
|
||||||
"name" : "cancelled",
|
"name" : "cancelled",
|
||||||
"link" : "https://www.bremen-calling.de/",
|
|
||||||
"msg_text" : "Storno"
|
"msg_text" : "Storno"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -135,7 +135,8 @@ def SendEmails(email_dict):
|
|||||||
with open(os.path.join(current_path,'../msg/notification_element.html'), mode="r", encoding="utf-8") as file:
|
with open(os.path.join(current_path,'../msg/notification_element.html'), mode="r", encoding="utf-8") as file:
|
||||||
element = file.read()
|
element = file.read()
|
||||||
element = element.replace("[[color]]", message_type["color"])
|
element = element.replace("[[color]]", message_type["color"])
|
||||||
element = element.replace("[[link]]", message_type["link"])
|
linktext = defs.email_credentials["url_template"] + str(notification.shipcall_id)
|
||||||
|
element = element.replace("[[link]]", linktext)
|
||||||
|
|
||||||
# We want to show the following information for each notification:
|
# We want to show the following information for each notification:
|
||||||
# Ship-name, Arr/Dep/Shift, ETA/ETD, berth
|
# Ship-name, Arr/Dep/Shift, ETA/ETD, berth
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user