نسخ من RaghadAlkhous/RestaurantDash
Work on Create your restaurant and Inventory
هذا الالتزام موجود في:
41
src/components/Home/Inventory/InventoryTablePage.js
Normal file
41
src/components/Home/Inventory/InventoryTablePage.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import React, { useState } from 'react';
|
||||
import TableView from './TableView';
|
||||
|
||||
const initialProducts = [
|
||||
{
|
||||
product: 'Apple Watch',
|
||||
sales: 150,
|
||||
amount: 45000,
|
||||
price: 299,
|
||||
status: 'Published',
|
||||
expiration: '30 Days Left',
|
||||
},
|
||||
{
|
||||
product: 'Samsung Galaxy',
|
||||
sales: 90,
|
||||
amount: 36000,
|
||||
price: 400,
|
||||
status: 'Low Stock',
|
||||
expiration: '12 Days Left',
|
||||
},
|
||||
{
|
||||
product: 'Sony Headphones',
|
||||
sales: 60,
|
||||
amount: 18000,
|
||||
price: 299,
|
||||
status: 'Draft',
|
||||
expiration: '5 Days Left',
|
||||
},
|
||||
];
|
||||
|
||||
const InventoryTablePage = () => {
|
||||
const [products, setProducts] = useState(initialProducts);
|
||||
|
||||
const handleAddNewProduct = () => {
|
||||
alert('Navigate to Add Product page or open form here');
|
||||
};
|
||||
|
||||
return <TableView data={products} onAddNewProduct={handleAddNewProduct} />;
|
||||
};
|
||||
|
||||
export default InventoryTablePage;
|
||||
المرجع في مشكلة جديدة
حظر مستخدم