fix: handle time interval in shared mobility pricing - #6307
Open
jorunnl wants to merge 4 commits into
Open
Conversation
Price segments were rendered as if rate applied per single minute/km, ignoring interval. A segment with interval 30 and rate 5 showed as "5 kr/min" instead of "5 kr per 30 min". Also account for interval in free-minutes campaign calculations and one-time (interval 0) charges.
jorunnl
requested review from
marius-at-atb,
rosvik and
strandlie
as code owners
September 4, 2026 08:58
…ayout ScooterTexts held only generic, form-factor-agnostic pricing/vehicle text and was used in just three call sites, so fold it into MobilityTexts.pricingDetails alongside the other pricing texts. Also fix the pricing details value column shrinking below its content width and wrapping mid-price when the row label is long.
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.
closes https://github.com/AtB-AS/kundevendt/issues/24365
Summary
intervalwhen renderingperMinPricing/perKmPricingrates, so a segment withinterval: 30, rate: 5shows as "5 kr per 30 min" instead of "5 kr/min"interval: 0(charged once, not per unit) now render as "(engangsbeløp)"/"(one-time fee)" instead of being mislabeled as per-minute/per-kmcomputeFreeMinuteCountnow accounts forintervalwhen converting a free-minutes campaign budget into minutes, instead of treatingrateas a flat per-minute cost