-
Notifications
You must be signed in to change notification settings - Fork 3
Implement basket quantity update functionality with increment/decrement controls #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
…nt buttons Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
|
@copilot Please revert the .NET version back to .NET 9. When working on the changes first install .NET 9 before verifying the build. |
Co-authored-by: KyleMcMaster <11415127+KyleMcMaster@users.noreply.github.com>
I've reverted the .NET version back to .NET 9.0 as requested. The changes include:
The build and all 10 tests are now passing successfully with .NET 9. Commit: a0dfec0 Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
… ASPNETCORE_HTTPS_PORT for development environment
This PR adds the ability for users to update basket item quantities directly from the Baskets page using intuitive increment (+) and decrement (-) buttons.
Features Added
✅ Increment/Decrement Buttons: Added "+" and "-" buttons next to each item's quantity display
✅ Real-time Updates: Quantities and total costs update immediately after each operation
✅ Automatic Item Removal: Items are automatically removed when quantity would go below 1
✅ Multi-item Support: Each basket item has independent quantity controls
✅ Live Basket Counter: Header basket counter updates to reflect total item count
✅ User Feedback: Clear success/error feedback via URL parameters
Technical Implementation
Domain Layer (
Basket.Domain.fs):updateBasketItemQuantityfunction for updating existing item quantitiesUI Layer (
Basket.Component.fs):/basket/update-quantitywith the target quantityHTTP Layer (
Basket.Page.fs):updateQuantityhandler to process quantity update requestsRouting (
Program.fs):POST /basket/update-quantityendpointTesting
Added comprehensive test suite (
UpdateBasketItemQuantity.fs) covering:All 10 new tests pass, maintaining 100% test coverage for the new functionality.
Demo
The screenshot demonstrates:
Validation & Edge Cases
Fixes #14.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.