Translate list action buttons; add debug logging for item updates

This commit is contained in:
2025-11-11 18:13:24 +01:00
parent e1cf2a3e46
commit 3ff85b8143
4 changed files with 10 additions and 5 deletions

View File

@@ -234,9 +234,12 @@ class ItemController
}
$item = new Item($db, $id, $name, $description, $categoryId, null, $idCode, $imagePath, $location);
error_log("Updating item $id with image: $imagePath");
if ($item->save()) {
error_log("Item $id updated successfully");
echo json_encode(['success' => true, 'message' => 'Part updated successfully']);
} else {
error_log("Failed to update item $id");
throw new Exception('Failed to update part');
}
} catch (Exception $e) {