diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a3e0c321..b23aec6e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable, unreleased changes to this project will be documented in this file. - Add Cypress e2e runner - #584 by @krzysztofwolski - create Apps - #599 by @AlicjaSzu - Refactor authorization - #624 by @dominik-zeglen +- Fix minor bugs - #628 by @dominik-zeglen ## 2.10.1 diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index c0e35e3b7..115047cf0 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -250,10 +250,6 @@ "context": "optional field", "string": "Optional" }, - "productVariantPriceOptionalPriceField": { - "context": "optional field", - "string": "Optional" - }, "saleDetailsPageCategoriesQuantity": { "context": "number of categories", "string": "Categories ({quantity})" @@ -4393,11 +4389,11 @@ "context": "product pricing, section header", "string": "Pricing" }, - "src_dot_products_dot_components_dot_ProductVariantPrice_dot_1416480328": { - "string": "Cost price override" + "src_dot_products_dot_components_dot_ProductVariantPrice_dot_1134347598": { + "string": "Price" }, - "src_dot_products_dot_components_dot_ProductVariantPrice_dot_2238565650": { - "string": "Selling price override" + "src_dot_products_dot_components_dot_ProductVariantPrice_dot_819659341": { + "string": "Cost price" }, "src_dot_products_dot_components_dot_ProductVariants_dot_1001303107": { "context": "product variant inventory", diff --git a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx index a007b21d9..9c1b33619 100644 --- a/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx +++ b/src/orders/components/OrderDraftDetailsProducts/OrderDraftDetailsProducts.tsx @@ -151,6 +151,7 @@ const OrderDraftDetailsProducts: React.FC = prop type="number" value={data.quantity} onChange={debounce} + onBlur={submit} /> )} diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index 1f89122a8..d39a927b0 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -51,16 +51,8 @@ const ProductVariantPrice: React.FC = props => { error={!!formErrors.price} name="price" label={intl.formatMessage({ - defaultMessage: "Selling price override" + defaultMessage: "Price" })} - hint={ - getProductErrorMessage(formErrors.price, intl) || - intl.formatMessage({ - defaultMessage: "Optional", - description: "optional field", - id: "productVariantPriceOptionalPriceField" - }) - } value={price} currencySymbol={currencySymbol} onChange={onChange} @@ -72,7 +64,7 @@ const ProductVariantPrice: React.FC = props => { error={!!formErrors.cost_price} name="costPrice" label={intl.formatMessage({ - defaultMessage: "Cost price override" + defaultMessage: "Cost price" })} hint={ getProductErrorMessage(formErrors.cost_price, intl) || diff --git a/src/shipping/views/ShippingZoneDetails/data.ts b/src/shipping/views/ShippingZoneDetails/data.ts index 95879b5ed..799e91600 100644 --- a/src/shipping/views/ShippingZoneDetails/data.ts +++ b/src/shipping/views/ShippingZoneDetails/data.ts @@ -28,7 +28,7 @@ export function getCreateShippingRateVariables( minimumOrderPrice: params.type === ShippingMethodTypeEnum.PRICE - ? getValue(data.maxValue, data.noLimits) + ? getValue(data.minValue, data.noLimits) : null, minimumOrderWeight: params.type === ShippingMethodTypeEnum.WEIGHT diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 02e94014a..63a1c7fbc 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -117229,7 +117229,7 @@ exports[`Storyshots Views / Products / Create product variant add first variant class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id" data-shrink="false" > - Selling price override + Price
-

- Optional -

@@ -117280,7 +117275,7 @@ exports[`Storyshots Views / Products / Create product variant add first variant class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id" data-shrink="false" > - Cost price override + Cost price
- Selling price override + Price
-

- Optional -

@@ -117952,7 +117942,7 @@ exports[`Storyshots Views / Products / Create product variant default 1`] = ` class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id" data-shrink="false" > - Cost price override + Cost price
- Selling price override + Price
-

- Optional -

@@ -118547,7 +118532,7 @@ exports[`Storyshots Views / Products / Create product variant when loading data class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id MuiFormLabel-disabled-id MuiInputLabel-disabled-id" data-shrink="false" > - Cost price override + Cost price
- Selling price override + Price
-

- Optional -

@@ -119237,7 +119217,7 @@ exports[`Storyshots Views / Products / Create product variant with errors 1`] = class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id" data-shrink="false" > - Cost price override + Cost price
- Selling price override + Price
-

- Optional -

@@ -139340,7 +139315,7 @@ exports[`Storyshots Views / Products / Product variant details attribute errors class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id MuiInputLabel-outlined-id MuiFormLabel-filled-id" data-shrink="true" > - Cost price override + Cost price
- Selling price override + Price
-

- Optional -

@@ -140310,7 +140280,7 @@ exports[`Storyshots Views / Products / Product variant details when loaded data class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id MuiInputLabel-outlined-id MuiFormLabel-filled-id" data-shrink="true" > - Cost price override + Cost price
- Selling price override + Price
-

- Optional -

@@ -141053,7 +141018,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-outlined-id MuiFormLabel-disabled-id MuiInputLabel-disabled-id" data-shrink="false" > - Cost price override + Cost price