From 6b2a34872ba0acff3b6c40e9ef01b05bf001200e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dro=C5=84?= Date: Tue, 22 Mar 2022 14:40:18 +0100 Subject: [PATCH] Change cost price placeholder (#1923) * Change cost price label to cost * Extract messages * Update snapshots * Revert header row label back to cost price --- locale/defaultMessages.json | 8 +++-- .../ProductVariantPrice.tsx | 4 +-- .../__snapshots__/Stories.test.ts.snap | 30 +++++++++---------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index c932eac58..b3da460fa 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -6869,9 +6869,9 @@ "context": "tabel column header", "string": "Selling Price" }, - "src_dot_products_dot_components_dot_ProductVariantPrice_dot_2051669917": { + "src_dot_products_dot_components_dot_ProductVariantPrice_dot_2644882304": { "context": "tabel column header", - "string": "Cost Price" + "string": "Cost" }, "src_dot_products_dot_components_dot_ProductVariantPrice_dot_3211447524": { "context": "info text", @@ -6884,6 +6884,10 @@ "src_dot_products_dot_components_dot_ProductVariantPrice_dot_4097816011": { "string": "No channels found" }, + "src_dot_products_dot_components_dot_ProductVariantPrice_dot_819659341": { + "context": "tabel column header", + "string": "Cost price" + }, "src_dot_products_dot_components_dot_ProductVariantSetDefault_dot_3683859003": { "context": "set variant as default, button", "string": "Set as default" diff --git a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx index b9c559693..135e61ea0 100644 --- a/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx +++ b/src/products/components/ProductVariantPrice/ProductVariantPrice.tsx @@ -149,7 +149,7 @@ const ProductVariantPrice: React.FC = props => { @@ -206,7 +206,7 @@ const ProductVariantPrice: React.FC = props => { className={classes.input} error={!!costPriceError} label={intl.formatMessage({ - defaultMessage: "Cost Price", + defaultMessage: "Cost", description: "tabel column header" })} name={`${listing.id}-channel-costPrice`} diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 2178e2495..84941aa1c 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -220425,7 +220425,7 @@ exports[`Storyshots Views / Products / Product variant details attribute errors class="MuiTableCell-root-id MuiTableCell-head-id ProductVariantPrice-colType-id" scope="col" > - Cost Price + Cost price @@ -220504,7 +220504,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 + Cost
- Cost Price + Cost @@ -220614,7 +220614,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 + Cost
- Cost Price + Cost @@ -222303,7 +222303,7 @@ exports[`Storyshots Views / Products / Product variant details no warehouses 1`] class="MuiTableCell-root-id MuiTableCell-head-id ProductVariantPrice-colType-id" scope="col" > - Cost Price + Cost price @@ -222382,7 +222382,7 @@ exports[`Storyshots Views / Products / Product variant details no warehouses 1`] 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 + Cost
- Cost Price + Cost @@ -222492,7 +222492,7 @@ exports[`Storyshots Views / Products / Product variant details no warehouses 1`] 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 + Cost
- Cost Price + Cost @@ -224176,7 +224176,7 @@ exports[`Storyshots Views / Products / Product variant details when loaded data class="MuiTableCell-root-id MuiTableCell-head-id ProductVariantPrice-colType-id" scope="col" > - Cost Price + Cost price @@ -224255,7 +224255,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 + Cost
- Cost Price + Cost @@ -224365,7 +224365,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 + Cost
- Cost Price + Cost