Skip to content

Commit

Permalink
Merge branch 'fix/data-grid-tab-behaviour' of https://github.com/medu…
Browse files Browse the repository at this point in the history
…sajs/medusa into fix/data-grid-tab-behaviour
  • Loading branch information
kasperkristensen committed Sep 3, 2024
2 parents d0ecfee + 55fd965 commit 39d1d17
Show file tree
Hide file tree
Showing 22 changed files with 152 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {
BaseFilterable,
Context,
FilterQuery,
FilterQuery as InternalFilterQuery,
FindConfig,
InferEntityType,
FilterQuery as InternalFilterQuery,
ModulesSdkTypes,
PerformedActions,
UpsertWithReplaceConfig,
Expand All @@ -22,13 +22,13 @@ import {
shouldForceTransaction,
} from "../common"
import { FreeTextSearchFilterKey } from "../dal"
import { DmlEntity, toMikroORMEntity } from "../dml"
import { buildQuery } from "./build-query"
import {
InjectManager,
InjectTransactionManager,
MedusaContext,
} from "./decorators"
import { DmlEntity, toMikroORMEntity } from "../dml"

type SelectorAndData = {
selector: FilterQuery<any> | BaseFilterable<FilterQuery<any>>
Expand Down Expand Up @@ -304,7 +304,7 @@ export function MedusaInternalService<
if (keySelectorForDataOnly.$or.length) {
const entitiesToUpdate = await this.list(
keySelectorForDataOnly,
{},
{ take: null },
sharedContext
)

Expand Down
6 changes: 5 additions & 1 deletion packages/modules/order/src/services/order-module-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2672,6 +2672,7 @@ export default class OrderModuleService<
: transactionData.order_id,
},
{
take: null,
select: ["id", "version"],
},
sharedContext
Expand Down Expand Up @@ -2719,6 +2720,7 @@ export default class OrderModuleService<
},
{
select: ["order_id", "version", "amount"],
take: null,
},
sharedContext
)
Expand All @@ -2744,6 +2746,7 @@ export default class OrderModuleService<
id: transactionIds,
},
{
take: null,
select: ["order_id", "amount"],
},
sharedContext
Expand Down Expand Up @@ -2778,6 +2781,7 @@ export default class OrderModuleService<
{
select: ["order_id", "amount"],
withDeleted: true,
take: null,
},
sharedContext
)
Expand Down Expand Up @@ -2810,7 +2814,7 @@ export default class OrderModuleService<
{
order_id: transactionData.map((trx) => trx.order_id),
},
{},
{ take: null },
sharedContext
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* summary: Remove a Received Item from Return
* x-sidebar-summary: Remove Received Item
* description: |
* Remove an item marked as received in the return by the ID of the item's `RECEIVE_RETURN_ITEM` action.
* Remove a received item in the return by the ID of the item's `RECEIVE_RETURN_ITEM` action.
*
* Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
* x-authenticated: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* summary: Remove Item from Return
* x-sidebar-summary: Remove Item
* description: |
* Remove an item in the return by the ID of the item's `RETURN_ITEM` action.
* Remove a requested item to be returned by the ID of the item's `RETURN_ITEM` action.
*
* Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
* x-authenticated: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @oas [post] /admin/returns
* operationId: PostReturns
* summary: Create Return
* description: Create a return.
* description: Create a return. The return can later be requested or confirmed.
* x-authenticated: true
* parameters:
* - name: expand
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**
* @oas [post] /admin/returns/{id}/dismiss-items
* operationId: PostReturnsIdDismissItems
* summary: Add Dismiss Items to Return
* description: Add a list of dismiss items to a return.
* summary: Add Damaged Items to Return
* x-sidebar-summary: Add Damaged Items
* description: Add damaged items, whose quantity is to be dismissed, to a return. These items will have the action `RECEIVE_DAMAGED_RETURN_ITEM`.
* x-authenticated: true
* parameters:
* - name: id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/**
* @oas [post] /admin/returns/{id}/dismiss-items/{action_id}
* operationId: PostReturnsIdDismissItemsAction_id
* summary: Add Dismiss Items to Return
* description: Add a list of dismiss items to a return.
* summary: Update Damaged Item of Return
* x-sidebar-summary: Update Damaged Item
* description: |
* Update a damaged item, whose quantity is to be dismissed, in the return by the ID of the item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
*
* Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
* x-authenticated: true
* parameters:
* - name: id
Expand All @@ -13,7 +17,7 @@
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* description: The ID of the damaged item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
* required: true
* schema:
* type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**
* @oas [post] /admin/returns/{id}/receive-items
* operationId: PostReturnsIdReceiveItems
* summary: Add Receive Items to Return
* description: Add a list of receive items to a return.
* summary: Add Received Items to Return
* x-sidebar-summary: Add Received Items
* description: Add received items in a return. These items will have the action `RECEIVE_RETURN_ITEM`.
* x-authenticated: true
* parameters:
* - name: id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/**
* @oas [post] /admin/returns/{id}/receive-items/{action_id}
* operationId: PostReturnsIdReceiveItemsAction_id
* summary: Add Receive Items to Return
* description: Add a list of receive items to a return.
* summary: Update a Received Item in a Return
* x-sidebar-summary: Update Received Item
* description: |
* Update a received item in the return by the ID of the item's `RECEIVE_RETURN_ITEM` action.
*
* Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
* x-authenticated: true
* parameters:
* - name: id
Expand All @@ -13,7 +17,7 @@
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* description: The ID of the received item's `RECEIVE_RETURN_ITEM` action.
* required: true
* schema:
* type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @oas [post] /admin/returns/{id}/receive
* operationId: PostReturnsIdReceive
* summary: Add Receives to Return
* description: Add a list of receives to a return.
* summary: Start Return Receival
* description: Start a return receival process to be later confirmed using the `/admin/returns/:id/receive/confirm` API route.
* x-authenticated: true
* parameters:
* - name: id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/**
* @oas [post] /admin/returns/{id}/receive/confirm
* operationId: PostReturnsIdReceiveConfirm
* summary: Add Confirms to Return
* description: Add a list of confirms to a return.
* summary: Confirm Return Receival
* description: >
* Confirm that a return has been received. This updates the quantity of the items received, if not damaged, and
* reflects the changes on the order.
* x-authenticated: true
* parameters:
* - name: id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**
* @oas [post] /admin/returns/{id}/request-items
* operationId: PostReturnsIdRequestItems
* summary: Add Request Items to Return
* description: Add a list of request items to a return.
* summary: Add Requested Items to Return
* x-sidebar-summary: Add Items
* description: Add items that are requested to be returned. These items will have the action `RETURN_ITEM`.
* x-authenticated: true
* parameters:
* - name: id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/**
* @oas [post] /admin/returns/{id}/request-items/{action_id}
* operationId: PostReturnsIdRequestItemsAction_id
* summary: Add Request Items to Return
* description: Add a list of request items to a return.
* summary: Update Requested Item in Return
* x-sidebar-summary: Update Requested Item
* description: |
* Update a requested item to be returned by the ID of the item's `RETURN_ITEM` action.
*
* Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property. return.
* x-authenticated: true
* parameters:
* - name: id
Expand All @@ -13,7 +17,7 @@
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* description: The ID of the item's `RETURN_ITEM` action.
* required: true
* schema:
* type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/**
* @oas [post] /admin/returns/{id}/request
* operationId: PostReturnsIdRequest
* summary: Add Requests to Return
* description: Add a list of requests to a return.
* summary: Confirm Return Request
* description: >
* Confirm a requested return. The changes are applied on the inventory quantity and the order only after the
* return has been confirmed as received using the `/admin/returns/:id/received/confirm`.
* x-authenticated: true
* parameters:
* - name: id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**
* @oas [post] /admin/returns/{id}/shipping-method
* operationId: PostReturnsIdShippingMethod
* summary: Add Shipping Methods to Return
* description: Add a list of shipping methods to a return.
* summary: Add a Shipping Method to a Return
* x-sidebar-summary: Add Shipping Method
* description: Add a shipping method to a return. The shipping method will have a `SHIPPING_ADD` action.
* x-authenticated: true
* parameters:
* - name: id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/**
* @oas [post] /admin/returns/{id}/shipping-method/{action_id}
* operationId: PostReturnsIdShippingMethodAction_id
* summary: Add Shipping Methods to Return
* description: Add a list of shipping methods to a return.
* summary: Update a Shipping Method of a Return
* x-sidebar-summary: Update Shipping Method
* description: |
* Update a shipping method of the return by the ID of the item's `SHIPPING_ADD` action.
*
* Every item has an `actions` property, whose value is an array of actions. You can check the action's name using its `action` property, and use the value of the `id` property.
* x-authenticated: true
* parameters:
* - name: id
Expand All @@ -13,7 +17,7 @@
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* description: The ID of the shipping method's `SHIPPING_ADD` action.
* required: true
* schema:
* type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**
* @oas [post] /admin/sales-channels/{id}/products
* operationId: PostSalesChannelsIdProducts
* summary: Add Products to Sales Channel
* description: Add a list of products to a sales channel.
* summary: Manage Products in Sales Channel
* x-sidebar-summary: Manage Products
* description: Manage products in a sales channel to add or remove them from the channel.
* x-authenticated: true
* parameters:
* - name: id
Expand Down Expand Up @@ -62,22 +63,22 @@
* application/json:
* schema:
* type: object
* description: SUMMARY
* description: The products to add or remove from the channel.
* properties:
* add:
* type: array
* description: The sales channel's add.
* description: The products to add to the sales channel.
* items:
* type: string
* title: add
* description: The add's details.
* description: A product's ID.
* remove:
* type: array
* description: The sales channel's remove.
* description: The products to remove from the sales channel.
* items:
* type: string
* title: remove
* description: The remove's details.
* description: A product's ID.
* x-codeSamples:
* - lang: Shell
* label: cURL
Expand Down
Loading

0 comments on commit 39d1d17

Please sign in to comment.