Commit Graph

4489 Commits

Author SHA1 Message Date
Shahed Nasser
29555ae518 fix(types, medusa): fixes to draft order request types (#8949)
- remove the `name` filter for orders (couldn't find any `name` property in the order data model).
- Remove the `order_id` property of a shipping method in the request body type for creating a draft order
- Update the types of `fulfillment_status` and `payment_status` in the order filters to showcase the possible status values.
2024-09-02 17:09:41 +00:00
Kasper Fabricius Kristensen
d88e6474e9 fix(dashboard): Product create price columns race condition (#8943) 2024-09-02 18:56:05 +02:00
Adrien de Peretti
479e712c17 fix(core-flows): Handle variant creation duplicate inventory item ids (#8937)
* fix(core-flows): Handle variant creation duplicate inventory item ids

* disabled already selected options

* address feedback

* fix tests
2024-09-02 18:36:42 +02:00
Kasper Fabricius Kristensen
ddcb030ac7 fix(medusa): Allow filtering customers by has_account (#8947)
* add has account filter param

* add has account filter param
2024-09-02 18:19:50 +02:00
Harminder Virk
3bb6ef3735 fix: move get-port to main dependencies list (#8938) 2024-09-02 18:37:54 +05:30
Frane Polić
b5ec6c9003 fix(dashboard): format currency sign (#8936)
**What**
- change `formatCurrency` admin util to show sign only for negative numbers

---

FIXES CC-335
2024-09-02 11:57:45 +00:00
Frane Polić
56ceeeb4c7 fix(dashboard): product option delete message (#8934)
FIXES CC-408
2024-09-02 11:56:56 +00:00
Harminder Virk
0ce584029c fix: handle case where product to be updated does not exist (#8897) 2024-09-02 16:23:31 +05:30
Riqwan Thamir
25367734c7 fix(dashboard): fix campaign end date (#8935)
what:

- scopes the conditional to the right date attribute

<img width="1027" alt="Screenshot 2024-09-02 at 11 47 09" src="https://github.com/user-attachments/assets/87048b93-e118-4548-80ee-2564bc2e56e5">

RESOLVES CC-68
2024-09-02 09:59:24 +00:00
Kasper Fabricius Kristensen
3c2fa8cdad fix(dashboard): Fix copy invite link (#8933)
* fix invite url

* use window location instead of backend url
2024-09-02 11:40:18 +02:00
Shahed Nasser
2c034774f0 fix(medusa, types): fix more query types (#8907)
Fix issues / missing query types I didn't pick up in the previous PRs.
2024-09-02 07:25:05 +00:00
Oli Juhl
cbb0a6adc7 fix: Customer registration (#8896)
* fix: Customer registration

* update test

* one mroe test

* chore: add transformation
2024-09-01 11:41:39 +02:00
Adrien de Peretti
99461e24ab feat(notification): Handle long running transaction and add status support (#8900)
RESOLVES FRMW-2110
RESOLVES FRMW-2095

**What**
- Fix notification module to not retain transactions open while sending notification
- Add support for notification status [success, pending, failure]
2024-09-01 08:01:47 +00:00
Frane Polić
dbb10ff051 feat(dashboard): order edits in timeline (#8899)
**What**
- add order edit confirmed/created events in the timeline
- add order change endpoint clients
- panel for active edit and pending edit
- few fixes around the edit domain
2024-09-01 07:49:14 +00:00
Shahed Nasser
7e92aa412c chore(framework): add a note for admin path configuration + add troubleshooting guide (#8905)
- add a note in the `path` configuration regarding same path as docker image
- Add a section in the troubleshooting guide for the same reason
2024-09-01 07:46:32 +00:00
Carlos R. L. Rodrigues
4ffb49efd0 chore(cart): completed at (#8921) 2024-08-31 12:42:58 -03:00
Carlos R. L. Rodrigues
89c6ef8fc9 chore(core-flows): added workflow events (#8915)
* chore(core-flows): added workflow events

* remove from parallelize

* check array
2024-08-30 16:32:08 -03:00
Oli Juhl
4350fe5368 chore: Remove @medusajs/medusa usage + local types from dashboard (#8883)
Closes CC-403
2024-08-30 15:37:44 +00:00
Adrien de Peretti
3da01035f3 fix: Shipping profile deletion with options (#8910)
* fix(fulfillment): Prevent deletion of profiles associated to options

* add tests

* typo

* address feedback
2024-08-30 17:04:29 +02:00
Frane Polić
48d4a97ad2 fix(dashboard): rma shipping floats (#8892) 2024-08-30 09:31:28 +00:00
Oli Juhl
e360a495b7 chore: Replace Error with FetchError (#8885) 2024-08-30 11:08:36 +02:00
Harminder Virk
9b6c2e5efa fix: ignore metadata when computing relationships from payload (#8895) 2024-08-30 13:32:25 +05:30
Shahed Nasser
170429a9b3 chore(types, medusa): [1/n] add missing query type arguments (#8877)
Add missing type arguments in listing requests.

1/n
2024-08-30 07:35:18 +00:00
Shahed Nasser
80fd20b21e chore(types, medusa): [2/n] add missing query type arguments (#8879)
Add missing type arguments in listing requests.

2/n
2024-08-30 07:18:14 +00:00
Shahed Nasser
0ee5c2d501 fix(dashboard, js-sdk, types, medusa): separate between delete response with and without parent (#8852)
- Separate the previous `DeleteResponse` to `DeleteResponse` and `DeleteResponseWithParent`, as not every API route's delete response returns a parent. This ensures more accurate types shown in OAS / documentation.
- Use `DeleteResponse` or `DeleteResponseWithParent` in response API routes based on what they return
- Remove direct usage of `DeleteResponse` in API route, and instead create a type in the `type` package specific for the route / domain.
- Use the new types in the `js-sdk` and `dashboard`.
2024-08-30 07:15:02 +00:00
Shahed Nasser
9f495fd853 chore(types, medusa): [3/3] add missing query type arguments (#8880)
Add missing type arguments in listing requests.

3/3
2024-08-30 07:07:18 +00:00
Oli Juhl
e0cb5ff0aa fix(dashboard): Fetch tags + types in product forms (#8887) 2024-08-30 08:35:46 +02:00
Carlos R. L. Rodrigues
891037081d chore(core-flows): apply taxes to items and shipping on RMA flows (#8858)
** What
Apply taxes to order line items and shipping methods
2024-08-29 17:33:39 +00:00
Frane Polić
f2496ef783 feat(dashboard): refactor dismissed quantity (#8842)
**What**
- refactor Receive return flow to use dismissed quantity instead of written off quantity 
- fix a few more edge cases

---

FIXES CC-392
2024-08-29 16:47:07 +00:00
Carlos R. L. Rodrigues
90a6f61c62 fix(order): populate version entities (#8884) 2024-08-29 13:22:24 -03:00
Oli Juhl
9cf1a5d709 chore: Remove last trace of client in dashboard (#8873) 2024-08-29 17:48:01 +02:00
Adrien de Peretti
bd20d66968 fix(link-module): Migration planner not closing connection correctly (#8881)
RESOLVES CC-405

**What**
Fixing mikro orm connection not closed during sync-links
2024-08-29 15:10:13 +00:00
Carlos R. L. Rodrigues
b6521e4c1a feat(medusa): order changes endpoint (#8728)
What:
- `admin/orders/:id/changes` endpoint to get order changes related to the order
- added `*_by` attributes missing
2024-08-29 14:20:12 +00:00
Riqwan Thamir
2a6c6fe590 feat(dashboard,types): split damaged activity from received (#8859)
what:

- split damaged activity from received
- adds a popover to view return details

<img width="1661" alt="Screenshot 2024-08-28 at 23 23 10" src="https://github.com/user-attachments/assets/064e982c-f850-452d-a60d-e5c267d0075a">

RESOLVES CC-363
2024-08-29 14:04:00 +00:00
Oli Juhl
00bd9271e3 chore: Workflow execution JS-SDK (#8851) 2024-08-29 11:22:43 +00:00
Frane Polić
e396c01260 fix(dashboard): RMAs shipping pricing (#8848)
* wip: allow unsetting price

* fix: use non return shipping for outbound

* fix: claims shipping

* fix: refactor

* fix: checks

* feat: polish
2024-08-29 11:54:29 +02:00
Oli Juhl
e652d03b98 chore: Replace reservation customer group client with JS-SDK + clean up (#8857) 2024-08-29 11:51:23 +02:00
Kasper Fabricius Kristensen
16d8fb1d20 fix(dashboard): Pass query params to list SC request (#8863)
Resolves CC-331
2024-08-29 08:35:39 +00:00
Adrien de Peretti
77b874f272 feat: Add support for providers to validate their options at loading time (#8853)
* feat: Add support for providers to validate their options at loading time

* fix missing removal

* fix integration tests

* add tests
2024-08-29 09:08:49 +02:00
Kasper Fabricius Kristensen
b8572165cb feat(dashboard): DataGrid improvements [4/4] (#8798)
**What**
- Changes cell state strategy from tracking from lazy to eager. This has required some changes to the API of the DataGrid component, and createDataGridColumnHelper function.
- Displays error messages in both affected cells and their rows. The row indicator also provides an option to quickly jump to an error.
- Allows the user to hide all rows and columns that don't have errors, to help quickly get an overview of the errors in a large grid.
- The first column of a DataGrid is now pinned, making it easier for a user to tell which entity they are editing.
- Fixes and improvements to column visibility menu.
- Adds a shortcuts modal that explains the different available keyboard commands.
- Updates `@tanstack/react-table` to the latest version.

Resolves CC-269
2024-08-28 19:06:38 +00:00
Frane Polić
d8fdf4d0b2 fix(dashboard): active rma z-index (#8854) 2024-08-28 15:54:01 +00:00
Adrien de Peretti
52e394055c fix(utils): DML hasOne - belongsTo not behaving correctly (#8813)
FIXES FRMW-2676

**What**
ref: https://discord.com/channels/876835651130097704/1023889804544458752/threads/1276979858781503528

Currently, when providing the following

```ts
const user1 = manager.create(User, {
  username: "User 1",
  team: {
    name: "Team 1",
  },
})
```

It would result in an error inserting into the database because the foreign key will be sent twice as part of the insert, one for the relation and one for the foreign key that both relate to the foreign key property.

To fix that and allow both approaches (providing the entity to cascade persist or just providing the foreign key in case of another side nullable relation) we need to handle it a bit differently.

now both approaches would be valid. the entities for the example might not be the best ones but it is just to illustrate
option 1 - we create both the user and the team:
```ts
const user1 = manager.create(User, {
  username: "User 1",
  team: {
    name: "Team 1",
  },
})
```
option 2 - the team already exists (for example the previous user have been detached from the team but we kept the team alive and assign a new user to that team) :
```ts
const user1 = manager.create(User, {
  username: "User 1",
  team_id: team.id
})
```
2024-08-28 15:45:48 +00:00
Frane Polić
6ea5a15762 fix(dashboard): active RMA section border (#8849)
**What**
- fix border around active RMA section on larger screens

**Prev**
![Screenshot 2024-08-28 at 14 36 11](https://github.com/user-attachments/assets/89f2dba9-3d84-4b32-a44c-44b32fb605fb)

**Now**
![Screenshot 2024-08-28 at 14 35 23](https://github.com/user-attachments/assets/6e96acfd-8916-456a-bdeb-9485d491f22f)
2024-08-28 15:20:56 +00:00
Adrien de Peretti
5bec38538a chore: Treat internal event differently, primarely do not display info logs for those events (#8767)
* chore: Treat internal event differently, primarely do not display info log for those events

* revert doc

* add few tests

* only set internal option if present

* revert to previous condition

* start including feedback after discussion

* include feedback

* fix modules integration tests

* fix modules integration tests

* fix event bus local
2024-08-28 16:46:40 +02:00
Carlos R. L. Rodrigues
6cfe9bd874 fix(orchestration): remote joiner alias conflict (#8844) 2024-08-28 11:34:22 -03:00
Shahed Nasser
68f3244de3 fix(core-flows): use unit price of item in create cart and add to cart flows (#8841)
* fix(types): fix create line item workflow type

* use unit price in workflows

* use tax inclusive from item
2024-08-28 17:34:07 +03:00
Oli Juhl
37b7592fba chore: Remove unused clients in admin + clean up js-sdk (#8839)
* feat(js-sdk): Add API key

* chore: Remove unused clients in admin + clean up js-sdk

* fix sales channel hooks
2024-08-28 15:43:55 +02:00
Adrien de Peretti
5294ce8654 chore(medusa): Re enable plugin loading (#8843)
* chore(medusa): Re enable plugin loading

* finalise
2024-08-28 15:38:51 +02:00
Shahed Nasser
61e7b2eb24 fix(admin-next,types): fix some http type names (#8836) 2024-08-28 15:43:54 +03:00
Riqwan Thamir
8fbfb1445d fix(dashboard): align items inside quick view popover (#8847)
* fix(dashboard): align items inside quick view popover

* chore: remove unwanted w-* classes
2024-08-28 14:37:35 +02:00