Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
warehouse-management
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
warehouse-management
Commits
6c14fa50
Commit
6c14fa50
authored
May 13, 2021
by
Darrick Yong
Browse files
Options
Browse Files
Download
Plain Diff
fix merge conflicts
parents
b98505d3
42904bec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
22 deletions
+39
-22
README.md
README.md
+29
-14
OrderButtons.jsx
frontend/src/components/order/OrderButtons.jsx
+9
-7
Item.java
...in/java/com/ascendfinalproject/warehouse/models/Item.java
+1
-1
No files found.
README.md
View file @
6c14fa50
...
@@ -17,27 +17,42 @@
...
@@ -17,27 +17,42 @@
---
---
## Details
## Details
#### Schema
### Schemas
#### Warehouse Order
```
```
{
{
_id: String
id: String,
orderId: String
orderId: String,
status: String "unfulfilled" (default) > "fulfilled"/"cancelled"
status: String "RECEIVED" (default) > "FULFILLED"/"CANCELLED",
orderObject?: (will have it on initial Kafka message, not sure if we need to store this)
createdAt: Date,
modifiedAt: Date,
orderItems: List<Item>,
address: String,
}
}
```
```
#### Workflow
#### Item
-
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."
{
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.
-
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
### UI
-
Login
-
Login
/Logout
-
Order
status update screen mark orders as fulfilled or cancelled
-
Order
Status and Update orders as
**"FULFILLED"**
or
**"CANCELLED"**
-
Order
s
earch
-
Order
Filter and S
earch
-
Order
information page
-
Order
Details
#### API Documentation
#### API Documentation
https://documenter.getpostman.com/view/7402212/TzRNGATe
https://documenter.getpostman.com/view/7402212/TzRNGATe
frontend/src/components/order/OrderButtons.jsx
View file @
6c14fa50
...
@@ -5,19 +5,21 @@ import Button from "../atoms/Button";
...
@@ -5,19 +5,21 @@ import Button from "../atoms/Button";
const
OrderButtons
=
({
order
,
editOrder
})
=>
{
const
OrderButtons
=
({
order
,
editOrder
})
=>
{
const
FULFILLED
=
"FULFILLED"
;
const
CANCELLED
=
"CANCELLED"
;
const
handleUpdate
=
(
action
)
=>
{
const
handleUpdate
=
(
action
)
=>
{
console
.
log
(
action
);
if
(
action
===
FULFILLED
)
{
if
(
action
===
"FULFILL"
)
{
editOrder
({
...
order
,
status
:
FULFILLED
});
editOrder
({
...
order
,
status
:
"FULFILLED"
});
}
else
if
(
action
===
CANCELLED
)
{
}
else
if
(
action
===
"CANCEL"
)
{
editOrder
({
...
order
,
status
:
CANCELLED
});
editOrder
({
...
order
,
status
:
"CANCELLED"
});
}
}
};
};
return
(
return
(
<
div
className=
"oii-buttons"
>
<
div
className=
"oii-buttons"
>
<
Button
className=
"fulfill-btn"
onClick=
{
()
=>
handleUpdate
(
"FULFILL"
)
}
text=
"Fulfill"
/>
<
Button
className=
"fulfill-btn"
onClick=
{
()
=>
handleUpdate
(
FULFILLED
)
}
text=
"Fulfill"
/>
<
Button
className=
"cancel-btn"
onClick=
{
()
=>
handleUpdate
(
"CANCEL"
)
}
text=
"Cancel"
/>
<
Button
className=
"cancel-btn"
onClick=
{
()
=>
handleUpdate
(
CANCELLED
)
}
text=
"Cancel"
/>
</
div
>
</
div
>
);
);
};
};
...
...
src/main/java/com/ascendfinalproject/warehouse/models/Item.java
View file @
6c14fa50
...
@@ -14,7 +14,7 @@ public class Item {
...
@@ -14,7 +14,7 @@ public class Item {
private
String
itemId
;
private
String
itemId
;
private
String
itemName
;
private
String
itemName
;
private
int
itemQuantity
;
private
int
itemQuantity
;
private
double
itemPrice
;
private
float
itemPrice
;
private
int
itemSku
;
private
int
itemSku
;
public
Item
()
{
public
Item
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment