-
Notifications
You must be signed in to change notification settings - Fork 674
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
{order.paymentStatusDisplay} / {order.statusDisplay} | ||
</p> | ||
</div> | ||
{"invoices" in order && order.invoices?.length && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{"invoices" in order && order.invoices?.length && ( | |
{order?.invoices?.length > 0 && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -17,13 +17,29 @@ const View: React.FC<RouteComponentProps<{ token?: string }>> = ({ | |||
const { data: user } = useUserDetails(); | |||
const guest = !user; | |||
|
|||
const handleDownloadInvoice = () => { | |||
if (order && "invoices" in order && order.invoices?.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (order && "invoices" in order && order.invoices?.length) { | |
if (order?.invoices?.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@@ -1,6 +1,6 @@ | |||
import * as H from "history"; | |||
|
|||
export interface IProps { | |||
orders: any[]; | |||
orders?: any[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's temporary fix for crash when no order exists for a user, together with changes in src/@next/pages/OrdersHistory/OrdersHistory.tsx
. We should create no order information view in the future if the appropriate design will exist.
d8479f8
to
e8d4cfb
Compare
655f479
to
b7319ac
Compare
I want to merge this change because it adds the possibility to download invoice from the popup menu in the order details view for logged in user.
PR intended to be tested with API branch:
saleor/saleor#5732
PR intended to be tested with SDK branch:
saleor/saleor-sdk#13
Screenshots
Pull Request Checklist