vendor ui

This commit is contained in:
Faheedkhan 2025-05-21 16:32:58 +03:00
parent 41feca462d
commit fe66ce1ca1
6 changed files with 318 additions and 231 deletions

View File

@ -4,41 +4,58 @@
{% block title %}{{ _("Expenses") }}{% endblock title %} {% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %} {% block content %}
<div class="row mt-4 mx-4">
<div class="d-flex justify-content-between mb-2 p-6"> <div class="row mt-4">
<span></span>
<h3 class="text-center">{% trans "Expenses" %}</h3> <div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Expenses" %}</h3>
<a href="{% url 'item_expense_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Expense" %}</a> <a href="{% url 'item_expense_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Expense" %}</a>
</div> </div>
<div class="mx-n4 px-4 mx-lg-n6 px-lg-6 pt-7 border-y">
<div class="table-responsive mx-n1 px-1 scrollbar"> {% if page_obj.object_list %}
<table class="table fs-9 mb-0 border-top border-translucent"> <div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead> <thead>
<tr> <tr class="bg-body-highlight">
<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 "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 "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 "Unit of Measure" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr> </tr>
</thead> </thead>
<tbody class="list"> <tbody class="list">
{% for expense in expenses %} {% for expense in expenses %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static"> <tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap py-0">{{ expense.item_number }}</td> <td class="align-middle product white-space-nowrap">
<td class="align-middle product white-space-nowrap">{{ expense.name }}</td> {{ expense.item_number }}
<td class="align-middle product white-space-nowrap">{{ expense.uom }}</td> </td>
<td class=""> <td class="align-middle product white-space-nowrap">
{{ expense.name }}
</td>
<td class="align-middle product white-space-nowrap">
{{ expense.uom }}
</td>
<td class="align-middle product white-space-nowrap">
<a href="{% url 'item_expense_update' expense.pk %}" <a href="{% url 'item_expense_update' expense.pk %}"
class="btn btn-sm btn-phoenix-success"> class="btn btn-sm btn-phoenix-success">
{% trans "Update" %} {% trans "Update" %}
</a> </a>
</td> </td>
<td class="align-middle product white-space-nowrap">
</td>
<td class="align-middle white-space-nowrap text-start">
</td>
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>
<td colspan="6" class="text-center">{% trans "No Invoice Found" %}</td> <td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -46,6 +63,9 @@
</div> </div>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
</div> </div>
{% endif %}
</div> </div>
</div>
{% endblock %} {% endblock %}

View File

@ -4,19 +4,19 @@
{% block title %}{{ _("Expenses") }}{% endblock title %} {% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %} {% block content %}
<div class="row">
<div class="d-flex justify-content-between">
<h3 class="mb-2">{% trans "Services" %}</h3> <div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Services" %}</h3>
<a href="{% url 'item_service_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Service" %}</a> <a href="{% url 'item_service_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Service" %}</a>
</div> </div>
{% if page_obj.object_list %}
<div class="table-responsive scrollbar transition"> <div class="table-responsive px-1 scrollbar mt-3">
<table class="table table-sm fs-9 mb-0 border-translucent"> <table class="table align-items-center table-flush">
<thead> <thead>
<tr> <tr class="bg-body-highlight">
<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 "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 "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 "Unit of Measure" %}</th>
@ -25,12 +25,21 @@
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr> </tr>
</thead> </thead>
<tbody class="list"> <tbody class="list">
{% for service in services %} {% for service in services %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static"> <tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap py-0">{{ service.pk }}</td> <td class="align-middle product white-space-nowrap">
<td class="align-middle product white-space-nowrap">{{ service.get_local_name }}</td> {{ service.pk }}
<td class="align-middle product white-space-nowrap">{{ service.uom }}</td> </td>
<td class="align-middle product white-space-nowrap">
{{ service.get_local_name }}
</td>
<td class="align-middle product white-space-nowrap">
{{ service.uom }}
</td>
<td class="align-middle product white-space-nowrap"> <td class="align-middle product white-space-nowrap">
{% if service.taxable %} {% if service.taxable %}
Yes Yes
@ -38,17 +47,21 @@
No No
{% endif %} {% endif %}
</td> </td>
<td class="align-middle product white-space-nowrap">{{ service.item.co }}</td> <td class="align-middle product white-space-nowrap">
<td class="text-center"> {{ service.item.co }}
</td>
<td class="align-middle white-space-nowrap text-start">
<a href="{% url 'item_service_update' service.pk %}" <a href="{% url 'item_service_update' service.pk %}"
class="btn btn-sm btn-phoenix-success"> class="btn btn-sm btn-phoenix-success">
{% trans "Update" %} {% trans "Update" %}
</a> </a>
</td> </td>
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>
<td colspan="6" class="text-center">{% trans "No Invoice Found" %}</td> <td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -56,5 +69,9 @@
</div> </div>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
</div> </div>
{% endif %}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -5,52 +5,82 @@
{% block content %} {% block content %}
<div class="row mt-4"> <div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Bank Accounts" %}</h3> <h3 class="">{% trans "Bank Accounts" %}</h3>
<a href="{% url 'bank_account_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Bank Account" %}</a> <a href="{% url 'bank_account_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans "Add Bank Account" %}</a>
</div> </div>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
<button class="btn btn-sm btn-secondary rounded-start" type="submit">
{% trans "search" %}
</button>
<input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{% trans 'Search bank accounts...' %}" />
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</div>
</form>
</div>
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3"> <div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush"> <table class="table align-items-center table-flush">
<thead> <thead>
<tr class="bg-body-highlight"> <tr class="bg-body-highlight">
<th class="border-top border-translucent ps-3">{% trans "Name" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Name" %}</th>
<th class="border-top border-translucent ps-3">{% trans "Account Number" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account Number" %}</th>
<th class="border-top border-translucent text-end pe-3">{% trans "Type" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Type" %}</th>
<th class="border-top border-translucent text-end pe-3" scope="col">{% trans "Action" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr> </tr>
</thead> </thead>
<tbody class="list"> <tbody class="list">
{% for bank in bank_accounts %} {% for bank in bank_accounts %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static"> <tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle ps-3">{{ bank.name }}</td> <td class="align-middle product white-space-nowrap">
<td class="align-middle ps-3">{{ bank.account_number }}</td> {{ bank.name }}
<td class="align-middle product text-end pe-3 ">{{ bank.account_type|capfirst }}</td> </td>
<td class="align-middle product text-end pe-3 "> <td class="align-middle product white-space-nowrap">
{{ bank.account_number }}
</td>
<td class="align-middle product white-space-nowrap">
{{ bank.account_type|capfirst }}
</td>
<td class="align-middle product white-space-nowrap">
<a href="{% url 'bank_account_update' bank.pk %}" <a href="{% url 'bank_account_update' bank.pk %}"
class="btn btn-sm btn-phoenix-success"> class="btn btn-sm btn-phoenix-success">
{% trans "Update" %} {% trans "Update" %}
</a> </a>
</td> </td>
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>
<td colspan="6" class="text-center">{% trans "No Bank Accounts Found" %}</td> <td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
</div> </div>
{% endif %}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -8,16 +8,12 @@
</a> </a>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<!--test-->
<!-- Search Bar -->
<div class="row mt-4"> <div class="row mt-4">
<div class="d-grid gap-2 d-md-flex justify-content-md-end"> <div class="d-flex justify-content-between mb-2">
<a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary"> <h3 class=""><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
<i class="fa fa-plus me-2"></i> <a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Account' %}</a>
{% trans 'New Account' %}</a>
</div> </div>
<h3 class="mb-3">
<i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
<div class="col-12"> <div class="col-12">
<form method="get" class=" mb-4"> <form method="get" class=" mb-4">
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
@ -38,26 +34,25 @@
</div> </div>
</form> </form>
</div> </div>
</div>
{% if page_obj.object_list %} {% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3"> <div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush"> <table class="table align-items-center table-flush">
<thead> <thead>
<tr class="bg-body-highlight"> <tr class="bg-body-highlight">
<th class="border-top border-translucent">{% trans "Type" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Type" %}</th>
<th class="border-top border-translucent ps-3">{% trans "Account Name" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account Name" %}</th>
<th class="border-top border-translucent">{% trans "Code" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Code" %}</th>
<th class="border-top border-translucent text-end pe-3">{% trans "Balance Type" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Balance Type" %}</th>
<th class="border-top border-translucent text-end pe-3">{% trans "Active" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Active" %}</th>
<th class="border-top border-translucent text-end align-middle pe-0 ps-4" scope="col"></th> <th class="sort white-space-nowrap align-middle" scope="col"></th>
</tr> </tr>
</thead> </thead>
<tbody class="list"> <tbody class="list">
{% for account in accounts %} {% for account in accounts %}
<div class="modal fade" id="deleteModal" <div class="modal fade" id="deleteModal"
data-bs-backdrop="static" data-bs-backdrop="static"
data-bs-keyboard="false" data-bs-keyboard="false"
@ -91,11 +86,18 @@
</div> </div>
</div> </div>
</div> </div>
<tr>
<td class="align-middle ps-3 fw-lighter">{{ account.role_bs|upper }}</td> <tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle ps-3">{{ account.name }}</td> <td class="align-middle product white-space-nowrap">
<td class="align-middle">{{ account.code }}</td> {{ account.role_bs|upper }}
<td class="align-middle text-end py-3 pe-3"> </td>
<td class="align-middle product white-space-nowrap">
{{ account.name }}
</td>
<td class="align-middle product white-space-nowrap">
{{ account.code }}
</td>
<td class="align-middle product white-space-nowrap">
{% if account.balance_type == 'debit' %} {% if account.balance_type == 'debit' %}
<div class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="fw-bold"><i class="fa-solid fa-circle-up"></i> {{ _("Debit") }}</span></div> <div class="badge badge-phoenix fs-10 badge-phoenix-success"><span class="fw-bold"><i class="fa-solid fa-circle-up"></i> {{ _("Debit") }}</span></div>
@ -103,14 +105,14 @@
<div class="badge badge-phoenix fs-10 badge-phoenix-danger"><span class="fw-bold"><i class="fa-solid fa-circle-down"></i> {{ _("Credit") }}</span></div> <div class="badge badge-phoenix fs-10 badge-phoenix-danger"><span class="fw-bold"><i class="fa-solid fa-circle-down"></i> {{ _("Credit") }}</span></div>
{% endif %} {% endif %}
</td> </td>
<td class="align-middle text-end py-3 pe-3"> <td class="align-middle product white-space-nowrap">
{% if account.active %} {% if account.active %}
<span class="fw-bold text-success fas fa-check-circle"></span> <span class="fw-bold text-success fas fa-check-circle"></span>
{% else %} {% else %}
<span class="fw-bold text-danger far fa-times-circle"></span> <span class="fw-bold text-danger far fa-times-circle"></span>
{% endif %} {% endif %}
</td> </td>
<td> <td class="align-middle white-space-nowrap text-start">
<div class="btn-reveal-trigger position-static"> <div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button> <button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2"><a href="{% url 'account_detail' account.uuid %}" class="dropdown-item text-success-dark"> <div class="dropdown-menu dropdown-menu-end py-2"><a href="{% url 'account_detail' account.uuid %}" class="dropdown-item text-success-dark">
@ -121,18 +123,14 @@
</div> </div>
</td> </td>
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>
<td colspan="5" class="text-center text-muted"> <td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
{% trans "No account found." %}
</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span> <div class="d-flex justify-content-between mt-3"><span class="d-none d-sm-inline-block" data-list-info="data-list-info">{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }}<span class="text-body-tertiary"> {{ _("Items of")}} </span>{{ page_obj.paginator.count }}</span>
<div class="d-flex"> <div class="d-flex">
@ -142,7 +140,9 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
</div>
<!--test-->
{% endblock %} {% endblock %}

View File

@ -4,18 +4,19 @@
{% block title %}{{ _("Ledger") }}{% endblock title %} {% block title %}{{ _("Ledger") }}{% endblock title %}
{% block content %} {% block content %}
<div class="row mt-4"> <div class="row mt-4">
<div class="d-flex justify-content-between mb-2"> <div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Ledger" %}</h3> <h3 class="">{% trans "Ledger" %}</h3>
<a href="{% url 'ledger_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'Create Ledger' %}</a>
</div> </div>
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<a href="{% url 'ledger_create' %}" class="btn btn-md btn-phoenix-primary">
<i class="fa fa-plus me-2"></i>
{% trans 'Create Ledger' %}</a>
</div>
<div class="table-responsive px-1 scrollbar mt-3"> <div class="table-responsive px-1 scrollbar mt-3">
<table class="table fs-9 mb-0 border-top border-translucent"> <table class="table align-items-center table-flush">
<thead> <thead>
<tr class="bg-body-highlight"> <tr class="bg-body-highlight">
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Ledger Name" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Ledger Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Journal Entries" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Journal Entries" %}</th>
@ -25,8 +26,10 @@
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th> <th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr> </tr>
</thead> </thead>
<tbody class="list"> <tbody class="list">
{% for ledger in ledgers %} {% for ledger in ledgers %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static"> <tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap"> <td class="align-middle product white-space-nowrap">
{% if ledger.invoicemodel %} {% if ledger.invoicemodel %}
@ -113,7 +116,7 @@
</tr> </tr>
{% empty %} {% empty %}
<tr> <tr>
<td colspan="6" class="text-center">{% trans "No Bank Accounts Found" %}</td> <td colspan="6" class="text-center">{% trans "No Entries found" %}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
@ -122,5 +125,8 @@
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -5,75 +5,73 @@
{% block vendors %}<a class="nav-link active">{{ _("Vendors")|capfirst }}</a>{% endblock %} {% block vendors %}<a class="nav-link active">{{ _("Vendors")|capfirst }}</a>{% endblock %}
{% block content %} {% block content %}
<section class="pt-5 pb-9">
<div class="row">
<h2 class="mb-4">{{ _("Vendors")|capfirst }}</h2>
<div class="row g-3 justify-content-between mb-4">
<div class="col-auto">
<div class="d-md-flex justify-content-between">
<div>
<a href="{% url 'vendor_create' %}" class="btn btn-md btn-phoenix-primary"><span class="fas fa-plus me-2"></span>{{ _("Add Vendor") }}</a>
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{{ _("Vendors")|capfirst }}</h2>
<a href="{% url 'vendor_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{{ _("Add Vendor") }}</a>
</div> </div>
</div>
</div> <div class="col-12">
<div class="col-auto"> <form method="get" class=" mb-4">
<div class="d-flex"> <div class="input-group input-group-sm">
<div class="search-box me-2"> <button class="btn btn-sm btn-secondary rounded-start" type="submit">
<form method="get" class="d-inline-block position-relative"> {% trans "search" %}
<input name="q" class="form-control search-input search" type="search" placeholder="{{ _('Enter vendor name') }}" aria-label="Search" value="{{ request.GET.q }}"/> </button>
<span class="fas fa-search search-box-icon"></span> <input type="text"
name="q"
class="form-control form-control-sm rounded-end"
value="{{ request.GET.q }}"
placeholder="{{ _('Enter vendor name') }}" />
{% if request.GET.q %} {% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-outline-danger ms-1"> <a href="{% url request.resolver_match.view_name %}"
class="btn btn-sm btn-outline-danger ms-1 rounded">
<i class="bi bi-x-lg"></i> <i class="bi bi-x-lg"></i>
</a> </a>
{% endif %} {% endif %}
</div>
</form> </form>
</div> </div>
</div>
</div>
</div>
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table table-hover fs-9 mb-0"> {% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class= "table align-items-center table-flush table-hover">
<thead> <thead>
<tr>
<th class="sort white-space-nowrap align-middle text-uppercase ps-0" scope="col" data-sort="name" style="width:25%;">{{ _("Name")|capfirst }}</th> <tr class="bg-body-highlight">
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="email" style="width:15%;"> <th class="sort white-space-nowrap align-middle" scope="col" data-sort="name" style="width:25%;">{{ _("Name")|capfirst }}</th>
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="email" style="width:15%;">
<div class="d-inline-flex flex-center"> <div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-success-subtle rounded me-2"><span class="text-success-dark" data-feather="mail"></span></div><span>{{ _("email")|capfirst }}</span> <div class="d-flex align-items-center px-1 py-1 bg-success-subtle rounded me-2"><span class="text-success-dark" data-feather="mail"></span></div><span>{{ _("email")|capfirst }}</span>
</div> </div>
</th> </th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="phone" style="width:15%; min-width: 180px;"> <th class="sort white-space-nowrap align-middle" scope="col" data-sort="phone" style="width:15%; min-width: 180px;">
<div class="d-inline-flex flex-center"> <div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-primary-subtle rounded me-2"><span class="text-primary-dark" data-feather="phone"></span></div><span>{{ _("Phone") }}</span> <div class="d-flex align-items-center px-1 py-1 bg-primary-subtle rounded me-2"><span class="text-primary-dark" data-feather="phone"></span></div><span>{{ _("Phone") }}</span>
</div> </div>
</th> </th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="contact" style="width:15%;"> <th class="sort white-space-nowrap align-middle" scope="col" data-sort="contact" style="width:15%;">
<div class="d-inline-flex flex-center"> <div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-info-subtle rounded me-2"><span class="text-info-dark" data-feather="user"></span></div><span>{{ _("Contact name")|capfirst }}</span> <div class="d-flex align-items-center px-1 py-1 bg-info-subtle rounded me-2"><span class="text-info-dark" data-feather="user"></span></div><span>{{ _("Contact name")|capfirst }}</span>
</div> </div>
</th> </th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="company" style="width:15%;"> <th class="sort white-space-nowrap align-middle" scope="col" data-sort="company" style="width:15%;">
<div class="d-inline-flex flex-center"> <div class="d-inline-flex flex-center">
<div class="d-flex align-items-center px-1 py-1 bg-warning-subtle rounded me-2"><span class="text-warning-dark" data-feather="grid"></span></div><span>{{ _("Address")|capfirst }}</span> <div class="d-flex align-items-center px-1 py-1 bg-warning-subtle rounded me-2"><span class="text-warning-dark" data-feather="grid"></span></div><span>{{ _("Address")|capfirst }}</span>
</div> </div>
</th> </th>
<th class="sort align-middle ps-4 pe-5 text-uppercase" scope="col" data-sort="date" style="width:15%;"> <th class="sort white-space-nowrap align-middle" scope="col" data-sort="date" style="width:15%;">{{ _("Create date") }}</th>
{{ _("Create date") }}</th> <th class="sort white-space-nowrap align-middle" scope="col"></th>
<th class="sort text-end align-middle pe-0 ps-4" scope="col"></th>
</tr> </tr>
</thead> </thead>
<tbody class="list" id="leal-tables-body"> <tbody class="list">
{% for vendor in vendors %} {% for vendor in vendors %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="name align-middle white-space-nowrap ps-0"> <tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
{% if vendor.logo %} {% if vendor.logo %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{{ vendor.logo.url }}" alt="" /> <div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{{ vendor.logo.url }}" alt="" />
@ -88,13 +86,22 @@
</div> </div>
</div> </div>
</td> </td>
<td class="email align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent"><a class="text-body-highlight" href="">{{ vendor.email }}</a></td> <td class="align-middle product white-space-nowrap">
<td class="phone align-middle white-space-nowrap fw-semibold ps-4 border-end border-translucent"><a class="text-body-highlight" href="tel:{{ vendor.phone }}">{{ vendor.phone_number }}</a></td> <a class="text-body-highlight" href="">{{ vendor.email }}</a>
<td class="contact align-middle white-space-nowrap ps-4 border-end border-translucent fw-semibold text-body-highlight">{{ vendor.contact_person }}</td> </td>
<td class="company align-middle white-space-nowrap text-body-tertiary text-opacity-85 ps-4 border-end border-translucent fw-semibold text-body-highlight"> <td class="align-middle product white-space-nowrap">
{{ vendor.address }}</td> <a class="text-body-highlight" href="tel:{{ vendor.phone }}">{{ vendor.phone_number }}</a>
<td class="date align-middle white-space-nowrap text-body-tertiary text-opacity-85 ps-4 text-body-tertiary">{{ vendor.created_at|date }}</td> </td>
<td class="align-middle white-space-nowrap text-end pe-0 ps-4"> <td class="align-middle product white-space-nowrap">
{{ vendor.contact_person }}
</td>
<td class="align-middle product white-space-nowrap">
{{ vendor.address }}
</td>
<td class="align-middle product white-space-nowrap">
{{ vendor.created_at|date }}
</td>
<td class="align-middle product white-space-nowrap">
<div class="btn-reveal-trigger position-static"> <div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button> <button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2"> <div class="dropdown-menu dropdown-menu-end py-2">
@ -112,18 +119,25 @@
</div> </div>
</td> </td>
</tr> </tr>
{% empty %}
<tr>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9"> <div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
<!-- Optional: Pagination --> <!-- Optional: Pagination -->
{% if is_paginated %} {% if is_paginated %}
{% include 'partials/pagination.html' %} {% include 'partials/pagination.html' %}
{% endif %} {% endif %}
</div> </div>
{% endif %}
</div> </div>
</section>
{% include 'modal/delete_modal.html' %} {% include 'modal/delete_modal.html' %}
{% endblock %} {% endblock %}