v1.0.0 — GSPARC Mezzouna API initiale

This commit is contained in:
Nabil Derouiche
2026-05-28 18:48:40 +00:00
commit cc143fd321
30 changed files with 1241 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
{% 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 %}