Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ecommerce-maven
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
ecommerce-maven
Commits
408dbf6c
Commit
408dbf6c
authored
May 09, 2021
by
Shaphen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AFP-47 Shaphen Pangburn]: Fix console errors and add styling to quantity input
parent
2bb2ee0b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
28 additions
and
17 deletions
+28
-17
PaymentMethod.js
ecom-web/src/components/checkout/PaymentMethod.js
+1
-1
ReviewOrder.js
ecom-web/src/components/checkout/ReviewOrder.js
+1
-1
ShippingAddress.js
ecom-web/src/components/checkout/ShippingAddress.js
+1
-1
SubmitOrder.js
ecom-web/src/components/checkout/SubmitOrder.js
+1
-1
checkout.jsx
ecom-web/src/components/checkout/checkout.jsx
+5
-5
product-item.jsx
ecom-web/src/components/product-market/product-item.jsx
+3
-2
product-market-container.jsx
...rc/components/product-market/product-market-container.jsx
+2
-2
product-market.jsx
ecom-web/src/components/product-market/product-market.jsx
+4
-3
CartItem.js
ecom-web/src/components/shopping-cart/CartItem.js
+1
-1
product-market.css
ecom-web/src/resources/stylesheets/product-market.css
+9
-0
No files found.
ecom-web/src/components/checkout/PaymentMethod.js
View file @
408dbf6c
import
React
,
{
useState
,
useEffect
}
from
'react'
//
import React, {useState, useEffect} from 'react'
export
default
function
PaymentMethod
()
{
export
default
function
PaymentMethod
()
{
return
(
return
(
...
...
ecom-web/src/components/checkout/ReviewOrder.js
View file @
408dbf6c
import
React
,
{
useState
,
useEffect
}
from
'react'
//
import React, {useState, useEffect} from 'react'
export
default
function
ReviewOrder
()
{
export
default
function
ReviewOrder
()
{
return
(
return
(
...
...
ecom-web/src/components/checkout/ShippingAddress.js
View file @
408dbf6c
import
React
,
{
useState
,
useEffect
}
from
'react'
//
import React, {useState, useEffect} from 'react'
export
default
function
ShippingAddress
()
{
export
default
function
ShippingAddress
()
{
return
(
return
(
...
...
ecom-web/src/components/checkout/SubmitOrder.js
View file @
408dbf6c
import
React
,
{
useState
,
useEffect
}
from
'react'
//
import React, {useState, useEffect} from 'react'
export
default
function
SubmitOrder
()
{
export
default
function
SubmitOrder
()
{
return
(
return
(
...
...
ecom-web/src/components/checkout/checkout.jsx
View file @
408dbf6c
import
React
,
{
useState
,
useEffect
}
from
'react'
//
import React, {useState, useEffect} from 'react'
import
ShippingAddress
from
'./ShippingAddress.js'
//
import ShippingAddress from './ShippingAddress.js'
import
PaymentMethod
from
'./PaymentMethod.js'
//
import PaymentMethod from './PaymentMethod.js'
import
ReviewOrder
from
'./ReviewOrder.js'
//
import ReviewOrder from './ReviewOrder.js'
import
SubmitOrder
from
'./SubmitOrder.js'
//
import SubmitOrder from './SubmitOrder.js'
export
default
function
checkout
()
{
export
default
function
checkout
()
{
...
...
ecom-web/src/components/product-market/product-item.jsx
View file @
408dbf6c
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
'../../resources/stylesheets/product-market.css'
;
export
default
class
ProductItem
extends
Component
{
export
default
class
ProductItem
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -14,7 +15,7 @@ export default class ProductItem extends Component {
...
@@ -14,7 +15,7 @@ export default class ProductItem extends Component {
return
(
return
(
<
div
className=
"product-item"
>
<
div
className=
"product-item"
>
<
div
id=
"more-details-img-box"
>
<
div
id=
"more-details-img-box"
>
<
img
id=
"prod-img"
src=
{
this
.
props
.
item
.
productImageUrl
?
this
.
props
.
item
.
productImageUrl
:
"-no photo-"
}
/>
<
img
id=
"prod-img"
alt=
""
src=
{
this
.
props
.
item
.
productImageUrl
?
this
.
props
.
item
.
productImageUrl
:
"-no photo-"
}
/>
<
p
id=
"more-details-text"
>
More Details
</
p
>
<
p
id=
"more-details-text"
>
More Details
</
p
>
</
div
>
</
div
>
<
p
id=
"prod-name"
>
{
this
.
props
.
item
.
productName
}
</
p
>
<
p
id=
"prod-name"
>
{
this
.
props
.
item
.
productName
}
</
p
>
...
@@ -37,7 +38,7 @@ export default class ProductItem extends Component {
...
@@ -37,7 +38,7 @@ export default class ProductItem extends Component {
<
input
id=
"order-quantity"
type=
"number"
placeholder=
"Qty"
/>
<
input
id=
"order-quantity"
type=
"number"
placeholder=
"Qty"
/>
<
span
id=
"add-to-cart-button"
>
Add to Cart
</
span
>
<
span
id=
"add-to-cart-button"
>
Add to Cart
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
)
)
}
}
}
}
ecom-web/src/components/product-market/product-market-container.jsx
View file @
408dbf6c
...
@@ -3,8 +3,8 @@ import ProductMarket from './product-market';
...
@@ -3,8 +3,8 @@ import ProductMarket from './product-market';
import
{
fetchProducts
,
fetchPromotions
}
from
'../../actions/product_actions'
;
import
{
fetchProducts
,
fetchPromotions
}
from
'../../actions/product_actions'
;
const
mSTP
=
state
=>
({
const
mSTP
=
state
=>
({
products
:
state
.
market
.
products
,
products
:
state
.
market
.
products
,
promotions
:
state
.
market
.
promotions
,
promotions
:
state
.
market
.
promotions
,
});
});
const
mDTP
=
dispatch
=>
({
const
mDTP
=
dispatch
=>
({
...
...
ecom-web/src/components/product-market/product-market.jsx
View file @
408dbf6c
import
React
,
{
Component
}
from
'react'
import
ProductItem
from
'./product-item'
import
ProductItem
from
'./product-item'
import
'../../resources/stylesheets/product-market.css'
;
import
'../../resources/stylesheets/product-market.css'
;
import
'../../resources/stylesheets/reset.css'
;
import
'../../resources/stylesheets/reset.css'
;
import
React
,
{
Component
}
from
'react'
export
default
class
ProductMarket
extends
Component
{
export
default
class
ProductMarket
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -34,12 +34,13 @@ export default class ProductMarket extends Component {
...
@@ -34,12 +34,13 @@ export default class ProductMarket extends Component {
{
this
.
props
.
products
.
map
(
prod
=>
{
{
this
.
props
.
products
.
map
(
prod
=>
{
return
(
return
(
<
div
className=
"product-item-container"
key=
{
prod
.
sku
}
>
<
div
className=
"product-item-container"
key=
{
prod
.
sku
}
>
{
prod
.
productName
?
{
prod
.
productName
?
<
ProductItem
item=
{
prod
}
/>
<
ProductItem
item=
{
prod
}
/>
:
:
<
div
className=
"product-item"
>
<
div
className=
"product-item"
>
<
p
id=
"prod-not-available"
>
This Product is No Longer Available
</
p
>
<
p
id=
"prod-not-available"
>
This Product is No Longer Available
</
p
>
</
div
>
}
</
div
>
}
</
div
>
</
div
>
)
)
})
}
})
}
...
...
ecom-web/src/components/shopping-cart/CartItem.js
View file @
408dbf6c
...
@@ -14,7 +14,7 @@ export default function CartItem(props) {
...
@@ -14,7 +14,7 @@ export default function CartItem(props) {
{
/* Left image div */
}
{
/* Left image div */
}
<
div
id
=
"productImageContainer"
>
<
div
id
=
"productImageContainer"
>
<
img
className
=
"productImage"
src
=
{
props
.
productInfo
.
productImageUrl
}
/
>
<
img
className
=
"productImage"
alt
=
""
src
=
{
props
.
productInfo
.
productImageUrl
}
/
>
<
/div
>
<
/div
>
{
/* Name and Product details */
}
{
/* Name and Product details */
}
...
...
ecom-web/src/resources/stylesheets/product-market.css
View file @
408dbf6c
...
@@ -146,6 +146,15 @@
...
@@ -146,6 +146,15 @@
padding
:
6px
;
padding
:
6px
;
}
}
#order-quantity
{
border
:
1px
dotted
rgba
(
0
,
0
,
0
,
0.3
);
outline
:
none
;
transition
:
all
0.5s
;
}
#order-quantity
:focus
{
border
:
1px
solid
black
;
}
.add-cart-and-quantity
{
.add-cart-and-quantity
{
display
:
flex
;
display
:
flex
;
}
}
...
...
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