This commit is contained in:
2025-12-04 17:20:42 +07:00
parent 3f57e61be2
commit 75a641ab40
8 changed files with 160 additions and 159 deletions

View File

@@ -2,23 +2,54 @@
<h1 class="text-2xl font-bold mb-3">Danh sách sản phẩm ({{ page.total | format_number }})</h1>
<div class="flex flex-wrap justify-between items-center">
<div class="btn-left flex items-center mb-3 gap-3">
<a href="javascript:void(0)" onclick="js_list_category.showModal()" class="btn btn-outline btn-view">
Chọn danh mục để xem
</a>
<a href="javascript:void(0)" onclick="js_list_brand.showModal()" class="btn btn-outline btn-view">
<div class="form-control w-48">
<div class="dropdown dropdown-bottom w-full">
<label tabindex="0" class="btn btn-view btn-sm btn-outline w-full flex justify-between">
Chọn danh mục
<i class="iconify lucide--chevron-down"></i>
</label>
<ul tabindex="0" class="dropdown-content menu bg-white shadow-xl rounded-box w-80 mt-1 p-2">
{% for cate in page.list_category %}
{% if cate.children.size > 0 %}
<li>
<details>
<summary><a href="{{cate.url}}">{{cate.title}}</a></summary>
{% for cate2 in cate.children %}
<ul>
<li><a>{{cate2.title}}</a></li>
{% if cate2.children.size > 0 %}
<ul class="ml-4">
{% for cate3 in cate2.children %}
<li><a href="{{cate3.url}}">{{cate3.title}} ({{cate3.totalProduct}})</a></li>
{% endfor %}
</ul>
{% endif %}
</ul>
{% endfor %}
</details>
</li>
{% else %}
<li><a href="{{cate.url}}">{{cate.title}}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
<a href="javascript:void(0)" onclick="js_list_brand.showModal()" class="btn btn-outline btn-sm btn-view">
Chọn thương hiệu để xem
</a>
</div>
<div class="btn-right flex items-center mb-3 gap-3">
<a href="/admin/product/form" class="btn btn-outline btn-view">
<a href="/admin/product/form" class="btn btn-sm btn-outline btn-view">
<i class="iconify lucide--plus"></i>
<span>Thêm sản phẩm mới</span>
</a>
<a href="" class="btn btn-outline btn-view">
<a href="" class="btn btn-outline btn-sm btn-view">
<i class="iconify lucide--file-pdf"></i>
<span class="ml-1">Danh sách cập nhật</span>
</a>
<a href="" class="btn btn-outline btn-view">
<a href="" class="btn btn-outline btn-sm btn-view">
<i class="iconify lucide--file-x"></i>
<span class="ml-1">Cập nhật Excel</span>
</a>
@@ -112,7 +143,7 @@
<label class="cursor-pointer flex items-center mb-2 gap-2"
onclick="AdminFunction.update_product_hot('{{item.id}}')">
<input type="checkbox" name="new" {% if item.hot_type=="new" %}checked="checked" {% endif %}
class="checkbox checkbox-success" />
class="checkbox checkbox-success checkbox-sm" />
<span class="label-text whitespace-nowrap">Mới Hot (Hỏi nhiều)</span>
</label>
@@ -120,14 +151,14 @@
<label class="cursor-pointer flex items-center mb-2 gap-2"
onclick="AdminFunction.update_product_hot('{{item.id}}')">
<input type="checkbox" name="hot" {% if item.hot_type=="hot" %}checked="checked" {% endif %}
class="checkbox checkbox-success" />
class="checkbox checkbox-success checkbox-sm" />
<span class="label-text whitespace-nowrap">Hot (Hỏi nhiều)</span>
</label>
<label class="cursor-pointer flex items-center mb-2 gap-2"
onclick="AdminFunction.update_product_hot('{{item.id}}')">
<input type="checkbox" name="bestsale" {% if item.hot_type=="bestsale" %}checked="checked"
{% endif %} class="checkbox checkbox-success" />
{% endif %} class="checkbox checkbox-success checkbox-sm" />
<span class="label-text whitespace-nowrap">Bán
chạy</span>
</label>
@@ -135,7 +166,7 @@
<label class="cursor-pointer flex items-center mb-2 gap-2"
onclick="AdminFunction.update_product_hot('{{item.id}}')">
<input type="checkbox" name="saleoff" {% if item.hot_type=="saleoff" %}checked="checked" {%
endif %} class="checkbox checkbox-success" />
endif %} class="checkbox checkbox-success checkbox-sm" />
<span class="label-text whitespace-nowrap">Xả
hàng (sale-off)</span>
</label>
@@ -143,7 +174,7 @@
<label class="cursor-pointer flex items-center mb-2 gap-2"
onclick="AdminFunction.update_product_hot('{{item.id}}')">
<input type="checkbox" name="online-only" {% if item.hot_type=="online-only"
%}checked="checked" {% endif %} class="checkbox checkbox-success" />
%}checked="checked" {% endif %} class="checkbox checkbox-success checkbox-sm" />
<span class="label-text whitespace-nowrap">Chỉ bán online</span>
</label>
@@ -202,6 +233,8 @@
</div>
<dialog id="js_list_category" class="modal">
<div class="modal-box w-11/12 max-w-5xl">
<form method="dialog">