mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-05-14 10:31:07 +08:00
Inventory Route
This commit is contained in:
parent
1fded3cedf
commit
03e6ac60e9
4 changed files with 67 additions and 2 deletions
41
src/components/InventoryInfo/InventoryInfo.tsx
Normal file
41
src/components/InventoryInfo/InventoryInfo.tsx
Normal file
|
@ -0,0 +1,41 @@
|
|||
import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material';
|
||||
|
||||
type Product = {
|
||||
id: number;
|
||||
name: string;
|
||||
stocks: number;
|
||||
lastModified: string;
|
||||
};
|
||||
|
||||
type ProductInfoProps = {
|
||||
products: Product[];
|
||||
};
|
||||
|
||||
export default function InventoryInfo(props: ProductInfoProps) {
|
||||
const { products } = props;
|
||||
|
||||
return (
|
||||
<TableContainer>
|
||||
<Table>
|
||||
<TableHead>
|
||||
<TableRow>
|
||||
<TableCell style={{ color: 'white' }}>Product ID</TableCell>
|
||||
<TableCell style={{ color: 'white' }}>Product Name</TableCell>
|
||||
<TableCell style={{ color: 'white' }}>Stocks</TableCell>
|
||||
<TableCell style={{ color: 'white' }}>Last Modified</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{products.map((product) => (
|
||||
<TableRow key={product.id}>
|
||||
<TableCell style={{ color: 'white' }}>{product.id}</TableCell>
|
||||
<TableCell style={{ color: 'white' }}>{product.name}</TableCell>
|
||||
<TableCell style={{ color: 'white' }}>{product.stocks}</TableCell>
|
||||
<TableCell style={{ color: 'white' }}>{product.lastModified}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue