diff --git a/frontend/src/components/Navbar/Navbar.jsx b/frontend/src/components/Navbar/Navbar.jsx index c99eb91..760a168 100644 --- a/frontend/src/components/Navbar/Navbar.jsx +++ b/frontend/src/components/Navbar/Navbar.jsx @@ -29,7 +29,7 @@ export const NAV_ITEM = (admin = false) => [ text: language?.ui.house, }, { - path: 'warehouse', + pathName: 'warehouse', show: true, icon: IconBuildingWarehouse, text: language?.ui.warehouse, diff --git a/frontend/src/pages/WareHouse/Warehouse.jsx b/frontend/src/pages/WareHouse/Warehouse.jsx index 66149f5..3f4e264 100644 --- a/frontend/src/pages/WareHouse/Warehouse.jsx +++ b/frontend/src/pages/WareHouse/Warehouse.jsx @@ -1,40 +1,99 @@ -import { IconPackage } from '@tabler/icons-solidjs' import { For } from 'solid-js' -import { Dynamic } from 'solid-js/web' import './warehouse.scss' const data = [ - + { + id: 1, + name: 'Bếp', + listBox: [ + { + id: 1, + code: 'bep-01', + name: 'Dụng cụ bếp', + items: ['dao', 'muỗng', 'đũa'], + }, + { + id: 2, + code: 'bep-02', + name: 'Dụng cụ bếp', + items: ['nồi 20"', 'chảo 20"', 'chén nhỏ', 'chén ăn cơm'], + }, + { + id: 3, + code: 'bep-02', + name: 'Dụng cụ bếp', + items: ['nồi 20"', 'chảo 20"', 'chén nhỏ', 'chén ăn cơm'], + }, + { + id: 4, + code: 'bep-02', + name: 'Dụng cụ bếp', + items: ['nồi 20"', 'chảo 20"', 'chén nhỏ', 'chén ăn cơm'], + }, + { + id: 5, + code: 'bep-02', + name: 'Dụng cụ bếp', + items: ['nồi 20"', 'chảo 20"', 'chén nhỏ', 'chén ăn cơm'], + }, + { + id: 6, + code: 'bep-02', + name: 'Dụng cụ bếp', + items: ['nồi 20"', 'chảo 20"', 'chén nhỏ', 'chén ăn cơm'], + }, + ], + }, + { + id: 2, + name: 'Bàn làm việc', + listBox: [ + { + id: 1, + code: 'work-01', + name: 'Work 1', + items: ['Chuột Logitech MX', 'Tai nghe G503X'], + }, + { + id: 2, + code: 'work-02', + name: 'Work 2', + items: ['Ổ cứng SSD 250GB', 'Điện thoại IP6'], + }, + ], + }, ] function PackageItem(props) { - const { item } = { ...props } - const isEmpty = item % 2 === 0 + const { box, index } = { ...props } + + // QRCode.toDataURL(box.code, {width: 200, margin: 1}, function (err, url) { + // if (err) throw err + // const img = document.getElementById(`${box.code}-${index}`) + // console.log(img, url) + // img.src = url + // }) + return ( + {/*
Nồi 20"
*/} +
+ +
+
@@ -52,13 +111,19 @@ export default function Warehouse() {
-
-
-
Khu bếp
-
- {(item) => } -
-
+
+ + {(warehouse) => ( +
+
+
{warehouse.name}
+
+ {(box, index) => } +
+
+
+ )} +