Deleting a product category shows a false "deleted successfully" alongside "could not be deleted"
Describe:
Deleting a product category that has only a soft-deleted product fails with "currently in use", and the list page shows a false success notification together with the error.
Root cause (verified against HEAD 9ece7f02): products_products.category_id is cascadeOnDelete, so deleting the category tries to hard-delete the trashed product, which is blocked by inventories_moves.product_id restrictOnDelete. Plus CategoriesTable swallows the QueryException without $action->failure(), so the success notification still fires.
To Reproduce:
- Go to 'Inventory > Configurations > Product Categories'
- Click on 'Delete' for a category with no visible products (verified case: category 25, trashed product 30, blocked by move 193)
- Observe the issue
❌ Actual Behavior
Two notifications at once: "Category deleted successfully" + "Category could not be deleted".
✅ Expected Behavior
One clear error only, no false success. Ideally naming the blocking trashed product/move.
Screenshots
Additional Context
Verified via tinker: 1451 ... inventories_moves_product_id_foreign ... ON DELETE RESTRICT on delete from products_categories where id = 25. View page shows only the error (it calls $action->failure() correctly). Same catch-without-failure pattern repeats in other Tables files.
Source: aureuserp/aureuserp