Commit Graph

5600 Commits

Author SHA1 Message Date
Patryk Spychalski
36c20ed188 fix(dashboard): fix translations for polish (#13266)
* remove unused translations

* add missing translations

* Revert "remove unused translations"

This reverts commit 99eaeb4d199c6ececdeed127b1a237f1ff140151.

* changeset
2025-08-22 10:52:15 +02:00
Adrien de Peretti
06ef9197f8 chore(pricing): Fix excessive db queries during price sets update (#13258)
* chore(pricing): Fix excessive db queries during price sets update

* chore(pricing): Fix excessive db queries during price sets update

* finalize upsert with replace of the rules

* fix limit

* Create quiet-pumpkins-hang.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-22 10:51:50 +02:00
Kasper Fabricius Kristensen
7f5b9fc5fa feat(medusa,dashboard): Add metadata UI to product tags domain + retrieve metadata by default (#13272) 2025-08-22 07:50:59 +02:00
Frane Polić
2d62e28913 fix(dashboard): show fulfilment option on SO edit (#13269)
* fix(dashboard): show fulfilment option on SO edit

* fix: validation
2025-08-21 22:34:26 +02:00
Lars Decker
e7b45f5fde chore: Improve German Admin Translations (de.json) (#13219)
* Change some german translations

* Update some german translations

* Add changeset

* Change the changeset

---------

Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
2025-08-21 15:58:54 +02:00
Frane Polić
319a941d99 fix(dashboard): zero in float currency inputs (#13267)
CLOSES AI-38
2025-08-21 11:07:10 +00:00
Frane Polić
492e018957 feat(dashboard, core-flows, js-sdk, types, medusa): listing order's shipping options (#13242)
* feat(dashboard, core-flows,js-sdk,types,medusa): listing order's shipping option

* fix: typo

* chore: migrate claim form

* fix: cleanup rule logic

* feat: add test case, rm params

* fix: expand location name
2025-08-21 13:01:27 +02:00
Frane Polić
9b38b750de feat(dashboard): shipping option tax rate overrides UI (#13260)
* feat(dashboard): shipping option tax rate overrides UI

* feat: add location filter

* feat: show service zone in SO table

* feat: display location in the SO table
2025-08-21 12:06:36 +02:00
William Bouchard
6602e893b8 chore(medusa): fetch shipping related attributes (#13244)
* chore(medusa): fet shipping related attributes

* some tests

* changeset

* small refactor

* typing

* adapt attribute value

* test

* test again
2025-08-20 13:03:27 -04:00
Shahed Nasser
fc144a8e13 chore(ui): TSDoc updates to UI package (#13246) 2025-08-20 17:05:24 +03:00
Oli Juhl
b152210554 feat(core-flows): Refresh adjustments when editing orders (#13189)
* wip

* add tests

* add more tests

* fixes buy-get promotion

* Create empty-pillows-promise.md

* chore: use query graph

* Update packages/core/core-flows/src/order/workflows/order-edit/refresh-order-edit-adjustments.ts

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>

---------

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
2025-08-20 15:04:27 +02:00
Frane Polić
5b7a041246 chore(ui): move toast to top right (#13092)
* chore(ui): display toast in top right corner

* fix: error as well

* refactor: feedback

* chore: move the rest of the modal controls to footer

---------

Co-authored-by: William Bouchard <46496014+willbouch@users.noreply.github.com>
2025-08-20 08:39:45 +02:00
Frane Polić
2f594291ad fix(core-flows, dashboard, types): improve allocation flows on Admin (#12572)
**What**
- handle single inventory items with `required_quantity > 1` correctly in the allocate UI flow
- display correct availability amount in the create fulullment form for inventory kit items
- fix check in the create fulfillment flow that would allow negative reservation because `required_quantity` wasn't included in the check
- show the most recent reservations first in the reservations table
- display an error in the allocation form if a reservation is not created for some inventory items 
- display inventory kit in the order summary if the product has multiple same inventory items

---

CLOSES SUP-1655
2025-08-19 18:48:24 +00:00
William Bouchard
67d3660abf feat(dashboard, core-flows): associate shipping option to type (#13226)
* feat(dashboard, core-flows): allow associating shipping option type to a shipping option

* edit as well

* fix translation schema

* fix some tests

* changeset

* add new test to update shipping option type

* add new test to create shipping option with shipping option type

* pr comments

* pr comments

* rename variable

* make zod great again
2025-08-19 11:02:36 -04:00
Frane Polić
c6b836bb03 fix(dashboard): create product selected inventory item display (#13111)
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-18 19:30:56 +02:00
Frane Polić
20b8187e2a fix(dashboard): table inclusive date filter (#13053)
**What**
- make end date inclusive for search results

---

https://github.com/user-attachments/assets/8367ffd1-e882-44a9-a876-a8e4731a6cd5

---

CLOSES CMRC-1072
2025-08-18 12:55:39 +00:00
Frane Polić
6d8e4acdc7 chore(dashboard): migrate location levels table (#12624)
* chore: migrate location levels table

* fix: page size

* fix: disable sorting by available quantity

* wip: migrate fulfillment location combobox

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-18 14:50:52 +02:00
Abdulrahman
eb376eb4cf fix(core-flows): handle missing variants and preserve zero unit_price in prepareLineItems (#13179)
* fix: handle missing variants and preserve zero unit_price in prepareLineItems

Fixed two issues in prepareLineItems:
1. unit_price value of 0 was previously treated as falsy and overwritten with the variant's price. Updated the check to only fallback when unitPrice is null or undefined.
2. When no variants array was provided, the code could throw due to non-null assertions. Now safely handles missing or empty variants.

Additional adjustments:
- Replaced `||` with `??` for array defaults to preserve valid empty arrays.
- Kept changes minimal to avoid altering function signature.

* Create sweet-wasps-build.md

* Update add-line-items.ts

* Update packages/core/core-flows/src/order/workflows/add-line-items.ts

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

* Update packages/core/core-flows/src/order/workflows/create-order.ts

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-18 14:50:25 +02:00
Carlos R. L. Rodrigues
fd4e791428 fix(utils): auto generated update method return (#13225)
* fix(utils): auto generated update method return

* tests

* cleanup

* rm unused function

* Update .changeset/young-mangos-suffer.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-18 13:26:36 +02:00
Riqwan Thamir
3cc512ef39 fix(utils): fix promotion case of each allocation not applying its total amount (#13199)
* fix(utils): fix promotion case of each allocation not applying its amount

* chore: fixed tests

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-17 19:11:16 +02:00
Sebastian Rindom
d2cb9523e0 feat: add column introspection api (#13183)
This is part of a set of stacked PRs to add support for view configurations, which will allow users to customize the columns shown in admin tables.

The functionality in this PR is behind the view_configuration feature flag.

**What**
- Adds an API to introspect the remote query schema and extract columns that users can add to their table views.

**Notes**
- This is a brute forced approach to get the functionality in place and I expect it to evolve to something more elegant over time. Some ideas for things we might want to consider:
  - Compute the entity columns during build time and store as static data the API can serve quickly.
  - Offer developers more control over how their data can be exposed in this API with additional decorators in the DML.
2025-08-15 15:35:01 +00:00
Carlos R. L. Rodrigues
83d2ce762c chore(locking-redis): default ttl to acquire lock (#13221)
* chore(locking-redis): default ttl to acquire lock

* ttl only for the method execute
2025-08-15 11:44:24 -03:00
Carlos R. L. Rodrigues
cbfe646ce1 chore(utils): round to zero credit lines (#13200) 2025-08-15 11:43:52 -03:00
Sebastian Rindom
12a38bcd2b feat(api): add view configuration API routes (#13177)
* feat: add view_configurations feature flag

  - Add feature flag provider and hooks to admin dashboard
  - Add backend API endpoint for feature flags
  - Create view_configurations feature flag (disabled by default)
  - Update order list table to use legacy version when flag is disabled
  - Can be enabled with MEDUSA_FF_VIEW_CONFIGURATIONS=true env var

* fix: naming

* fix: feature flags unauthenticated

* fix: add test

* feat: add settings module

* fix: deps

* fix: cleanup

* fix: add more tetsts

* fix: rm changelog

* fix: deps

* fix: add settings module to default modules list

* feat(api): add view configuration API routes

- Add CRUD endpoints for view configurations
- Add active view configuration management endpoints
- Add feature flag middleware for view config routes
- Add comprehensive integration tests
- Add HTTP types for view configuration payloads and responses
- Support system defaults and user-specific configurations
- Enable setting views as active during create/update operations

* fix: test

* fix: test

* fix: test

* fix: change view configuration path

* fix: tests

* fix: remove manual settings module config from integration tests

* fix: container typing

* fix: workflows
2025-08-15 13:17:52 +02:00
Sebastian Rindom
f7fc05307f feat: add settings module (#13175)
* feat: add view_configurations feature flag

  - Add feature flag provider and hooks to admin dashboard
  - Add backend API endpoint for feature flags
  - Create view_configurations feature flag (disabled by default)
  - Update order list table to use legacy version when flag is disabled
  - Can be enabled with MEDUSA_FF_VIEW_CONFIGURATIONS=true env var

* fix: naming

* fix: feature flags unauthenticated

* fix: add test

* feat: add settings module

* fix: deps

* fix: cleanup

* fix: add more tetsts

* fix: rm changelog

* fix: deps

* fix: add settings module to default modules list

* fix: pr comments

* fix: deps,build

* fix: alias

* fix: tests

* fix: update snapshots
2025-08-15 10:59:54 +02:00
Sebastian Rindom
ab795bb0a2 feat: view config feature flag (#13171)
* feat: add view_configurations feature flag

  - Add feature flag provider and hooks to admin dashboard
  - Add backend API endpoint for feature flags
  - Create view_configurations feature flag (disabled by default)
  - Update order list table to use legacy version when flag is disabled
  - Can be enabled with MEDUSA_FF_VIEW_CONFIGURATIONS=true env var

* fix: naming

* fix: feature flags unauthenticated

* fix: add test
2025-08-15 08:56:40 +02:00
William Bouchard
4b3c43fe92 feat(dashboard, js-sdk): shipping option type mngmt dashboard (#13208)
* chore(types, api): support shipping option type api endpoints

* core flows

* api

* typos

* compiler errors

* integration tests

* remove metadata

* changeset

* modify test

* upsert

* change remote query

* minor to patch

* description optional

* chore(dashboard, js-sdk): shipping option type management on admin dashboard

* description optional

* woops my bad

* my bad again

* create and edit

* prettier

* build code from label

* remove metadata route

* remove some translation text that is not used

* remove unsued files

* changeset

* adapt test

* fix test

* suggestion

---------

Co-authored-by: william bouchard <williambouchard@williams-MacBook-Pro.local>
2025-08-14 15:21:33 -04:00
Jan Biardzki
257e71f988 fix(core-flows): fix update tax lines to apply tax rule by product type (#13202)
* test(draft-order): add draft order creation test with tax application by product type

* fix: add `product_type.id` and `items.product_type_id` fields to order utilities

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-14 20:07:43 +02:00
William Bouchard
34c3c14e0a chore(types, api): support shipping option type api endpoints (#13191)
* chore(types, api): support shipping option type api endpoints

* core flows

* api

* typos

* compiler errors

* integration tests

* remove metadata

* changeset

* modify test

* upsert

* change remote query

* minor to patch

* description optional

* description optional

* woops my bad

* my bad again

---------

Co-authored-by: william bouchard <williambouchard@williams-MacBook-Pro.local>
2025-08-14 10:15:51 -04:00
github-actions[bot]
01fa17d2ad chore: Version Packages (#13045)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-08-14 13:23:45 +02:00
Aditya Erlangga Wibowo
ae12623ca6 fix(types): add option_id field to FilterableProductOptionValueProps (#13085)
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-14 11:49:29 +02:00
Oli Juhl
f4ae615a3e fix(tax): Use correct rule reference for shipping (#13195)
* fix(tax): Use correct rule reference

* fix tests
2025-08-13 21:06:19 +02:00
Carlos R. L. Rodrigues
356b2862d2 chore(core-flows): import zod (#13197) 2025-08-13 15:12:14 -03:00
William Bouchard
f1da73cb58 fix(types): remove order_id in apis that do not handle it (#13185)
* fix(types): remove order_id in apis that do not handle it

* changeset

---------

Co-authored-by: william bouchard <williambouchard@williams-MacBook-Pro.local>
2025-08-11 20:56:57 +02:00
Stevche Radevski
2c1fe4cfe4 fix: Allow getting the token from the SDK client (#13164) 2025-08-08 08:42:44 +02:00
Riqwan Thamir
224eaedf5c fix(dashboard,promotion): percentage promotions + set currency code on percentage promotions (#13161) 2025-08-07 13:07:41 +02:00
Carlos R. L. Rodrigues
9725bff25d fix(index): logical operators (#13137) 2025-08-07 07:34:50 -03:00
Carlos R. L. Rodrigues
a52708769d chore(util): avoid promotion value precision limit (#13145) 2025-08-06 15:49:10 -03:00
Carlos R. L. Rodrigues
b1cba9fdeb fix(workflow-engine-inmemory): fix cron job schedule (#13151) 2025-08-06 11:14:44 -03:00
William Bouchard
b7083b9f0f fix(dashboard): variants disappearing when removing an option on product creation (#13150)
* fix(dashboard): variants disappearing when removing an option on product creation

* error border on option without values

---------

Co-authored-by: william bouchard <williambouchard@williams-MacBook-Pro.local>
2025-08-06 08:53:04 -04:00
William Bouchard
acf6bbc2ec chore(core-flows): throw error on invalid promo code (#13140)
* chore(core-flows): throw error on invalid promo code

* add changelog

* better error handling in test

---------

Co-authored-by: william bouchard <williambouchard@williams-MacBook-Pro.local>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-08-05 09:01:41 -04:00
Mikkel Lindstrøm Hansen
93d7a93b28 Made in operator work as In insted of equal logic (#13078)
Changed the In operator to actually work like an In instead of being same logic as Equals. This means that in promotions you can add a rule to apply when a product is in a category or multiple different. Before the logic had to match all the products categories to apply, which doesnt really make sense when you have nested category structure on products. The logic also applies to tags where you can make a rule apply based on a tag before it also had to match all tags on a product to apply.

Issue:

https://github.com/medusajs/medusa/issues/12669

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2025-08-05 11:10:29 +00:00
Oli Juhl
02dd83f59a fix(pricing): Calculate prices with multiple rule values (#13079) 2025-08-05 13:04:55 +02:00
Frane Polić
0452eba20b chore(dashboard): add missing US states (#13094)
* chore(dashboard): add missing US states

* fix: add missing territiories
2025-08-03 19:17:12 +02:00
scherddel
51d4751d95 fix(utils): Fix on precision for high quantities for items when promotion is applied (#13131)
* Fix on precision for high quantities for items when promotion is applied

* Fix on precision for high quantities for items when promotion is applied
2025-08-03 19:16:16 +02:00
Shahed Nasser
57ad8fc755 chore: use since instead of version tag in TSDocs (#13126) 2025-08-01 17:52:52 +03:00
scherddel
9766570827 fix(types,utils,promotion): Move from total to original_total to resolve edge case for adjustments calculation (#13106)
* Move from total to original_total to resolve edge case in adjustment calculation

* Added changeset

* Added test case for correction

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-08-01 12:52:04 +02:00
Shahed Nasser
db60ec5a1a chore: add links to package.json (#13100) 2025-08-01 10:59:47 +03:00
Shahed Nasser
db0eb0f035 chore: fix example in createProductsWorkflow TSDocs (#13112) 2025-08-01 10:50:51 +03:00
tehaulp
881c8a4969 feat: added pacific franc currency (#13086) 2025-08-01 09:32:50 +02:00