Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
order-management-react
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
0
Merge Requests
0
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
order-management-react
Commits
872cf962
Commit
872cf962
authored
May 07, 2021
by
Shanelle Valencia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-98}
🚧
Continue styling order index [
@svalencia
]
parent
00d4f710
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
30 deletions
+77
-30
OrderDetails.tsx
src/components/OrderDetails.tsx
+1
-0
OrderShowDetails.tsx
src/components/OrderShowDetails.tsx
+23
-10
SearchOrder.tsx
src/components/SearchOrder.tsx
+31
-10
index.css
src/index.css
+10
-0
OrderIndexPage.tsx
src/pages/OrderIndexPage.tsx
+12
-10
No files found.
src/components/OrderDetails.tsx
View file @
872cf962
import
React
from
'react'
import
{
Link
}
from
'react-router-dom'
const
OrderDetails
=
(
props
:
any
)
=>
{
const
orderNumber
=
props
.
orderNumber
const
date
=
props
.
date
;
...
...
src/components/OrderShowDetails.tsx
View file @
872cf962
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Item
}
from
'Order'
;
import
{
Table
,
Thead
,
Tbody
,
Tfoot
,
Tr
,
Th
,
Td
,
TableCaption
,
Input
,
Wrap
,
WrapItem
}
from
"@chakra-ui/react"
const
OrderShowDetails
=
(
props
:
any
)
=>
{
const
[
items
,
setItems
]
=
useState
<
Item
[]
>
()
...
...
@@ -24,17 +37,17 @@ const OrderShowDetails = (props: any) => {
return
(
items
?
<
table
>
<
t
body
>
<
t
r
>
<
th
>
ID
</
t
h
>
<
th
>
Price
</
t
h
>
<
th
>
Quantity
</
t
h
>
<
th
>
SKU
</
t
h
>
</
t
r
>
<
Table
variant=
"striped"
colorScheme=
"messenger"
size=
"lg"
>
<
T
body
>
<
T
r
>
<
Th
>
ID
</
T
h
>
<
Th
>
Price
</
T
h
>
<
Th
>
Quantity
</
T
h
>
<
Th
>
SKU
</
T
h
>
</
T
r
>
{
itemDetails
}
</
t
body
>
</
t
able
>
</
T
body
>
</
T
able
>
:
<
div
className=
"Order without items"
>
This order didn't contain any items.
...
...
src/components/SearchOrder.tsx
View file @
872cf962
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
Link
}
from
'react-router-dom'
import
{
OrderDetails
}
from
'components'
import
{
FontAwesomeIcon
}
from
'@fortawesome/react-fontawesome'
import
{
faSearch
}
from
'@fortawesome/free-solid-svg-icons'
import
{
Table
,
Thead
,
...
...
@@ -10,6 +12,9 @@ import {
Th
,
Td
,
TableCaption
,
Input
,
Wrap
,
WrapItem
}
from
"@chakra-ui/react"
...
...
@@ -22,6 +27,8 @@ const SearchOrder = (props: any) => {
console
.
log
(
"ORDERS"
,
orders
)
const
searchIcon
=
<
FontAwesomeIcon
icon=
{
faSearch
}
/>
const
handleSearchInput
=
(
event
:
any
)
=>
{
setSearchInput
(
event
.
target
.
value
);
...
...
@@ -47,19 +54,33 @@ const SearchOrder = (props: any) => {
return
(
<
div
>
<
h1
>
Search
</
h1
>
<
input
type=
"text"
placeholder=
"Search"
value=
{
searchInput
}
onChange=
{
handleSearchInput
}
/>
<
Table
variant=
"striped"
colorScheme=
"linkedin"
size=
"lg"
>
<
Wrap
>
{
/* <WrapItem>
<span>Search</span>
</WrapItem> */
}
<
WrapItem
>
{
/* <input
type="text"
placeholder="Search"
value={searchInput}
onChange={handleSearchInput}
/> */
}
<
Input
focusBorderColor=
"gray.400"
type=
"text"
placeholder=
"Search <%=searchIcon%>"
value=
{
searchInput
}
onChange=
{
handleSearchInput
}
/>
</
WrapItem
>
</
Wrap
>
<
Table
variant=
"striped"
colorScheme=
"messenger"
size=
"lg"
>
<
Tbody
>
<
Tr
>
{
/*
<Th>Order number</Th>
<
Th
>
Order number
</
Th
>
<
Th
>
Created
</
Th
>
<Th>Order Status</Th>
*/
}
<
Th
>
Order Status
</
Th
>
</
Tr
>
{
searchResultArr
}
</
Tbody
>
...
...
src/index.css
View file @
872cf962
...
...
@@ -15,6 +15,8 @@ code {
monospace
;
}
/* tbody, tr, th, span, td {
border: 2px solid orangered;
}
...
...
@@ -76,5 +78,13 @@ li {
.table-div
{
padding
:
150px
;
padding-top
:
80px
;
}
.index-table
{
border
:
1px
solid
rgb
(
110
,
106
,
106
);
padding
:
0
10px
15px
10px
;
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
);
}
\ No newline at end of file
src/pages/OrderIndexPage.tsx
View file @
872cf962
...
...
@@ -29,16 +29,18 @@ const OrderIndexPage = () => {
return
(
<
div
className=
"table-div"
>
<
SearchOrder
orders=
{
orders
}
/>
<
Table
variant=
"striped"
colorScheme=
"linkedin"
size=
"lg"
>
<
Tbody
>
<
Tr
>
<
Th
>
Order number
</
Th
>
<
Th
>
Created
</
Th
>
<
Th
>
Order Status
</
Th
>
</
Tr
>
{
orderDetailsArr
}
</
Tbody
>
</
Table
>
<
div
className=
"index-table"
>
<
Table
variant=
"striped"
colorScheme=
"messenger"
size=
"lg"
>
<
Tbody
>
<
Tr
>
<
Th
>
Order number
</
Th
>
<
Th
>
Created
</
Th
>
<
Th
>
Order Status
</
Th
>
</
Tr
>
{
orderDetailsArr
}
</
Tbody
>
</
Table
>
</
div
>
</
div
>
)
}
...
...
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