Make sure invoices card is visible only on orders other than unconfirmed (#944)
* Make sure invoices card is visible only on orders other than unconfirmed * Replace div with React.Fragment * Use short form of fragment and remove key
This commit is contained in:
parent
167b77e18a
commit
0578de63c6
1 changed files with 11 additions and 7 deletions
|
@ -254,13 +254,17 @@ const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => {
|
|||
selectedChannelName={order?.channel?.name}
|
||||
/>
|
||||
<CardSpacer />
|
||||
<OrderInvoiceList
|
||||
invoices={order?.invoices}
|
||||
onInvoiceClick={onInvoiceClick}
|
||||
onInvoiceGenerate={onInvoiceGenerate}
|
||||
onInvoiceSend={onInvoiceSend}
|
||||
/>
|
||||
<CardSpacer />
|
||||
{order?.status !== OrderStatus.UNCONFIRMED && (
|
||||
<>
|
||||
<OrderInvoiceList
|
||||
invoices={order?.invoices}
|
||||
onInvoiceClick={onInvoiceClick}
|
||||
onInvoiceGenerate={onInvoiceGenerate}
|
||||
onInvoiceSend={onInvoiceSend}
|
||||
/>
|
||||
<CardSpacer />
|
||||
</>
|
||||
)}
|
||||
<OrderCustomerNote note={maybe(() => order.customerNote)} />
|
||||
</div>
|
||||
</Grid>
|
||||
|
|
Loading…
Reference in a new issue