Initial commit
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ project.name }} - Zeiterfassung
|
||||
{% endblock %}
|
||||
|
||||
{% block header_title %}
|
||||
Zeiterfassung
|
||||
{% endblock %}
|
||||
|
||||
{% block header_description %}
|
||||
Zeiten erfassen und verwalten
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% load django_tables2 %}
|
||||
|
||||
<div class="mb-8">
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
<div class="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4">
|
||||
<div>
|
||||
<h2 class="text-xl font-bold">
|
||||
Aktionen
|
||||
</h2>
|
||||
|
||||
<p class="text-slate-400 text-sm mt-1">
|
||||
Arbeitszeiten und Anfahrten erfassen
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col sm:flex-row gap-2">
|
||||
|
||||
<!-- START -->
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="start">
|
||||
<button class="btn btn-action-start">
|
||||
▶ Start
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<!-- STOP -->
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="stop">
|
||||
<button class="btn btn-action-stop">
|
||||
■ Stop
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 rounded-xl shadow bg-white dark:bg-slate-800 text-slate-900 dark:text-white transition-colors">
|
||||
|
||||
<div class="mb-6">
|
||||
|
||||
<h2 class="text-xl font-bold">
|
||||
Zeiterfassungen
|
||||
</h2>
|
||||
|
||||
<p class="text-slate-400 text-sm mt-1">
|
||||
Erfasste Zeiten des Projekts
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="overflow-x-auto rounded-xl">
|
||||
{% render_table table %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="flex gap-2">
|
||||
|
||||
<form method="post"
|
||||
action="{% url 'time_tracking:edit' record.project_id record.id %}"
|
||||
id="save-form-{{ record.id }}"
|
||||
class="inline">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-save">
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
<form method="post"
|
||||
action="{% url 'time_tracking:delete' record.project_id record.id %}"
|
||||
class="inline">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-delete">
|
||||
Löschen
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
<input
|
||||
type="text"
|
||||
name="activity"
|
||||
form="save-form-{{ record.id }}"
|
||||
value="{{ record.activity }}"
|
||||
class="border rounded px-2 py-1 w-full">
|
||||
@@ -0,0 +1,6 @@
|
||||
<input
|
||||
type="number"
|
||||
name="break_minutes"
|
||||
form="save-form-{{ record.id }}"
|
||||
value="{{ record.break_minutes }}"
|
||||
class="border rounded px-2 py-1 w-24">
|
||||
@@ -0,0 +1,6 @@
|
||||
<input
|
||||
type="datetime-local"
|
||||
name="end"
|
||||
form="save-form-{{ record.id }}"
|
||||
value="{% if record.end %}{{ record.end|date:'Y-m-d' }}T{{ record.end|date:'H:i' }}{% endif %}"
|
||||
class="border rounded px-2 py-1">
|
||||
@@ -0,0 +1,13 @@
|
||||
<select
|
||||
name="entry_type"
|
||||
form="save-form-{{ record.id }}"
|
||||
class="border rounded px-2 py-1 w-full">
|
||||
|
||||
{% for value,label in types %}
|
||||
<option value="{{ value }}"
|
||||
{% if record.entry_type == value %}selected{% endif %}>
|
||||
{{ label }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
@@ -0,0 +1,5 @@
|
||||
{% if record.invoiced %}
|
||||
<span class="text-slate-400 font-semibold">Ja</span>
|
||||
{% else %}
|
||||
<span class="text-slate-400">Nein</span>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,6 @@
|
||||
<input
|
||||
type="datetime-local"
|
||||
name="start"
|
||||
form="save-form-{{ record.id }}"
|
||||
value="{{ record.start|date:'Y-m-d' }}T{{ record.start|date:'H:i' }}"
|
||||
class="border rounded px-2 py-1">
|
||||
Reference in New Issue
Block a user