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

added a new section for displaying the customer address #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
25 changes: 11 additions & 14 deletions client/app/components/Manager/OrderList/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
/**
*
* OrderList
*
*/

import React from 'react';

import { Link } from 'react-router-dom';

import { formatDate } from '../../../utils/date';

const OrderList = props => {
Expand Down Expand Up @@ -56,16 +48,21 @@ const OrderList = props => {
</div>
<div className='mb-1'>
<span>Ordered on</span>
<span className='order-label'>{` ${formatDate(
order.created
)}`}</span>
<span className='order-label'>{` ${formatDate(order.created)}`}</span>
</div>
<div className='mb-1'>
<span>Order Total</span>
<span className='order-label'>{` $${
order?.totalWithTax ? order?.totalWithTax : 0
}`}</span>
<span className='order-label'>{` $${order?.totalWithTax ? order?.totalWithTax : 0}`}</span>
</div>
{/* Display customer address */}
{order.address && (
<div className='mb-1'>
<span>Customer Address:</span>
<div className='order-label'>
{`${order.address.street}, ${order.address.city}, ${order.address.state} ${order.address.zip}`}
</div>
</div>
)}
</div>
</div>
</div>
Expand Down