Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View all orders of anonymous customer #3879

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/orders/components/OrderCustomer/OrderCustomer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { Card, CardContent, Typography } from "@material-ui/core";
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";

import { orderListUrl } from "@dashboard/orders/urls";
import { customerUrl } from "../../../customers/urls";
import { maybe } from "../../../misc";
import { AddressTextError } from "./AddrssTextError";
Expand Down Expand Up @@ -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>
</>
)
) : (
<>
Expand Down