Update configure warehouse link
This commit is contained in:
parent
bf18651f7d
commit
dc43578d5a
6 changed files with 36 additions and 28 deletions
|
@ -316,7 +316,7 @@
|
||||||
},
|
},
|
||||||
"productVariantWarehouseSectionDescription": {
|
"productVariantWarehouseSectionDescription": {
|
||||||
"context": "no warehouses info",
|
"context": "no warehouses info",
|
||||||
"string": "There are no warehouses set up for your store. To add stock quantity to the variant please"
|
"string": "There are no warehouses set up for your store. To add stock quantity to the variant please {configureWarehouseUrl}"
|
||||||
},
|
},
|
||||||
"productVariantWarehouseSectionDescriptionLink": {
|
"productVariantWarehouseSectionDescriptionLink": {
|
||||||
"context": "no warehouses info",
|
"context": "no warehouses info",
|
||||||
|
@ -324,7 +324,7 @@
|
||||||
},
|
},
|
||||||
"productWarehouseSectionDescription": {
|
"productWarehouseSectionDescription": {
|
||||||
"context": "no warehouses info",
|
"context": "no warehouses info",
|
||||||
"string": "There are no warehouses set up for your store. To add stock quantity to the product please"
|
"string": "There are no warehouses set up for your store. To add stock quantity to the product please {configureWarehouseUrl}"
|
||||||
},
|
},
|
||||||
"productWarehouseSectionDescriptionLink": {
|
"productWarehouseSectionDescriptionLink": {
|
||||||
"context": "no warehouses info",
|
"context": "no warehouses info",
|
||||||
|
|
|
@ -191,32 +191,40 @@ const ProductStocks: React.FC<ProductStocksProps> = ({
|
||||||
{hasVariants ? (
|
{hasVariants ? (
|
||||||
<>
|
<>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="There are no warehouses set up for your store. To add stock quantity to the variant please"
|
defaultMessage="There are no warehouses set up for your store. To add stock quantity to the variant please {configureWarehouseUrl}"
|
||||||
description="no warehouses info"
|
description="no warehouses info"
|
||||||
id="productVariantWarehouseSectionDescription"
|
id="productVariantWarehouseSectionDescription"
|
||||||
/>{" "}
|
values={{
|
||||||
<Link onClick={onWarehouseConfigure}>
|
configureWarehouseUrl: (
|
||||||
<FormattedMessage
|
<Link onClick={onWarehouseConfigure}>
|
||||||
defaultMessage="configure a warehouse"
|
<FormattedMessage
|
||||||
description="no warehouses info"
|
defaultMessage="configure a warehouse"
|
||||||
id="productVariantWarehouseSectionDescriptionLink"
|
description="no warehouses info"
|
||||||
/>
|
id="productVariantWarehouseSectionDescriptionLink"
|
||||||
</Link>
|
/>
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="There are no warehouses set up for your store. To add stock quantity to the product please"
|
defaultMessage="There are no warehouses set up for your store. To add stock quantity to the product please {configureWarehouseUrl}"
|
||||||
description="no warehouses info"
|
description="no warehouses info"
|
||||||
id="productWarehouseSectionDescription"
|
id="productWarehouseSectionDescription"
|
||||||
/>{" "}
|
values={{
|
||||||
<Link onClick={onWarehouseConfigure}>
|
configureWarehouseUrl: (
|
||||||
<FormattedMessage
|
<Link onClick={onWarehouseConfigure}>
|
||||||
defaultMessage="configure a warehouse"
|
<FormattedMessage
|
||||||
description="no warehouses info"
|
defaultMessage="configure a warehouse"
|
||||||
id="productWarehouseSectionDescriptionLink"
|
description="no warehouses info"
|
||||||
/>
|
id="productWarehouseSectionDescriptionLink"
|
||||||
</Link>
|
/>
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
|
@ -14,7 +14,7 @@ import {
|
||||||
usePrivateMetadataUpdate
|
usePrivateMetadataUpdate
|
||||||
} from "@saleor/utils/metadata/updateMetadata";
|
} from "@saleor/utils/metadata/updateMetadata";
|
||||||
import { useWarehouseList } from "@saleor/warehouses/queries";
|
import { useWarehouseList } from "@saleor/warehouses/queries";
|
||||||
import { warehouseListPath } from "@saleor/warehouses/urls";
|
import { warehouseAddPath } from "@saleor/warehouses/urls";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ export const ProductCreateView: React.FC = () => {
|
||||||
)}
|
)}
|
||||||
onBack={handleBack}
|
onBack={handleBack}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
onWarehouseConfigure={() => navigate(warehouseListPath)}
|
onWarehouseConfigure={() => navigate(warehouseAddPath)}
|
||||||
saveButtonBarState={productCreateOpts.status}
|
saveButtonBarState={productCreateOpts.status}
|
||||||
fetchMoreCategories={{
|
fetchMoreCategories={{
|
||||||
hasMore: searchCategoryOpts.data?.search.pageInfo.hasNextPage,
|
hasMore: searchCategoryOpts.data?.search.pageInfo.hasNextPage,
|
||||||
|
|
|
@ -33,7 +33,7 @@ import {
|
||||||
usePrivateMetadataUpdate
|
usePrivateMetadataUpdate
|
||||||
} from "@saleor/utils/metadata/updateMetadata";
|
} from "@saleor/utils/metadata/updateMetadata";
|
||||||
import { useWarehouseList } from "@saleor/warehouses/queries";
|
import { useWarehouseList } from "@saleor/warehouses/queries";
|
||||||
import { warehouseListPath } from "@saleor/warehouses/urls";
|
import { warehouseAddPath } from "@saleor/warehouses/urls";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ export const ProductUpdate: React.FC<ProductUpdateProps> = ({ id, params }) => {
|
||||||
onDelete={() => openModal("remove")}
|
onDelete={() => openModal("remove")}
|
||||||
onImageReorder={handleImageReorder}
|
onImageReorder={handleImageReorder}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
onWarehouseConfigure={() => navigate(warehouseListPath)}
|
onWarehouseConfigure={() => navigate(warehouseAddPath)}
|
||||||
onVariantAdd={handleVariantAdd}
|
onVariantAdd={handleVariantAdd}
|
||||||
onVariantsAdd={() => navigate(productVariantCreatorUrl(id))}
|
onVariantsAdd={() => navigate(productVariantCreatorUrl(id))}
|
||||||
onVariantShow={variantId => () =>
|
onVariantShow={variantId => () =>
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
usePrivateMetadataUpdate
|
usePrivateMetadataUpdate
|
||||||
} from "@saleor/utils/metadata/updateMetadata";
|
} from "@saleor/utils/metadata/updateMetadata";
|
||||||
import { useWarehouseList } from "@saleor/warehouses/queries";
|
import { useWarehouseList } from "@saleor/warehouses/queries";
|
||||||
import { warehouseListPath } from "@saleor/warehouses/urls";
|
import { warehouseAddPath } from "@saleor/warehouses/urls";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ export const ProductVariant: React.FC<ProductUpdateProps> = ({
|
||||||
onDelete={() => openModal("remove")}
|
onDelete={() => openModal("remove")}
|
||||||
onImageSelect={handleImageSelect}
|
onImageSelect={handleImageSelect}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
onWarehouseConfigure={() => navigate(warehouseListPath)}
|
onWarehouseConfigure={() => navigate(warehouseAddPath)}
|
||||||
onVariantClick={variantId => {
|
onVariantClick={variantId => {
|
||||||
navigate(productVariantEditUrl(productId, variantId));
|
navigate(productVariantEditUrl(productId, variantId));
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
usePrivateMetadataUpdate
|
usePrivateMetadataUpdate
|
||||||
} from "@saleor/utils/metadata/updateMetadata";
|
} from "@saleor/utils/metadata/updateMetadata";
|
||||||
import { useWarehouseList } from "@saleor/warehouses/queries";
|
import { useWarehouseList } from "@saleor/warehouses/queries";
|
||||||
import { warehouseListPath } from "@saleor/warehouses/urls";
|
import { warehouseAddPath } from "@saleor/warehouses/urls";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ export const ProductVariant: React.FC<ProductVariantCreateProps> = ({
|
||||||
onBack={handleBack}
|
onBack={handleBack}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
onVariantClick={handleVariantClick}
|
onVariantClick={handleVariantClick}
|
||||||
onWarehouseConfigure={() => navigate(warehouseListPath)}
|
onWarehouseConfigure={() => navigate(warehouseAddPath)}
|
||||||
onVariantReorder={handleVariantReorder}
|
onVariantReorder={handleVariantReorder}
|
||||||
saveButtonBarState={variantCreateResult.status}
|
saveButtonBarState={variantCreateResult.status}
|
||||||
warehouses={
|
warehouses={
|
||||||
|
|
Loading…
Reference in a new issue