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
48543cf6
Commit
48543cf6
authored
May 07, 2021
by
Shanelle Valencia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'styling' into 'dev'
[AFP-98]
🚧
Clean up code [
@svalencia
] See merge request
!8
parents
96b38663
4d336757
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
102 deletions
+7
-102
Nav.tsx
src/components/Nav.tsx
+1
-1
SearchOrder.tsx
src/components/SearchOrder.tsx
+0
-96
index.ts
src/components/index.ts
+0
-1
index.css
src/index.css
+5
-0
OrderIndexPage.tsx
src/pages/OrderIndexPage.tsx
+1
-4
No files found.
src/components/Nav.tsx
View file @
48543cf6
...
...
@@ -24,7 +24,7 @@ const Nav = () => {
<
Spacer
/>
<
Box
className=
"right-nav"
>
<
Link
className=
"nav-link"
to=
"/account"
>
{
userIcon
}
</
Link
>
<
Button
><
Link
className=
"nav-link"
to=
"/orders"
>
All orders
</
Link
></
Button
>
<
Button
><
Link
to=
"/orders"
>
All orders
</
Link
></
Button
>
<
Button
onClick=
{
handleAuth
}
>
{
authLinkText
}
</
Button
>
</
Box
>
</
Flex
>
...
...
src/components/SearchOrder.tsx
deleted
100644 → 0
View file @
96b38663
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,
// Tbody,
// Tfoot,
// Tr,
// Th,
// Td,
// TableCaption,
// Input,
// Wrap,
// WrapItem
// } from "@chakra-ui/react"
const
SearchOrder
=
(
props
:
any
)
=>
{
// const { orders } = props;
// const [searchInput, setSearchInput] = useState("");
// const [searchResult, setSearchResult] = useState<string[]>([]);
// console.log("ORDERS", orders)
// const searchIcon = <FontAwesomeIcon icon={faSearch} />
// const handleSearchInput = (event: any) => {
// setSearchInput(event.target.value);
// }
// useEffect(() => {
// const filtered = orders.filter((order: any) =>
// order.id.includes(searchInput) //|| order.date.includes(searchInput)
// );
// // debugger
// setSearchResult(filtered);
// }, [searchInput]);
// const searchResultArr = searchResult.map((item: any, idx) => {
// return <Tr key={idx}><OrderDetails
// date={item.orderCreatedAt}
// orderNumber={item.id}
// status={item.orderStatus}/>
// </Tr>
// })
// return (
// <div>
// <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="md">
// <Thead>
// <Tr>
// <Th>Order number</Th>
// <Th>Created</Th>
// <Th>Order Status</Th>
// </Tr>
// </Thead>
// <Tbody>
// {searchResultArr}
// </Tbody>
// </Table>
// </div>
// );
}
export
default
SearchOrder
src/components/index.ts
View file @
48543cf6
...
...
@@ -4,6 +4,5 @@ export {default as Nav} from './Nav'
export
{
default
as
OrderDetails
}
from
'./OrderDetails'
export
{
default
as
SignUpForm
}
from
'./SignUpForm'
export
{
default
as
OrderShowDetails
}
from
'./OrderShowDetails'
export
{
default
as
SearchOrder
}
from
'./SearchOrder'
export
{
default
as
Login
}
from
'./Login'
export
{
default
as
Logout
}
from
'./Logout'
\ No newline at end of file
src/index.css
View file @
48543cf6
...
...
@@ -86,6 +86,11 @@ li {
}
.nav-link
{
margin-right
:
15px
;
}
.table-div
{
padding
:
150px
;
padding-top
:
80px
;
...
...
src/pages/OrderIndexPage.tsx
View file @
48543cf6
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
OrderDetails
,
SearchOrder
}
from
'components'
import
{
OrderDetails
}
from
'components'
import
{
OrderService
}
from
'services'
;
import
{
Order
}
from
'Order'
;
import
{
useAllOrders
}
from
'hooks'
...
...
@@ -7,11 +7,8 @@ import {
Table
,
Thead
,
Tbody
,
Tfoot
,
Tr
,
Th
,
Td
,
TableCaption
,
Input
}
from
"@chakra-ui/react"
...
...
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