85 lines
3.9 KiB
HTML
Executable File
85 lines
3.9 KiB
HTML
Executable File
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="page-head">
|
|
<h1 class="page-title">{{ vorname }} {{ nachname }}</h1>
|
|
<div class="page-actions"><a class="btn ghost" href="/hr">Zurück zur Liste</a></div>
|
|
</div>
|
|
<div class="panel">
|
|
<h3 style="margin-top:0">Stammdaten</h3>
|
|
<form method="post" action="/hr/{{ id }}">
|
|
<input type="hidden" name="_csrf" value="{{ ctx.csrf }}">
|
|
<div class="grid-2">
|
|
<div class="formrow"><label>Vorname</label><input name="vorname" value="{{ vorname }}" required></div>
|
|
<div class="formrow"><label>Nachname</label><input name="nachname" value="{{ nachname }}" required></div>
|
|
</div>
|
|
<div class="grid-2">
|
|
<div class="formrow"><label>Personalnr.</label><input name="personalnr" value="{{ personalnr }}"></div>
|
|
<div class="formrow"><label>E-Mail</label><input name="email" type="email" value="{{ email }}"></div>
|
|
</div>
|
|
<div class="grid-2">
|
|
<div class="formrow"><label>Abteilung</label><input name="abteilung" value="{{ abteilung }}"></div>
|
|
<div class="formrow"><label>Position</label><input name="position" value="{{ position }}"></div>
|
|
</div>
|
|
<div class="grid-2">
|
|
<div class="formrow"><label>Eintritt</label><input name="eintritt" type="date" value="{{ eintritt }}"></div>
|
|
<div class="formrow"><label>Austritt</label><input name="austritt" type="date" value="{{ austritt }}"></div>
|
|
</div>
|
|
<div class="formrow"><label>Status</label>
|
|
<select name="status">
|
|
{% for o in status_opts %}<option value="{{ o.0 }}" {% if o.1 %}selected{% endif %}>{{ o.0 }}</option>{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="formrow"><label>Notizen</label><textarea name="notizen">{{ notizen }}</textarea></div>
|
|
<button class="btn" type="submit">Speichern</button>
|
|
</form>
|
|
</div>
|
|
|
|
<h2 class="section-title">Abwesenheiten</h2>
|
|
<div class="panel">
|
|
<form method="post" action="/hr/{{ id }}/abwesenheiten">
|
|
<input type="hidden" name="_csrf" value="{{ ctx.csrf }}">
|
|
<div class="grid-2">
|
|
<div class="formrow"><label>Typ</label>
|
|
<select name="typ">{% for t in absence_types %}<option>{{ t }}</option>{% endfor %}</select>
|
|
</div>
|
|
<div class="formrow"><label>Kommentar</label><input name="kommentar"></div>
|
|
</div>
|
|
<div class="grid-2">
|
|
<div class="formrow"><label>Von</label><input name="von" type="date" required></div>
|
|
<div class="formrow"><label>Bis</label><input name="bis" type="date" required></div>
|
|
</div>
|
|
<button class="btn ghost" type="submit">Antrag anlegen</button>
|
|
</form>
|
|
</div>
|
|
<table class="tickets">
|
|
<thead><tr><th>Typ</th><th>Zeitraum</th><th>Status</th><th>Kommentar</th><th>Aktion</th></tr></thead>
|
|
<tbody>
|
|
{% for a in absences %}
|
|
<tr>
|
|
<td>{{ a.typ }}</td>
|
|
<td class="sz">{{ a.zeitraum }}</td>
|
|
<td><span class="pill {{ a.status_class }}">{{ a.status }}</span></td>
|
|
<td class="sz">{{ a.kommentar }}</td>
|
|
<td>
|
|
{% if a.pending %}
|
|
<form method="post" action="/hr/abwesenheiten/{{ a.id }}/status" class="inline-form">
|
|
<input type="hidden" name="_csrf" value="{{ ctx.csrf }}">
|
|
<input type="hidden" name="zurueck" value="/hr/{{ id }}">
|
|
<input type="hidden" name="status" value="Genehmigt">
|
|
<button class="btn mini" type="submit">Genehmigen</button>
|
|
</form>
|
|
<form method="post" action="/hr/abwesenheiten/{{ a.id }}/status" class="inline-form">
|
|
<input type="hidden" name="_csrf" value="{{ ctx.csrf }}">
|
|
<input type="hidden" name="zurueck" value="/hr/{{ id }}">
|
|
<input type="hidden" name="status" value="Abgelehnt">
|
|
<button class="btn ghost mini" type="submit">Ablehnen</button>
|
|
</form>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% if absences.is_empty() %}<tr><td colspan="5" class="sz">Keine Abwesenheiten.</td></tr>{% endif %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|