feat(core-flows, dashboard, link-modules,medusa, types, utils): fulfillment shipping changes (#10902)

**What**
- product <> shipping profile link
- create and update product workflows/endpoints accepts shipping profile
- pass shipping option id when creating fulfillment to allow overriding customer selected SO
- validate shipping profile delete
- dashboard
  - set shipping profile on product create
  - manage shipping profile for a product
  - **update the create fulfillment form**
- other
  - fix create product form infinite rerenders
 
---

CLOSES CMRC-831 CMRC-834 CMRC-836 CMRC-837 CMRC-838 CMRC-857 TRI-761
This commit is contained in:
Frane Polić
2025-01-27 12:00:20 +00:00
committed by GitHub
parent 3e81962503
commit 864d772e34
78 changed files with 3529 additions and 794 deletions
@@ -4,7 +4,10 @@ import {
batchProductVariantsWorkflow,
batchProductVariantsWorkflowId,
} from "@medusajs/core-flows"
import { IProductModuleService } from "@medusajs/types"
import {
IFulfillmentModuleService,
IProductModuleService,
} from "@medusajs/types"
import { Modules } from "@medusajs/utils"
import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
@@ -17,9 +20,20 @@ medusaIntegrationTestRunner({
let appContainer
let service: IProductModuleService
let fulfullmentService: IFulfillmentModuleService
let shippingProfile
beforeAll(async () => {
appContainer = getContainer()
service = appContainer.resolve(Modules.PRODUCT)
fulfullmentService = appContainer.resolve(Modules.FULFILLMENT)
})
beforeEach(async () => {
shippingProfile = await fulfullmentService.createShippingProfiles({
name: "Test",
type: "default",
})
})
describe("batchProductWorkflow", () => {
@@ -43,7 +57,8 @@ medusaIntegrationTestRunner({
create: [
{
title: "test3",
options: [{ title: "size", options: ["x"] }],
shipping_profile_id: shippingProfile.id,
options: [{ title: "size", values: ["x"] }],
},
],
update: [{ id: product1.id, title: "test1-updated" }],
@@ -94,6 +109,7 @@ medusaIntegrationTestRunner({
{
title: "test1",
options: [{ title: "size", values: ["x", "l", "m"] }],
shipping_profile_id: shippingProfile.id,
variants: [
{
title: "variant1",