Versiunea funcțională EUMI
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2 class="fw-bold">Intervenții (Helpdesk)</h2>
|
||||
|
||||
<!-- HTMX Live Search Input -->
|
||||
<input class="form-control w-25" type="search"
|
||||
name="search" placeholder="Caută tichet..."
|
||||
hx-get="{% url 'interventions:intervention_list' %}"
|
||||
hx-trigger="input changed delay:400ms, search"
|
||||
hx-target="#ticket-table-body">
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<table class="table table-striped table-hover mb-0">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Subiect & Descriere</th>
|
||||
<th>Raportat de</th>
|
||||
<th>Status</th>
|
||||
<th>Prioritate</th>
|
||||
<th>Data Raportării</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="ticket-table-body">
|
||||
{% include 'interventions/partials/ticket_table.html' %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,41 @@
|
||||
{% for ticket in tickets %}
|
||||
<tr>
|
||||
<td class="align-middle fw-medium">#{{ ticket.id }}</td>
|
||||
<td class="align-middle">
|
||||
<strong>{{ ticket.title }}</strong><br>
|
||||
<small class="text-muted text-truncate d-inline-block" style="max-width: 300px;">
|
||||
{{ ticket.description }}
|
||||
</small>
|
||||
</td>
|
||||
<td class="align-middle">{{ ticket.reported_by.name }}</td>
|
||||
<td class="align-middle">
|
||||
{% if ticket.status == 'nou' %}
|
||||
<span class="badge bg-info text-dark">Nou (Deschis)</span>
|
||||
{% elif ticket.status == 'in_lucru' %}
|
||||
<span class="badge bg-warning text-dark">În lucru</span>
|
||||
{% elif ticket.status == 'in_asteptare' %}
|
||||
<span class="badge bg-secondary">În așteptare</span>
|
||||
{% elif ticket.status == 'solutionat' %}
|
||||
<span class="badge bg-success">Soluționat</span>
|
||||
{% else %}
|
||||
<span class="badge bg-dark">Închis</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
{% if ticket.priority == 'scazuta' %}
|
||||
<span class="badge bg-secondary">Scăzută</span>
|
||||
{% elif ticket.priority == 'medie' %}
|
||||
<span class="badge bg-primary">Medie</span>
|
||||
{% elif ticket.priority == 'ridicata' %}
|
||||
<span class="badge bg-warning text-dark">Ridicată</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger">Critică</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="align-middle">{{ ticket.created_at|date:"d.m.Y H:i" }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center text-muted py-4">Nu au fost găsite tichete de suport.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user