From 039061df0119bfbfb829ff719c9bfdef1eed68bd Mon Sep 17 00:00:00 2001
From: Jules Laplace <jules@okfoc.us>
Date: Fri, 21 Apr 2017 21:11:16 -0400
Subject: emails

---
 client/components/OrderList.jsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'client/components/OrderList.jsx')

diff --git a/client/components/OrderList.jsx b/client/components/OrderList.jsx
index c84fd3d..1061f91 100644
--- a/client/components/OrderList.jsx
+++ b/client/components/OrderList.jsx
@@ -22,6 +22,7 @@ export default class OrderList extends React.Component {
         state_lookup(order.order_state),
         order.order_zip,
         order.order_country !== 'United States' ? '' : order.order_country,
+        order.order_email,
       ]
     })
     csvStringify(orders, (err, csv) => {
@@ -92,6 +93,9 @@ export default class OrderList extends React.Component {
       else {
         order_address = order.order_address1
       }
+      const order_email = ! order.order_email ? '' : (
+        <a className='email' href={'mailto:'+order.order_email}>{order.order_email}</a>
+      )
       
       const country = order.order_country !== 'United States' ? order.order_country : ""
       return (
@@ -102,7 +106,8 @@ export default class OrderList extends React.Component {
           <div>
             {order_name}<br />
             {order_address}<br />
-            {order.order_city}, {state_lookup(order.order_state)} {order.order_zip} {country}
+            {order.order_city}, {state_lookup(order.order_state)} {order.order_zip} {country}<br/>
+            {order_email}
           </div>
         </div>
       )
-- 
cgit v1.2.3-70-g09d2

