feat(core-flows, dashboard, fulfillment, fulfillment-manual, utils, types): create shipping options with calculated prices (#10495)
**What** - support creating SO with calculated price - support updating SO for both types of pricing - update `validateShippingOptionPricesStep` to handle both SO price_types - add the `validateShippingOptionsForPriceCalculation` method to `FulfillementModule` - add `canCalculate` and `calculatePrice` to fulfillment provider service service / interface / manual provider - disable SO pricing edit on Admin if SO price type is calculated --- CLOSES CMRC-776
This commit is contained in:
@@ -47,7 +47,10 @@ import {
|
||||
isOptionEnabledInStore,
|
||||
isReturnOption,
|
||||
} from "../../../../../lib/shipping-options"
|
||||
import { FulfillmentSetType } from "../../../common/constants"
|
||||
import {
|
||||
FulfillmentSetType,
|
||||
ShippingOptionPriceType,
|
||||
} from "../../../common/constants"
|
||||
|
||||
type LocationGeneralSectionProps = {
|
||||
location: HttpTypes.AdminStockLocation
|
||||
@@ -167,6 +170,8 @@ function ShippingOption({
|
||||
{
|
||||
label: t("stockLocations.shippingOptions.pricing.action"),
|
||||
icon: <CurrencyDollar />,
|
||||
disabled:
|
||||
option.price_type === ShippingOptionPriceType.Calculated,
|
||||
to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${option.service_zone_id}/shipping-option/${option.id}/pricing`,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user