Feat/bulk operations for inventory service (#4503)

* initial push

* bulk delete reservations by location ids

* add method to interface (not implemented yet)

* bulk update

* delete reservations by location id bulk

* add create bulk for inventory item

* refactor attach inventory item method

* add changeset

* verbose false

* method override instead of multiple methods

* change up method signature

* redo changes when updating interface

* update createInventoryLevel method

* rename variables

* fix feedback

* return correct string array when emitting event

* refactor inventory service

* redo order changes

* snapshot

* move prep methods
This commit is contained in:
Philip Korsholm
2023-07-18 11:17:57 +02:00
committed by GitHub
parent d440c834d3
commit d184d23c63
20 changed files with 1194 additions and 228 deletions
@@ -75,7 +75,7 @@ export const simpleProductFactory = async (
},
]
for (const pv of variants) {
product.variants = await Promise.all(variants.map(async (pv) => {
const factoryData = {
...pv,
product_id: prodId,
@@ -85,8 +85,8 @@ export const simpleProductFactory = async (
{ option_id: optionId, value: faker.commerce.productAdjective() },
]
}
await simpleProductVariantFactory(connection, factoryData)
}
return await simpleProductVariantFactory(connection, factoryData)
}))
return product
}