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,48 +4,68 @@
{% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %}
<div class="row mt-4 mx-4">
<div class="d-flex justify-content-between mb-2 p-6">
<span></span>
<h3 class="text-center">{% trans "Expenses" %}</h3>
<div class="row mt-4">
<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>
</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">
<table class="table fs-9 mb-0 border-top border-translucent">
<thead>
<tr>
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<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 "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 "Action" %}</th>
</tr>
</thead>
<tbody class="list">
{% for expense in expenses %}
<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">{{ expense.name }}</td>
<td class="align-middle product white-space-nowrap">{{ expense.uom }}</td>
<td class="">
<a href="{% url 'item_expense_update' expense.pk %}"
<tbody class="list">
{% for expense in expenses %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{{ expense.item_number }}
</td>
<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 %}"
class="btn btn-sm btn-phoenix-success">
{% trans "Update" %}
</a>
</td>
</tr>
</td>
<td class="align-middle product white-space-nowrap">
</td>
<td class="align-middle white-space-nowrap text-start">
</td>
</tr>
{% empty %}
<tr>
<td colspan="6" class="text-center">{% trans "No Invoice Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
</div>
<tr>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -4,19 +4,19 @@
{% block title %}{{ _("Expenses") }}{% endblock title %}
{% block content %}
<div class="row">
<div class="d-flex justify-content-between">
<h3 class="mb-2">{% 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>
<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>
</div>
<div class="table-responsive scrollbar transition">
<table class="table table-sm fs-9 mb-0 border-translucent">
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<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 "Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Unit of Measure" %}</th>
@ -25,30 +25,43 @@
<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 py-0">{{ service.pk }}</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">
{% if service.taxable %}
Yes
{% else %}
No
{% endif %}
{{ service.pk }}
</td>
<td class="align-middle product white-space-nowrap">{{ service.item.co }}</td>
<td class="text-center">
<a href="{% url 'item_service_update' service.pk %}"
<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">
{% if service.taxable %}
Yes
{% else %}
No
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
{{ service.item.co }}
</td>
<td class="align-middle white-space-nowrap text-start">
<a href="{% url 'item_service_update' service.pk %}"
class="btn btn-sm btn-phoenix-success">
{% trans "Update" %}
</a>
</td>
</tr>
{% empty %}
{% empty %}
<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>
{% endfor %}
</tbody>
@ -56,5 +69,9 @@
</div>
<div class="d-flex justify-content-center">
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -5,52 +5,82 @@
{% block content %}
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Bank Accounts" %}</h3>
<div class="d-flex justify-content-between mb-2">
<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>
</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">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="border-top border-translucent ps-3">{% trans "Name" %}</th>
<th class="border-top border-translucent ps-3">{% trans "Account Number" %}</th>
<th class="border-top border-translucent text-end pe-3">{% 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 "Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account Number" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Type" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr>
</thead>
<tbody class="list">
{% for bank in bank_accounts %}
{% for bank in bank_accounts %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle ps-3">{{ bank.name }}</td>
<td class="align-middle ps-3">{{ bank.account_number }}</td>
<td class="align-middle product text-end pe-3 ">{{ bank.account_type|capfirst }}</td>
<td class="align-middle product text-end pe-3 ">
<a href="{% url 'bank_account_update' bank.pk %}"
<td class="align-middle product white-space-nowrap">
{{ bank.name }}
</td>
<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 %}"
class="btn btn-sm btn-phoenix-success">
{% trans "Update" %}
</a>
</td>
</td>
</tr>
{% empty %}
<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>
{% endfor %}
</tbody>
</table>
</div>
<div class="d-flex justify-content-center">
<div class="d-flex justify-content-center">
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -8,16 +8,12 @@
</a>
{% endblock %}
{% block content %}
<!-- Search Bar -->
<!--test-->
<div class="row mt-4">
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
<a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary">
<i class="fa fa-plus me-2"></i>
{% trans 'New Account' %}</a>
<div class="d-flex justify-content-between mb-2">
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
<a href="{% url 'account_create' %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Account' %}</a>
</div>
<h3 class="mb-3">
<i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
<div class="col-12">
<form method="get" class=" mb-4">
<div class="input-group input-group-sm">
@ -38,25 +34,24 @@
</div>
</form>
</div>
</div>
{% if page_obj.object_list %}
{% if page_obj.object_list %}
<div class="table-responsive px-1 scrollbar mt-3">
<table class="table align-items-center table-flush">
<thead>
<tr class="bg-body-highlight">
<th class="border-top border-translucent">{% trans "Type" %}</th>
<th class="border-top border-translucent ps-3">{% trans "Account Name" %}</th>
<th class="border-top border-translucent">{% trans "Code" %}</th>
<th class="border-top border-translucent text-end pe-3">{% trans "Balance Type" %}</th>
<th class="border-top border-translucent text-end pe-3">{% 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">{% trans "Type" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Account Name" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Code" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Balance Type" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Active" %}</th>
<th class="sort white-space-nowrap align-middle" scope="col"></th>
</tr>
</thead>
<tbody class="list">
{% for account in accounts %}
{% for account in accounts %}
<div class="modal fade" id="deleteModal"
data-bs-backdrop="static"
@ -91,26 +86,33 @@
</div>
</div>
</div>
<tr>
<td class="align-middle ps-3 fw-lighter">{{ account.role_bs|upper }}</td>
<td class="align-middle ps-3">{{ account.name }}</td>
<td class="align-middle">{{ account.code }}</td>
<td class="align-middle text-end py-3 pe-3">
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{{ account.role_bs|upper }}
</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' %}
<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>
{% else %}
<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 %}
</td>
<td class="align-middle text-end py-3 pe-3">
{% if account.active %}
<td class="align-middle product white-space-nowrap">
{% if account.active %}
<span class="fw-bold text-success fas fa-check-circle"></span>
{% else %}
<span class="fw-bold text-danger far fa-times-circle"></span>
{% endif %}
</td>
<td>
<td class="align-middle white-space-nowrap text-start">
<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>
<div class="dropdown-menu dropdown-menu-end py-2"><a href="{% url 'account_detail' account.uuid %}" class="dropdown-item text-success-dark">
@ -118,21 +120,17 @@
</a>
<div class="dropdown-divider"></div><button class="dropdown-item text-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">{% trans "Delete" %}</button>
</div>
</div>
</div>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center text-muted">
{% trans "No account found." %}
</td>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</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">
@ -142,7 +140,9 @@
</div>
</div>
{% endif %}
</div>
<!--test-->
{% endblock %}

View File

@ -4,18 +4,19 @@
{% block title %}{{ _("Ledger") }}{% endblock title %}
{% block content %}
<div class="row mt-4">
<div class="d-flex justify-content-between mb-2">
<h3 class="">{% trans "Ledger" %}</h3>
</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>
<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 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>
<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 "Journal Entries" %}</th>
@ -25,11 +26,13 @@
<th class="sort white-space-nowrap align-middle" scope="col">{% trans "Action" %}</th>
</tr>
</thead>
<tbody class="list">
{% for ledger in ledgers %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="align-middle product white-space-nowrap">
{% if ledger.invoicemodel %}
{% if ledger.invoicemodel %}
<a href="{% url 'invoice_detail' ledger.invoicemodel.pk %}">{{ ledger.get_wrapped_model_instance }}</a>
{% elif ledger.billmodel %}
<a href="{% url 'bill_detail' ledger.billmodel.pk %}">{{ ledger.get_wrapped_model_instance }}</a>
@ -38,7 +41,7 @@
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
<a class="btn btn-sm btn-primary"
<a class="btn btn-sm btn-primary"
href="{% url 'journalentry_list' ledger.pk %}">
<i class="fa-solid fa-right-left"></i>
<span>
@ -48,21 +51,21 @@
</a>
</td>
<td class="align-middle product white-space-nowrap">
{{ ledger.created |date }}
{{ ledger.created |date }}
</td>
<td class="align-middle product white-space-nowrap">
{% if ledger.is_posted %}
{% if ledger.is_posted %}
<i class="fa-solid fa-square-check text-success"></i>
{% else %}
<i class="fa-solid fa-circle-xmark text-danger"></i>
{% endif %}
</td>
<td class="align-middle product white-space-nowrap">
{% if ledger.is_locked %}
{% if ledger.is_locked %}
<i class="fa-solid fa-lock text-success"></i>
{% else %}
<i class="fa-solid fa-unlock text-danger"></i>
{% endif %}
{% endif %}
</td>
<td class="align-middle white-space-nowrap text-start">
<div class="btn-reveal-trigger position-static">
@ -108,12 +111,12 @@
class="dropdown-item has-text-danger has-text-weight-bold">{% trans 'Delete' %}</a>
{% endif %}
</div>
</div>
</div>
</td>
</tr>
{% empty %}
<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>
{% endfor %}
</tbody>
@ -121,6 +124,9 @@
</div>
<div class="d-flex justify-content-center">
</div>
</div>
{% endblock %}

View File

@ -5,125 +5,139 @@
{% block vendors %}<a class="nav-link active">{{ _("Vendors")|capfirst }}</a>{% endblock %}
{% 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>
</div>
<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 class="col-auto">
<div class="d-flex">
<div class="search-box me-2">
<form method="get" class="d-inline-block position-relative">
<input name="q" class="form-control search-input search" type="search" placeholder="{{ _('Enter vendor name') }}" aria-label="Search" value="{{ request.GET.q }}"/>
<span class="fas fa-search search-box-icon"></span>
{% if request.GET.q %}
<a href="{% url request.resolver_match.view_name %}" class="btn btn-outline-danger ms-1">
<i class="bi bi-x-lg"></i>
</a>
{% endif %}
</form>
</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="{{ _('Enter vendor name') }}" />
{% 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>
</div>
<div class="table-responsive scrollbar mx-n1 px-1">
<table class="table table-hover fs-9 mb-0">
<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>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="email" style="width:15%;">
<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>
</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;">
<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>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="contact" style="width:15%;">
<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>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase border-end border-translucent" scope="col" data-sort="company" style="width:15%;">
<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>
</th>
<th class="sort align-middle ps-4 pe-5 text-uppercase" scope="col" data-sort="date" style="width:15%;">
{{ _("Create date") }}</th>
<th class="sort text-end align-middle pe-0 ps-4" scope="col"></th>
</tr>
</thead>
<tbody class="list" id="leal-tables-body">
{% for vendor in vendors %}
<tr class="hover-actions-trigger btn-reveal-trigger position-static">
<td class="name align-middle white-space-nowrap ps-0">
<div class="d-flex align-items-center">
{% if vendor.logo %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{{ vendor.logo.url }}" alt="" />
{% else %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{% static 'images/icons/picture.svg' %}" alt="" />
{% endif %}
{% 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>
<tr class="bg-body-highlight">
<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-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>
</th>
<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-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><a class="fs-8 fw-bold" href="{% url 'vendor_detail' vendor.slug %}">{{ vendor.arabic_name }}</a>
<div class="d-flex align-items-center">
<p class="mb-0 text-body-highlight fw-semibold fs-9 me-2">{{ vendor.name}}</p><!--<span class="badge badge-phoenix badge-phoenix-primary">{{ vendor.vendor_model.uuid }}</span>-->
</div>
</div>
</div>
</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="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>
<td class="contact align-middle white-space-nowrap ps-4 border-end border-translucent fw-semibold text-body-highlight">{{ vendor.contact_person }}</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">
{{ vendor.address }}</td>
<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 class="align-middle white-space-nowrap text-end pe-0 ps-4">
<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>
<div class="dropdown-menu dropdown-menu-end py-2">
<a href="{% url 'vendor_update' vendor.slug %}" class="dropdown-item text-success-dark">
{% trans "Edit" %}
</a>
<div class="dropdown-divider"></div>
<button class="delete-btn dropdown-item text-danger"
data-url="{% url 'vendor_delete' vendor.slug %}"
data-message="{{ _("Are you sure you want to delete this vendor")}}?"
data-bs-toggle="modal" data-bs-target="#deleteModal">
{{ _("Delete") }}
</button>
</div>
</div>
</td>
</th>
<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-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>
</th>
<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-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>
</th>
<th class="sort white-space-nowrap align-middle" scope="col" data-sort="date" style="width:15%;">{{ _("Create date") }}</th>
<th class="sort white-space-nowrap align-middle" scope="col"></th>
</tr>
{% endfor %}
</tbody>
</thead>
<tbody class="list">
{% for vendor in vendors %}
<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">
{% if vendor.logo %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{{ vendor.logo.url }}" alt="" />
{% else %}
<div class="avatar avatar-xl me-3"><img class="rounded-circle" src="{% static 'images/icons/picture.svg' %}" alt="" />
{% endif %}
</div>
<div><a class="fs-8 fw-bold" href="{% url 'vendor_detail' vendor.slug %}">{{ vendor.arabic_name }}</a>
<div class="d-flex align-items-center">
<p class="mb-0 text-body-highlight fw-semibold fs-9 me-2">{{ vendor.name}}</p><!--<span class="badge badge-phoenix badge-phoenix-primary">{{ vendor.vendor_model.uuid }}</span>-->
</div>
</div>
</div>
</td>
<td class="align-middle product white-space-nowrap">
<a class="text-body-highlight" href="">{{ vendor.email }}</a>
</td>
<td class="align-middle product white-space-nowrap">
<a class="text-body-highlight" href="tel:{{ vendor.phone }}">{{ vendor.phone_number }}</a>
</td>
<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">
<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 'vendor_update' vendor.slug %}" class="dropdown-item text-success-dark">
{% trans "Edit" %}
</a>
<div class="dropdown-divider"></div>
<button class="delete-btn dropdown-item text-danger"
data-url="{% url 'vendor_delete' vendor.slug %}"
data-message="{{ _("Are you sure you want to delete this vendor")}}?"
data-bs-toggle="modal" data-bs-target="#deleteModal">
{{ _("Delete") }}
</button>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
<!-- Optional: Pagination -->
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% empty %}
<tr>
<td colspan="6" class="text-center text-muted">{% trans "No Accounts Found" %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="row align-items-center justify-content-end py-4 pe-0 fs-9">
<!-- Optional: Pagination -->
{% if is_paginated %}
{% include 'partials/pagination.html' %}
{% endif %}
</div>
{% endif %}
</div>
</div>
</section>
</div>
{% include 'modal/delete_modal.html' %}
{% endblock %}