Commit Graph

4828 Commits

Author SHA1 Message Date
Shahed Nasser
c8cb9b5c1a fix(medusa): add query type argument to RequestWithContext (#10469) 2024-12-09 11:43:52 +02:00
Kasper Fabricius Kristensen
a1a1e0e789 feat(dashboard): SO cart item total rules UI (#10386) 2024-12-09 09:44:11 +01:00
Riqwan Thamir
9e797dc3d2 feat(core-flows, types): update shipping methods upon cart ops (#10382)
* feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context

* chore: add test for shipping options returning free shipping

* feat(core-flows, types): update shipping methods upon cart ops

* chore: fix specs

* chore: fix bugs + specs

* Update update-shipping-methods.ts

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

* Update mutations.ts

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

* chore: undo refresh changes

* chore: merge with latest

* chore: address PR comments

* chore: fix conflicts

* chore: fix specs

* chore: address reviews

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-12-08 14:06:50 +01:00
Riqwan Thamir
f95c4e240c fix(promotion, core-flows): updating cart with removed promotion removes adjustments (#10489) 2024-12-08 13:13:31 +01:00
Kasper Fabricius Kristensen
864f53011b fix(dashboard,types): Fix TS errors (#10457)
**What**
- Fixes TS erros in dashboard project
- Updates incorrect HTTP Invite types
- Fixes incorrectly formatted dates in dashboard
2024-12-08 11:51:13 +00:00
Hirotaka Mizutani
55f5ce4690 feat: added Japanese translation (#10379)
* feat: add Japanese language support

* feat: add missing required keys for Japanese translation
2024-12-07 21:52:15 +08:00
Adrien de Peretti
0a077d48e1 chore(workflow-engine): Migrate to DML (#10477)
RESOLVES FRMW-2832
RESOLVES FRMW-2833

**What**
Migrate workflow engines to DML. Alos includes and update to the linkable generation which now takes into account id and primary keys to generate the linkable instead of only primary keys
2024-12-06 13:23:07 +00:00
Carlos R. L. Rodrigues
b0448a7c35 chore: locking-postgres provider dml (#10478) 2024-12-06 10:14:14 -03:00
Carlos R. L. Rodrigues
f65a3cc06d fix(utils): avoid optional properties on graphql generated file (#10476)
FIXES: SUP-367
2024-12-06 12:16:02 +00:00
Harminder Virk
f3c91c908a refactor: migrate store module to DML (#10467) 2024-12-06 17:38:15 +05:30
Kasper Fabricius Kristensen
7e04091b49 fix(dashboard): Prevent sending off empty string as handle for product category (#10473) 2024-12-06 12:33:18 +01:00
Shahed Nasser
597bffaab3 fix(framework): add missing query type argument in request types (#10456)
* fix(framework): add missing query type argument in request types

* fix types
2024-12-06 09:53:34 +02:00
Stevche Radevski
bed00e154d feat(js-sdk): Make credentials configurable in SDK (#10464) 2024-12-06 15:39:35 +08:00
Carlos R. L. Rodrigues
90ae187e09 fix(workflows-sdk): name for when/then step (#10459) 2024-12-05 15:47:42 -03:00
Sebastian Rindom
7ff3f15d6d fix(medusa): calculate sales channel availability correctly for variants (#10448)
* fix: calculate inventory quantities based on sales channel and locations

* Update packages/medusa/src/api/utils/middlewares/products/variant-inventory-quantity.ts

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* Update packages/medusa/src/api/utils/middlewares/products/variant-inventory-quantity.ts

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* Update packages/core/core-flows/src/product/steps/get-variant-availability.ts

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* fix: crk

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-12-05 19:29:47 +01:00
Adrien de Peretti
b160fd3cbf fix(utils): DML one to one definition (#10415)
RESOLVES FRMW-2819

**What**
Fix one to one definition.
2024-12-05 16:55:57 +00:00
Harminder Virk
70d77ea22f refactor: migrate api key module to DML (#10450)
Fixes: FRMW-2827
2024-12-05 16:37:54 +00:00
Adrien de Peretti
559fc6587a fix(): Deleted default sales channel should be prevented (#10193)
FIXES CMRC-722

**What**
- It should not be allowed to delete a default sales channel
- The admin does not allow to delete a sales channel use as the default for the store
2024-12-05 16:19:45 +00:00
Kasper Fabricius Kristensen
2b455b15a6 fix(dashboard): Cleanup unsafe accesses to possibly undefined values in order timeline (#10454)
**What**
- Fixes an unsafe access to a field that may be undefined if an order was created through a custom workflow.
2024-12-05 15:51:35 +00:00
Salvador Girones Gil
a7ad809520 fix(core/js-sdk) Add the credentials field in the fetch() only if supported (#10446)
fixes https://github.com/medusajs/nextjs-starter-medusa/issues/421

The root cause of the issue is that credentials is not supported by CloudFlare workers.
2024-12-05 14:10:40 +00:00
Kasper Fabricius Kristensen
16663ec813 fix(dashboard,types): Add missing Metadata form for Region domain and fix payload types (#10449) 2024-12-05 14:03:29 +00:00
Harminder Virk
be15240909 refactor: migrate sales-channel to DML (#10452)
Fixes: FRMW-2830
2024-12-05 14:02:08 +00:00
Harminder Virk
0a16efa426 refactor: migrate cart module to DML (#10385)
FIXES: FRMW-2815

This PR has no breaking changes
2024-12-05 12:30:50 +00:00
Adrien de Peretti
90d7f4ff39 chore(utils): DML#hasOne allow mappedBy to not be defined (#10442)
RESOLVES FRMW-2826

**What**
We have many places where we define only one to one on one side of the relation. In that case it is a one to one that does not mapped by to the other side relation since it is not defined. This pr allow to create a one to one without mapped by. In order to remove breaking changes, in that case we ask the user to explicitly define the `mappedBy` as `undefined`
2024-12-05 09:31:38 +00:00
Harminder Virk
223bcff379 feat: add support for defining hasOne with FK (#10441) 2024-12-05 14:15:13 +05:30
olivermrbl
4723acd949 chore: Version packages 2024-12-04 18:36:57 +01:00
Oli Juhl
ff4663713a fix(core-flows): Listing return shipping options (#10432) 2024-12-04 17:21:07 +01:00
Kasper Fabricius Kristensen
3d5ca155e3 fix(dashboard): Prevent order details page from crashing on no region (#10431)
Resolves SUP-356
2024-12-04 16:18:54 +00:00
Kasper Fabricius Kristensen
c6f955f0b5 fix(dashboard): Add Shipping Profile metadata route (#10430) 2024-12-04 17:09:44 +01:00
Frane Polić
340769595a feat(admin, js-sdk, types): update order forms (#10418)
* feat: edit shipping, billing and email forms

* feat: timeline history, update change model, update tests

* fix: address comments

* fix: invalidation, translation schema, update label

* fix: old/new
2024-12-04 14:56:40 +01:00
Kasper Fabricius Kristensen
a5263083fa fix(framework): Ensure that CORS and Auth middleware is applied for routes only defined in middlewares.ts (#10339) 2024-12-04 14:49:43 +01:00
Carlos R. L. Rodrigues
1f3754a75e chore(workflows-sdk): add unit test (#10419) 2024-12-04 10:32:03 +00:00
Kasper Fabricius Kristensen
a5c8cc992c fix(dashboard): Prevent language ptBR from breaking dashboard (#10422) 2024-12-04 10:44:04 +01:00
Kasper Fabricius Kristensen
e8f4f7ea2b fix(dashboard): Add default value to inventory item combobox (#10412)
**What**
- Resolves CMRC-761
- Fixes TS errors in the same file.

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-12-03 18:03:54 +00:00
Kasper Fabricius Kristensen
18583ed567 fix(dashboard): Fix broken number input in adjust inventory form (#10416) 2024-12-03 18:36:20 +01:00
Kasper Fabricius Kristensen
4e7d242a78 fix(stock-location): Fix export of StockLocation module (#10406) 2024-12-03 18:35:52 +01:00
Frane Polić
ab948b7c65 feat(core-flows,medusa,order,types): update orders (#10373)
**What**
- add order update endpoint
- add workflows and steps for updating orders
- add `registerChanges` method to Order module + workflow step

---

CLOSES CMRC-633
2024-12-03 17:15:26 +00:00
Lucien Blunk-Lallet
56ae076fd2 Fix French translation typos (#10348)
Hello,

This is just a small PR to fix a few typos with the French translation, especially with the template strings.

Best regards.
2024-12-03 11:35:37 +00:00
Marco Sannino
56e9acbed8 feat: added Italian translations (#10362) 2024-12-02 19:34:27 +01:00
Karl Hofmann
12884966e3 German language corrections (#10394) 2024-12-02 17:57:30 +01:00
Harminder Virk
3e98364bd1 feature: add support for check constraints in DML (#10391) 2024-12-02 17:59:50 +05:30
Adrien de Peretti
ac79585232 feat(user): Migrate user module to DML (#10389)
* feat(user): Migrate user module to DML

* Create rotten-tigers-worry.md

* update indexes names following conventions

* remove duplicate modifier
2024-12-02 12:36:40 +01:00
Adrien de Peretti
4ef353a7b9 feat(auth): Migrate auth module to DML (#10387)
* feat(auth): Migrate auth module to DML

* Create lazy-eagles-bow.md
2024-12-02 11:58:04 +01:00
Harminder Virk
913cf15e2b refactor: migrate pricing entities to DML models (#10335)
Fixes: FRMW-2810

## Breaking changes
There is only one breaking change

- The `min_quantity` and `max_quantity` properties are now consistently typed as numbers. Earlier, it was [typed as numbers](https://github.com/medusajs/medusa/blob/develop/integration-tests/http/__tests__/price-list/admin/price-list.spec.ts#L68-L69) in some API responses and as [string in others](https://github.com/medusajs/medusa/blob/develop/integration-tests/http/__tests__/price-list/admin/price-list.spec.ts#L186-L187). I did not go to the bottom of this inconsistency, but the tests reveals them.

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-12-02 09:44:41 +00:00
Adrien de Peretti
a1f36caaf7 chore(utils): Ensure DML name convention follow the same as the class name for simplicity (#10370)
**What**
DML class name and mikro orm entity name are different, it was ok and the idea was to accept that and do the transformation when needed. But since class name are usually upper case first we decided to re integrate that convention in the DML class name as well to simplify consumption of the dml name without having to worry about the normal case
2024-12-02 04:57:23 +00:00
Riqwan Thamir
11bd556133 feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context (#10374)
* feat(core-flows,framework,medusa): list shipping options pass in cart as pricing context

* chore: add test for shipping options returning free shipping
2024-12-01 20:59:26 +01:00
Oli Juhl
eacd691951 fix: Ensure tax lines are generated for all items and shipping methods in cart (#10372)
* fix: Generate tax lines for all items in cart

* fix: Correct test
2024-12-01 14:50:38 +01:00
Kasper Fabricius Kristensen
94f6265dfc fix(ui,icons,ui-preset): Fix CodeBlock and Command components (#10369) 2024-11-29 17:30:25 +01:00
Riqwan Thamir
5719e825ca feat(core-flows,types,medusa): ability to update/create custom shipping prices (#10368) 2024-11-29 15:04:33 +01:00
Adrien de Peretti
ed11834d6e Fix(dml): DML default/nullable management (#10363)
RESOLVES FRMW-2813

**What**
Extract what we have done in the order module DML migration.
This includes all the changes we discussed around default value and nullable management

From now on, when the default is being set through the DML on a property, no default initializer will be created, this means that when a mikro orm class is being instantiated, no default will be applied at instantiation time. This fixes the issue when retrieving data and not selecting fields that have a default. The default initializer was taking the relay making you think the data was present except that it was the value of the default initializer. From now on, the default value is applied as follows
- db column default
- before flush
- on persist
The same applies for nullable properties/columns

Co-authored-by: Harminder Virk <1706381+thetutlage@users.noreply.github.com>
2024-11-29 11:46:26 +00:00