fix(core-flows, link-module): product <> inventory delete cascades (#9528)

**What**
- remove cascade delete of inventory items on product delete
- implement inventory deletion in product/variant delete workflows with checks:
  - product/variant cannot be deleted if there are reservations associated with their inventory items
  - inventory item will be cascade deleted if it's not used by other variants (that are not being deleted in the current flow)

---

FIXES CC-581 CC-582
This commit is contained in:
Frane Polić
2024-10-14 18:22:31 +02:00
committed by GitHub
parent 86f744cf3b
commit 809c851865
7 changed files with 355 additions and 31 deletions

View File

@@ -44,7 +44,6 @@ export const ProductVariantInventoryItem: ModuleJoinerConfig = {
args: {
methodSuffix: "InventoryItems",
},
deleteCascade: true,
},
],
extends: [