This commit is contained in:
2025-12-08 14:35:28 +07:00
parent ac2717b077
commit 0068d20a12
12 changed files with 58 additions and 438 deletions

View File

@@ -42,15 +42,15 @@
</div>
<div class="btn-right flex items-center mb-3 gap-3">
<a href="/admin/product/form" class="btn btn-sm btn-outline btn-view">
<i class="iconify lucide--plus"></i>
<i data-lucide="plus" class="size-4"></i>
<span>Thêm sản phẩm mới</span>
</a>
<a href="" class="btn btn-outline btn-sm btn-view">
<i class="iconify lucide--file-pdf"></i>
<i data-lucide="file-text" class="size-4"></i>
<span class="ml-1">Danh sách cập nhật</span>
</a>
<a href="" class="btn btn-outline btn-sm btn-view">
<i class="iconify lucide--file-x"></i>
<i data-lucide="file-x" class="size-4"></i>
<span class="ml-1">Cập nhật Excel</span>
</a>
</div>
@@ -58,13 +58,13 @@
<div class="overflow-x-auto mt-5 border border-base-200 rounded-sm">
<table class="table">
<thead>
<tr class="bg-base-200 text-black">
<tr class="bg-base-300 text-black font-bold">
<th>STT</th>
<th>Ảnh</th>
<th>Sản phẩm (Tổng số: {{page.total}})</th>
<th>Thông tin bán hàng</th>
<th>
<select id="" class="select" onchange="location.href=this.value">
<select id="" class="select select-sm" onchange="location.href=this.value">
<option value="/admin/product?">Lọc sản phẩm</option>
<option value="/admin/product?hotType=new">Mới</option>
<option value="/admin/product?hotType=hot">HOT (hỏi nhiều)</option>
@@ -80,7 +80,7 @@
{% assign counter = 0 %}
{% for item in page.item_list %}
{% increment counter %}
<tr>
<tr class="hover:bg-base-300">
<td>{{ counter }}</td>
<td>
<img class="block mx-auto my-0 w-[70px] h-[50px]" src="{{item.image.thumb}}" alt="">
@@ -99,7 +99,7 @@
<div class="flex items-center my-1 gap-2">
<span>Mã kho</span>
<b class="px-2">{{item.sku}}</b>
<span class="text-black font-[500]">|</span>
<span class="text-black font-500">|</span>
<span class="px-2">Hãng</span>
<p class="link-primary">{{item.model}}</p>
</div>
@@ -143,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 checkbox-sm" />
class="checkbox checkbox-active checkbox-sm" />
<span class="label-text whitespace-nowrap">Mới Hot (Hỏi nhiều)</span>
</label>
@@ -151,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 checkbox-sm" />
class="checkbox checkbox-active 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 checkbox-sm" />
{% endif %} class="checkbox checkbox-active checkbox-sm" />
<span class="label-text whitespace-nowrap">Bán
chạy</span>
</label>
@@ -166,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 checkbox-sm" />
endif %} class="checkbox checkbox-active checkbox-sm" />
<span class="label-text whitespace-nowrap">Xả
hàng (sale-off)</span>
</label>
@@ -174,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 checkbox-sm" />
%}checked="checked" {% endif %} class="checkbox checkbox-active checkbox-sm" />
<span class="label-text whitespace-nowrap">Chỉ bán online</span>
</label>
@@ -210,7 +210,6 @@
</tbody>
</table>
</div>
<div class="join mt-5 justify-center flex items-center">
{% for paging in page.pagination.collection %}
{% if paging.name == 'next' %}
@@ -229,12 +228,8 @@
{% endif %}
{% endfor %}
</div>
</div>
<dialog id="js_list_category" class="modal">
<div class="modal-box w-11/12 max-w-5xl">
<form method="dialog">