aboutsummaryrefslogtreecommitdiff
path: root/src/components/tables/item-table.js
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-26 23:57:18 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-26 23:57:18 +0530
commit708862c94bd119ca7e86540fbc68595a6256c9e3 (patch)
tree7eb8d284746015fe015641ae082f48abde2512cc /src/components/tables/item-table.js
parentdb693ab4000405f5b02e71dfaf78efe6884b775b (diff)
created very basic client editor
Diffstat (limited to 'src/components/tables/item-table.js')
-rw-r--r--src/components/tables/item-table.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/tables/item-table.js b/src/components/tables/item-table.js
index c1115c1..e42b272 100644
--- a/src/components/tables/item-table.js
+++ b/src/components/tables/item-table.js
@@ -21,6 +21,10 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPencil, faTrashCan } from '@fortawesome/free-solid-svg-icons'
const ItemTable = (props) => {
+ const handleEdit = (i) => {
+ alert("editing coming soon")
+ }
+
const handleDelete = (i) => {
// TODO: add confirmation prompt
deleteItem(i.Id, handleDelSuccess, handleDelFail);
@@ -65,7 +69,7 @@ const ItemTable = (props) => {
<td className={i.MinQuantity === 0.0 ? "empty" : ""}>{i.MinQuantity}</td>
<td className={i.MaxQuantity === 0.0 ? "empty" : ""}>{i.MaxQuantity}</td>
<td className={"buttons"}>
- <FontAwesomeIcon icon={faPencil} onClick={() => alert("editing coming soon")}/>
+ <FontAwesomeIcon icon={faPencil} onClick={() => handleEdit(i)}/>
<FontAwesomeIcon icon={faTrashCan} onClick={() => handleDelete(i)}/>
</td>
</tr>