fix(sw-2501): remove the continue buttons on enter details
This removes the continue buttons on the enter details page.
This is only that, not the refactoring of the whole enter details page with changing to one form etc. Since I just didn’t complete that refactor today I decided to do this light variant for now.
A quick explanation is that the continue buttons are removed and instead the form is submitted (meaning saving the form data to the store) on blur on the input elements IF the form is valid. If it’s invalid we change the isComplete flag in the store to false. This will hopefully also fix a bug where you were able to submit old data if the new data is invalid.
When clicking the submit button and a room is incomplete/invalid the browser scrolls to the first invalid room.
Approved-by: Erik Tiekstra
fix(sw-1897): show member price modal immediately
* fix(sw-1897): show member price modal immediately
* Make checkbox fully controlled
* Remove action in the store that wasn't used
Approved-by: Hrishikesh Vaipurkar
fix(sw-2444): view all ancillaries mobile
* fix(sw-2444): view all ancillaries mobile
On mobile the view all button to show all ancillaries shouldn't be
shown. It's already a carousel showing all available ancillaries.
Approved-by: Bianca Widstam
Approved-by: Matilda Landström
fix(sw-1867): Don't allow same name or membno between rooms
* fix(sw-1867): Don't allow same name or membno between rooms
We don't want to allow two different rooms to have the same firstname
and lastname combination or the same membership number.
* Fine tune validation triggers
* Add comments explaining manual validation triggering
* Change to react-hook-form built-in deps instead
Approved-by: Simon.Emanuelsson
The number of breakfasts and total sums weren’t correctly calculated. This fixes that.
Also changes display logic of when the ancillaries sections are shown
Approved-by: Bianca Widstam
Feat/sw-1839 show added breakfast
* Fix wrong space character
* Change to correct CSS variable
* Show added breakfast ancillary in the "My add-ons" section
* Show breakfast info in room card
* Show breakfast in price details table
* Format price
Approved-by: Pontus Dreij
fix: Add type casting for room package codes
* fix: Add type casting for room package codes
Approved-by: Michael Zetterberg
Approved-by: Matilda Landström
Feat/SW-1282 list added ancillaries
* feat(sw-1282): add icon to accordionItem
* feat(sw-1282): list added ancillaries
* Change translation key to already existing
* Remove duplicate key
* Move new files to the new folder structure
Approved-by: Pontus Dreij
feat(SW-1523): foundation for my stay page
* feat(SW-1523): foundation for my stay page
This is the base page for the my stay page. It is very much hard coded
and all components need to get a design update afterwards. But this is
to get the page going!
* fix(i18n): messages
Approved-by: Michael Zetterberg
Approved-by: Christian Andolf
Merged in feat/sw-397-alternative-hotels (pull request #1211)
Feat/sw 397 alternative hotels
* fix(SW-397): create alternative hotels page
* update types
* Adapt to new changes for fetching data
* Make bookingcode optional
* Code review fixes
Approved-by: Simon.Emanuelsson
fix(SW-1177): fix localization problems in search history
* fix(SW-1177): fix localization problems in search history
When saving search history the whole location objects where stored and
also used later. This made the list display in different languages if
the user previously had search for something in another language.
Another issue where that the list where also deduped based on name of
the search item, which meant that there could be multiple history
items for the same entity and the same ID, e.g. `Gothenburg` and
`Göteborg`.
Approved-by: Bianca Widstam
Fix/sw-1127 image fixes for lightbox
* fix(SW-1127): move back to top button behind lightbox
* fix(SW-1127): don't loop lightbox thumbnails
* fix(SW-1127): nicer animation in the gallery
This both fixes a bug in the gallery where the animation in the carousel
didn't work so good and also animates the images different directions
depending on if the user go left or right.
Approved-by: Matilda Landström
fix(SW-1260): allow unrecognized hotel facilities
* fix(SW-1260): allow unrecognized hotel facilities
Before this we only allowed hotel facilities that we know about (ID:s in
an enum). Now we instead allow everything, but filter away the ones we
don't know about.
Approved-by: Christel Westerberg
fix(SW-1160): include current header as sticky
* fix(SW-1160): include current header as sticky
* fix(sw-1160): only count with current header height if its shown
Approved-by: Erik Tiekstra
fix(sw-1110): only match search keywords from start of word
* fix(sw-1110): only match search keywords from start of word
This changes the search field so when it tries to match on a keyword it
has to match from the beginning of the word, not anywhere in the word
Approved-by: Bianca Widstam
fix(SW-1013): extract custom components from day picker
* fix(SW-1013): extract custom components from day picker
The custom components in the mobile day picker made a lot of components
in the day picker to unmount and mount again, which had weird scrolling
behaviour. They don't need to be baked in to the day picker so they are
now extracted to regular sibling elements.
Approved-by: Pontus Dreij
fix(SW-1011): when only choosing one date on mobile
* fix(SW-1011): when only choosing one date on mobile
When choosing only from date on mobile the to date is set to the next
day. This was only the case on desktop before, no it's on mobile too.
* Remove unnecessary dependency
Approved-by: Pontus Dreij
Approved-by: Hrishikesh Vaipurkar
Feat/SW-342 filtering and sorting mobile
* feat(SW-342): add sort and filter on mobile
* Use zustand for state management
* Add count and translations
* Clear filters
* Small fixes
* Fixes
Approved-by: Pontus Dreij
Feat/SW-342 filtering and sorting mobile
* feat(SW-342): add sort and filter on mobile
* Use zustand for state management
* Add count and translations
* Clear filters
* Small fixes
* Fixes
Approved-by: Pontus Dreij
Create the sidepeek for a specific roomtype. This also changes the lightbox to use react-aria instead of radix-ui, so we use the same for the lightbox and the sidepeek. Works better together!
Approved-by: Bianca Widstam
This implements the actual call to the API to create a booking. That’s the only thing it does, it doesn’t handle the response in any way.
This PR is just to get it there and the new booking sub team will handle it further, with payment etc.
Approved-by: Michael Zetterberg
Approved-by: Fredrik Thorsson
Approved-by: Simon.Emanuelsson
This updates the select room page according to the new UX. It has different sections on the same page, but with specific URLs per section. Since neither UX, UI nor API is completely done both design and data structures are a bit temporary.
Approved-by: Simon.Emanuelsson
This is the foundation for the rate selection. Since we don't have UX
and UI ready yet this is on a best effort basis. Things that will be
changed later includes proper API fetching, correct design,
internationalization of text and form handling.