Merge pull request 'small method syntax fixed' (#273) from frontend into main
Reviewed-on: #273
This commit is contained in:
commit
8a07005bf7
@ -2268,7 +2268,7 @@ class CarDealershipRegistrationForm(forms.ModelForm):
|
||||
|
||||
class CarDetailsEstimateCreate(forms.Form):
|
||||
customer = forms.ModelChoiceField(
|
||||
queryset=Customer.objects.all(),
|
||||
queryset=Customer.objects.filter(active=True),
|
||||
required=True,
|
||||
label="Customer",
|
||||
widget=forms.Select(attrs={"class": "form-control"}),
|
||||
|
||||
@ -36,7 +36,8 @@
|
||||
<div class="card rounded ">
|
||||
<div class="card-header ">
|
||||
<p class="mb-2">{{ _("Group Details") }}</p>
|
||||
<a class="btn btn-phoenix-secondary " href="{% url 'group_list' request.dealer.slug %}">{% trans "Group List" %}</a>
|
||||
<a class="btn btn-phoenix-secondary me-2" href="{% url 'group_list' request.dealer.slug %}">{% trans "Groups List" %}</a>
|
||||
<a class="btn btn-phoenix-secondary " href="{% url 'user_list' request.dealer.slug %}">{% trans "Staffs List" %}</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
<a class="btn btn-phoenix-secondary btn-sm"
|
||||
href="{% url 'group_detail' request.dealer.slug group.id %}">
|
||||
<i class="fa-solid fa-eye me-1"></i>
|
||||
{% trans 'view'|capfirst %}
|
||||
{% trans 'view Permissions'|capfirst %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -194,7 +194,7 @@
|
||||
data-bs-parent="#navbarVerticalCollapse"
|
||||
id="nv-sales">
|
||||
<li class="collapsed-nav-item-title d-none">{% trans 'sales'|capfirst %}</li>
|
||||
{% if perms.django_ledger.add_estimatemodel %}
|
||||
{% comment %} {% if perms.django_ledger.add_estimatemodel %}
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
@ -204,7 +204,7 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %} {% endcomment %}
|
||||
{% if perms.django_ledger.view_estimatemodel %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'estimate_list' request.dealer.slug %}">
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- Main row -->
|
||||
{% if car.ready %}
|
||||
{% if car.ready and car.status != 'sold' %}
|
||||
<div class="d-flex align-items-center gap-2 mb-2">
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-phoenix-success"
|
||||
|
||||
@ -60,15 +60,15 @@
|
||||
<h2 class="text-xl font-semibold text-gray-800 mb-4">
|
||||
<i class="fas fa-credit-card text-gray-400 mr-2"></i> {% trans "Payment" %}
|
||||
</h2>
|
||||
|
||||
{% if object.completed %}
|
||||
<div class="bg-green-50 text-green-700 px-4 py-3 rounded-lg flex items-center">
|
||||
<i class="fas fa-check-circle mr-3 text-lg"></i>
|
||||
<p class="text-sm font-medium">
|
||||
{% blocktrans with object.completed as completed %}
|
||||
Payment completed on: {{ completed|date:"F j, Y" }}
|
||||
{% endblocktrans %}
|
||||
{% trans "Payment completed on : "%}{{object.completed}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
{% if object.is_ready_for_payment %}
|
||||
<p class="text-gray-600 mb-4">
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
const modalBody = document.getElementById('POModalBody')
|
||||
modalBody.innerHTML = `
|
||||
<div class="d-flex justify-content-center gap-3 py-3">
|
||||
<a hx-boost="true" class="btn btn-phoenix-primary px-4" href="${actionUrl}">
|
||||
<a hx-boost="true" class="btn btn-phoenix-danger px-4" href="${actionUrl}">
|
||||
<i class="fas fa-check-circle me-2"></i>${buttonText}
|
||||
</a>
|
||||
<button class="btn btn-phoenix-secondary" data-bs-dismiss="modal">
|
||||
|
||||
@ -1,17 +1,19 @@
|
||||
<!-- templates/purchase_orders/po_confirm_delete.html -->
|
||||
{% extends "base.html" %}
|
||||
{%load i18n %}
|
||||
{% block title %}{% trans "Confirm Delete"%} - {{ block.super }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container mt-4">
|
||||
<h2>{% trans "Confirm Deletion" %}</h2>
|
||||
<p>
|
||||
{% trans "Are you sure you want to delete the Purchase Order" %} <strong>"{{ po.po_number }}"</strong>?
|
||||
{% trans "Are you sure you want to delete the Purchase Order" %} <strong>"{{ object.po_number }}"</strong>?
|
||||
</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="btn btn-phoenix-danger">{% trans "Yes, Delete" %}</button>
|
||||
<a href="{% url 'purchase_order_detail' po.id %}"
|
||||
<a href="{% url 'purchase_order_detail' request.dealer.slug request.dealer.entity.slug object.pk %}"
|
||||
class="btn btn-phoenix-secondary">{% trans "Cancel" %}</a>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
Purchase Order {{ po_model.po_number }}?{% endblocktrans %}
|
||||
</h2>
|
||||
<p class="card-text text-muted mb-4">
|
||||
{% trans "All transactions associated with this Purchase Order will be deleted.
|
||||
If you want to void the PO instead," %} <a href="{% url 'purchase_order_detail' dealer_slug=request.dealer.slug pk=po_model.uuid %}"
|
||||
{% trans "All transactions associated with this Purchase Order will be deleted.If you want to void the PO instead," %}
|
||||
<a href="{% url 'purchase_order_detail' dealer_slug=request.dealer.slug entity_slug=view.kwargs.entity_slug pk=po_model.uuid %}"
|
||||
class="text-decoration-none">{% trans "click here" %}</a>
|
||||
</p>
|
||||
<div class="d-flex justify-content-center gap-3 mt-4">
|
||||
@ -33,3 +33,5 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<i class="fa-solid fa-floppy-disk me-1"></i>
|
||||
{% trans 'Save' %}
|
||||
</button>
|
||||
<a href="{% url 'home' request.dealer.slug %}"
|
||||
<a href="{% url 'estimate_detail' request.dealer.slug estimate.pk %}"
|
||||
class="btn btn-phoenix-secondary btn-lg">
|
||||
<i class="fa-solid fa-ban me-1"></i>
|
||||
{% trans "Cancel" %}
|
||||
@ -40,3 +40,4 @@
|
||||
</div>
|
||||
</main>
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user