Skip to content
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

Add accessType to search pages #1555

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vincit-matu
Copy link
Contributor

@vincit-matu vincit-matu commented Feb 12, 2025

🛠️ Changelog

  • Adds accessType to both search pages. Both to the form/filters, and the search result reservation cards

🧪 Test plan

  • Automated tests
  • Both single and seasonal reservation unit searches should have a new filter for accessType, and that it works (most/all reservation units use the "Suora pääsy" option for now)
  • Check that search results display their respective access types with a new icon + value

🚧 Dependencies

  • None

🎫 Tickets

@github-actions github-actions bot added the feature Adds a new feature label Feb 12, 2025
/>
),
value: t(
`reservationUnit:accessTypes.${reservationUnit.currentAccessType}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be possible to my knowledge, as all reservation units have an accessType (which currentAccessType defaults to, if it's not specified separately)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about to change

apps/ui/components/search/SeasonalSearchForm.tsx Outdated Show resolved Hide resolved
apps/ui/components/search/SingleSearchForm.tsx Outdated Show resolved Hide resolved
apps/ui/components/search/SingleSearchForm.tsx Outdated Show resolved Hide resolved
/>
),
value: t(
`reservationUnit:accessTypes.${reservationUnit.currentAccessType}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: shouldn't be possible to my knowledge, as all reservation units have an accessType (which currentAccessType defaults to, if it's not specified separately)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changes in the new backend

apps/ui/modules/search.ts Outdated Show resolved Hide resolved
- remove unnecessary helper functions from modules/search
- replace remaining instances of removed query param helper functions with toNumber and/or ignoreMaybeArray
@vincit-matu vincit-matu force-pushed the add-accessType-to-search-pages branch from 9ec3ff7 to 6b6ad63 Compare February 12, 2025 13:45
Copy link
Contributor

@joonatank joonatank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes coming to backend so marking this

/>
),
value: t(
`reservationUnit:accessTypes.${reservationUnit.currentAccessType}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

about to change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants