What
This commit introduces the `stockLocationsCreated` hook to the `createStockLocationsWorkflow`.
Why
The hook was missing and necessary to improve the workflow's extensibility.
How
Added the `stockLocationsCreated` hook and updated related logic within the workflow.
Testing
1. Create new medusa project via create-medusa-app
2. Connect this custom branch of medusa to it
3. Create `src/workflows/hooks/stock-locations-created.ts` file with the following content:
```
import { createStockLocationsWorkflow } from "@medusajs/medusa/core-flows"
createStockLocationsWorkflow.hooks.stockLocationsCreated(
(async ({ stockLocations, additional_data }, { container }) => {
console.log({stockLocations})
})
)
```
4. Create new admin account and create there a new stock location
5. The log should be displayed in terminal
**What**
- Uses derived state in DataTable, to prevent the state in the URL and component from going out of sync.
- Introduces a way for RouteModals to restore URL params on close.
Resolves CMRC-936
**What**
Currently, we are potentially providing an array of selector/data leading to fetching data sequentially before running on update which will fetch data again in batch and perform the update. Now we can pass the data directly which includes the id already and only perform one bulk fetch + one bulk update.
This pr also include a fix on the inventory validation, currently, only the item to update inventory is being checked, with this pr we also check the inventory for the items that needs to be created
**What - what changes are in this PR**
Typo on the homepage in the codeTabs
**Why - why are these changes relevant**
Simple typo that might be bothering more people than just me!
**How - how have the changes been implemented**
Fixed the typo from: `notificaitonModuleService` to `notificationModuleService`
**Testing - how has the changes been tested or how can the reviewer test the feature**
Should be simple enough not to require full testing locally!
**What**
- Prevent event release when a workflow is run as step and finish
- Use `unlink` instead of `del` when removing keys from redist to push the execution to async thread
Fixes: FRMW-2920
The feature is called `middleware-file-loader`, because it does more than just collecting middlewares. It also collects the bodyParser config for routes
**What**
- Fix soft deletion and restoration emitted events
- Improve soft deleted/restore algorithm
- Fix big number field handling null value during partial hydration from mikro orm
**What**
Some steps were calling the modules even when nothing was needed which for some operations would create transaction for nothing leading to extra execution time that add up very quickly on cloud network
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
what:
- scopes uniqueness index to only non deleted records
- explicit sorting of buy get promotions
- This error popped up as we removed the uniqueness constraint which seems to have kept a specific order.
RESOLVES https://github.com/medusajs/medusa/issues/11606
What:
* Not all Cart operations need a full refresh updating items. This PR introduces a flag to force the refresh for special ocasions, like updating the Cart's region, or transfering the Cart to another customer. For all other flows it will update only promotions, taxes and payment collection if needed.
**What**
- Move create product to use native create by structuring the data appropriately, it means no more `upsertWithReplace` being very poorly performant and got 20x better performances on staging
- Improvements in `upsertWithReplace` to still get performance boost for places that still relies on it. Mostly bulking the operations when possible
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>