Commit Graph

5537 Commits

Author SHA1 Message Date
Adrien de Peretti
48963f55ef Chore/rm main entity concept (#7709)
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules

Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-06-19 13:02:16 +00:00
Harminder Virk
2895ccfba8 Add support for id property type (#7775) 2024-06-19 17:59:03 +05:30
Frane Polić
ef5719a3d8 feat(dashboard): variant details page (#7767)
* wip: setup

* feat: finish inventory, prices section

* feat: finish prices section pagination

* fix: move edit variants to variants details, fix loader

* fix: suggestion

* feat: price editor flow
2024-06-19 13:56:35 +02:00
Harminder Virk
fd87858bd9 Handle embedded pg schema name inside the table name when generating indexes (#7774) 2024-06-19 16:48:44 +05:30
Harminder Virk
0b623fa27a Allow entities to contain pg schema name in their name (#7773) 2024-06-19 14:39:33 +05:30
Oli Juhl
305e1d66ca fix(medusa): Load subscribers and scheduled jobs in worker mode (#7769) 2024-06-18 19:15:55 +02:00
Riqwan Thamir
0d04c548f5 feat(dashboard,types,promotion,medusa): hide fields on promotions depending on templates (#7746)
**what:**

- hides different fields depending on the chosen template
- remove operator values API
- fixes to edit promotion rules
- make currency optional for promotion

RESOLVES CORE-2297
2024-06-18 16:47:42 +00:00
Harminder Virk
1451112f08 Add support for created and updated at timestamps (#7765) 2024-06-18 21:22:31 +05:30
Adrien de Peretti
89bb16cea1 chore: Add back the db utils to the test runner for specific cases (#7764)
* chore: Add back the db utils to the test runner for specific casees

* chore: Add back the db utils to the test runner for specific casees
2024-06-18 17:19:37 +02:00
Kasper Fabricius Kristensen
d5c5628ffc feat(dashboard): Add Optimistic UI to category rank form + style updates (#7747)
**What**
- Makes rank updates optimistic, meaning that we override the local state (ranking) with what we expect the outcome of the request to be. If a request fails then we revert to the last known server state.
- Updates the style of dragged items.
- Fixes an issue where the tree would flicker when submitting the create form.
2024-06-18 14:46:32 +00:00
Riqwan Thamir
288e41856b fix(core-flows): delete existing payment session before creating new (#7751)
what:

Multiple active sessions are used for split payments. We don't currently support split payments. Until we have that implemented, this change is to ensure that whenever we create a new payment session, we delete an existing session if present. 

RESOLVES CORE-2284
2024-06-18 11:51:20 +00:00
Carlos R. L. Rodrigues
cfa983001b feat(order): create claim and exchange (#7734) 2024-06-18 08:08:16 -03:00
Adrien de Peretti
e0b14519f1 fix: Medusa service base method transaction (#7758)
**What**
Remove transaction decorator from the base medusa service method, the transaction will always be coming from the shared context. It fixes the issue that when you consume a base method directly it will return a proper tuple from the DB instead of the one from the entity map cc @VariableVic 

**NOTE**
This pr also fix some categories issues in the product module which was preventing the tests from working. if @sradevski you could have a look later, in the mean time we can still merge it

FIXES CORE-2342
2024-06-18 10:58:54 +00:00
Harminder Virk
8410592239 Rename schema to property (#7761) 2024-06-18 16:14:09 +05:30
Riqwan Thamir
4c962b97b1 chore: extend timeout on flaky spec (#7760) 2024-06-18 12:01:12 +02:00
Harminder Virk
4f7bbf1f29 feat: add support for indexes (#7756) 2024-06-18 13:41:16 +05:30
Carlos R. L. Rodrigues
d6c6f5998c chore(orchestration): remote joiner - relationships as map (#7752) 2024-06-17 16:11:42 -03:00
Carlos R. L. Rodrigues
12a57836a7 fix(pricing): Only get prices from active price list (#7753) 2024-06-17 20:18:08 +02:00
Kasper Fabricius Kristensen
2d8d2c4255 feat(dashboard,js-sdk,types,admin-shared): Add Product Types domain (#7732) 2024-06-17 16:50:55 +00:00
Carlos R. L. Rodrigues
70a72ce2df chore(payment-stripe): smallest unit (#7748) 2024-06-17 13:37:38 -03:00
Riqwan Thamir
263d9d0f22 feat(core-flows,utils): add payment + shipment workflow events (#7749) 2024-06-17 18:05:05 +02:00
Kasper Fabricius Kristensen
2e8e7b27b6 fix(dashboard,types,js-sdk): Locations & Shipping fixes and cleanup (#7715) 2024-06-17 16:10:39 +02:00
Carlos R. L. Rodrigues
bc0c65c6b3 feat(modules-sdk): define link (#7743) 2024-06-17 09:28:42 -03:00
Harminder Virk
0886869148 feat: mark all DML entities as soft delete-able by default (#7744) 2024-06-17 16:16:56 +05:30
Frane Polić
4e86caba30 feat(dashboard): display inventory levels in variants table (#7694)
* feat: display inventory levels in variants table

* fix: display conditions and translations

* fix: invalidate inventory lists when products are created

* fix: translation, fix link definition

* fix: revert link

* feat: navigation actions

* fix: action, refactor

* fix: refactor, add check for manage quantity flag

* fix: update label
2024-06-17 11:23:18 +02:00
Harminder Virk
0b9a6d5a52 Identify the owner when both sides defines a many to many relationship (#7741) 2024-06-17 14:47:14 +05:30
Frane Polić
3ecbec9685 feat(dashboard): inventory details variants section (#7705) 2024-06-14 11:18:23 +02:00
Harminder Virk
2af3f9e954 Add support for cascades to DML (#7721) 2024-06-14 13:45:11 +05:30
Riqwan Thamir
3d33f06e77 chore: upgrade jest everywhere (#7703) 2024-06-14 07:35:30 +02:00
Oli Juhl
f138339cbc fix: Sort orders by created_at desc (#7706) 2024-06-13 21:31:59 +02:00
Riqwan Thamir
41528ddecf fix: ability to update price list status on admin (#7699) 2024-06-13 21:29:02 +02:00
Stevche Radevski
dd1a8e6016 fix: Sort product categories based on rank (#7702) 2024-06-13 14:35:50 +00:00
Oli Juhl
6ee0a2c1b5 feat: Variant inventory quantity in GET requests (#7701)
* feat: Variant inventory quantity in GET requests

* clean up

* fix link name
2024-06-13 13:41:54 +02:00
Adrien de Peretti
d2a5201eeb chore: Refactor and improve abstract module service factory (#7688)
* chore: Refactor and improve abstract module service factory

* align naming

* clean up some template args and tests

* partially migrate modules

* partially migrate modules

* migrate more modules

* migrate last modules

* fix typings

* rename interface

* rename interface

* fixes

* fixes

* rm local plain tests
2024-06-13 13:12:37 +02:00
Riqwan Thamir
c57223a3a2 chore: price list prices of a product can be deleted (#7700) 2024-06-13 12:19:09 +02:00
Shahed Nasser
c1db40b564 docs: added customer storefront guides (#7685)
* added customer guides

* fixes to sidebar

* remove old customer registration guide

* fix build error

* generate files

* run linter
2024-06-13 12:21:54 +03:00
Stevche Radevski
d862d03de0 feat: Revamp of product categories (#7695)
* feat: Normalize the categories interface to match standards

* feat: Revamp the product category implementation

* fix: Adjustments to code and tests around product categories
2024-06-13 09:10:12 +02:00
Harminder Virk
fbd8eef18b Overall revamp of relationships (#7690) 2024-06-13 11:19:53 +05:30
Riqwan Thamir
129fb447d0 chore: allow calculating prices without explicit fields (#7691) 2024-06-12 20:04:53 +02:00
Carlos R. L. Rodrigues
75811cd4b3 feat(order): Claim and Exchange entities (#7681) 2024-06-12 14:49:15 -03:00
Shahed Nasser
85d487d90b docs: added checkout storefront guides (#7678)
* add first guides

* added more guides

* finished payment + added stripe

* finished adding guides

* updated generated sidebar
2024-06-12 19:46:06 +02:00
Shahed Nasser
7e7e6e3311 chore: fix OAS circular dependencies (#7693) 2024-06-12 19:42:03 +02:00
Frane Polić
3693f61dc3 feat(dashboard): finalise inventory kit creation (#7692)
* feat: finalize inventory kit creation

* fix: placeholder
2024-06-12 16:35:54 +02:00
Kasper Fabricius Kristensen
2f76fbc6ed feat(dashboard,types,sdk,medusa,ui): ProductCategory domain (#7675)
**What**
- Add missing features to ProductCategory domain in admin
- Add types
- Add SDK

**UI**
- Moves the TooltipProvider from the component to an export. Users should now wrap their entire application in a TooltipProvider. This change was made to take advantage of the built-in features of Radix Tooltip, and allows us to skip the delayDuration when moving the cursor from one tooltip to another within 500ms.
- Fixes the layout of the Hint component, as the create form revealed that it was off.
- Fixes an issue where focus styles were missing from the dropdown menu.

**Note**
- ~~We currently don't have an endpoint for deleting categories, so I have disabled the button in the admin. See CORE--2286~~ PR has been opened to add delete endpoint, so I have re-enabled the delete button.
- The update category workflow seems to be broken, it's possible for the `mpath` of a category to reach an invalid state, that breaks `include_descendants_tree` from working. See CORE-2287.
- The ProductCategory model is incorrect. All fields are optional and it's not possible to set the description to null, which means the only way of unsetting it is to set it to `""`. See CORE-2276.
- The design for the Organize drag-n-drop form is not final. Ludvig will create a final design, and we can then update the form.
- Currently, all things related to Metadata is left out, as we need to update the flow for metadata according to the latest designs.

RESOLVES CORE-1960, CORE-2230
*except for the above mentioned issues.
2024-06-12 11:15:12 +00:00
Oli Juhl
73ca358606 feat: Introduce order.placed event (#7682) 2024-06-12 12:05:13 +02:00
Harminder Virk
6d43daa930 Code cleanup and add support for default values and nullable relationships (#7687) 2024-06-12 14:39:03 +05:30
Shahed Nasser
ee6bdd0ab0 docs: add products storefront guides (#7645)
* add tips + regions pages

* docs: added storefront regions guide

* removed storefront tips chapter from book

* added product guides

* finished price guide

* add product category pages

* more categories pages

* finished category pages

* add collections guides

* add missing next.js comment

* use useRegion hook

* added missing link
2024-06-11 19:55:56 +02:00
Frane Polić
48d8b2c623 fix(core-flows): variant pricing batch update (#7677)
* fix: variant pricing batch update

* fix: batch endpoint throwing when `create` array isn't passed

* fix: batch variants workflow
2024-06-11 19:45:43 +02:00
Harminder Virk
5f348d88f4 Initial implementation of DML to Mikro ORM entity generation (#7667)
* feat: initial implementation of DML to Mikro ORM entity generation

CORE-2279

* test: fix breaking tests

* refactor: cleanup code for defining properties and relationships

* feat: finish initial implementation of relationships
2024-06-11 21:00:36 +05:30
Stevche Radevski
0e731dbad0 feat: Add support for category deletion (#7679) 2024-06-11 16:49:42 +02:00