From 5b4d07d5473d5a928a5e6bb2f71f8635fb1eabbf Mon Sep 17 00:00:00 2001 From: Matthias Berchtold Date: Tue, 11 Jul 2023 10:48:49 +0200 Subject: [PATCH] View all orders of anonymous customer (#3879) * feat: view all orders of anonymous customer * fix: formatting error fix: translation-messages --- locale/defaultMessages.json | 4 ++++ .../OrderCustomer/OrderCustomer.tsx | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/locale/defaultMessages.json b/locale/defaultMessages.json index 8a75fd96f..7bc126071 100644 --- a/locale/defaultMessages.json +++ b/locale/defaultMessages.json @@ -2941,6 +2941,10 @@ "J4E+jp": { "string": "Variant name" }, + "J4NBVR": { + "context": "link", + "string": "View Orders" + }, "J7mFhU": { "context": "currency code select", "string": "{code} - {countries}" diff --git a/src/orders/components/OrderCustomer/OrderCustomer.tsx b/src/orders/components/OrderCustomer/OrderCustomer.tsx index 41ab1d586..612710395 100644 --- a/src/orders/components/OrderCustomer/OrderCustomer.tsx +++ b/src/orders/components/OrderCustomer/OrderCustomer.tsx @@ -18,6 +18,7 @@ import { } from "@dashboard/graphql"; import useStateFromProps from "@dashboard/hooks/useStateFromProps"; import { buttonMessages } from "@dashboard/intl"; +import { orderListUrl } from "@dashboard/orders/urls"; import { FetchMoreProps, RelayToFlat } from "@dashboard/types"; import createSingleAutocompleteSelectHandler from "@dashboard/utils/handlers/singleAutocompleteSelectChangeHandler"; import { Card, CardContent, Typography } from "@material-ui/core"; @@ -168,7 +169,23 @@ const OrderCustomer: React.FC = props => { ) : ( - {userEmail} + <> + {userEmail} +
+ + + +
+ ) ) : ( <>