gsparc-mezzouna-api/app/templates/anomalies.html

53 lines
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}الشذوذ — GSPARC Mezzouna{% endblock %}
{% block content %}
<h2 style="margin-bottom:1rem;">⚠️ قائمة الشذوذات</h2>
<div class="card">
{% if anomalies %}
<table>
<thead>
<tr>
<th>التاريخ</th>
<th>الماتريكول</th>
<th>النوع</th>
<th>نوع الشذوذ</th>
<th>رقم الإيصال</th>
<th>الحالة</th>
<th>إجراء</th>
</tr>
</thead>
<tbody>
{% for a in anomalies %}
<tr>
<td>{{ a.التاريخ }}</td>
<td>{{ a.رقم_الماتريكول }}</td>
<td>{{ vehicules.get(a.رقم_الماتريكول,'') }}</td>
<td><span class="badge badge-danger">{{ a.نوع_الشذوذ }}</span></td>
<td>{{ a.رقم_الايصال if a.رقم_الايصال else "-" }}</td>
<td>
{% if a.تمت_المعالجة %}
<span class="badge badge-success">✅ تمت المعالجة</span>
{% else %}
<span class="badge badge-warning">⏳ قيد الانتظار</span>
{% endif %}
</td>
<td>
{% if not a.تمت_المعالجة %}
<form method="POST" action="/anomalies/{{ a.id }}/resolve" style="display:inline;">
<input type="text" name="action" placeholder="إجراء التصحيح" style="width:120px; padding:0.3rem; margin-left:0.3rem;">
<button class="btn btn-success btn-sm">حل</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p style="color:var(--text-light); text-align:center; padding:2rem;">✅ لا توجد شذوذات. كل العمليات طبيعية.</p>
{% endif %}
</div>
{% endblock %}