68 lines
3.8 KiB
HTML
68 lines
3.8 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n static %}
|
|
{% block title %}
|
|
{{ _("Services") }}
|
|
{% endblock title %}
|
|
{% block content %}
|
|
|
|
{% if services or request.GET.q %}
|
|
<div class="row mt-4">
|
|
<div class="d-flex justify-content-between mb-2">
|
|
<h3 class="">{% trans "Services" %}<span class="fas fa-tools text-primary ms-2"></span></h3>
|
|
{% if perms.inventory.add_additionalservices %}
|
|
<a href="{% url 'item_service_create' request.dealer.slug %}"
|
|
class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Service" %}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% include "partials/search_box.html" %}
|
|
{% if page_obj.object_list or request.GET.q %}
|
|
<div class="table-responsive px-1 scrollbar mt-3">
|
|
<table class="table align-items-center">
|
|
<thead class="bg-body-highlight">
|
|
<tr >
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Item Number" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Name" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Unit of Measure" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Taxable" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account" %}</th>
|
|
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="list">
|
|
{% for service in services %}
|
|
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
|
|
<td class="align-middle product white-space-nowrap px-1">{{ service.pk }}</td>
|
|
<td class="align-middle product white-space-nowrap">{{ service.get_local_name|default:service.name }}</td>
|
|
<td class="align-middle product white-space-nowrap">{{ service.get_uom_display }}</td>
|
|
<td class="align-middle product white-space-nowrap">{{ service.taxable|yesno }}</td>
|
|
<td class="align-middle product white-space-nowrap">{{ service.item.co }}</td>
|
|
<td class="align-middle white-space-nowrap text-start">
|
|
{% if perms.inventory.add_additionalservices %}
|
|
<a href="{% url 'item_service_update' request.dealer.slug service.pk %}"
|
|
class="btn btn-sm btn-phoenix-primary"><li class="fa fa-edit me-1"></li>{% trans "Update" %}</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="6" class="text-center text-muted">{% trans "No Services Found" %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% if page_obj.paginator.num_pages > 1 %}
|
|
<div class="d-flex justify-content-end mt-3">
|
|
<div class="d-flex">{% include 'partials/pagination.html' %}</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% else %}
|
|
{% url 'item_service_create' request.dealer.slug as create_services_url %}
|
|
{% include "empty-illustration-page.html" with value="service" url=create_services_url %}
|
|
{%endif%}
|
|
|
|
{% endblock %}
|