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
995edcbc
Commit
995edcbc
authored
May 07, 2021
by
Darrick Yong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix itemPrice type and add order detail table
parent
1e617d45
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
47 deletions
+37
-47
order.css
frontend/public/stylesheets/order.css
+26
-8
ItemDetails.jsx
frontend/src/components/order/ItemDetails.jsx
+5
-5
OrderDetails.jsx
frontend/src/components/order/OrderDetails.jsx
+3
-6
WarehouseController.java
...nalproject/warehouse/controllers/WarehouseController.java
+1
-6
Item.java
...in/java/com/ascendfinalproject/warehouse/models/Item.java
+2
-2
WarehouseOrderService.java
...inalproject/warehouse/services/WarehouseOrderService.java
+0
-20
No files found.
frontend/public/stylesheets/order.css
View file @
995edcbc
...
...
@@ -128,30 +128,48 @@
overflow
:
hidden
;
padding
:
20px
50px
;
box-sizing
:
border-box
;
overflow
:
scroll
;
/* background: white; */
}
.animate
{
transition
:
max-height
1s
ease
-out
;
max-height
:
2
00px
;
transition
:
max-height
0.75s
ease-in
-out
;
max-height
:
4
00px
;
}
.order-details-header
{
padding
:
4px
0
;
font-size
:
20px
;
font-weight
:
700
;
border-bottom
:
1px
solid
red
;
border-bottom
:
2px
solid
black
;
}
.order-detail-table
{
/* margin: 20px; */
/* border-spacing: 30px; */
margin
:
15px
;
}
.order-details
thead
{
.order-detail-table
thead
{
font-weight
:
700
;
border-bottom
:
1px
solid
black
;
}
.order-detail-table
th
,
.order-detail-table
td
{
padding
:
5px
20px
;
}
.item-detail
~
.item-detail
{
border-top
:
1px
solid
red
;
/* border-top: 1px solid red; */
}
.item-sku
,
.item-qty
{
text-align
:
center
;
}
.item-price
{
text-align
:
end
;
}
.order-detail-table
th
~
th
,
.order-detail-table
td
~
td
{
border-left
:
1px
solid
black
;
}
\ No newline at end of file
frontend/src/components/order/ItemDetails.jsx
View file @
995edcbc
...
...
@@ -4,15 +4,15 @@ const ItemDetails = ({ item }) => {
return
(
<
tr
className=
"item-detail"
>
<
t
h
>
{
itemSku
}
</
th
>
<
t
h
>
{
itemName
}
</
th
>
<
t
h
>
{
`$${itemPrice}`
}
</
th
>
<
t
h
>
{
itemQuantity
}
</
th
>
<
t
d
className=
"item-sku"
>
{
itemSku
}
</
td
>
<
t
d
className=
"item-name"
>
{
itemName
}
</
td
>
<
t
d
className=
"item-qty"
>
{
itemQuantity
}
</
td
>
<
t
d
className=
"item-price"
>
{
`$${itemPrice.toFixed(2)}`
}
</
td
>
</
tr
>
// <li className="item-detail">
// {`${itemName} -- x ${itemQuantity} bought at ${itemPrice}/ea.`}
// </li>
)
)
;
}
export
default
ItemDetails
;
\ No newline at end of file
frontend/src/components/order/OrderDetails.jsx
View file @
995edcbc
...
...
@@ -5,18 +5,14 @@ const OrderDetails = ({ order, showDetails }) => {
return
(
<
div
className=
{
`order-details ${showDetails ? "animate" : ""}`
}
>
<
div
className=
"order-details-container"
>
{
`Warehouse Order #: ${order.id}`
}
<
div
className=
"order-details-header"
>
Order Details
</
div
>
<
div
className=
"order-details-header"
>
Order Details:
</
div
>
<
table
className=
"order-detail-table"
>
<
thead
>
<
tr
>
<
th
>
SKU #
</
th
>
<
th
>
Name
</
th
>
<
th
>
Price
</
th
>
<
th
>
Quantity
</
th
>
<
th
>
Price
</
th
>
</
tr
>
</
thead
>
<
tbody
>
...
...
@@ -25,6 +21,7 @@ const OrderDetails = ({ order, showDetails }) => {
))
}
</
tbody
>
</
table
>
{
`Warehouse Order #: ${order.id}`
}
</
div
>
</
div
>
);
...
...
src/main/java/com/ascendfinalproject/warehouse/controllers/WarehouseController.java
View file @
995edcbc
...
...
@@ -5,6 +5,7 @@ import com.ascendfinalproject.warehouse.models.WarehouseOrder;
import
com.ascendfinalproject.warehouse.services.WarehouseOrderService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
reactor.core.publisher.Flux
;
import
reactor.core.publisher.Mono
;
...
...
@@ -16,12 +17,6 @@ public class WarehouseController {
@Autowired
WarehouseOrderService
orderService
;
// @CrossOrigin
// @GetMapping(value = "/orders")
// public Mono<OrderResponse> getOrders() throws InterruptedException {
// return orderService.getOrders();
// }
//
@CrossOrigin
@GetMapping
(
value
=
"/orders"
)
public
Flux
<
WarehouseOrder
>
getOrders
()
{
...
...
src/main/java/com/ascendfinalproject/warehouse/models/Item.java
View file @
995edcbc
...
...
@@ -12,10 +12,10 @@ public class Item {
private
String
itemId
;
private
String
itemName
;
private
int
itemQuantity
;
private
int
itemPrice
;
private
double
itemPrice
;
private
int
itemSku
;
public
Item
(
String
itemId
,
String
itemName
,
int
itemQuantity
,
int
itemPrice
,
int
itemSku
)
{
public
Item
(
String
itemId
,
String
itemName
,
int
itemQuantity
,
double
itemPrice
,
int
itemSku
)
{
this
.
itemId
=
itemId
;
this
.
itemName
=
itemName
;
this
.
itemQuantity
=
itemQuantity
;
...
...
src/main/java/com/ascendfinalproject/warehouse/services/WarehouseOrderService.java
View file @
995edcbc
...
...
@@ -25,26 +25,6 @@ public class WarehouseOrderService {
return
orderRepository
.
findById
(
id
);
}
// public Mono<OrderResponse> getOrders() throws InterruptedException {
// add ResponseEntity
// return orderRepository.findAll();
// OrderResponse res = new OrderResponse();
// Flux<WarehouseOrder> warehouseOrderFlux = orderRepository.findAll().log().map(order -> {
// res.addOrder(order);
// res.appendId(order.getId());
// return order;
// });
// Mono<ResponseEntity<OrderResponse>>
// return warehouseOrderFlux.doOnComplete(() -> Mono.just(res));
// return warehouseOrderFlux.next().map(wareHouse -> res)
// .doOnSuccess(subscription -> Mono.just(res));
//
//
// System.out.println("-----");
// System.out.println(res);
// Thread.sleep(2000);
// return Mono.just(res);
// }
public
Flux
<
WarehouseOrder
>
getOrders
()
{
return
orderRepository
.
findAll
();
}
...
...
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