Viva-con-Agua / pool-backend

User service for handling user and crew relations
0 stars 0 forks source link

Add Event-Date to Notification-Mails #205

Open FriedhelmW opened 1 month ago

FriedhelmW commented 1 month ago

Add Start and End Date of the Event to the Mail-Notfications, to clarify which Event the Mail is about in case of multiple similare Events.

Notification-Templates to add Date (Headoffice):

FriedhelmW commented 1 month ago

@TobiKaestle, der Wunsch kam über Mattermost rein. Wenn du dazu kommst gerne einmal kurz schreiben, wo man das im einbaut und zu ToDo schieben, wenn das von der Community gemacht werden kann.

ebroda commented 1 month ago

Anfrage war hier: https://mattermost.vivaconagua.org/austausch/pl/8n18hjhtwfb57g97byo7n6ptje

TobiKaestle commented 1 month ago

Ich glaub man kann das einfach in das Mailtemplate reinnehmen. Das müsste dann so sein:

{{.Content.Fields.Event.start_at.Format "02 Jan 2006 15:04:05"}} bzw {{.Content.Fields.Event.end_at.Format "02 Jan 2006 15:04:05"}}

Ob das so funktioniert und die genaue Bezeichnung müsste aber mal getestet werden

FriedhelmW commented 1 month ago

Hab es gerade einmal auf dev getestet und es klappt leider nicht. Es kommen keine Mails mehr an, wenn ich das einfüge.

Es müsste aber am .Format liegen. Wenn das Format weglasse Funktioniert es, dass ich in der Mail das Datum als Unix bekomme.

TobiKaestle commented 1 month ago

Es muss folgende Lib installiert werden und anschließend die templates angepasst werden

https://canarychecker.io/scripting/gotemplate