diff --git a/src/components/ProductRow.tsx b/src/components/ProductRow.tsx
index 9171c0b..1d300be 100644
--- a/src/components/ProductRow.tsx
+++ b/src/components/ProductRow.tsx
@@ -7,7 +7,6 @@ import {
DialogContent,
DialogTitle,
IconButton,
- MenuItem,
Stack,
TextField,
Typography,
@@ -106,15 +105,16 @@ export const ProductRow = ({ product, categories, onSave, onDelete }: ProductRow
/>
{categories.map((cat) => (
-
+
))}
{formState.barcode ? (
diff --git a/src/screens/ManageCategoriesScreen.test.tsx b/src/screens/ManageCategoriesScreen.test.tsx
index 631e772..89a6f07 100644
--- a/src/screens/ManageCategoriesScreen.test.tsx
+++ b/src/screens/ManageCategoriesScreen.test.tsx
@@ -1,7 +1,7 @@
import { MemoryRouter } from 'react-router-dom';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { describe, expect, it, vi } from 'vitest';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
import { ManageCategoriesScreen } from './ManageCategoriesScreen';
const categoriesMock = [{ id: 'cat-1', name: 'Snacks', created_at: 0, updated_at: 0 }];
diff --git a/src/screens/PickListsScreen.tsx b/src/screens/PickListsScreen.tsx
index ade79fd..9972103 100644
--- a/src/screens/PickListsScreen.tsx
+++ b/src/screens/PickListsScreen.tsx
@@ -10,7 +10,6 @@ import {
ListItem,
ListItemButton,
ListItemText,
- MenuItem,
Stack,
TextField,
Typography,
@@ -68,11 +67,13 @@ export const PickListsScreen = () => {
const saveEdit = async () => {
if (!editingList || !areaId) return;
- await db.pickLists.update(editingList.id, {
- area_id: areaId,
- notes: notes.trim() || undefined,
- });
+ const listId = editingList.id;
+ const trimmedNotes = notes.trim() || undefined;
closeEdit();
+ await db.pickLists.update(listId, {
+ area_id: areaId,
+ notes: trimmedNotes,
+ });
};
const deleteList = async (list: PickList) => {
@@ -136,39 +137,42 @@ export const PickListsScreen = () => {
))}
-
+ {editingList ? (
+
+ ) : null}
);
};