View all orders of anonymous customer (#3879)
* feat: view all orders of anonymous customer * fix: formatting error fix: translation-messages
This commit is contained in:
parent
4652f56531
commit
5b4d07d547
2 changed files with 22 additions and 1 deletions
|
@ -2941,6 +2941,10 @@
|
|||
"J4E+jp": {
|
||||
"string": "Variant name"
|
||||
},
|
||||
"J4NBVR": {
|
||||
"context": "link",
|
||||
"string": "View Orders"
|
||||
},
|
||||
"J7mFhU": {
|
||||
"context": "currency code select",
|
||||
"string": "{code} - {countries}"
|
||||
|
|
|
@ -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<OrderCustomerProps> = props => {
|
|||
<FormattedMessage id="Qovenh" defaultMessage="Anonymous user" />
|
||||
</Typography>
|
||||
) : (
|
||||
<Typography className={classes.userEmail}>{userEmail}</Typography>
|
||||
<>
|
||||
<Typography className={classes.userEmail}>{userEmail}</Typography>
|
||||
<div>
|
||||
<Link
|
||||
underline={false}
|
||||
href={orderListUrl({
|
||||
customer: userEmail,
|
||||
})}
|
||||
>
|
||||
<FormattedMessage
|
||||
id="J4NBVR"
|
||||
defaultMessage="View Orders"
|
||||
description="link"
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
) : (
|
||||
<>
|
||||
|
|
Loading…
Reference in a new issue