Commit 0f30aea9 authored by Darrick Yong's avatar Darrick Yong

add more styling on order details

parent 8765be73
...@@ -76,22 +76,56 @@ ...@@ -76,22 +76,56 @@
} }
.fulfill-btn { .fulfill-btn {
position: relative;
border: 1px solid green; border: 1px solid green;
color: green; color: green;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4),
0 1px 1px rgba(0, 0, 0, 0.5);
}
.fulfill-btn:hover {
color: white;
background: green;
box-shadow: none;
} }
.cancel-btn { .cancel-btn {
position: relative;
border: 1px solid red; border: 1px solid red;
color: red; color: red;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4),
0 1px 1px rgba(0, 0, 0, 0.5);
}
.cancel-btn:hover {
color: white;
background: red;
}
.fulfill-btn:active, .cancel-btn:active {
top: 2px;
} }
.order-details { .order-details {
display: flex;
flex-direction: column;
/* min-height: 0px; */
max-height: 0px; max-height: 0px;
overflow: hidden; overflow: hidden;
transition: max-height 1s ease-out; transition: max-height 1s ease-out;
} }
.order-details-container {
overflow: hidden;
padding: 0 50px 20px;
box-sizing: border-box;
}
.animate { .animate {
transition: max-height 1s ease-out; transition: max-height 1s ease-out;
max-height: 200px; max-height: 200px;
}
.item-detail ~ .item-detail {
margin-top: 10px;
} }
\ No newline at end of file
...@@ -35,6 +35,7 @@ export const createOrder = (order) => (dispatch) => ...@@ -35,6 +35,7 @@ export const createOrder = (order) => (dispatch) =>
export const editOrder = (order) => (dispatch) => { export const editOrder = (order) => (dispatch) => {
OrderAPIUtil.editOrder(order) OrderAPIUtil.editOrder(order)
.then(res => { .then(res => {
dispatch(updateOrder(res.data)) // debugger
dispatch(updateOrder(res))
}); });
} }
\ No newline at end of file
...@@ -3,9 +3,9 @@ const ItemDetails = ({ item }) => { ...@@ -3,9 +3,9 @@ const ItemDetails = ({ item }) => {
const { itemId, itemName, itemQuantity, itemPrice, itemSku } = item; const { itemId, itemName, itemQuantity, itemPrice, itemSku } = item;
return ( return (
<div> <li className="item-detail">
{`${itemName} -- x ${itemQuantity} bought at ${itemPrice}/ea.`} {`${itemName} -- x ${itemQuantity} bought at ${itemPrice}/ea.`}
</div> </li>
) )
} }
......
...@@ -43,10 +43,16 @@ const OrderDetails = ({ order, showDetails }) => { ...@@ -43,10 +43,16 @@ const OrderDetails = ({ order, showDetails }) => {
return ( return (
<div className={`order-details ${showDetails ? "animate" : ""}`}> <div className={`order-details ${showDetails ? "animate" : ""}`}>
Order Details <div className="order-details-container">
{sampleItems.map( item => ( Order Details
<ItemDetails key={item.itemId}item={item} /> <ul>
))} {sampleItems.map( item => (
<ItemDetails key={item.itemId}item={item} />
))}
</ul>
</div>
</div> </div>
) )
} }
......
...@@ -43,4 +43,6 @@ public class WarehouseOrderService { ...@@ -43,4 +43,6 @@ public class WarehouseOrderService {
} }
} }
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