diff --git a/src/components/Boxes.js b/src/components/Boxes.js
index 888ceda..b8fbc12 100644
--- a/src/components/Boxes.js
+++ b/src/components/Boxes.js
@@ -1,6 +1,6 @@
// src/components/Boxes.js
import React, { useEffect, useState } from 'react';
-import { Container, Button, TextField, List, ListItem, ListItemText, IconButton } from '@mui/material';
+import { Container, Button, TextField, Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material';
import { Delete as DeleteIcon } from '@mui/icons-material';
import { Link as RouterLink } from 'react-router-dom'; // Import Link from react-router-dom
import axios from 'axios';
@@ -51,6 +51,33 @@ export default function Boxes({ token }) {
return (
+
+
+
+
+
+ Box Name
+ Actions
+
+
+
+ {boxes.map((box) => (
+
+
+
+ {box.name}
+
+
+
+
+
+
+ ))}
+
+
+
Add Box
-
- {boxes.map((box) => (
- handleDeleteBox(box.ID)}>
-
-
- }>
- {/* Use Link component */}
- {box.name}
-
- }
- />
-
- ))}
-
);
}
\ No newline at end of file
diff --git a/src/components/ItemDetails.js b/src/components/ItemDetails.js
index 98bf967..2815ade 100644
--- a/src/components/ItemDetails.js
+++ b/src/components/ItemDetails.js
@@ -1,6 +1,6 @@
// src/components/ItemDetails.js
import React, { useState, useEffect, useRef, useCallback } from 'react';
-import { TextField, Button, Container, Avatar } from '@mui/material';
+import { TextField, Button, Container, Avatar, Tooltip } from '@mui/material';
import axios from 'axios';
import { PRIMARY_COLOR, SECONDARY_COLOR } from '../App';
//import { useNavigate } from 'react-router-dom'; // Import useNavigate
@@ -195,13 +195,15 @@ export default function ItemDetails({ item, token, onSave, onClose, boxId }) {
Edit Item: {item.name}
{/* Display the item image as an avatar */}
-
+
+
+
{imageOverlayVisible && (
@@ -233,6 +235,7 @@ export default function ItemDetails({ item, token, onSave, onClose, boxId }) {
margin="normal"
value={imagePath}
onChange={(e) => setImagePath(e.target.value)}
+ sx={{ display: 'none' }}
/>
) : (
-
- {items
- .filter(item =>
- item.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
- item.description.toLowerCase().includes(searchQuery.toLowerCase())
- )
- .map((item) => (
-
- handleEditItem(item)}>
-
-
- handleDeleteItem(item.ID)}>
-
-
- >
- }>
-
-
-
-
- {item.description}
- {item.image_path && (
- Image: {item.image_path}
- )}
- >
- }
- />
-
- ))}
-
+
+
+
+
+ Image
+ Name
+ Description
+ Actions
+
+
+
+ {items
+ .filter(item =>
+ item.name.toLowerCase().includes(searchQuery.toLowerCase()) ||
+ item.description.toLowerCase().includes(searchQuery.toLowerCase())
+ )
+ .map((item) => (
+
+
+
+
+ {item.name}
+ {item.description}
+
+
+ handleEditItem(item)}
+ size="large"
+ sx={{ mr: 1 }}
+ >
+
+
+
+
+ handleDeleteItem(item.ID)}
+ size="large"
+ color="error"
+ >
+
+
+
+
+
+ ))}
+
+
+
)}
);