Skip to content

Show and edit the parking operator reference - #1790

Draft
teppope wants to merge 2 commits into
entur:masterfrom
tmfg:feat/parking-organisation-ref-editor
Draft

teppope wants to merge 2 commits into
entur:masterfrom
tmfg:feat/parking-organisation-ref-editor

Conversation

@teppope

@teppope teppope commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Needs entur/tiamat#484 (parking organisationRef in GraphQL, merged 2026-10-15) deployed first. Without it, every stop place query that uses the VerboseParking fragment is likely to fail. This was not run against an older Tiamat.

Summary

The modern editor shows and edits the operator reference of every parking, car or bicycle.

  • The Operator reference text field sits in the part of the panel that every parking shows.
  • A save sends the value trimmed.
  • A blank field sends no value, so the stored reference stays. Tiamat keeps the old value when the field is absent.
  • A save without an edit keeps the stored value.
  • Both VerboseParking fragments request organisationRef.
  • An agent wrote the fi, sv, nb and fr translations. Native speakers should check them.
  • The legacy editor does not change.

Type of change

  • New feature (non-breaking change which adds functionality)

Issue

The Nordic NeTEx Profile stops document gives OrganisationRef to a Parking through Site. Tiamat stores it since #484. No editor showed it until now.

Unit tests

See Verification.

Verification

Check Result
Unit tests in parkingOrganisationRef.spec.js ✅ Before the change 5 of 8 failed. toClient, save with a value, trimmed save and value survives a save: expected undefined to be 'FSR:Operator:0101263-6'. Reducer: default.changeParkingOrganisationRef is not a function
npx vitest run ✅ 306 tests pass on the branch
npx tsc --noEmit and npm run check ✅ Clean
M1 Car park-and-ride ✅ Local Tiamat on master: the field shows the stored value. A change saves and reads back through GraphQL
M2 Bicycle parking ✅ Same result as M1
M3 Save without a change ✅ GraphQL returns the same reference and the same version
M4 Clear the field and save ✅ GraphQL returns the old reference. The field shows it again after a reload
M5 Parking with no reference ✅ The save sends none and GraphQL returns null
Modern editor, bicycle and car parking ✅ Screenshots below. The before state has no Operator reference field. The test fixtures store no reference, so the screenshots show the layout only
Legacy editor ✅ The legacy view does not change. This PR adds the field to the modern view only. A unit test covers that a legacy save keeps the value

after-bicycle-modern.png

after-car-motorcycle-modern.png

Known limitations

  • A user cannot clear a stored operator reference in the editor.

teppope and others added 2 commits October 27, 2026 18:29
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant