2
0
Fork 0

Compare commits

..

No commits in common. "e17645a8f34c0a4052ee5a582fdc8cbdba84ea5a" and "20309244f343d89d53dc2f91c5da39ea710d10b4" have entirely different histories.

4 changed files with 12 additions and 16 deletions

View File

@ -37,7 +37,7 @@ Diese Schichtzuteilung wurde maschinell erstellt und ist auch ohne Unterschrift
<tbody>
{% for assignment in assignments %}
{% with assignment.shift as shift %}
<tr{% if shift.registration_count == shift.required_helpers|default:shift.room.required_helpers or assignment.was_full %} class="has-text-grey" style="text-decoration: line-through;"{% endif %}>
<tr{% if shift.registration_count == shift.required_helpers|default:shift.room.required_helpers or assignment.was_full%} class="has-text-grey" style="text-decoration: line-through;"{% endif %}>
<td>{{ shift.start_at }}</td>
<td>{{ shift.duration|duration }}</td>
<td>{{ shift.room.name }} </td>

View File

@ -95,6 +95,8 @@ class Command(BaseCommand):
return
self.stderr.write()
all_messages = set(messages)
sent_messages = set()
error = None
@ -102,16 +104,16 @@ class Command(BaseCommand):
for message in send(all_messages):
sent_messages.add(message)
self.stderr.write()
self.stderr.write(
self.style.SUCCESS(
f"\r{str(len(sent_messages)).rjust(len(str(len(all_messages))))} / {len(all_messages)}"
),
ending="",
)
)
self.stderr.write()
except Exception as e:
error = e
self.stderr.write()
self.stderr.write(
self.style.WARNING(f"sent {len(sent_messages)} out of {len(all_messages)}")
)

View File

@ -28,9 +28,7 @@ class Receiver(BaseReceiver):
class Sender(BaseSender):
def send(self, messages):
for message in messages:
logger.info(
f"\nwould send sms\nto: {message.recipient}\n\n{message.text}\n"
)
logger.info(f"would send sms\nto: {message.recipient}\n\n{message.text}")
yield message

View File

@ -41,21 +41,17 @@
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% if shift.event.fallbackassignment_set.count > 0 %}
<h5 class="subtitle">Teammitglieder</h5>
<div class="columns is-multiline">
{% for fallback in shift.event.fallbackassignment_set.all %}
<div class="column is-one-quarter">
<div class="box{% if fallback.was_full %} has-text-grey" style="text-decoration: line-through;{% endif %}">
{{ fallback.team_member.name }}
<div class="box">
<div class="is-flex is-align-items-center is-justify-content-space-between mb-2">
Teammitglieder: {%for e in shift.event.fallbackassignment_set.all%}{% if not e.was_full %}{{e.team_member.name}}, {% endif %}{%endfor%}
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
<h5 class="subtitle">Helfer*in eintragen</h5>
<form action="" method="post">
{% csrf_token %}