Development #45293
système natif de rappel de réservation
0%
Description
Aujourd'hui on peut se trouver à ajouter dans des workflows des actions pour assurer un email ou un SMS genre la veille et je me dis qu'on pourrait laisser les workflows tranquilles et avoir cette gestion nativement dans chrono, où par agenda on pourrait définir l'envoi automatique de rappels.
Fichiers
Révisions associées
agendas: add booking reminders (#45293)
manager: preview booking reminders (#45293)
Historique
Mis à jour par Valentin Deniaud il y a plus de 3 ans
- Fichier 0002-agendas-add-booking-reminder-mechanisms-45293.patch 0002-agendas-add-booking-reminder-mechanisms-45293.patch ajouté
- Fichier 0001-agendas-add-new-attributes-to-Booking-45293.patch 0001-agendas-add-new-attributes-to-Booking-45293.patch ajouté
- Fichier 0003-manager-preview-booking-reminders-45293.patch 0003-manager-preview-booking-reminders-45293.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Statut changé de Solution proposée à Solution validée
+ ctx = { + 'event': booking.event, + 'meeting': booking.user_display_label, + 'form_url': booking.form_url, + 'in_x_days': _('tomorrow') if days == 1 else _('in %s days') % days, + 'time': booking.event.start_datetime.strftime('%H:%M'), + 'date': booking.event.start_datetime.date().strftime('%A %d %B'), + 'date_short': booking.event.start_datetime.date().strftime('%d/%m'), + 'email_extra_info': agenda.reminder_settings.email_extra_info, + 'sms_extra_info': agenda.reminder_settings.sms_extra_info, + }
Je trouve qu'on charge le contexte avec pas mal de choses dont on devrait laisser le calcul au gabarit (réaction suscitée par les time et date et date_short, qui peut ensuite s'étendre pour dire qu'on pourrait au final juste y avoir booking (il y a peut-être un juste milieu, avoir booking & agenda & event_datetime & *_extra_info, par exemple).
Je serais aussi pour ne pas inclure les champs Notify by SMS & Additional text to incude in SMS quand il n'y a pas de prise en charge de SMS, plutôt qu'offrir la surprise d'une erreur "SMS are unavailable on this instance.".
Pour la prévisualisation je la préférerais dans une popup, genre :
+++ b/chrono/manager/templates/chrono/manager_agenda_reminder_preview.html @@ -11,6 +11,8 @@ {% endblock %} {% block content %} +<div id="message-preview"> {% if subject %} <p>{% trans "Users will receive the following email:" %}</p> <p class="email-subject"><strong>{% trans "Subject:" %}</strong> {{ subject }}</p> @@ -18,5 +20,9 @@ <p>{% trans "Users will receive the following SMS:" %}</p> {% endif %} <p>{{ message }}</p> + +<div class="buttons"> <a class="button" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Return to settings' %}</a> +</div> +</div> {% endblock %} ... +++ b/chrono/manager/templates/chrono/manager_agenda_settings.html @@ -47,7 +47,7 @@ </p> <p> {% if agenda.reminder_settings.send_email %} -<a href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='email' %}">{% trans "Preview email" %}</a> +<a rel="popup" data-selector="#message-preview" href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='email' %}">{% trans "Preview email" %}</a> {% endif %}
Mis à jour par Valentin Deniaud il y a plus de 3 ans
Frédéric Péters a écrit :
Pour la prévisualisation je la préférerais dans une popup, genre :
Cool, je connaissais pas data-selector.
J'ai appliqué tout ça, c'est vert, je pousse.
Mis à jour par Valentin Deniaud il y a plus de 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 7cfa0fc3f1b0bd7c14bba76ecc1d70ef5befca4b Author: Valentin Deniaud <vdeniaud@entrouvert.com> Date: Tue Sep 15 14:06:35 2020 +0200 manager: preview booking reminders (#45293) commit ab32481a6b9b76bc19a71f4b551b1b66dc67024b Author: Valentin Deniaud <vdeniaud@entrouvert.com> Date: Tue Sep 15 14:05:38 2020 +0200 agendas: add booking reminders (#45293) commit 271cea7b4419cd3630dbc7d329380e0c98893aa6 Author: Valentin Deniaud <vdeniaud@entrouvert.com> Date: Wed Sep 9 17:52:03 2020 +0200 agendas: add new attributes to Booking (#45293)
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
agendas: add new attributes to Booking (#45293)