Fix seat markup pricing - prioritize seat maps over offer services for total calculation#432
Draft
Fix seat markup pricing - prioritize seat maps over offer services for total calculation#432
Conversation
Co-authored-by: igorp1 <2934495+igorp1@users.noreply.github.com>
Co-authored-by: igorp1 <2934495+igorp1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Wrong return price value (Seats)
Fix seat markup pricing - prioritize seat maps over offer services for total calculation
Aug 1, 2025
Contributor
|
@copilot fix linter errors |
Co-authored-by: igorp1 <2934495+igorp1@users.noreply.github.com>
Author
Fixed the linter errors. The issues were prettier formatting problems in both modified files. Applied automatic formatting fixes and all lint checks now pass. (f98da31) 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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When seat markup was applied using the
markupprop, the component would display the correct marked-up price in the seat selection interface but would still calculate totals using the original (non-marked-up) prices from the offer'savailable_services.The Problem
Consider this scenario:
markup: { seats: { rate: 0.1, amount: 0 } }The issue was in the
getTotalAmountForServicesfunction which had this logic:available_services(original prices)Since seat services exist in both the offer AND seat maps, it would always use the original price from step 1.
The Solution
Modified
getTotalAmountForServicesto prioritize seat maps over offer services:available_services(for non-seat services)This ensures:
Testing
Added comprehensive tests covering:
Fixes #416.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
downloads.sentry-cdn.comgooglechromelabs.github.io/usr/local/bin/node install.mjs(dns block)https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.88/linux64/chrome-headless-shell-linux64.zip/usr/local/bin/node install.mjs(http block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.