03 sept 2026 - apropape gata, de schimbat setarile pt productie
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
<li><a class="dropdown-item" href="#" hx-get="{% url 'equipment:peripheral_create' %}" hx-target="#modal-content-area" data-bs-toggle="modal" data-bs-target="#form-modal">🖨️ Periferic</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="{% url 'equipment:export_inventory' %}" class="btn btn-success fw-bold shadow-sm me-2">
|
||||
<!-- <a href="{% url 'equipment:export_inventory' %}" class="btn btn-success fw-bold shadow-sm me-2">
|
||||
📊 Exportă Inventar (Excel)
|
||||
</a>
|
||||
</a> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid mt-4">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2>Raport Mentenanță Echipamente</h2>
|
||||
</div>
|
||||
|
||||
<!-- Formularul de filtrare -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<form method="GET" action="{% url 'equipment:maintenance_report' %}" class="row g-3 align-items-end">
|
||||
<div class="col-auto">
|
||||
<label for="start_date" class="form-label">De la data:</label>
|
||||
<!-- Am schimbat type="date" cu type="text" și am adăugat clasa flatpickr-date -->
|
||||
<input type="text" class="form-control flatpickr-date" id="start_date" name="start_date" value="{{ start_date|default_if_none:'' }}" placeholder="ZZ.LL.AAAA" required>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label for="end_date" class="form-label">Până la data:</label>
|
||||
<!-- Am schimbat type="date" cu type="text" și am adăugat clasa flatpickr-date -->
|
||||
<input type="text" class="form-control flatpickr-date" id="end_date" name="end_date" value="{{ end_date|default_if_none:'' }}" placeholder="ZZ.LL.AAAA" required>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="submit" class="btn btn-primary">Generează Raport</button>
|
||||
{% if records %}
|
||||
<a href="{% url 'equipment:maintenance_report' %}" class="btn btn-secondary ms-2">Resetează</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tabelul cu rezultate -->
|
||||
{% if records is not None %}
|
||||
<div class="card">
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-striped table-hover mb-0">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Dată Intervenție</th>
|
||||
<th>Echipament</th>
|
||||
<th>Tip Operațiune</th>
|
||||
<th>Efectuat de</th>
|
||||
<th>Observații</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for record in records %}
|
||||
<tr>
|
||||
<td>{{ record.date|date:"d.m.Y" }}</td>
|
||||
<!-- Ajustează record.equipment / record.operation_type etc. conform modelului tău -->
|
||||
<td>{{ record.equipment }}</td>
|
||||
<td>{{ record.operation_type }}</td>
|
||||
<td>{{ record.performed_by }}</td>
|
||||
<td>{{ record.notes|default:"-" }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center py-4">Nu au fost găsite intervenții de mentenanță în perioada selectată.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user