diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 00f2ffca2..e49441d84 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -1502,6 +1502,10 @@ "9OtpHt": { "string": "Order line deleted" }, + "9QtKvB": { + "context": "Product type is shippable", + "string": "Shippable" + }, "9RCuN3": { "string": "Payment successfully captured" }, @@ -1618,10 +1622,6 @@ "context": "channels availability text", "string": "In {selectedChannelsCount} out of {allChannelsCount, plural, one {# channel} other {# channels}}" }, - "ADTNND": { - "context": "product type", - "string": "Physical" - }, "AHK0K9": { "context": "dialog content", "string": "{counter,plural,one{Are you sure you want to unassign this product?} other{Are you sure you want to unassign {displayQuantity} products?}}" @@ -1828,9 +1828,6 @@ "context": "variant availability in channel", "string": "Available" }, - "Be+J13": { - "string": "Configurable" - }, "BfJGij": { "context": "header", "string": "Address Information" @@ -2789,6 +2786,10 @@ "context": "switch button", "string": "Is this product shippable?" }, + "ICeshC": { + "context": "product type", + "string": "Shippable" + }, "IEpmGQ": { "context": "description", "string": "Use Saleor Cloud to access Saleor Apps" @@ -5410,10 +5411,6 @@ "context": "order history message", "string": "Fulfillment confirmation was sent to customer" }, - "asdvmK": { - "context": "product type", - "string": "Digital" - }, "auxEP1": { "context": "input placeholder", "string": "Search by attribute name" @@ -6514,10 +6511,6 @@ "context": "product field", "string": "Collections" }, - "jyTwDR": { - "context": "product type is either simple or configurable", - "string": "Type" - }, "jyaAlB": { "context": "button", "string": "Create collection" @@ -8119,6 +8112,10 @@ "vcwrgW": { "string": "No translatable entities found" }, + "vdk01u": { + "context": "product type", + "string": "Not shippable" + }, "ve/Sph": { "context": "there are more elements of list that are hidden", "string": "and {number} more" @@ -8456,10 +8453,6 @@ "context": "dialog header", "string": "Dectivate App" }, - "yNb+dT": { - "context": "product type", - "string": "Simple product" - }, "yOaNWB": { "context": "delete shipping method", "string": "Are you sure you want to delete {name}?" diff --git a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx index 7a994770b..745c1f31c 100644 --- a/src/productTypes/components/ProductTypeList/ProductTypeList.tsx +++ b/src/productTypes/components/ProductTypeList/ProductTypeList.tsx @@ -11,15 +11,10 @@ import { productTypeUrl, } from "@dashboard/productTypes/urls"; import { getArrowDirection } from "@dashboard/utils/sort"; -import { - TableBody, - TableCell, - TableFooter, - Typography, -} from "@material-ui/core"; +import { TableBody, TableCell, TableFooter } from "@material-ui/core"; import { makeStyles } from "@saleor/macaw-ui"; import React from "react"; -import { FormattedMessage, useIntl } from "react-intl"; +import { FormattedMessage } from "react-intl"; import { maybe, renderCollection } from "../../../misc"; import { ListActions, ListProps, SortPage } from "../../../types"; @@ -70,8 +65,6 @@ const ProductTypeList: React.FC = props => { } = props; const classes = useStyles(props); - const intl = useIntl(); - return ( = props => { className={classes.colType} > @@ -150,22 +143,7 @@ const ProductTypeList: React.FC = props => { {productType ? ( - <> - {productType.name} - - {maybe(() => productType.hasVariants) - ? intl.formatMessage({ - id: "X90t9n", - defaultMessage: "Configurable", - description: "product type", - }) - : intl.formatMessage({ - id: "yNb+dT", - defaultMessage: "Simple product", - description: "product type", - })} - - + {productType.name} ) : ( )} @@ -175,16 +153,16 @@ const ProductTypeList: React.FC = props => { productType.isShippingRequired ? ( <> ) : ( <> diff --git a/src/productTypes/components/ProductTypeList/index.ts b/src/productTypes/components/ProductTypeList/index.ts deleted file mode 100644 index 9c1624523..000000000 --- a/src/productTypes/components/ProductTypeList/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default } from "./ProductTypeList"; -export * from "./ProductTypeList"; diff --git a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx index a827fcaca..16e9dbe83 100644 --- a/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx +++ b/src/productTypes/components/ProductTypeListPage/ProductTypeListPage.tsx @@ -4,6 +4,7 @@ import FilterBar from "@dashboard/components/FilterBar"; import { configurationMenuUrl } from "@dashboard/configuration"; import { ProductTypeFragment } from "@dashboard/graphql"; import { sectionNames } from "@dashboard/intl"; +import ProductTypeList from "@dashboard/productTypes/components/ProductTypeList/ProductTypeList"; import { productTypeAddUrl, ProductTypeListUrlSortField, @@ -19,7 +20,6 @@ import { SortPage, TabPageProps, } from "../../../types"; -import ProductTypeList from "../ProductTypeList"; import { createFilterStructure, ProductTypeFilterKeys, diff --git a/src/products/components/ProductCreatePage/ProductCreatePage.tsx b/src/products/components/ProductCreatePage/ProductCreatePage.tsx index fd57bf2f0..88f1a9739 100644 --- a/src/products/components/ProductCreatePage/ProductCreatePage.tsx +++ b/src/products/components/ProductCreatePage/ProductCreatePage.tsx @@ -31,6 +31,7 @@ import { } from "@dashboard/graphql"; import useNavigator from "@dashboard/hooks/useNavigator"; import useStateFromProps from "@dashboard/hooks/useStateFromProps"; +import { ProductOrganization } from "@dashboard/products/components/ProductOrganization/ProductOrganization"; import { ProductVariantPrice } from "@dashboard/products/components/ProductVariantPrice"; import { ProductCreateUrlQueryParams, @@ -42,7 +43,6 @@ import { useIntl } from "react-intl"; import { FetchMoreProps, RelayToFlat } from "../../../types"; import { ProductDetailsForm } from "../ProductDetailsForm"; -import { ProductOrganization } from "../ProductOrganization"; import { ProductShipping } from "../ProductShipping"; import { ProductStocks } from "../ProductStocks"; import ProductTaxes from "../ProductTaxes"; diff --git a/src/products/components/ProductOrganization/ProductOrganization.tsx b/src/products/components/ProductOrganization/ProductOrganization.tsx index 850b9ca39..0a76c97b2 100644 --- a/src/products/components/ProductOrganization/ProductOrganization.tsx +++ b/src/products/components/ProductOrganization/ProductOrganization.tsx @@ -12,7 +12,6 @@ import { ProductErrorFragment, } from "@dashboard/graphql"; import { ChangeEvent } from "@dashboard/hooks/useForm"; -import { commonMessages } from "@dashboard/intl"; import { productTypeUrl } from "@dashboard/productTypes/urls"; import { FetchMoreProps } from "@dashboard/types"; import { getFormErrors, getProductErrorMessage } from "@dashboard/utils/errors"; @@ -133,17 +132,6 @@ export const ProductOrganization: React.FC< - - - - - - - {productType?.hasVariants - ? intl.formatMessage(commonMessages.yes) - : intl.formatMessage(commonMessages.no)} - - )}