freightdesk/webapp/src/views/pages/vehicles/detail.ejs
FreightDesk 1a4eaaa040 Initial commit: FreightDesk v1.0
- 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)
2026-06-07 18:57:24 +00:00

33 lines
1.2 KiB
Text

<%- include('../partials/header', { activeMenu: 'vehicles' }) %>
<div class="page-header">
<div>
<h1 class="page-title">&#128666; <%= vehicle.number %></h1>
<p class="page-subtitle"><%= vehicle.type || '—' %> &#124; <%= vehicle.city || '—' %></p>
</div>
<a href="/vehicles" class="btn btn-outline">&larr; 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 || '?' %> &#8594; <%= 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') %>