feat: replaced priority with mistake
This commit is contained in:
@@ -76,13 +76,13 @@
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-1">Priorität:</label>
|
||||
<select name="priority"
|
||||
{% if not view.can_edit or form.priority.field.disabled %}disabled{% endif %}
|
||||
class="w-full p-2 border border-gray-300 rounded shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 {% if not view.can_edit or form.priority.field.disabled %}bg-gray-100{% endif %}">
|
||||
<option value="low" {% if ticket.priority == 'low' %}selected{% endif %}>Niedrig</option>
|
||||
<option value="medium"
|
||||
{% if ticket.priority == 'medium' %}selected{% endif %}>Normal</option>
|
||||
<option value="high" {% if ticket.priority == 'high' %}selected{% endif %}>Hoch</option>
|
||||
<select name="mistake"
|
||||
{% if not view.can_edit or form.mistake.field.disabled %}disabled{% endif %}
|
||||
class="w-full p-2 border border-gray-300 rounded shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 {% if not view.can_edit or form.mistake.field.disabled %}bg-gray-100{% endif %}">
|
||||
{% for value, label in form.mistake.field.choices %}
|
||||
<option value="{{ value }}"
|
||||
{% if value == ticket.mistake %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -124,7 +124,9 @@
|
||||
class="w-full p-2 border border-gray-300 rounded shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 placeholder:text-black {% if not view.can_edit or ticket.status != 'resolved' %}bg-gray-100 cursor-not-allowed{% endif %}">{{ ticket.answer|default:'' }}</textarea>
|
||||
{% if form.answer.errors %}<div class="text-red-600 text-sm mt-1">{{ form.answer.errors }}</div>{% endif %}
|
||||
<p class="text-xs text-gray-500 mt-1">
|
||||
{% if ticket.status != 'resolved' or ticket.status != 'closed' %}Eine Antwort ist erforderlich beim Setzen des Status auf "Gelöst"{% endif %}
|
||||
{% if ticket.status != 'resolved' or ticket.status != 'closed' %}
|
||||
Eine Antwort ist erforderlich beim Setzen des Status auf "Gelöst"
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<th class="px-4 py-3 text-center text-sm font-bold">#</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-bold">Titel</th>
|
||||
<th class="px-4 py-3 text-center text-sm font-bold">Status</th>
|
||||
<th class="px-4 py-3 text-center text-sm font-bold">Priorität</th>
|
||||
<th class="px-4 py-3 text-center text-sm font-bold">Fehlerart</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-bold">Zugewiesen an</th>
|
||||
<th class="px-4 py-3 text-center text-sm font-bold">Erstellt</th>
|
||||
</tr>
|
||||
@@ -163,19 +163,7 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
{% if ticket.priority == 'low' %}
|
||||
<span class="px-2 py-1 rounded-full text-xs font-bold bg-blue-500 text-white">{{ ticket.get_priority_display }}</span>
|
||||
{% elif ticket.priority == 'medium' %}
|
||||
<span class="px-2 py-1 rounded-full text-xs font-bold bg-yellow-400 text-gray-900">
|
||||
{{ ticket.get_priority_display }}
|
||||
</span>
|
||||
{% elif ticket.priority == 'high' %}
|
||||
<span class="px-2 py-1 rounded-full text-xs font-bold bg-orange-500 text-white">
|
||||
{{ ticket.get_priority_display }}
|
||||
</span>
|
||||
{% elif ticket.priority == 'urgent' %}
|
||||
<span class="px-2 py-1 rounded-full text-xs font-bold bg-red-500 text-white">{{ ticket.get_priority_display }}</span>
|
||||
{% endif %}
|
||||
<span class="px-2 py-1 rounded-full text-xs font-bold bg-blue-500 text-white">{{ ticket.get_mistake_display }}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-gray-600">
|
||||
{% if ticket.assigned_to %}
|
||||
|
||||
@@ -93,15 +93,15 @@
|
||||
{% if form.status.errors %}<div class="text-red-600 text-sm mt-1">{{ form.status.errors }}</div>{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium mb-1">Priorität:</label>
|
||||
<select name="priority"
|
||||
<label class="block text-sm font-medium mb-1">Fehlerart:</label>
|
||||
<select name="mistake"
|
||||
class="w-full p-2 border border-gray-300 rounded shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||
{% for value, display in form.fields.priority.choices %}
|
||||
{% for value, display in form.fields.mistake.choices %}
|
||||
<option value="{{ value }}"
|
||||
{% if form.priority.value == value %}selected{% endif %}>{{ display }}</option>
|
||||
{% if form.mistake.value == value %}selected{% endif %}>{{ display }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if form.priority.errors %}<div class="text-red-600 text-sm mt-1">{{ form.priority.errors }}</div>{% endif %}
|
||||
{% if form.mistake.errors %}<div class="text-red-600 text-sm mt-1">{{ form.mistake.errors }}</div>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Zugewiesen an -->
|
||||
|
||||
Reference in New Issue
Block a user