|
2 | 2 |
|
3 | 3 | from app.api.helpers.db import save_to_db |
4 | 4 | from app.api.helpers.log import record_activity |
| 5 | +from app.api.helpers.files import make_frontend_url |
5 | 6 | from app.api.helpers.system_notifications import NOTIFS, get_event_exported_actions, get_event_imported_actions, \ |
6 | 7 | get_monthly_payment_notification_actions, get_monthly_payment_follow_up_notification_actions, \ |
7 | 8 | get_ticket_purchased_attendee_notification_actions, get_ticket_purchased_notification_actions, \ |
@@ -279,18 +280,25 @@ def send_notif_ticket_cancel(order): |
279 | 280 | ), |
280 | 281 | message=NOTIFS[TICKET_CANCELLED]['message'].format( |
281 | 282 | cancel_note=order.cancel_note, |
282 | | - event_name=order.event.name |
| 283 | + event_name=order.event.name, |
| 284 | + event_url=make_frontend_url('/e/{identifier}'.format(identifier=order.event.identifier)), |
| 285 | + order_url=make_frontend_url('/orders/{identifier}/view'.format(identifier=order.identifier)), |
| 286 | + invoice_id=order.invoice_number |
283 | 287 | ) |
284 | 288 | ) |
285 | 289 | for organizer in order.event.organizers: |
286 | 290 | send_notification( |
287 | 291 | user=organizer, |
288 | 292 | title=NOTIFS[TICKET_CANCELLED_ORGANIZER]['title'].format( |
289 | | - invoice_id=order.invoice_number |
| 293 | + invoice_id=order.invoice_number, |
| 294 | + event_name=order.event.name |
290 | 295 | ), |
291 | 296 | message=NOTIFS[TICKET_CANCELLED_ORGANIZER]['message'].format( |
292 | 297 | cancel_note=order.cancel_note, |
293 | | - invoice_id=order.invoice_number |
| 298 | + invoice_id=order.invoice_number, |
| 299 | + event_name=order.event.name, |
| 300 | + cancel_order_page=make_frontend_url('/events/{identifier}/tickets/orders/cancelled' |
| 301 | + .format(identifier=order.event.identifier)) |
294 | 302 | ) |
295 | 303 | ) |
296 | 304 |
|
|
0 commit comments