feat: added ticket history

This commit is contained in:
2025-05-05 18:33:23 +02:00
parent e0ff4dde70
commit afa44011d0
3 changed files with 54 additions and 1 deletions

View File

@@ -132,5 +132,22 @@
<button type="submit">Absenden</button>
</form>
{% endif %}
<div style="margin-top: 3rem;">
<h2>🕓 Bearbeitungshistorie</h2>
{% if ticket.history.exists %}
<ul style="list-style: none; padding: 0;">
{% for entry in ticket.history.all %}
<li style="margin-bottom: 1rem; background-color: #f9f9f9; border-left: 4px solid #ccc; padding: 0.5rem 1rem;">
<strong>{{ entry.changed_by.username }}</strong>
hat <code>{{ entry.field }}</code> geändert:<br>
<em>{{ entry.old_value }}</em><strong>{{ entry.new_value }}</strong><br>
<small>am {{ entry.changed_at|date:"d.m.Y H:i" }}</small>
</li>
{% endfor %}
</ul>
{% else %}
<p><em>Keine Änderungen bisher.</em></p>
{% endif %}
</div>
</div>
{% endblock %}