s
This commit is contained in:
@@ -1,6 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
use Hura8\Components\Product\AdminController\AProductController;
|
||||||
|
|
||||||
|
|
||||||
|
$objAProductController = new AProductController();
|
||||||
|
$product_id = getRequestInt('id', 0);
|
||||||
|
|
||||||
|
$product_info = $objAProductController->getFullInfo($product_id);
|
||||||
|
|
||||||
$view_part = getRequest("part", "basic");
|
$view_part = getRequest("part", "basic");
|
||||||
|
|
||||||
$view_part_file = str_replace("-", "_", $view_part);
|
$view_part_file = str_replace("-", "_", $view_part);
|
||||||
@@ -14,20 +22,13 @@ if(@file_exists($part_file)) {
|
|||||||
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
"product_info" => _get_product_info(),
|
"product_info" => $product_info,
|
||||||
"product_menu" => _get_product_menu(),
|
"product_menu" => _get_product_menu(),
|
||||||
"view_part" => $view_part,
|
"view_part" => $view_part,
|
||||||
];
|
];
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
|
|
||||||
function _get_product_info() {
|
|
||||||
return [
|
|
||||||
"id" => 12,
|
|
||||||
"title" => "Máy in mã vạch MH241",
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
function _get_product_menu() {
|
function _get_product_menu() {
|
||||||
$current_selected = getRequest('part', 'basic');
|
$current_selected = getRequest('part', 'basic');
|
||||||
$product_menu = array(
|
$product_menu = array(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class="text-sm breadcrumbs ml-[10px]">
|
<div class="text-sm breadcrumbs ml-[10px]">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a>Danh sách sản phẩm</a></li>
|
<li><a href="/admin/product">Danh sách sản phẩm</a></li>
|
||||||
<li class="text-[#0041E8]">Form thêm/sửa sản phẩm</li>
|
<li class="text-[#0041E8]">Form thêm/sửa sản phẩm</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<div class="bg-white rounded-[10px] shadow-[0_1px_1px_0_rgba(0,0,0,0.1)]">
|
<div class="bg-white rounded-[10px] shadow-[0_1px_1px_0_rgba(0,0,0,0.1)]">
|
||||||
|
|
||||||
{% for _menu in page.product_menu %}
|
{% for _menu in page.product_menu %}
|
||||||
<a role="tab" href="/?module=product&view=form&part={{ _menu.id }}"
|
<a role="tab" href="/admin/product/form?id={{ page.product_info.id }}&part={{ _menu.id }}" title="{{ _menu.name }}"
|
||||||
class="py-[7px] px-[15px] text-[#919699] block border-b-[1px] border-[#fafafb] {% if _menu.is_current == 1 %}bg-[#0041E8] text-[#fff]{% endif %}">
|
class="py-[7px] px-[15px] text-[#919699] block border-b-[1px] border-[#fafafb] {% if _menu.is_current == 1 %}bg-[#0041E8] text-[#fff]{% endif %}">
|
||||||
{{ _menu.name }}
|
{{ _menu.name }}
|
||||||
</a>
|
</a>
|
||||||
@@ -91,4 +91,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div class="grid w-[100%] ">
|
<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="m-[15px] px-[15px] py-[20px] rounded-[15px] bg-white shadow-[0_1px_1px_0_rgba(0,0,0,0.1)]">
|
||||||
<h1 class="text-2xl font-[700] mb-3">Danh sách sản phẩm</h1>
|
<h1 class="text-2xl font-[700] mb-3">Danh sách sản phẩm ({{ page.total | format_number }})</h1>
|
||||||
<form
|
<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)]">
|
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">
|
<input type="search" class="block border h-[36px] ps-3 rounded w-[375px]" placeholder="Tìm sản phẩm">
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<th>STT</th>
|
<th>STT</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Ảnh</th>
|
<th>Ảnh</th>
|
||||||
<th>Sản phẩm (Tổng số: 1.742)</th>
|
<th>Sản phẩm</th>
|
||||||
<th class="whitespace-nowrap">Người dùng</th>
|
<th class="whitespace-nowrap">Người dùng</th>
|
||||||
<th>Thông tin bán hàng</th>
|
<th>Thông tin bán hàng</th>
|
||||||
<th>Thông tin khác</th>
|
<th>Thông tin khác</th>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<i class="icons icon-edit"></i>
|
<i class="icons icon-edit"></i>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{item.request_path}}" class="text-[#0041E8] w-[300px] inline-block">{{item.title}}</a>
|
<a href="/admin/product/form?id={{item.id}}" class="text-[#0041E8] w-[300px] inline-block">{{item.title}}</a>
|
||||||
{% if item.config_count > 0 %}<p class="text-[#FFC700]">[Có cấu hình]</p>{% endif %}
|
{% if item.config_count > 0 %}<p class="text-[#FFC700]">[Có cấu hình]</p>{% endif %}
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<span>Danh mục:</span>
|
<span>Danh mục:</span>
|
||||||
@@ -172,15 +172,15 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="" id="">
|
<input type="checkbox" name="">
|
||||||
<label for="">Mới Hot (Hỏi nhiều)</label>
|
<label for="">Mới Hot (Hỏi nhiều)</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="" id="">
|
<input type="checkbox" name="" >
|
||||||
<label for="">Bán chạy</label>
|
<label for="">Bán chạy</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input type="checkbox" name="" id="">
|
<input type="checkbox" name="" >
|
||||||
<label for="">Xả hàng (sale-off)</label>
|
<label for="">Xả hàng (sale-off)</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="">
|
<td class="">
|
||||||
<div class="list-btn flex items-center w-[150px]">
|
<div class="list-btn flex items-center w-[150px]">
|
||||||
<a href=""
|
<a href="/admin/product/form?id={{item.id}}" title="Form sản phẩm"
|
||||||
class="w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
class="w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="13" viewBox="0 0 12 13"
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="13" viewBox="0 0 12 13"
|
||||||
fill="none">
|
fill="none">
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
fill="#0041E8"></path>
|
fill="#0041E8"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
<a href=""
|
<a href="{{item.request_path}}" title="Xem tại web" target="_blank"
|
||||||
class="w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
class="w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13"
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13"
|
||||||
fill="none">
|
fill="none">
|
||||||
@@ -283,4 +283,4 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user