diff --git a/.changeset/beige-rockets-scream.md b/.changeset/beige-rockets-scream.md new file mode 100644 index 0000000000000..66796ed002f13 --- /dev/null +++ b/.changeset/beige-rockets-scream.md @@ -0,0 +1,5 @@ +--- +"@medusajs/dashboard": patch +--- + +fix(dashboard): Add missing inventory_item.list.\* widgets diff --git a/.changeset/big-horses-sneeze.md b/.changeset/big-horses-sneeze.md new file mode 100644 index 0000000000000..e294a5c0dd03e --- /dev/null +++ b/.changeset/big-horses-sneeze.md @@ -0,0 +1,5 @@ +--- +"@medusajs/dashboard": patch +--- + +fix(dashboard): Ensure Breadcrumbs don't display stale data diff --git a/.changeset/gentle-dancers-count.md b/.changeset/gentle-dancers-count.md new file mode 100644 index 0000000000000..aa70f11cab91d --- /dev/null +++ b/.changeset/gentle-dancers-count.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +fix: do not update the .env.template file with the database name diff --git a/.changeset/good-yaks-draw.md b/.changeset/good-yaks-draw.md new file mode 100644 index 0000000000000..34c8d40e5cf16 --- /dev/null +++ b/.changeset/good-yaks-draw.md @@ -0,0 +1,5 @@ +--- +"@medusajs/auth-google": patch +--- + +feature: Add email to google provider-identity metadata diff --git a/.changeset/honest-chefs-attend.md b/.changeset/honest-chefs-attend.md new file mode 100644 index 0000000000000..ee5c391feb7bd --- /dev/null +++ b/.changeset/honest-chefs-attend.md @@ -0,0 +1,5 @@ +--- +"@medusajs/core-flows": patch +--- + +Order edit quantity diff diff --git a/.changeset/mean-rice-cough.md b/.changeset/mean-rice-cough.md new file mode 100644 index 0000000000000..511e96c69f030 --- /dev/null +++ b/.changeset/mean-rice-cough.md @@ -0,0 +1,6 @@ +--- +"@medusajs/admin-shared": patch +"@medusajs/dashboard": patch +--- + +fix(admin-shared,dashboard): Add missing Injection Zones and remove unused zones" diff --git a/.changeset/orange-donkeys-hammer.md b/.changeset/orange-donkeys-hammer.md new file mode 100644 index 0000000000000..aa67ea5a14ef3 --- /dev/null +++ b/.changeset/orange-donkeys-hammer.md @@ -0,0 +1,8 @@ +--- +"@medusajs/event-bus-local": patch +"@medusajs/event-bus-redis": patch +"@medusajs/orchestration": patch +"@medusajs/utils": patch +--- + +Improve event bus error handling diff --git a/.changeset/proud-pigs-deny.md b/.changeset/proud-pigs-deny.md new file mode 100644 index 0000000000000..bf11e3066d7e7 --- /dev/null +++ b/.changeset/proud-pigs-deny.md @@ -0,0 +1,28 @@ +--- +"@medusajs/api-key": patch +"@medusajs/auth": patch +"@medusajs/cart": patch +"@medusajs/currency": patch +"@medusajs/file": patch +"@medusajs/fulfillment": patch +"@medusajs/index": patch +"@medusajs/inventory": patch +"@medusajs/locking": patch +"@medusajs/notification": patch +"@medusajs/order": patch +"@medusajs/payment": patch +"@medusajs/pricing": patch +"@medusajs/product": patch +"@medusajs/promotion": patch +"@medusajs/region": patch +"@medusajs/sales-channel": patch +"@medusajs/stock-location": patch +"@medusajs/store": patch +"@medusajs/tax": patch +"@medusajs/user": patch +"@medusajs/workflow-engine-inmemory": patch +"@medusajs/workflow-engine-redis": patch +"@medusajs/locking-postgres": patch +--- + +Fix/mikro orm cli wrapper diff --git a/.changeset/rich-pumpkins-lie.md b/.changeset/rich-pumpkins-lie.md new file mode 100644 index 0000000000000..49ae17a49a420 --- /dev/null +++ b/.changeset/rich-pumpkins-lie.md @@ -0,0 +1,5 @@ +--- +"@medusajs/file-local": patch +--- + +Throw error from local file provider diff --git a/.changeset/rude-cooks-knock.md b/.changeset/rude-cooks-knock.md new file mode 100644 index 0000000000000..a436f56e49681 --- /dev/null +++ b/.changeset/rude-cooks-knock.md @@ -0,0 +1,5 @@ +--- +"@medusajs/dashboard": patch +--- + +fix(dashboard): Fix active nav link styling for built-in routes diff --git a/.changeset/thirty-lamps-collect.md b/.changeset/thirty-lamps-collect.md new file mode 100644 index 0000000000000..9b62cebb36aff --- /dev/null +++ b/.changeset/thirty-lamps-collect.md @@ -0,0 +1,6 @@ +--- +"@medusajs/core-flows": patch +"@medusajs/medusa": patch +--- + +Create Order before payment capture diff --git a/.github/workflows/docs-test.yml b/.github/workflows/docs-test.yml index 62fa900dfaf5a..5482a64686bec 100644 --- a/.github/workflows/docs-test.yml +++ b/.github/workflows/docs-test.yml @@ -39,6 +39,7 @@ jobs: run: yarn build env: NEXT_PUBLIC_BASE_URL: "http://localhost:3000" + NEXT_PUBLIC_BASE_PATH: /api NEXT_PUBLIC_DOCS_URL: "https://medusa-docs.vercel.app" NEXT_PUBLIC_UI_URL: "https://docs-ui.vercel.app" # TODO change once we have actual URLs @@ -317,7 +318,7 @@ jobs: - name: Get Directories to Scan if: ${{ steps.pr-files.outputs.files_lt_threshold == 'true' }} working-directory: www/vale - run: ./get-files.sh api-reference app/_mdx + run: ./get-files.sh api-reference markdown id: directories - name: Vale Linter diff --git a/integration-tests/http/__tests__/order-edits/order-edits.spec.ts b/integration-tests/http/__tests__/order-edits/order-edits.spec.ts index 9790780b1215c..80f4fa4d7bd6e 100644 --- a/integration-tests/http/__tests__/order-edits/order-edits.spec.ts +++ b/integration-tests/http/__tests__/order-edits/order-edits.spec.ts @@ -1,10 +1,10 @@ +import { medusaIntegrationTestRunner } from "@medusajs/test-utils" import { ContainerRegistrationKeys, Modules, OrderChangeStatus, RuleOperator, } from "@medusajs/utils" -import { medusaIntegrationTestRunner } from "@medusajs/test-utils" import { adminHeaders, createAdminUser, @@ -418,6 +418,31 @@ medusaIntegrationTestRunner({ expect(result.summary.current_order_total).toEqual(124) expect(result.summary.original_order_total).toEqual(60) + const updatedItem = result.items.find((i) => i.id === item.id) + expect(updatedItem.actions).toEqual([ + expect.objectContaining({ + details: expect.objectContaining({ + quantity: 2, + unit_price: 25, + quantity_diff: 0, + }), + }), + expect.objectContaining({ + details: expect.objectContaining({ + quantity: 3, + unit_price: 25, + quantity_diff: 1, + }), + }), + expect.objectContaining({ + details: expect.objectContaining({ + quantity: 3, + unit_price: 30, + quantity_diff: 1, + }), + }), + ]) + // Remove the item by setting the quantity to 0 result = ( await api.post( diff --git a/packages/admin/admin-shared/src/extensions/widgets/constants.ts b/packages/admin/admin-shared/src/extensions/widgets/constants.ts index 9a3a4ab313b25..b4a83fc1a97cc 100644 --- a/packages/admin/admin-shared/src/extensions/widgets/constants.ts +++ b/packages/admin/admin-shared/src/extensions/widgets/constants.ts @@ -7,15 +7,6 @@ const ORDER_INJECTION_ZONES = [ "order.list.after", ] as const -const DRAFT_ORDER_INJECTION_ZONES = [ - "draft_order.list.before", - "draft_order.list.after", - "draft_order.details.side.before", - "draft_order.details.side.after", - "draft_order.details.before", - "draft_order.details.after", -] as const - const CUSTOMER_INJECTION_ZONES = [ "customer.details.before", "customer.details.after", @@ -39,6 +30,13 @@ const PRODUCT_INJECTION_ZONES = [ "product.details.side.after", ] as const +const PRODUCT_VARIANT_INJECTION_ZONES = [ + "product_variant.details.before", + "product_variant.details.after", + "product_variant.details.side.before", + "product_variant.details.side.after", +] as const + const PRODUCT_COLLECTION_INJECTION_ZONES = [ "product_collection.details.before", "product_collection.details.after", @@ -96,15 +94,6 @@ const CAMPAIGN_INJECTION_ZONES = [ "campaign.list.after", ] as const -const GIFT_CARD_INJECTION_ZONES = [ - "gift_card.details.before", - "gift_card.details.after", - "gift_card.list.before", - "gift_card.list.after", - "custom_gift_card.before", - "custom_gift_card.after", -] as const - const USER_INJECTION_ZONES = [ "user.details.before", "user.details.after", @@ -204,15 +193,16 @@ const INVENTORY_ITEM_INJECTION_ZONES = [ */ export const INJECTION_ZONES = [ ...ORDER_INJECTION_ZONES, - ...DRAFT_ORDER_INJECTION_ZONES, ...CUSTOMER_INJECTION_ZONES, ...CUSTOMER_GROUP_INJECTION_ZONES, ...PRODUCT_INJECTION_ZONES, + ...PRODUCT_VARIANT_INJECTION_ZONES, ...PRODUCT_COLLECTION_INJECTION_ZONES, ...PRODUCT_CATEGORY_INJECTION_ZONES, + ...PRODUCT_TYPE_INJECTION_ZONES, + ...PRODUCT_TAG_INJECTION_ZONES, ...PRICE_LIST_INJECTION_ZONES, ...PROMOTION_INJECTION_ZONES, - ...GIFT_CARD_INJECTION_ZONES, ...USER_INJECTION_ZONES, ...STORE_INJECTION_ZONES, ...PROFILE_INJECTION_ZONES, @@ -226,8 +216,6 @@ export const INJECTION_ZONES = [ ...WORKFLOW_INJECTION_ZONES, ...CAMPAIGN_INJECTION_ZONES, ...TAX_INJECTION_ZONES, - ...PRODUCT_TYPE_INJECTION_ZONES, - ...PRODUCT_TAG_INJECTION_ZONES, ...RETURN_REASON_INJECTION_ZONES, ...INVENTORY_ITEM_INJECTION_ZONES, ] as const diff --git a/packages/admin/dashboard/src/components/layout/nav-item/nav-item.tsx b/packages/admin/dashboard/src/components/layout/nav-item/nav-item.tsx index 562ff1be3c9d3..89ddc174b5b5e 100644 --- a/packages/admin/dashboard/src/components/layout/nav-item/nav-item.tsx +++ b/packages/admin/dashboard/src/components/layout/nav-item/nav-item.tsx @@ -99,20 +99,27 @@ export const NavItem = ({ const navLinkClassNames = useCallback( ({ + to, isActive, isNested = false, isSetting = false, }: { + to: string isActive: boolean isNested?: boolean isSetting?: boolean - }) => - clx(BASE_NAV_LINK_CLASSES, { + }) => { + if (["core", "setting"].includes(type)) { + isActive = pathname.startsWith(to) + } + + return clx(BASE_NAV_LINK_CLASSES, { [NESTED_NAV_LINK_CLASSES]: isNested, [ACTIVE_NAV_LINK_CLASSES]: isActive, [SETTING_NAV_LINK_CLASSES]: isSetting, - }), - [] + }) + }, + [type, pathname] ) const isSetting = type === "setting" @@ -130,11 +137,11 @@ export const NavItem = ({ } : undefined } - className={(props) => - clx(navLinkClassNames({ ...props, isSetting }), { + className={({ isActive }) => { + return clx(navLinkClassNames({ isActive, isSetting, to }), { "max-lg:hidden": !!items?.length, }) - } + }} > {type !== "setting" && (