update icon,fixed menu, modal category, modal brand

This commit is contained in:
2024-01-30 15:53:37 +07:00
25 changed files with 723 additions and 533 deletions

View File

@@ -1,21 +1,14 @@
<div class="grid w-[100%] ">
<div class="m-[15px] px-[15px] py-[20px] rounded-[15px] bg-white shadow-[0_1px_1px_0_rgba(0,0,0,0.1)]">
<div class="w-[100%]">
<div
class="m-[15px] px-[15px] py-[20px] rounded-[15px] bg-white shadow-[0_1px_1px_0_rgba(0,0,0,0.1)] overflow-x-auto">
<h1 class="text-2xl font-[700] mb-3">Danh sách sản phẩm ({{ page.total | format_number }})</h1>
<form
class="w-[100%] flex w-[100%] rounded-[10px] p-[15px] border-solid border-[#F6F6F6] border-[1px] shadow-[0_1px_1px_0_rgba(0,0,0,0.1)]">
<input type="search" class="block border h-[36px] ps-3 rounded w-[375px]" placeholder="Tìm sản phẩm">
<div
class="w-[100px] rounded-[4px] ml-[9px] bg-[#0041E8] text-white flex leading-[35px] text-center items-center justify-center cursor-pointer">
Tìm kiếm
</div>
</form>
<div class="flex justify-between items-center mt-[20px]">
<div class="btn-left flex items-center">
<a href=""
<a href="javascript:void(0)" onclick="js_list_category.showModal()"
class="px-[10px] py-[8px] border-[#79B0E2] border-[1px] rounded-[4px] text-[#79B0E2] hover:bg-[#0061ff] hover:text-white mr-[15px]">
Chọn danh mục để xem
</a>
<a href=""
<a href="javascript:void(0)" onclick="js_list_brand.showModal()"
class="px-[10px] py-[8px] border-[#79B0E2] border-[1px] rounded-[4px] text-[#79B0E2] hover:bg-[#0061ff] hover:text-white mr-[15px]">
Chọn thương hiệu để xem
</a>
@@ -29,53 +22,12 @@
</a>
<a href=""
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white ml-[15px] hover:stroke-white font-[500]">
<svg class="hover:fill-white" xmlns="http://www.w3.org/2000/svg" width="14" height="15"
viewBox="0 0 14 15" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M1.30461 1.30461C1.49965 1.10957 1.76417 1 2.04 1H8.28C8.41791 1 8.55018 1.05479 8.6477 1.1523L12.2877 4.7923C12.3852 4.88982 12.44 5.02209 12.44 5.16V7.76C12.44 8.04719 12.2072 8.28 11.92 8.28C11.6328 8.28 11.4 8.04719 11.4 7.76V5.37539L8.06461 2.04L2.04 2.04L2.04 7.76C2.04 8.04719 1.80719 8.28 1.52 8.28C1.23281 8.28 1 8.04719 1 7.76V2.04C1 1.76417 1.10957 1.49965 1.30461 1.30461Z"
fill="#0041E8" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.28 1C8.56719 1 8.8 1.23281 8.8 1.52V4.64H11.92C12.2072 4.64 12.44 4.87281 12.44 5.16C12.44 5.44719 12.2072 5.68 11.92 5.68H8.28C7.99281 5.68 7.76 5.44719 7.76 5.16V1.52C7.76 1.23281 7.99281 1 8.28 1Z"
fill="#0041E8" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M1 10.36C1 10.0728 1.23281 9.84 1.52 9.84H2.56C2.97374 9.84 3.37053 10.0044 3.66309 10.2969C3.95564 10.5895 4.12 10.9863 4.12 11.4C4.12 11.8137 3.95564 12.2105 3.66309 12.5031C3.37053 12.7956 2.97374 12.96 2.56 12.96H2.04V13.48C2.04 13.7672 1.80719 14 1.52 14C1.23281 14 1 13.7672 1 13.48V10.36ZM2.04 11.92H2.56C2.69791 11.92 2.83018 11.8652 2.9277 11.7677C3.02521 11.6702 3.08 11.5379 3.08 11.4C3.08 11.2621 3.02521 11.1298 2.9277 11.0323C2.83018 10.9348 2.69791 10.88 2.56 10.88H2.04V11.92Z"
fill="#0041E8" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.1 10.36C10.1 10.0728 10.3328 9.84 10.62 9.84H12.44C12.7272 9.84 12.96 10.0728 12.96 10.36C12.96 10.6472 12.7272 10.88 12.44 10.88H11.14V13.48C11.14 13.7672 10.9072 14 10.62 14C10.3328 14 10.1 13.7672 10.1 13.48V10.36Z"
fill="#0041E8" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.1 12.18C10.1 11.8928 10.3328 11.66 10.62 11.66H12.18C12.4672 11.66 12.7 11.8928 12.7 12.18C12.7 12.4672 12.4672 12.7 12.18 12.7H10.62C10.3328 12.7 10.1 12.4672 10.1 12.18Z"
fill="#0041E8" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M5.29 10.36C5.29 10.0728 5.52281 9.84 5.81 9.84H6.72C7.27165 9.84 7.80071 10.0591 8.19078 10.4492C8.58086 10.8393 8.8 11.3683 8.8 11.92C8.8 12.4716 8.58086 13.0007 8.19078 13.3908C7.80071 13.7809 7.27165 14 6.72 14H5.81C5.52281 14 5.29 13.7672 5.29 13.48V10.36ZM6.33 10.88V12.96H6.72C6.99583 12.96 7.26035 12.8504 7.45539 12.6554C7.65043 12.4604 7.76 12.1958 7.76 11.92C7.76 11.6442 7.65043 11.3796 7.45539 11.1846C7.26035 10.9896 6.99583 10.88 6.72 10.88H6.33Z"
fill="#0041E8" />
<path
d="M8.28 1H2.04C1.76417 1 1.49965 1.10957 1.30461 1.30461C1.10957 1.49965 1 1.76417 1 2.04V7.76C1 8.04719 1.23281 8.28 1.52 8.28C1.80719 8.28 2.04 8.04719 2.04 7.76L2.04 2.04L8.06461 2.04L11.4 5.37539V7.76C11.4 8.04719 11.6328 8.28 11.92 8.28C12.2072 8.28 12.44 8.04719 12.44 7.76V5.16M8.28 1C8.41791 1 8.55018 1.05479 8.6477 1.1523L12.2877 4.7923C12.3852 4.88982 12.44 5.02209 12.44 5.16M8.28 1C8.56719 1 8.8 1.23281 8.8 1.52V4.64H11.92C12.2072 4.64 12.44 4.87281 12.44 5.16M8.28 1C7.99281 1 7.76 1.23281 7.76 1.52V5.16C7.76 5.44719 7.99281 5.68 8.28 5.68H11.92C12.2072 5.68 12.44 5.44719 12.44 5.16M1.52 9.84C1.23281 9.84 1 10.0728 1 10.36V13.48C1 13.7672 1.23281 14 1.52 14C1.80719 14 2.04 13.7672 2.04 13.48V12.96H2.56C2.97374 12.96 3.37053 12.7956 3.66309 12.5031C3.95564 12.2105 4.12 11.8137 4.12 11.4C4.12 10.9863 3.95564 10.5895 3.66309 10.2969C3.37053 10.0044 2.97374 9.84 2.56 9.84H1.52ZM2.56 11.92H2.04V10.88H2.56C2.69791 10.88 2.83018 10.9348 2.9277 11.0323C3.02521 11.1298 3.08 11.2621 3.08 11.4C3.08 11.5379 3.02521 11.6702 2.9277 11.7677C2.83018 11.8652 2.69791 11.92 2.56 11.92ZM10.62 9.84C10.3328 9.84 10.1 10.0728 10.1 10.36V13.48C10.1 13.7672 10.3328 14 10.62 14C10.9072 14 11.14 13.7672 11.14 13.48V10.88H12.44C12.7272 10.88 12.96 10.6472 12.96 10.36C12.96 10.0728 12.7272 9.84 12.44 9.84H10.62ZM10.62 11.66C10.3328 11.66 10.1 11.8928 10.1 12.18C10.1 12.4672 10.3328 12.7 10.62 12.7H12.18C12.4672 12.7 12.7 12.4672 12.7 12.18C12.7 11.8928 12.4672 11.66 12.18 11.66H10.62ZM5.81 9.84C5.52281 9.84 5.29 10.0728 5.29 10.36V13.48C5.29 13.7672 5.52281 14 5.81 14H6.72C7.27165 14 7.80071 13.7809 8.19078 13.3908C8.58086 13.0007 8.8 12.4716 8.8 11.92C8.8 11.3683 8.58086 10.8393 8.19078 10.4492C7.80071 10.0591 7.27165 9.84 6.72 9.84H5.81ZM6.33 12.96V10.88H6.72C6.99583 10.88 7.26035 10.9896 7.45539 11.1846C7.65043 11.3796 7.76 11.6442 7.76 11.92C7.76 12.1958 7.65043 12.4604 7.45539 12.6554C7.26035 12.8504 6.99583 12.96 6.72 12.96H6.33Z"
stroke="#0041E8" stroke-width="0.3" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<i class="fa-regular fa-file-pdf"></i>
<span class="ml-1">Danh sách cập nhật</span>
</a>
<a href=""
class="flex items-center px-[10px] py-[8px] border-[#0041E8] border-[1px] rounded-[4px] text-[#0041E8] hover:bg-[#0041E8] hover:text-white ml-[15px] hover:stroke-white font-[500]">
<svg class="hover:fill-white" xmlns="http://www.w3.org/2000/svg" width="13" height="15"
viewBox="0 0 13 15">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M1.29289 1.29289C1.48043 1.10536 1.73478 1 2 1H8C8.13261 1 8.25979 1.05268 8.35355 1.14645L11.8536 4.64645C11.9473 4.74021 12 4.86739 12 5V13C12 13.2652 11.8946 13.5196 11.7071 13.7071C11.5196 13.8946 11.2652 14 11 14H2C1.73478 14 1.48043 13.8946 1.29289 13.7071C1.10536 13.5196 1 13.2652 1 13V2C1 1.73478 1.10536 1.48043 1.29289 1.29289ZM7.79289 2L2 2L2 13H11V5.20711L7.79289 2Z"
fill="#0041E8" stroke="#0041E8" stroke-width="0.3" stroke-linecap="round"
stroke-linejoin="round" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8 1C8.27614 1 8.5 1.22386 8.5 1.5V4.5H11.5C11.7761 4.5 12 4.72386 12 5C12 5.27614 11.7761 5.5 11.5 5.5H8C7.72386 5.5 7.5 5.27614 7.5 5V1.5C7.5 1.22386 7.72386 1 8 1Z"
fill="#0041E8" stroke="#0041E8" stroke-width="0.3" stroke-linecap="round"
stroke-linejoin="round" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M4.64645 7.14645C4.84171 6.95118 5.15829 6.95118 5.35355 7.14645L8.35355 10.1464C8.54882 10.3417 8.54882 10.6583 8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L4.64645 7.85355C4.45118 7.65829 4.45118 7.34171 4.64645 7.14645Z"
fill="#0041E8" stroke="#0041E8" stroke-width="0.3" stroke-linecap="round"
stroke-linejoin="round" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.35355 7.14645C8.54882 7.34171 8.54882 7.65829 8.35355 7.85355L5.35355 10.8536C5.15829 11.0488 4.84171 11.0488 4.64645 10.8536C4.45118 10.6583 4.45118 10.3417 4.64645 10.1464L7.64645 7.14645C7.84171 6.95118 8.15829 6.95118 8.35355 7.14645Z"
fill="#0041E8" stroke="#0041E8" stroke-width="0.3" stroke-linecap="round"
stroke-linejoin="round" />
</svg>
<i class="fa-regular fa-file-excel"></i>
<span class="ml-1">Cập nhật Excel</span>
</a>
</div>
@@ -114,7 +66,7 @@
</td>
<td>
<a href="/admin/product/form?id={{item.id}}"
class="text-[#0041E8] w-[300px] inline-block">{{item.title}}</a>
class="text-[#0041E8] inline-block w-[140px]">{{item.title}}</a>
{% if item.config_count > 0 %}<p class="text-[#FFC700]">[Có cấu hình]</p>{% endif %}
<div class="flex items-center">
<span>Danh mục:</span>
@@ -145,7 +97,7 @@
</td>
<td>
<div class="flex items-center mb-[1px]">
<span class="whitespace-nowrap">- Giá bán:</span>
<span class="">- Giá bán:</span>
<b class="text-[#E00000] ml-[3px] whitespace-nowrap">
{% if item.price > 0 %}
{{item.price | format_price }} vnd
@@ -240,4 +192,101 @@
</div>
<dialog id="js_list_category" class="modal">
<div class="modal-box w-11/12 max-w-5xl">
<form method="dialog">
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2"></button>
</form>
<div class="flex items-center">
<b class="text-[16px]">Tổng sản phẩm:</b>
<p class="ml-[5px]">{{page.total}} sản phẩm</p>
</div>
<div class="list-category mt-[5px] max-h-[400px] max-h-[400px] overflow-x-auto">
{% for cate in page.list_category %}
<a href="{{cate.url}}" class="item block mb-[5px] text-[#0041E8]">
{% if cate.children.size > 0 %}
<b class="text-[#0041E8]">+ (#{{cate.id}}){{cate.title}}</b>
{% else %}
+ (#{{cate.id}}){{cate.title}}
{% endif %}
</a>
{% if cate.children.size > 0 %}
<div class="ml-[15px]">
{% for cate2 in cate.children %}
<a href="{{cate2.url}}" class="item block mb-[5px] text-[#0041E8]">
{% if cate2.children.size > 0 %}
<b class="text-[#0041E8]">+ (#{{cate2.id}}){{cate2.title}}</b>
{% else %}
+ (#{{cate2.id}}){{cate2.title}} ({{cate2.totalProduct}})
{% endif %}
</a>
{% if cate2.children.size > 0 %}
<div class="ml-[15px]">
{% for cate3 in cate2.children %}
<a href="{{cate3.url}}" class="item block mb-[5px] text-[#0041E8]">+
(#{{cate3.id}}){{cate3.title}}
({{cate3.totalProduct}})</a>
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
</dialog>
<dialog id="js_list_brand" class="modal">
<div class="modal-box w-11/12 max-w-3xl">
<form method="dialog">
<button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2"></button>
</form>
<div class="flex flex-wrap items-center">
<b class="inline-block w-[120px]">Tìm theo chữ cái</b>
<div class="list-key inline-block ml-[10px] w-[calc(100%-140px)]">
{% for key in page.brand_letters %}
<a href="{{key.url}}">
<span class="text-[#0041E8] underline">{{key.key}}</span> <span>({{key.total}})</span>
</a>
{% endfor %}
</div>
<table class="mt-[15px] w-[100%] table-brand">
<thead>
<tr>
<th>STT</th>
<th>Thương hiệu</th>
<th class="whitespace-nowrap">Số lượng sản phẩm</th>
</tr>
</thead>
<tbody>
{% assign stt = 0 %}
{% for item in page.list_brands %}
{% for item2 in item.1 %}
{% increment stt %}
<tr>
<td class="w-[10%]">{{stt}}</td>
<td>{{item2.name}}</td>
<td class="w-[18%]">
<span>{{item2.product}}</span>
<a href="{{item2.url}}" class="text-[#0041E8]">(Xem sp)</a>
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
</div>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
</dialog>
</div>