Skip to content

fix(frontend): correct cart stock display and disable increment when exhausted - #80

Merged
seifmaazouz merged 1 commit into
devfrom
frontend/feature/cart-stock-fix
Apr 6, 2026
Merged

seifmaazouz merged 1 commit into
devfrom
frontend/feature/cart-stock-fix

Conversation

@seifmaazouz

@seifmaazouz seifmaazouz commented Apr 6, 2026 •

Copy link
Copy Markdown
Owner

Description

Fix cart stock display and prevent unnecessary backend calls by disabling the increment button when available stock is exhausted.

Related Issue

Closes #<issue_number>

Type of Change

  • feat - New feature or functionality for users
  • fix - Bug fix that resolves an issue
  • refactor - Code restructuring without changing functionality
  • docs - Documentation changes only
  • chore - Maintenance tasks, dependencies, config changes
  • test - Adding/updating tests
  • perf - Performance improvements

Scope (optional)

  • backend
  • frontend
  • database
  • docs
  • misc

Checklist

  • PR title follows conventional commit format
  • This PR is squash-merged into dev
  • No breaking changes (or marked with !)

Notes

  • Fixes: compute available = stock - quantity for authoritative display; remove misleading optimistic UI updates; disable + when available <= 0 or cart is loading to avoid useless backend calls.

@seifmaazouz
seifmaazouz requested a review from A-agha2607 as a code owner April 6, 2026 16:26
@seifmaazouz
seifmaazouz merged commit 801eb1a into dev Apr 6, 2026
5 checks passed
@seifmaazouz
seifmaazouz deleted the frontend/feature/cart-stock-fix branch April 6, 2026 16:32
@seifmaazouz
seifmaazouz restored the frontend/feature/cart-stock-fix branch April 7, 2026 22:06
@seifmaazouz
seifmaazouz deleted the frontend/feature/cart-stock-fix branch April 7, 2026 22:59
github-actions Bot pushed a commit that referenced this pull request Apr 8, 2026
## [1.0.1](v1.0.0...v1.0.1) (2026-04-08)

### Bug Fixes

* **backend:** include Title on CustomerOrderItem creation ([#79](#79)) ([88cdf44](88cdf44))
* **cart:** update shopping cart stock handling and structured insufficient-stock responses ([#76](#76)) ([bf10552](bf10552))
* **frontend:** correct cart stock display and disable increment when exhausted ([#80](#80)) ([801eb1a](801eb1a))
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant