do-tracker/app/templates/track_do.html

42 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Track Delivery Order</title>
</head>
<body>
<h1>Track a Delivery Order</h1>
<form method="POST">
<label>Enter DO Number or Delivery Number:</label><br>
<input type="text" name="search" required>
<button type="submit">Search</button>
</form>
{% if do %}
<h2>DO: {{ do.do_number }} / {{ do.delivery_number }}</h2>
<p>Status: <strong>{{ do.status }}</strong></p>
<p>Created by: {{ do.created_by }}</p>
<p>Final Destination: {{ do.final_location }}</p>
<p>Collected By: {{ do.collected_by if do.collected_by else "Not collected yet" }}</p>
<p>Created: {{ do.created_at }}</p>
<h3>Movement History:</h3>
{% if movements %}
<ul>
{% for m in movements %}
<li>
📍 {{ m.branch_id }} | Handled by {{ m.handled_by }} | Arrived: {{ m.arrived_at }}
{% if m.departed_at %}| Departed: {{ m.departed_at }}{% endif %}
{% if m.comment %}<br>📝 {{ m.comment }}{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<p>No movement data yet.</p>
{% endif %}
{% endif %}
<p><a href="/store">Back to Dashboard</a></p>
</body>
</html>