Translate list action buttons; add debug logging for item updates
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user