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
@@ -658,6 +658,7 @@ medusaIntegrationTestRunner({
describe("POST /store/carts/:id/line-items", () => {
let region
const productData = {
title: "Medusa T-Shirt",
handle: "t-shirt",
@@ -716,8 +717,21 @@ medusaIntegrationTestRunner({
})
it("adding an existing variant should update or create line item depending on metadata", async () => {
const shippingProfile =
await fulfillmentModule.createShippingProfiles({
name: "Test",
type: "default",
})
const product = (
await api.post(`/admin/products`, productData, adminHeaders)
await api.post(
`/admin/products`,
{
...productData,
shipping_profile_id: shippingProfile.id,
},
adminHeaders
)
).data.product
const cart = (
@@ -1203,6 +1217,7 @@ medusaIntegrationTestRunner({
"/admin/products",
{
title: "Test fixture",
shipping_profile_id: shippingProfile.id,
options: [
{ title: "size", values: ["large", "small"] },
{ title: "color", values: ["green"] },