Commit 6c14fa50 authored by Darrick Yong's avatar Darrick Yong

fix merge conflicts

parents b98505d3 42904bec
......@@ -17,27 +17,42 @@
---
## Details
#### Schema
### Schemas
#### Warehouse Order
```
{
_id: String
orderId: String
status: String "unfulfilled" (default) > "fulfilled"/"cancelled"
orderObject?: (will have it on initial Kafka message, not sure if we need to store this)
id: String,
orderId: String,
status: String "RECEIVED" (default) > "FULFILLED"/"CANCELLED",
createdAt: Date,
modifiedAt: Date,
orderItems: List<Item>,
address: String,
}
```
#### Workflow
- Warehouse Management (WM) expects an Order object (?) from Order Management (OM) on order placement in Kafka.
- On receipt of an Order object, WM will create a warehouse order entry in database with a status of "unfulfilled."
#### Item
```
{
itemId: String,
itemName: String,
itemQuantity: int,
itemPrice: float,
itemSku: int,
}
```
### Workflow
- Warehouse Management (WM) expects an Order object from Order Management (OM) on order creation in Kafka.
- On receipt of an Order object, WM will create a warehouse order entry in database with a status of **"RECEIVED"**.
- In the WM UI, a warehouse manager will have the ability to fulfill or cancel unfulfilled orders.
- When an order is marked **"fulfilled"** or **"cancelled"**, a Kafka message will be sent to be consumed.
- When an order is marked **"FULFILLED"** or **"CANCELLED"**, a Kafka message will be sent to be consumed.
#### UI
- Login
- Order status update screen mark orders as fulfilled or cancelled
- Order search
- Order information page
### UI
- Login/Logout
- Order Status and Update orders as **"FULFILLED"** or **"CANCELLED"**
- Order Filter and Search
- Order Details
#### API Documentation
https://documenter.getpostman.com/view/7402212/TzRNGATe
......@@ -5,19 +5,21 @@ import Button from "../atoms/Button";
const OrderButtons = ({ order, editOrder }) => {
const FULFILLED = "FULFILLED";
const CANCELLED = "CANCELLED";
const handleUpdate = (action) => {
console.log(action);
if (action === "FULFILL") {
editOrder({ ...order, status: "FULFILLED" });
} else if (action === "CANCEL") {
editOrder({ ...order, status: "CANCELLED" });
if (action === FULFILLED) {
editOrder({ ...order, status: FULFILLED });
} else if (action === CANCELLED) {
editOrder({ ...order, status: CANCELLED });
}
};
return (
<div className="oii-buttons">
<Button className="fulfill-btn" onClick={() => handleUpdate("FULFILL")} text="Fulfill"/>
<Button className="cancel-btn" onClick={() => handleUpdate("CANCEL")} text="Cancel"/>
<Button className="fulfill-btn" onClick={() => handleUpdate(FULFILLED)} text="Fulfill"/>
<Button className="cancel-btn" onClick={() => handleUpdate(CANCELLED)} text="Cancel"/>
</div>
);
};
......
......@@ -14,7 +14,7 @@ public class Item {
private String itemId;
private String itemName;
private int itemQuantity;
private double itemPrice;
private float itemPrice;
private int itemSku;
public Item() {
......
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