mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Basic checkin/out logic complete
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
{% load markdown_tags %}
|
||||
{% load button from filters %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row my-3 py-3">
|
||||
@@ -53,7 +54,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if not event.dry_hire %}
|
||||
{% if event.can_check_in %}
|
||||
<div class="col-sm-12">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Crew Record</div>
|
||||
@@ -66,10 +67,10 @@
|
||||
<th scope="col">Start Time</th>
|
||||
<th scope="col">Role</th>
|
||||
<th scope="col">End Time</th>
|
||||
<th></th>
|
||||
<th scope="col">{% if self.request.user.pk is form.event.mic.pk %}<a href="{% url 'event_checkin_override' event.pk %}" class="btn btn-sm btn-success"><span class="fas fa-plus"></span> Add</a>{% endif %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="crewmemberst">
|
||||
<tbody id="crewmembers">
|
||||
{% for crew in object.crew.all %}
|
||||
<tr>
|
||||
<td>{{crew.person}}</td>
|
||||
@@ -81,7 +82,7 @@
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center bg-warning">Apparently this event happened by magic...</td>
|
||||
<td colspan="6" class="text-center bg-warning">Apparently this event happened by magic...</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
@@ -3,14 +3,47 @@
|
||||
{% load static %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/selects.css' %}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/easymde.min.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/selects.js' %}"></script>
|
||||
<script src="{% static 'js/easymde.min.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/autocompleter.js' %}"></script>
|
||||
<script src="{% static 'js/interaction.js' %}"></script>
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-12">
|
||||
{% include 'form_errors.html' %}
|
||||
<form id="checkin" role="form" method="POST" action="{{ form.action|default:request.path }}">
|
||||
<input type="hidden" name="{{ form.event.name }}" id="{{ form.event.id_for_label }}"
|
||||
value="{{event.pk}}"/>
|
||||
{% if not request.is_ajax and self.request.user.pk is form.event.mic.pk %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.person.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.person.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="{{ form.person.id_for_label }}" name="{{ form.person.name }}" class="px-0 selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if person %}
|
||||
<option value="{{form.person.value}}" selected="selected" >{{ person.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<input type="hidden" name="{{ form.person.name }}" id="{{ form.person.id_for_label }}"
|
||||
value="{{request.user.pk}}"/>
|
||||
{% endif %}
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.time.id_for_label }}"
|
||||
@@ -44,7 +77,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if edit %}
|
||||
{% if edit or manual %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.end_time.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">End Time</label>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<a href="https://docs.google.com/forms/d/e/1FAIpQLSf-TBOuJZCTYc2L8DWdAaC3_Werq0ulsUs8-6G85I6pA9WVsg/viewform" class="btn btn-danger"><span class="fas fa-file-invoice-dollar"></span> <span class="d-none d-sm-inline">Subhire Insurance Form</span></a>
|
||||
|
||||
{% if not event.dry_hire %}
|
||||
{% if event.can_check_in %}
|
||||
<a href="{% url 'event_checkin' event.pk %}" class="btn btn-success modal-href {% if request.user.current_event %}disabled{%endif%}"><span class="fas fa-user-clock"></span> <span class="d-none d-sm-inline">Check In</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user