Projet

Général

Profil

Development #45293

système natif de rappel de réservation

Ajouté par Frédéric Péters il y a plus de 3 ans. Mis à jour il y a plus de 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
20 juillet 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

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

Révision 271cea7b (diff)
Ajouté par Valentin Deniaud il y a plus de 3 ans

agendas: add new attributes to Booking (#45293)

Révision ab32481a (diff)
Ajouté par Valentin Deniaud il y a plus de 3 ans

agendas: add booking reminders (#45293)

Révision 7cfa0fc3 (diff)
Ajouté par Valentin Deniaud il y a plus de 3 ans

manager: preview booking reminders (#45293)

Historique

#1

Mis à jour par Valentin Deniaud il y a plus de 3 ans

  • Assigné à mis à Valentin Deniaud
#3

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 %}

#4

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.

#5

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)
#6

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

Formats disponibles : Atom PDF