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:
@@ -15,3 +15,4 @@ export * from "./readonly"
|
||||
export * from "./region-payment-provider"
|
||||
export * from "./sales-channel-location"
|
||||
export * from "./shipping-option-price-set"
|
||||
export * from "./product-shipping-profile"
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
import { ModuleJoinerConfig } from "@medusajs/framework/types"
|
||||
import { LINKS, Modules } from "@medusajs/framework/utils"
|
||||
|
||||
export const ProductShippingProfile: ModuleJoinerConfig = {
|
||||
serviceName: LINKS.ProductShippingProfile,
|
||||
isLink: true,
|
||||
databaseConfig: {
|
||||
tableName: "product_shipping_profile",
|
||||
idPrefix: "prodsp",
|
||||
},
|
||||
alias: [
|
||||
{
|
||||
name: "product_shipping_profile",
|
||||
},
|
||||
{
|
||||
name: "product_shipping_profiles",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "product_id", "shipping_profile_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "Product",
|
||||
primaryKey: "id",
|
||||
foreignKey: "product_id",
|
||||
alias: "product",
|
||||
args: {
|
||||
methodSuffix: "Products",
|
||||
},
|
||||
},
|
||||
{
|
||||
serviceName: Modules.FULFILLMENT,
|
||||
entity: "ShippingProfile",
|
||||
primaryKey: "id",
|
||||
foreignKey: "shipping_profile_id",
|
||||
alias: "shipping_profile",
|
||||
args: {
|
||||
methodSuffix: "ShippingProfiles",
|
||||
},
|
||||
},
|
||||
],
|
||||
extends: [
|
||||
{
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "Product",
|
||||
fieldAlias: {
|
||||
shipping_profile: {
|
||||
path: "shipping_profiles_link.shipping_profile",
|
||||
isList: false,
|
||||
},
|
||||
},
|
||||
relationship: {
|
||||
serviceName: LINKS.ProductShippingProfile,
|
||||
primaryKey: "product_id",
|
||||
foreignKey: "id",
|
||||
alias: "shipping_profiles_link",
|
||||
isList: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
serviceName: Modules.FULFILLMENT,
|
||||
entity: "ShippingProfile",
|
||||
relationship: {
|
||||
serviceName: LINKS.ProductShippingProfile,
|
||||
primaryKey: "shipping_profile_id",
|
||||
foreignKey: "id",
|
||||
alias: "products_link",
|
||||
isList: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user