Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Hotfix

dominik-zeglen0f5a77522cfb
diff --git a/saleor/static/dashboard-next/collections/views/CollectionDetails.tsx b/saleor/static/dashboard-next/collections/views/CollectionDetails.tsx
index 4b554f2282..18dc86c21a 100644
--- a/saleor/static/dashboard-next/collections/views/CollectionDetails.tsx
+++ b/saleor/static/dashboard-next/collections/views/CollectionDetails.tsx
@@ -22,9 +22,11 @@ import { CollectionUpdate } from "../types/CollectionUpdate";
import { RemoveCollection } from "../types/RemoveCollection";
import { UnassignCollectionProduct } from "../types/UnassignCollectionProduct";
import {
+ collectionAddProductPath,
collectionAddProductUrl,
collectionImageRemoveUrl,
collectionListUrl,
+ collectionRemovePath,
collectionRemoveUrl,
collectionUrl
} from "../urls";
@@ -239,7 +241,7 @@ export const CollectionDetails: React.StatelessComponent<
)}
</Paginator>
<Route
- path={collectionAddProductUrl(":id")}
+ path={collectionAddProductPath(":id")}
render={({ match }) => (
<CollectionAssignProductDialog
open={!!match}
@@ -264,7 +266,7 @@ export const CollectionDetails: React.StatelessComponent<
)}
/>
<Route
- path={collectionRemoveUrl(":id")}
+ path={collectionRemovePath(":id")}
render={({ match }) => (
<ActionDialog
onClose={() =>
@@ -284,8 +286,9 @@ export const CollectionDetails: React.StatelessComponent<
__html: i18n.t(
"Are you sure you want to remove <strong>{{ collectionName }}</strong>?",
{
- collectionName:
- data.collection.name,
+ collectionName: maybe(
+ () => data.collection.name
+ ),
context: "modal"
}
)
diff --git a/saleor/static/dashboard-next/orders/views/OrderDetails/index.tsx b/saleor/static/dashboard-next/orders/views/OrderDetails/index.tsx
index 0ab9588096..a958963dbf 100644
--- a/saleor/static/dashboard-next/orders/views/OrderDetails/index.tsx
+++ b/saleor/static/dashboard-next/orders/views/OrderDetails/index.tsx
@@ -500,6 +500,21 @@ export const OrderDetails: React.StatelessComponent<OrderDetailsProps> = ({
}
saveButtonBarState="default"
/>
+ <Route
+ path={orderCancelPath(":id")}
+ render={({ match }) => (
+ <OrderDraftCancelDialog
+ onClose={onModalClose}
+ onConfirm={() =>
+ orderDraftCancel.mutate({ id })
+ }
+ open={!!match}
+ orderNumber={maybe(
+ () => order.number
+ )}
+ />
+ )}
+ />
</>
)}
<Route
@@ -576,19 +591,6 @@ export const OrderDetails: React.StatelessComponent<OrderDetailsProps> = ({
/>
)}
/>
- <Route
- path={orderCancelPath(":id")}
- render={({ match }) => (
- <OrderDraftCancelDialog
- onClose={onModalClose}
- onConfirm={() =>
- orderDraftCancel.mutate({ id })
- }
- open={!!match}
- orderNumber={maybe(() => order.number)}
- />
- )}
- />
<Route
path={orderDraftShippingMethodPath(":id")}
render={({ match }) => (