Fix #630 -- manual check-in of attendees (#642)

* [WIP] manual check-in of attendees

This enables manual check-in of attendees.  The post-code was heavily
copied from the APIRedeemView of the pretixdroid, thus so far this seems
to be working, but I have a few questions:

The checkin-Objects generated by the pretixdroid-app have a nonce.
Should the checkin object generated here have a nonce, too?

Should the result of the check-in be noted in any other way than by the
change of the status?

* addressed review comments

* implement unit test for manual checkin

* fix style-issues

* Slight layout change

* Log who did the manual check-in

* Improve unit test to check the result of the action
This commit is contained in:
Jakob Schnell
2017-10-28 23:16:22 +02:00
committed by Raphael Michel
parent 9213a40219
commit 1a894d71b8
4 changed files with 74 additions and 3 deletions

View File

@@ -52,6 +52,7 @@
<table class="table table-condensed table-hover">
<thead>
<tr>
<th />
<th>{% trans "Order code" %} <a href="?{% url_replace request 'ordering' '-code'%}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'code'%}"><i class="fa fa-caret-up"></i></a></th>
<th>{% trans "Item" %} <a href="?{% url_replace request 'ordering' '-item'%}"><i class="fa fa-caret-down"></i></a>
@@ -74,6 +75,11 @@
{% for e in entries %}
{% with e.checkins.first as checkin %}
<tr>
<td>
<input type="checkbox" name="checkin"
id="id_checkin" class=""
value="{{e.pk}}"/>
</td>
<td>
<strong><a href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=e.order.code %}">{{ e.order.code }}</a></strong>
</td>
@@ -107,6 +113,10 @@
</tbody>
</table>
</div>
<button type="submit" class="btn btn-primary btn-save">
{% trans "Check-In selected attendees" %}
</button>
</form>
{% include "pretixcontrol/pagination.html" %}
{% endif %}
{% endblock %}