- Express + EJS server-rendered app - Supabase PostgreSQL database - Auth: username/password with bcrypt - Dashboard with business stats - Load CRUD with filters - WhatsApp message parser - Payment tracking - Shipper & vehicle management - Reports (monthly, top shippers, routes) - Government-app aesthetic (tricolor theme) - Dark mode support - Docker + Coolify deployment ready - Seed data from existing business ledger (88 loads, 41 shippers, 70 vehicles)
33 lines
1.2 KiB
Text
33 lines
1.2 KiB
Text
<%- include('../partials/header', { activeMenu: 'vehicles' }) %>
|
|
|
|
<div class="page-header">
|
|
<div>
|
|
<h1 class="page-title">🚚 <%= vehicle.number %></h1>
|
|
<p class="page-subtitle"><%= vehicle.type || '—' %> | <%= vehicle.city || '—' %></p>
|
|
</div>
|
|
<a href="/vehicles" class="btn btn-outline">← Back</a>
|
|
</div>
|
|
|
|
<div class="card mt-4">
|
|
<div class="card-header"><h3 class="card-title">Load History</h3></div>
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<thead><tr><th>Date</th><th>Shipper</th><th>Route</th><th>Freight</th><th>Status</th></tr></thead>
|
|
<tbody>
|
|
<% for (const l of loads) { %>
|
|
<tr>
|
|
<td><%= l.date || '—' %></td>
|
|
<td><%= l.shipper ? l.shipper.name : '—' %></td>
|
|
<td><%= l.from_city || '?' %> → <%= l.to_city || '?' %></td>
|
|
<td><%= formatINR(l.freight_charged) %></td>
|
|
<td><span class="badge badge-<%= getStatusColor(l.status) %>"><%= l.status %></span></td>
|
|
</tr>
|
|
<% } %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<%- include('../partials/footer') %>
|