unify checkin messaging
This commit is contained in:
parent
f70e94955d
commit
af3d9381ad
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.0.4 on 2022-05-17 15:01
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("app", "0009_helper_asta_confirmed"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="room",
|
||||
name="meeting_location",
|
||||
field=models.TextField(default="Infopoint"),
|
||||
),
|
||||
]
|
|
@ -13,6 +13,7 @@ global_preferences = global_preferences_registry.manager()
|
|||
class Room(models.Model):
|
||||
name = models.CharField(max_length=200, primary_key=True)
|
||||
required_helpers = models.IntegerField()
|
||||
meeting_location = models.TextField(default="Infopoint")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -135,7 +136,8 @@ class ShiftRegistration(models.Model):
|
|||
)
|
||||
|
||||
def send_reminder(self):
|
||||
text = f"Deine kontakt-Schicht beginnt um {self.shift.start_at.strftime('%H:%M')}, bitte komm eine halbe Stunde vorher an den Infopoint."
|
||||
url = reverse("shift", kwargs={"shiftid": self.shift.pk})
|
||||
text = f"Deine kontakt-Schicht beginnt um {self.shift.start_at.strftime('%H:%M')}, bitte komm 15 Minuten vorher an den Treffpunkt. https://kontakt.rocks{url}"
|
||||
msg = Message(to=self.helper, text=text)
|
||||
msg.save()
|
||||
self.reminder_sent = True
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% block content %}
|
||||
<div class="box">
|
||||
{% if is_registered %}
|
||||
<div class="notification is-info">Du bist zu dieser Schicht angemeldet</div>
|
||||
<div class="notification is-info">Du bist zu dieser Schicht angemeldet. Bitte komme 15 Minuten vor deiner Schicht am Treffpunkt.</div>
|
||||
{% endif %}
|
||||
{% if shift.deleted %}
|
||||
<div class="notification">Diese Schicht wurde gelöscht.</div>
|
||||
|
@ -17,6 +17,7 @@
|
|||
<strong>Ort:</strong> {{ shift.room.name }}<br>
|
||||
<strong>Beginn:</strong> {{ shift.start_at }}<br>
|
||||
<strong>Dauer:</strong> {{ shift.duration }}<br>
|
||||
<strong>Treffpunkt:</strong> {{ shift.room.meeting_location }}<br>
|
||||
<em>{{ shift.description|linebreaksbr }}</em>
|
||||
</div>
|
||||
{% if can_register and not shift.deleted %}
|
||||
|
|
|
@ -216,7 +216,7 @@ def shift(request, shiftid):
|
|||
messages.add_message(
|
||||
request,
|
||||
messages.SUCCESS,
|
||||
"Erfolgreich angemeldet, bitte komme eine halbe Stunde vor deiner Schicht an den Infopoint",
|
||||
"Erfolgreich angemeldet, bitte komme 15 Minuten vor deiner Schicht am Treffpunkt",
|
||||
)
|
||||
# redirect so page can be reloaded without resending post data
|
||||
return redirect("shift", shiftid=shift.pk)
|
||||
|
|
Loading…
Reference in New Issue