fix date filter
employee dashboard fully working
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{% extends 'common/base.html' %}
|
||||
{% block content %}
|
||||
|
||||
{% load filters %}
|
||||
{% load permission_tags %}
|
||||
<div class="dashboard-wrapper">
|
||||
<div class="stats-grid">
|
||||
<div class="dashboard-card">
|
||||
@@ -65,46 +66,61 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>MSCU1234567</td>
|
||||
<td>40HC</td>
|
||||
<td><span class="status-tag status-received">Received</span></td>
|
||||
<td>2023-06-15</td>
|
||||
</tr>
|
||||
{% 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 %}
|
||||
<!-- Other rows similar structure -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-card">
|
||||
<div class="card-header">
|
||||
<h3>Recent payments</h3>
|
||||
{% if request.user|has_employee_perm:"can_view_payments" %}
|
||||
<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>
|
||||
<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 containers %}#}
|
||||
{# <tr>#}
|
||||
{# <td>{{ container.number }}</td>#}
|
||||
{# <td>container.container_type</td>#}
|
||||
{# <td><span class="status-tag status-received">Received</span></td>#}
|
||||
{# <td>{{ container.received_date }}</td>#}
|
||||
{# </tr>#}
|
||||
{# {% endfor %}#}
|
||||
<!-- Other rows similar structure -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user