Commit 3787a534 authored by Shanelle Valencia's avatar Shanelle Valencia

Merge branch 'restyle-showpage' into 'dev'

💄 Match show page to order index page [@svalencia]

See merge request !26
parents 686bf130 82ba095c
...@@ -37,13 +37,13 @@ const OrderShowDetails = (props: any) => { ...@@ -37,13 +37,13 @@ const OrderShowDetails = (props: any) => {
return ( return (
items ? items ?
<Table variant="striped" colorScheme="messenger" size="lg"> <Table variant="striped" colorScheme="gray" size="md">
<Thead > <Thead >
<Tr className="table-header" > <Tr className="table-header" >
<Th fontSize="21px" color="rgba(255, 166, 0, 0.897)">ID</Th> <Th fontSize="16px" >Item ID</Th>
<Th fontSize="21px" color="rgba(255, 166, 0, 0.897)">Price</Th> <Th fontSize="16px" >Price</Th>
<Th fontSize="21px" color="rgba(255, 166, 0, 0.897)">Quantity</Th> <Th fontSize="16px" >Quantity</Th>
<Th fontSize="21px" color="rgba(255, 166, 0, 0.897)">SKU</Th> <Th fontSize="16px" >SKU</Th>
</Tr> </Tr>
</Thead> </Thead>
<Tbody> <Tbody>
......
...@@ -90,27 +90,31 @@ input[type=text]:focus { ...@@ -90,27 +90,31 @@ input[type=text]:focus {
.index-table { .index-table {
border: 1px solid rgb(110, 106, 106); border: 1px solid rgb(110, 106, 106);
padding: 0 10px 15px 10px; /* padding: 0 10px 15px 10px; */
border-radius: 2px; border-radius: 2px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
padding-top: 10px; padding-top: 10px;
} }
.show-div { /* .show-div {
padding: 80px 100px; padding: 80px 100px;
} */
.show-div-header {
padding-top: 20px;
} }
.show-table { .show-table {
border: 1px solid rgb(110, 106, 106); /* border: 1px solid rgb(110, 106, 106); */
padding: 0 10px 15px 10px; /* padding: 0 10px 15px 10px; */
border-radius: 2px; border-radius: 2px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
} }
.table-header { .table-header {
background-color: #00557ddc; background-color: ;
} }
......
...@@ -6,9 +6,10 @@ import { useOrder } from 'hooks' ...@@ -6,9 +6,10 @@ import { useOrder } from 'hooks'
import { OrderService } from 'services' import { OrderService } from 'services'
import { import {
Flex, Flex,
Box Box,
Tag
} from "@chakra-ui/react" } from "@chakra-ui/react"
import { tagColorMap } from '../pages/OrdersPage/index'
const OrderShowPage = (props: any) => { const OrderShowPage = (props: any) => {
...@@ -30,14 +31,16 @@ const OrderShowPage = (props: any) => { ...@@ -30,14 +31,16 @@ const OrderShowPage = (props: any) => {
if (!order) { if (!order) {
return(<></>); return(<></>);
} }
const statusText = order.orderStatus
return ( return (
<> <>
<div className="show-div"> <div className="show-div">
<Flex justify="space-around"> <Flex justify="space-around" className="show-div-header">
<Box><strong>Order Date:</strong> {new Date(order.orderCreatedAt).toLocaleDateString()}</Box> <Box><strong>Order Date:</strong> {new Date(order.orderCreatedAt).toLocaleDateString()}</Box>
<Box><strong>Order Number:</strong> {order.id}</Box> <Box><strong>Order Number:</strong> {order.id}</Box>
<Box><strong>Order Status:</strong> {order.orderStatus}</Box> <Box><strong>Status:</strong><Tag colorScheme={tagColorMap.get(statusText.toUpperCase())}>{statusText}</Tag></Box>
</Flex> </Flex>
<br/> <br/>
<div className="show-table"> <div className="show-table">
......
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