car_detail 1
This commit is contained in:
parent
75808b633b
commit
cafb12818a
@ -1,4 +1,4 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% load i18n static custom_filters %}
|
{% load i18n static custom_filters %}
|
||||||
{% block title %}{{ _("Car Details") }}{% endblock %}
|
{% block title %}{{ _("Car Details") }}{% endblock %}
|
||||||
{% block customCSS %}
|
{% block customCSS %}
|
||||||
@ -17,14 +17,24 @@
|
|||||||
{% endblock customCSS %}
|
{% endblock customCSS %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if not car.ready %}
|
|
||||||
|
{% if not car.ready and not car.status == 'sold' %}
|
||||||
<div class="alert alert-outline-warning d-flex align-items-center"
|
<div class="alert alert-outline-warning d-flex align-items-center"
|
||||||
role="alert">
|
role="alert">
|
||||||
<i class="fa-solid fa-circle-info fs-6"></i>
|
<i class="fa-solid fa-circle-info fs-6"></i>
|
||||||
|
{%if not car.finances and not car.colors%}
|
||||||
<p class="mb-0 flex-1">
|
<p class="mb-0 flex-1">
|
||||||
{{ _("This car information is not complete , please add colors and finances before making it ready for sale .") }}<a class="ms-3 text-body-primary fs-9"
|
{{ _("This car information is not complete , please add colors and finances both before making it ready for sale .") }}
|
||||||
href="{% url 'add_color' car.slug %}">{{ _("Add Color") }}</a>
|
|
||||||
</p>
|
</p>
|
||||||
|
{% elif car.finances and not car.colors %}
|
||||||
|
<p class="mb-0 flex-1">
|
||||||
|
{{ _("This car information is not complete , please add colors before making it ready for sale .") }}
|
||||||
|
</p>
|
||||||
|
{%else%}
|
||||||
|
<p class="mb-0 flex-1">
|
||||||
|
{{ _("This car information is not complete , please add finances before making it ready for sale .") }}
|
||||||
|
</p>
|
||||||
|
{%endif%}
|
||||||
<button class="btn-close"
|
<button class="btn-close"
|
||||||
type="button"
|
type="button"
|
||||||
data-bs-dismiss="alert"
|
data-bs-dismiss="alert"
|
||||||
@ -237,7 +247,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Discount Amount"|capfirst %}</th>
|
<th>{% trans "Discount Amount"|capfirst %}</th>
|
||||||
<td>{{ car.finances.discount_amount|floatformat:2 }} -</td>
|
<td>{{ car.finances.discount_amount|floatformat:2 }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Additional Fee"|capfirst %}</th>
|
<th>{% trans "Additional Fee"|capfirst %}</th>
|
||||||
@ -285,6 +295,8 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="table-responsive scrollbar mb-3">
|
<div class="table-responsive scrollbar mb-3">
|
||||||
<table class="table table-sm fs-9 mb-0 overflow-hidden">
|
<table class="table table-sm fs-9 mb-0 overflow-hidden">
|
||||||
|
|
||||||
|
<!--test-->
|
||||||
{% if car.colors %}
|
{% if car.colors %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans 'Exterior' %}</th>
|
<th>{% trans 'Exterior' %}</th>
|
||||||
@ -309,32 +321,27 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
{% comment %} {% if not car.get_transfer %}
|
{% if not car.get_transfer %}
|
||||||
<a href="{% url 'car_finance_update' car.finances.pk %}"
|
<a href="{% url 'car_colors_update' car.slug %}"
|
||||||
class="btn btn-phoenix-warning btn-sm mb-3">{% trans "Edit" %}</a>
|
class="btn btn-phoenix-warning btn-sm mb-3">{% trans "Edit" %}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
<span class="badge bg-danger">{% trans "Cannot Edit, Car in Transfer." %}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
|
||||||
<p>{% trans "No finance details available." %}</p>
|
|
||||||
{% if perms.inventory.add_carfinance %}
|
|
||||||
<a href="{% url 'car_finance_create' car.slug %}"
|
|
||||||
class="btn btn-phoenix-success btn-sm mb-3">{% trans "Add" %}</a>
|
|
||||||
{% endif %} {% endcomment %}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% comment %} <tr>
|
{% else %}
|
||||||
<td colspan="2">{% trans "No colors available for this car." %}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
|
||||||
{% if perms.inventory.change_carcolors %}
|
<td colspan="2">
|
||||||
<a href="{% url 'add_color' car.slug %}"
|
<p>{% trans "No color details available." %}</p>
|
||||||
class="btn btn-phoenix-success btn-sm">{% trans "Add" %}</a>
|
{% if perms.inventory.add_carcolors %}
|
||||||
|
<a class="btn btn-phoenix-success btn-sm mb-3" href="{% url 'add_color' car.slug %}">{{ _("Add Color") }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr> {% endcomment %}
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<!--test-->
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user