Remove configurable label (#3646)

* Remove default export

* Rename misleading labels

* Remove default export

* Remove redundant message

* Extract messages

---------

Co-authored-by: andrzejewsky <vox3r69@gmail.com>
This commit is contained in:
Timur Carpeev 2023-06-06 14:27:56 +02:00 committed by GitHub
parent f5f216eca3
commit f2f11a6450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 69 deletions

View file

@ -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}?"

View file

@ -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<ProductTypeListProps> = props => {
} = props;
const classes = useStyles(props);
const intl = useIntl();
return (
<ResponsiveTable>
<TableHead
@ -108,9 +101,9 @@ const ProductTypeList: React.FC<ProductTypeListProps> = props => {
className={classes.colType}
>
<FormattedMessage
id="jyTwDR"
defaultMessage="Type"
description="product type is either simple or configurable"
id="9QtKvB"
defaultMessage="Shippable"
description="Product type is shippable"
/>
</TableCellHeader>
<TableCell className={classes.colTax}>
@ -150,22 +143,7 @@ const ProductTypeList: React.FC<ProductTypeListProps> = props => {
</TableCell>
<TableCell className={classes.colName}>
{productType ? (
<>
<span data-test-id="name">{productType.name}</span>
<Typography variant="caption">
{maybe(() => productType.hasVariants)
? intl.formatMessage({
id: "X90t9n",
defaultMessage: "Configurable",
description: "product type",
})
: intl.formatMessage({
id: "yNb+dT",
defaultMessage: "Simple product",
description: "product type",
})}
</Typography>
</>
) : (
<Skeleton />
)}
@ -175,16 +153,16 @@ const ProductTypeList: React.FC<ProductTypeListProps> = props => {
productType.isShippingRequired ? (
<>
<FormattedMessage
id="ADTNND"
defaultMessage="Physical"
id="ICeshC"
defaultMessage="Shippable"
description="product type"
/>
</>
) : (
<>
<FormattedMessage
id="asdvmK"
defaultMessage="Digital"
id="vdk01u"
defaultMessage="Not shippable"
description="product type"
/>
</>

View file

@ -1,2 +0,0 @@
export { default } from "./ProductTypeList";
export * from "./ProductTypeList";

View file

@ -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,

View file

@ -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";

View file

@ -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<
</Link>
</Text>
</Box>
<Box display="flex" flexDirection="column">
<Text variant="bodyEmp">
<FormattedMessage id="Be+J13" defaultMessage="Configurable" />
</Text>
<Text variant="caption">
{productType?.hasVariants
? intl.formatMessage(commonMessages.yes)
: intl.formatMessage(commonMessages.no)}
</Text>
</Box>
</Box>
)}
<SingleAutocompleteSelectField

View file

@ -1 +0,0 @@
export * from "./ProductOrganization";

View file

@ -42,6 +42,7 @@ import useNavigator from "@dashboard/hooks/useNavigator";
import useStateFromProps from "@dashboard/hooks/useStateFromProps";
import { maybe } from "@dashboard/misc";
import ProductExternalMediaDialog from "@dashboard/products/components/ProductExternalMediaDialog";
import { ProductOrganization } from "@dashboard/products/components/ProductOrganization/ProductOrganization";
import { defaultGraphiQLQuery } from "@dashboard/products/queries";
import { productImageUrl, productListUrl } from "@dashboard/products/urls";
import { ProductVariantListError } from "@dashboard/products/views/ProductUpdate/handlers/errors";
@ -53,7 +54,6 @@ import { useIntl } from "react-intl";
import { getChoices } from "../../utils/data";
import { ProductDetailsForm } from "../ProductDetailsForm";
import ProductMedia from "../ProductMedia";
import { ProductOrganization } from "../ProductOrganization";
import ProductTaxes from "../ProductTaxes";
import ProductVariants from "../ProductVariants";
import ProductUpdateForm from "./form";