From fa41f12e3dcc36ea8d9e03d27a778c409770597d Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 23 Jan 2026 22:24:05 -0800 Subject: [PATCH] revamp edit item modal --- .../src/components/modals/EditItemModal.jsx | 134 +++++++++++++----- .../src/styles/components/EditItemModal.css | 101 +++++++++---- 2 files changed, 174 insertions(+), 61 deletions(-) diff --git a/frontend/src/components/modals/EditItemModal.jsx b/frontend/src/components/modals/EditItemModal.jsx index 502fb02..b1624a8 100644 --- a/frontend/src/components/modals/EditItemModal.jsx +++ b/frontend/src/components/modals/EditItemModal.jsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; +import { ITEM_GROUPS, ITEM_TYPES, getItemTypeLabel, getZoneValues } from "../../constants/classifications"; import "../../styles/components/EditItemModal.css"; -import ClassificationSection from "../forms/ClassificationSection"; import AddImageModal from "./AddImageModal"; export default function EditItemModal({ item, onSave, onCancel, onImageUpdate }) { @@ -72,58 +72,120 @@ export default function EditItemModal({ item, onSave, onCancel, onImageUpdate }) } }; + const incrementQuantity = () => { + setQuantity(prev => prev + 1); + }; + + const decrementQuantity = () => { + setQuantity(prev => Math.max(1, prev - 1)); + }; + + const availableGroups = itemType ? (ITEM_GROUPS[itemType] || []) : []; + return (
e.stopPropagation()}>

Edit Item

-
- - setItemName(e.target.value)} - className="edit-modal-input" - /> -
+ {/* Item Name - no label */} + setItemName(e.target.value)} + className="edit-modal-input" + placeholder="Item name" + /> -
- + {/* Quantity Control - like AddItemForm */} +
+ setQuantity(parseInt(e.target.value))} - className="edit-modal-input" + readOnly /> -
- -
- - - -
- -
+
+ + {/* Inline Classification Fields */} +
+ + +
+ + {itemType && ( +
+ + +
+ )} + +
+ + +
+ +
+ + +