Commit Graph

4728 Commits

Author SHA1 Message Date
Oli Juhl
8091c5f5bc fix: Remove undefined from events in update (#10170) 2024-11-20 09:43:51 +01:00
Harminder Virk
7390c14c20 feat: add support for making relationships searchable (#10172)
Closes: FRMW-2784
2024-11-20 08:39:44 +00:00
Riqwan Thamir
495c381709 feat(types, js-sdk): add updateCustomer to js-sdk (#10158)
what:

- adds new `POST /store/cart/:id/customer` endpoint to js sdk
2024-11-19 18:32:49 +00:00
Frane Polić
79088c8a3b feat(medusa): request order transfer storefront API (#10156)
**What**
- add an endpoint for order transfer requests from the storefront

---

CLOSES CMRC-702
2024-11-19 17:42:25 +00:00
Shahed Nasser
b43febda54 chore(js-sdk,types): add tsdocs for admin JS SDK methods [6/n] (#10028)
* chore(js-sdk,types): add tsdocs for admin JS SDK methods [6/n]

* fix error

* remove type changes
2024-11-19 19:15:44 +02:00
Riqwan Thamir
85f9c2b85a fix(framework,types): correct example of database driver options (#10166) 2024-11-19 16:32:31 +00:00
Shahed Nasser
5fb73e6698 chore(core-flows,types): add TSDocs for useQueryGraphStep (#10042) 2024-11-19 18:31:33 +02:00
Riqwan Thamir
2783bed8ae fix(dashboard): updated variant title is used when creating product (#10155) 2024-11-19 16:22:34 +01:00
Harminder Virk
9dff05cdde Revert "feat: add optional fields" (#10159)
Reverts medusajs/medusa#10150
2024-11-19 13:28:02 +00:00
Adrien de Peretti
1f44281ed6 fix(product): Update full descendant tree mpath when updating parent category id (#10144)
FIXES FRMW-2774

**What**
When updating the parent category id, all descendant mpath should be re computed
2024-11-19 12:51:34 +00:00
Adrien de Peretti
59bf9afd48 fix(core-flows): Add missing cart sales channel id fields to be part of the application context (#10142)
RESOLVES SUP-185

**What**
The cart fields to be fetched for the promotion workflow was not including the sales_channel_id, making any rules being constraint to that fields not being validated against this property.
2024-11-19 11:46:49 +00:00
Riqwan Thamir
b7044bb3b0 feat(core-flows,medusa): Add API to update cart's customer (#10151)
what:

- adds an endpoint that updates a cart's customer

RESOLVES CMRC-718
2024-11-19 11:44:25 +00:00
Sebastian Rindom
41dc05d0c9 fix: add address and customer metadata to tax calc context (#10122)
Fixes CMRC-713

**What**
- Ensure that customer and shipping address metadata is passed in the tax calculation context when updating tax lines on a cart.

**Why**
- Gives more flexibility in criteria to evaluate tax rates. 
- https://github.com/medusajs/medusa/discussions/10121
- https://github.com/medusajs/medusa/discussions/10114

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-11-19 11:42:31 +00:00
Frane Polić
39e81d8d21 fix(dashboard): order edit - display item quantity change correctly (#10078)
**What**
- use a diff form change action details to display edit history
2024-11-19 11:22:55 +00:00
Adrien de Peretti
7aa990795c chore(): Update module provider retrieval error message and type (#10138)
Partially RESOLVES FRMW-2802

**What**
Improve error message and change the error type when retrieving a provider from a local container fail
2024-11-19 11:19:19 +00:00
Harminder Virk
661ea7865c feat: add optional fields (#10150) 2024-11-19 16:28:33 +05:30
Frane Polić
36460a3a07 feat(medusa, types, utils, core-flows, order) request & accept order transfer (#10106)
**What**
- add request order transfer workflow
- add admin endpoint for transferring an order to a customer
- accept order transfer storefront endpoint
- accept transfer workflow
- changes in the order module to introduce new change and action types

---

**Note**
- we return 400 instead 409 currently if there is already an active order edit, I will revisit this in a followup
- endpoint for requesting order transfer from the storefront will be added in a separate PR

---

RESOLVES CMRC-701
RESOLVES CMRC-703
RESOLVES CMRC-704
RESOLVES CMRC-705
2024-11-19 08:53:22 +00:00
Adrien de Peretti
b1b7a4abf1 fix(payment): Idempotent cancellation and proper creationg fail handling (#10135)
RESOLVES SUP-188

**What**
Two changes are happening here
- In the stripe payment provider, idempotent cancellation action, if not id is provided then return the existing data unchanged
- Payment module should not try to cancel a session that have failed to be created in the first place
2024-11-18 17:45:13 +00:00
Carlos R. L. Rodrigues
47ca1d4b54 fix(inventory): update reservation quantity (#10139) 2024-11-18 11:55:22 -03:00
Harminder Virk
d933b3f1e4 Refactor/finish rename order (#10136) 2024-11-18 15:31:29 +05:30
Harminder Virk
2c957c64be refactor: rename workflow to singular (#10134) 2024-11-18 14:58:30 +05:30
Mehmet Erturk
1d88ad3793 feat: Add Turkish Language (#10109)
Turkish translation added.
2024-11-15 22:12:34 +00:00
Adrien de Peretti
2822972e04 fix(product): wrong snapshot name and inexistent script (#10119)
* chore(product): Rename wrong snapshot name and add missing elements

* rm non existing command

* Create proud-pigs-deny.md
2024-11-15 15:53:41 +01:00
Kasper Fabricius Kristensen
493d242c12 fix(dashboard): Add Breadcrumb components (#10079)
**What**
- Adds Breadcrumb component to all routes that needs breadcrumbs.
- The Breadcrumb components use a combination of loader data and useQuery to ensure that the displayed value is kept up to date if the underlying data is changed via a mutation.
- Also fixes a couple of places where the breadcrumb was not setup correctly.

Resolves CMRC-688
2024-11-15 13:13:03 +00:00
Kasper Fabricius Kristensen
8ed3d87c23 fix(dashboard): Add missing inventory list zones (#10117)
Resolves CMRC-710
2024-11-15 13:09:26 +00:00
Adrien de Peretti
1afc577e54 feat(product): Make product option value linkable (#10116)
RESOLVES FRMW-2799

**What**
Make the product option value linkable
2024-11-15 11:32:55 +00:00
Adrien de Peretti
10da8b379f chore(workflows-sdk): Display each error individually instead of packed (#10072)
**What**
Instead of displaying a single string prepared with all the errors, log each error individually
2024-11-15 11:27:52 +00:00
Kasper Fabricius Kristensen
dea86d8c87 fix(dashboard): Fix active nav link styling for built-in routes (#10082)
**What**
- Ensures that NavLinks are correctly styled for both built-in and extension routes.
2024-11-14 18:32:52 +00:00
Kasper Fabricius Kristensen
a153bc477c fix(admin-shared,dashboard): Add missing injection zones (#10098)
**What**
- Adds missing InjectionZones for ProductVariant details page.
- Removes v1 related zones, such as GiftCard and DraftOrder.
2024-11-14 18:32:36 +00:00
Carlos R. L. Rodrigues
06ce16c90b chore(local-file): throw error if file exist (#10087) 2024-11-14 12:11:37 -03:00
Adrien de Peretti
2e5fd9fd71 fix(core-flows): Fix date usage accross workflows (#10100)
FIXES CMRC-691

**What**
`Date` is something that get executed, since workflows are meant to compose the definition of what will be executed, the date where always having the same value as they was executed once during composition.
Instead wrap those into transformer that will be executed when needed and fix the Date issues
2024-11-14 14:51:30 +00:00
Furman
4c983557f9 feature: Add email to google provider-identity metadata (#10081)
* feature: Add email to google provider-identity metadata

* Include changeset.

---------

Co-authored-by: Stevche Radevski <sradevski@live.com>
2024-11-14 15:01:53 +01:00
Carlos R. L. Rodrigues
3e265229f2 chore(event-bus): event bus error handling (#10085) 2024-11-13 18:03:29 -03:00
Harminder Virk
98bf8c9006 test: add tests for self relationships (#10071)
Initially I thought that we will have to add special checks to allow relationships referencing itself. However, it turned out that not to be the case. Instead, it had more to do with how self relationships are defined in Mikro ORM.

In case of `belongsTo` relationship we have to define the other side as well either as a `hasMany` or `hasOne`. For example:

** The following code will fail, because no children are defined for the parent**
```ts
const user = model.define("user", {
  id: model.number(),
  username: model.text(),
  parent: model.belongsTo(() => user)
})
```

** Addition of children relationship will make things work**
```ts
const user = model.define("user", {
  id: model.number(),
  username: model.text(),
  parent: model.belongsTo(() => user, { mappedBy: "children" }),
  children: model.hasMany(() => user, { mappedBy: "parent" }),
})
```

We can see the similar setup here with our `ProductCategory` MikroORM entity. https://github.com/medusajs/medusa/blob/develop/packages/modules/product/src/models/product-category.ts#L87-L94

@adrien2p Correct me if I am wrong. But I have added the tests for now so that we know the behavior of self relationships
2024-11-13 17:20:27 +00:00
Harminder Virk
d9d4e575f6 fix: do not update the .env.template file with the database name (#10073)
Fixes FRMW-2775
2024-11-13 12:28:13 +00:00
Carlos R. L. Rodrigues
fc5d2b5fca feat(core-flows): order add quantity diff (#10065) 2024-11-12 16:49:58 -03:00
Karl Hofmann
ffa3a15ba1 Feat: add german language support (#9892)
**What**
Added German language json file. 

**Why**
To be able to choose german language.

**How**
The File is translated with Google Translate, some human checks and corrections. I'm sure it's not perfect, but it is a good starting point. First the en.json was duplicated (as de.json) to be able to see the changes made and if the structure is still the same.

**Testing**
As mentioned in How, i checked if the structure is still the same.

Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-11-12 13:46:43 +00:00
Carlos R. L. Rodrigues
2344012d1c fix(core-flows): capture before order created (#9980)
What:
 When `autocapture` is enabled, the webhook is processed before the order was created.
 The payment processing workflows were merged into a single one
 
FIXES: SUP-118, SUP-9

https://github.com/medusajs/medusa/issues/9998
2024-11-12 13:43:48 +00:00
Carlos R. L. Rodrigues
1eef324af3 fix(orchestration): fix set step failure (#10031)
What:
 - copy data before saving checkpoint
 - removed unused data format function
 - properly handle registerStepFailure to not throw
 - emit onFinish event even when execution failed
2024-11-12 10:06:36 +00:00
olivermrbl
d5605656ae chore: Version packages 2024-11-12 10:10:07 +01:00
Kasper Fabricius Kristensen
904f0926f1 fix(dashboard): Load product variant edit page and fix product detail query key (#10029)
**What**
- Fixes Edit Variant form so it properly loads the product variant
- Fixes the query key for product details to prevent the cache from being shared between queries for the same ID but with different params.

Resolves CMRC-685

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
2024-11-12 08:40:08 +00:00
Frane Polić
81208b6e1d fix(dashboard): handle deleted products/variants in the order domain (#9841)
* fix: optional variants and products

* fix: more cases with inventory

* fix: fulfillment creation modal

* fix: move create fulfillment actions to footer

* refactor: use properties of the LineItem

* fix: remove N/A

* fix: remove ||

* fix: show confirmed status properly

* fix: pick needed product props

* fix: typo
2024-11-12 09:05:11 +01:00
Frane Polić
fb05ca2b8a fix(medusa, types): filter product by external_id (#10010) 2024-11-11 19:31:41 +01:00
Kasper Fabricius Kristensen
34f4f695c0 fix(types): Add AdminBatchUpdateProductVariant type (#10009) 2024-11-11 19:30:44 +01:00
Shahed Nasser
0ef92cce28 chore(medusa): show success message after user is created (#10027) 2024-11-11 20:16:14 +02:00
Harminder Virk
e228088f8d fix: pluralize type helper to account for uncountable nouns and special rules (#10011) 2024-11-11 17:18:23 +05:30
Paweł Romanowski
5c22c57cb8 feat: add Polish language support (#9770)
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-11-11 10:07:28 +00:00
olivermrbl
ecece05b72 chore: Version packages 2024-11-11 10:58:20 +01:00
Dos
6ead7bf92d feat(stripe-payment): add promptpay (#9789)
* feat(stripe): add promptpay

* Create selfish-wombats-smash.md

---------

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>
2024-11-10 22:44:52 +01:00
Oli Juhl
094971775b chore: Add actor type check + more tests (#10005) 2024-11-10 21:38:19 +00:00