From 19446b6aa3a05eb20ba2becb053bd09aad0546cc Mon Sep 17 00:00:00 2001 From: mysteriogig <166094738+mysteriogig@users.noreply.github.com> Date: Fri, 18 Oct 2024 19:45:01 +0530 Subject: [PATCH] added a new section for displaying the customer address I've added a new section for displaying the customer address right after the "Order Total". --- .../app/components/Manager/OrderList/index.js | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/client/app/components/Manager/OrderList/index.js b/client/app/components/Manager/OrderList/index.js index 59a28a82..8b88fe95 100644 --- a/client/app/components/Manager/OrderList/index.js +++ b/client/app/components/Manager/OrderList/index.js @@ -1,13 +1,5 @@ -/** - * - * OrderList - * - */ - import React from 'react'; - import { Link } from 'react-router-dom'; - import { formatDate } from '../../../utils/date'; const OrderList = props => { @@ -56,16 +48,21 @@ const OrderList = props => {
Ordered on - {` ${formatDate( - order.created - )}`} + {` ${formatDate(order.created)}`}
Order Total - {` $${ - order?.totalWithTax ? order?.totalWithTax : 0 - }`} + {` $${order?.totalWithTax ? order?.totalWithTax : 0}`}
+ {/* Display customer address */} + {order.address && ( +
+ Customer Address: +
+ {`${order.address.street}, ${order.address.city}, ${order.address.state} ${order.address.zip}`} +
+
+ )}