Commit 73e9863c authored by Kevin Kaminski's avatar Kevin Kaminski

Merge branch 'fix-frontend-issues' into 'dev'

[AFP-NA] fix order date display and order created date display

See merge request !12
parents 68388055 95fcb0be
......@@ -21,7 +21,7 @@ const OrderDetails = (props: any) => {
const status = props.status
return (
<>
<Td><Link to={"/orders/" + orderNumber}>{orderNumber}</Link></Td>
<Td><Link to={"/orders/" + orderNumber}>{orderNumber.slice(orderNumber.length - 7).toUpperCase()}</Link></Td>
<Td>{date}</Td>
<Td>{status}</Td>
</>
......
......@@ -20,7 +20,7 @@ const OrderIndexPage = () => {
const orderDetailsArrCreator = (orders: Order[]) => {
return orders.map((order: Order, idx: any) => {
return <Tr key={idx}><OrderDetails
date={order.orderCreatedAt}
date={new Date(order.orderCreatedAt).toLocaleDateString()}
orderNumber={order.id}
status={order.orderStatus}
/></Tr>
......@@ -72,7 +72,7 @@ const OrderIndexPage = () => {
<Thead>
<Tr>
<Th>Order number</Th>
<Th>Created</Th>
<Th>Order Date</Th>
<Th>Order Status</Th>
</Tr>
</Thead>
......
......@@ -35,8 +35,8 @@ const OrderShowPage = (props: any) => {
<>
<div className="show-div">
<Flex justify="space-around">
<Box><strong>Order Date:</strong> {order.orderCreatedAt}</Box>
<Box><strong>Order Number:</strong> {order.id}</Box>
<Box><strong>Order Date:</strong> {new Date(order.orderCreatedAt).toLocaleDateString()}</Box>
<Box><strong>Order Number:</strong> {order.id.slice(order.id.length - 7).toUpperCase()}</Box>
<Box><strong>Order Status:</strong> {order.orderStatus}</Box>
</Flex>
<br/>
......
......@@ -29,5 +29,3 @@ const MainRouter: React.FC = () => {
}
export default MainRouter
\ No newline at end of file
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment