haikal/templates/sales/quotation_list.html
2024-12-18 16:08:34 +00:00

59 lines
2.5 KiB
HTML

{% extends "base.html" %}
{% load i18n static %}
{% block title %}{{ _("Quotations") }}{% endblock title %}
{% block content %}
<div class="container mt-4">
<h3 class="text-center">{% trans "Quotations" %}</h3>
<div class="table-responsive">
<table class="table table-striped align-middle">
<thead>
<tr>
<th>#</th>
<th>{% trans "Customer" %}</th>
<th>{% trans "Total Cars" %}</th>
<th>{% trans "Total Amount" %}</th>
<th>{% trans "Created At" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for quotation in quotations %}
<tr>
<td>{{ forloop.counter }}</td>
<td>{{ quotation.customer.get_full_name }}</td>
<td>{{ quotation.quotation_cars.count }}</td>
<td>{{ quotation.quotation_cars.get_financial_details.total_amount }}</td>
<td>
{% if quotation.status == 'DRAFT' %}
<span class="badge rounded-pill bg-light">{{ quotation.status }}</span>
{% elif quotation.status == 'PENDING' %}
<span class="badge rounded-pill bg-warning">{{ quotation.status }}</span>
{% elif quotation.status == 'CONFIRMED' %}
<span class="badge rounded-pill bg-success">{{ quotation.status }}</span>
{% elif quotation.status == 'CANCELED' %}
<span class="badge rounded-pill bg-danger">{{ quotation.status }}</span>
{% endif %}
</td>
<td>{{ quotation.created_at|date:"d/m/Y H:i" }}</td>
<td>
<a href="{% url 'quotation_detail' quotation.id %}" class="btn btn-sm btn-info">
{% trans "view" %}
</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Quotations Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
</div>
</div>
{% endblock %}