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
810e67fb
Commit
810e67fb
authored
May 11, 2021
by
Shaphen Pangburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Team]: Fix Add logic to not allow interaction with products that have no available stock
parent
1f99e20f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
product-item.jsx
ecom-web/src/components/product-market/product-item.jsx
+2
-0
product-market.jsx
ecom-web/src/components/product-market/product-market.jsx
+3
-2
product-market.css
ecom-web/src/resources/stylesheets/product-market.css
+17
-4
No files found.
ecom-web/src/components/product-market/product-item.jsx
View file @
810e67fb
...
@@ -107,6 +107,8 @@ export default class ProductItem extends Component {
...
@@ -107,6 +107,8 @@ export default class ProductItem extends Component {
disabled=
{
!
this
.
props
.
user
?.
currentUser
}
disabled=
{
!
this
.
props
.
user
?.
currentUser
}
onChange=
{
this
.
handleChange
(
"orderItemQuantity"
)
}
onChange=
{
this
.
handleChange
(
"orderItemQuantity"
)
}
value
=
{
this
.
state
.
orderItemQuantity
}
value
=
{
this
.
state
.
orderItemQuantity
}
min=
"1"
max=
"99"
/>
/>
<
button
disabled=
{
!
this
.
props
.
user
?.
currentUser
}
className=
"add-to-cart-button"
>
Add to Cart
</
button
>
<
button
disabled=
{
!
this
.
props
.
user
?.
currentUser
}
className=
"add-to-cart-button"
>
Add to Cart
</
button
>
</
form
>
</
form
>
...
...
ecom-web/src/components/product-market/product-market.jsx
View file @
810e67fb
...
@@ -38,7 +38,8 @@ export default class ProductMarket extends Component {
...
@@ -38,7 +38,8 @@ export default class ProductMarket extends Component {
<
div
className=
"products-container"
>
<
div
className=
"products-container"
>
{
this
.
props
.
products
.
map
(
prod
=>
{
{
this
.
props
.
products
.
map
(
prod
=>
{
return
(
return
(
<
div
className=
{
prod
.
productName
?
"product-item-container"
:
"no-item"
}
key=
{
prod
.
sku
}
>
<
div
className=
{
prod
.
availableStock
>
0
?
"product-item-container"
:
"no-item"
}
key=
{
prod
.
sku
}
>
{
prod
.
availableStock
>
0
?
""
:
<
p
id=
"out-of-stock"
>
- Out of Stock -
</
p
>
}
{
prod
.
productName
?
{
prod
.
productName
?
<
ProductItem
<
ProductItem
item=
{
prod
}
item=
{
prod
}
...
...
ecom-web/src/resources/stylesheets/product-market.css
View file @
810e67fb
...
@@ -34,7 +34,20 @@
...
@@ -34,7 +34,20 @@
}
}
.no-item
{
.no-item
{
display
:
none
;
pointer-events
:
none
;
position
:
relative
;
width
:
330px
;
height
:
335px
;
margin
:
8px
;
opacity
:
0.4
;
}
#out-of-stock
{
position
:
absolute
;
font-size
:
35px
;
top
:
80px
;
left
:
48px
;
z-index
:
50
;
}
}
.product-item
{
.product-item
{
...
@@ -166,7 +179,7 @@
...
@@ -166,7 +179,7 @@
outline
:
none
;
outline
:
none
;
height
:
30px
;
height
:
30px
;
padding
:
6px
;
padding
:
6px
;
width
:
4
2
px
;
width
:
4
7
px
;
transition
:
all
0.5s
;
transition
:
all
0.5s
;
}
}
.order-quantity
:focus
{
.order-quantity
:focus
{
...
@@ -408,8 +421,8 @@
...
@@ -408,8 +421,8 @@
color
:
red
;
color
:
red
;
}
}
input
::-webkit-outer-spin-button
,
/*
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
input::-webkit-inner-spin-button {
-webkit-appearance: none;
-webkit-appearance: none;
margin: 0;
margin: 0;
}
} */
\ No newline at end of file
\ No newline at end of file
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