Skip to content

Add parking payment methods and repair payment process values - #1775

Merged
a-limyr merged 2 commits into
entur:masterfrom
tmfg:fix/parking-payment-methods-not-editable
Oct 23, 2026
Merged

a-limyr merged 2 commits into
entur:masterfrom
tmfg:fix/parking-payment-methods-not-editable

Conversation

@teppope

@teppope teppope commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds an editable paymentMethods field to the parking editor. The change adds a GraphQL field, locale labels and a multi-select control in the modern editor.
  • Keeps parkingPaymentProcess to the four values that the NeTEx Nordic profile allows: free, payAndDisplay, payByPrepaidToken and payByMobileDevice. A stored value outside this list still renders, and a save keeps it.
  • Renames the parkingPaymentProcess label in all five locale files, from "Payment method" to "Payment process". The field names a process, not a method. The new paymentMethods field now owns the "Payment method" wording.
  • Adds a defaultMessage fallback to every enum label lookup. A stop place that holds an untranslated value now shows the raw value, not a blank string.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Issue

Tiamat stores paymentMethods, but the editor had no control for it. The parkingPaymentProcess label used the "Payment method" wording, so a user could not tell the two fields apart.

A user clears paymentMethods with an empty selection. The editor then sends an empty list, and Tiamat clears the stored list.

Unit tests

  • Unit tests cover the model, the GraphQL mapping, the empty selection and the render fallback.
  • Each new test fails without its fix. With the nine-value list, the payment process test fails with AssertionError: expected [ 'free', 'other', …(7) ] to deeply equal [ 'free', 'payAndDisplay', …(2) ].

Verification

Check Result
npx tsc --noEmit ✅ Clean
npm run check (Prettier) ✅ Clean
vitest run ✅ 212 tests pass
Payment process values against the NeTEx Nordic profile ✅ Checked against the Nordic NeTEx Profile stops document, Parking, ParkingPaymentProcess. The editor offers exactly the four values
Before and after, modern editor ✅ Payment process replaces the wrong Parking payment method label, and Payment methods is new modern editor before and after
Before and after, legacy editor ✅ The rename only. The new control stays out of the legacy editor legacy editor before and after

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@teppope
teppope force-pushed the fix/parking-payment-methods-not-editable branch from bdb35e0 to a807aaa Compare October 9, 2026 13:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@teppope
teppope requested a review from a-limyr October 12, 2026 07:59
@a-limyr
a-limyr merged commit c1888bf into entur:master Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants