You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_django/templates/client-dashboard-content.html

127 lines
5.5 KiB
HTML

{% extends 'common/base.html' %}
{% load filters %}
{% load permission_tags %}
{% block content %}
<div class="dashboard-wrapper">
<div class="stats-grid">
<div class="dashboard-card">
<div class="card-content">
<div class="icon-circle">
<svg xmlns="http://www.w3.org/2000/svg" class="dashboard-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
</svg>
</div>
<div class="stat-info">
<h3>Active Containers</h3>
<p class="stat-number">{{ containers }}</p>
<p class="stat-change">+{{ containers_week }} since last week</p>
</div>
</div>
</div>
<div class="dashboard-card">
<div class="card-content">
<div class="icon-circle">
<svg xmlns="http://www.w3.org/2000/svg" class="dashboard-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
</div>
<div class="stat-info">
<h3>Preinfo sent</h3>
<p class="stat-number">{{ preinfos }}</p>
<p class="stat-change">+{{ preinfos_week }} since last week</p>
</div>
</div>
</div>
<div class="dashboard-card">
<div class="card-content">
<div class="icon-circle">
<svg xmlns="http://www.w3.org/2000/svg" class="dashboard-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" />
</svg>
</div>
<div class="stat-info">
<h3>Bookings active</h3>
<p class="stat-number">{{ bookings }}</p>
<p class="stat-change">+{{ bookings_week }} since last week</p>
</div>
</div>
</div>
</div>
<div class="tables-grid">
<div class="dashboard-card">
<div class="card-header">
<h3>Recent Container Activity</h3>
</div>
<div class="card-body">
<table class="table">
<thead>
<tr>
<th>Container</th>
<th>Type</th>
<th>Status</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for container in recent_containers %}
<tr>
<td>{{ container.number }}</td>
<td>{{ container.container_type.name }}</td>
{% if container.expedited %}
<td><span class="status-tag status-expedited">Expedited</span></td>
<td>{{ container.expedited_on|bg_date }}</td>
{% else %}
<td><span class="status-tag status-received">Received</span></td>
<td>{{ container.received_on|bg_date }}</td>
{% endif %}
</tr>
{% empty %}
<tr>
<td> No recent history</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% if request.user|has_company_perm:"can_view_payment" %}
<div class="dashboard-card">
<div class="card-header">
<h3>Recent payments</h3>
</div>
<div class="card-body">
<table class="table">
<thead>
<tr>
<th>Invoice №</th>
<th>Company</th>
<th>Amount</th>
<th>Paid</th>
</tr>
</thead>
<tbody>
{% for payment in recent_payments %}
<tr>
<td>{{ payment.invoice_number }}</td>
<td>{{ payment.company.name }}</td>
<td>{{ payment.total_amount }}</td>
<td><span class="status-tag status-received">{{ payment.paid }}</span></td>
</tr>
{% empty %}
<tr>
<td> No recent history</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}