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
fc2ae2dc
Commit
fc2ae2dc
authored
May 05, 2021
by
Kevin Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-26]
🚧
working on setting up Product typing correctly
parent
69e7792b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
7 deletions
+1
-7
OrderShowDetails.tsx
src/components/OrderShowDetails.tsx
+1
-0
OrderService.ts
src/services/OrderService.ts
+0
-7
No files found.
src/components/OrderShowDetails.tsx
View file @
fc2ae2dc
import
React
from
'react'
;
import
{
OrderService
}
from
'services'
;
import
{
Product
}
from
'Order'
;
const
OrderShowDetails
=
(
props
:
any
)
=>
{
const
orderProductDetails
=
props
.
products
.
map
((
prod
:
any
,
idx
:
any
)
=>
{
...
...
src/services/OrderService.ts
View file @
fc2ae2dc
import
orderData
from
'./mock-order-data'
import
{
Order
}
from
'Order'
;
// type Order {
// sku: number
// }
export
const
allOrders
=
()
=>
new
Promise
<
Order
[]
>
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
(
orderData
)
},
2000
)
...
...
@@ -12,10 +9,6 @@ export const orderById = (id: number) => new Promise<Order>((res, rej) => {
setTimeout
(()
=>
{
res
(
orderData
[
id
])
},
2000
)
})
// export const orderById = (idx: any) => {
// return orderData[idx];
// }
export
default
{
allOrders
,
...
...
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