Commit Graph

118 Commits

Author SHA1 Message Date
Anton Gunnarsson
4e1cb01b84 Merged in chore/cleanup-after-trpc-migration (pull request #2457)
Chore/cleanup after trpc migration

* Clean up TODOs

* Rename REDEMPTION constant to SEARCH_TYPE_REDEMPTION

* Update dependencies

Remove unused deps from scandic-web
Add missing deps to trpc package

* Update self-referencing imports

* Remove unused variables from scandic-web env

* Fix missing graphql-tag package

* Actually fix

* Remove unused env var


Approved-by: Christian Andolf
Approved-by: Linus Flood
2025-06-30 12:08:19 +00:00
Simon Emanuelsson
59f4a27cb1 feat: translate Voucher everywhere during booking flow 2025-06-30 10:57:00 +00:00
Christian Andolf
ff40ef72c4 chore: fix and migrate unit tests to vitest 2025-06-30 09:49:30 +02:00
Simon Emanuelsson
5d275c6b1b feat: add condition to show strikethrough price 2025-06-26 11:59:05 +00:00
Anton Gunnarsson
bbcabfa0ba Merged in feat/sw-2864-move-hotels-router-to-trpc-package (pull request #2410)
feat (SW-2864): Move booking router to trpc package

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Move booking router to trpc package

* Merge branch 'master' into feat/sw-2864-move-hotels-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 09:02:59 +00:00
Anton Gunnarsson
002d093af4 Merged in feat/sw-2863-move-contentstack-router-to-trpc-package (pull request #2389)
feat(SW-2863): Move contentstack router to trpc package

* Add exports to packages and lint rule to prevent relative imports

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 07:53:01 +00:00
Bianca Widstam
f6cebcb269 Merged in fix/SW-2666-select-rate-campaign-terms-modal (pull request #2442)
fix(SW-2666): correct default rate for campaign rates member

* fix(SW-2666): correct default rate for campaign rates member


Approved-by: Christian Andolf
2025-06-25 14:43:26 +00:00
Bianca Widstam
169d7fa7ea Merged in fix/SW-2991-logged-in-ui-campaign-rate-card (pull request #2394)
fix(SW-2991): new rate card for logged in users

* fix(SW-2991): new rate card for logged in users


Approved-by: Simon.Emanuelsson
2025-06-25 14:18:39 +00:00
Simon Emanuelsson
145a6d2365 feat: only show alerts when booking dates are affected 2025-06-25 11:16:20 +00:00
Tobias Johansson
8272327993 Merged in fix/SW-2801-correct-date-formats (pull request #2400)
fix(SW-2801): Added lang specific date formats

* fix(SW-2801): Added lang specific date formats

* fix: wrong type import


Approved-by: Michael Zetterberg
2025-06-25 11:12:28 +00:00
Simon Emanuelsson
d4894c1647 feat: change all Based on availability to Subject to availability in booking flow 2025-06-25 10:30:45 +00:00
Bianca Widstam
3d4d66870d Merged in fix/SW-2706-label-room-features (pull request #2419)
fix(SW-2706): use labels for localize instead of API for room features

* fix(SW-2706): use labels for localize instead of API for room features


Approved-by: Tobias Johansson
2025-06-24 13:49:40 +00:00
Bianca Widstam
a112173663 Merged in fix/Sw-2849-update-sidepeek-select-rate (pull request #2406)
fix(SW-2849): use same sidepeek on select rate as on select hotel

* fix(SW-2849): use same sidepeek on select rate as on select hotel

* fix(SW-2849): remove ameneties sidepeek enum


Approved-by: Erik Tiekstra
2025-06-24 11:37:25 +00:00
Tobias Johansson
401c4ba6d1 Merged in fix/SW-3087-price-details-error (pull request #2402)
fix(SW-3087): Added missing property that caused error in PriceDetailsModal

* fix(SW-3087): Added missing property that caused error in PriceDetailsModal


Approved-by: Arvid Norlin
Approved-by: Matilda Landström
2025-06-23 08:45:01 +00:00
Anton Gunnarsson
846fd904a6 Merged in feat/sw-2859-set-up-shared-trpc-package (pull request #2319)
feat(SW-2859): Create trpc package

* Add isEdge, safeTry and dataCache to new common package

* Add eslint and move prettier config

* Clean up tests

* Create trpc package and move initialization

* Move errors and a few procedures

* Move telemetry to common package

* Move tokenManager to common package

* Add Sentry to procedures

* Clean up procedures

* Fix self-referencing imports

* Add exports to packages and lint rule to prevent relative imports

* Add env to trpc package

* Add eslint to trpc package

* Apply lint rules

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* Fix lang imports


Approved-by: Linus Flood
2025-06-18 12:14:20 +00:00
Simon.Emanuelsson
85acd3453d Merged in feat/SW-1719-strikethrough-rates (pull request #2266)
Feat/SW-1719 strikethrough rates

* feat(SW-1719): Strikethrough rate if logged in on regular rate cards

* feat(SW-1719): Strikethrough rate if logged in on rate summary

* feat(SW-1719): Strikethrough rate if logged in on mobile rate summary

* feat(SW-1719): Strikethrough rate if logged in on enter details

* feat(SW-1719): Strikethrough rate support for multiple rooms

* feat(SW-1719): booking receipt fixes on confirmation page

* feat(SW-1719): improve initial total price calculation

* feat: harmonize enter details total price to use one and the same function


Approved-by: Michael Zetterberg
2025-06-13 12:01:16 +00:00
Christian Andolf
c545ed2fe2 Merged in refactor/design-system-divider (pull request #2354)
refactor: move divider to design system

Approved-by: Arvid Norlin
2025-06-13 09:38:10 +00:00
Christian Andolf
9551a629fa refactor: move divider to design system
remove not used variants and duplicate colors
2025-06-13 11:27:50 +02:00
Joakim Jäderberg
180a100140 Merged in fix/SW-2964-hide-booking-code-switcher (pull request #2345)
fix: as a temporary fix hide booking code switcher and add a way to do a search without bookingcode

* fix: as a temporary fix hide booking code switcher and add a way to do a search without bookingcode


Approved-by: Linus Flood
2025-06-13 07:07:22 +00:00
Bianca Widstam
ecd8d81b80 Merged in fix/update-hotel-card-select-hotel-mobile (pull request #2327)
fix: left aligned description text on hotel card on select hotel page

* fix: update hotel card from peter suggestions


Approved-by: Christian Andolf
Approved-by: Matilda Landström
2025-06-12 12:25:12 +00:00
Bianca Widstam
db5f79c1d3 Merged in fix/SW-2986-select-rate-breakfast-message (pull request #2315)
fix(SW-2986): breakfast message on other languages break ui select rate

* fix(SW-2986): breakfast message on other languages break ui select rate

* fix(SW-2155

* fix(SW-2986): remove redundant css


Approved-by: Christian Andolf
2025-06-09 12:25:13 +00:00
Anton Gunnarsson
bff34b034e Merged in feat/sw-2857-refactor-booking-flow-url-updates (pull request #2302)
feat(SW-2857): Refactor booking flow url updates

* Add support for removing parameters when using initial values in serializeSearchParams

* Don't manually write search params in rate store

* Booking is already from live search params so no need

* Fix input type in serializeBookingSearchParams


Approved-by: Linus Flood
2025-06-09 09:16:22 +00:00
Hrishikesh Vaipurkar
e3f4cfb738 Merged in fix/SW-2717-select-hotel-booking-codes- (pull request #2270)
fix: SW-2717 Updated filter display rules

* fix: SW-2717 Updated filter display rules

* fix: SW-2717 Fixed chip button trigger popover after next upgrade

* SW-2717 Optimised code


Approved-by: Erik Tiekstra
2025-06-05 07:14:49 +00:00
Bianca Widstam
984805ea8d Merged in feat/SW-1936-ui-room-card (pull request #2268)
feat(SW-1936): update room card ui

* feat(SW-1936): update room card ui


Approved-by: Linus Flood
2025-06-03 12:51:33 +00:00
Christian Andolf
726ea44105 Merged in fix/consistent-link-colors (pull request #2245)
feat: update links default color to match design documents

Approved-by: Michael Zetterberg
2025-06-02 14:38:16 +00:00
Anton Gunnarsson
03468ad824 Merged in fix/refactor-booking-flow-search-params (pull request #2148)
Fix: refactor booking flow search params

* wip: apply codemod and upgrade swc plugin

* wip: design-system to react 19, fix issues from async (search)params

* Prepare new parse function for booking flow search params

* Prepare serialize function for booking flow search params

* Improve handling of comma separated arrays

* Slightly refactor for readability

* Next abstracts URLSearchParams so handle the abstraction instead

* Refactor booking widget to use new search params parsing

* Rename search param functions

* Refactor select-hotel to use new search param parser

* Use new search params parser in select-rate and details

* Fix hotelId type

* Avoid passing down search params into BookingWidget components

* More updates to use new types instead of SearchParams<T>

* Remove types SelectHotelSearchParams and AlternativeSelectHotelSearchParams

* Fix parseBookingWidgetSearchParams return type

* Add error handling to booking search param parsers

* Fix modifyRateIndex handling in details page

* Clean up

* Refactor booking widget search param serializing to util function

* Move start page booking widget search param parsing to page

* Use new search param serializer in HandleErrorCallback

* Delete convertSearchParamsToObj & convertObjToSearchParams


Approved-by: Michael Zetterberg
2025-06-02 13:38:01 +00:00
Christian Andolf
b3b3704c86 feat: update links default color to match design documents 2025-06-02 15:34:40 +02:00
Anton Gunnarsson
cbf9e7b7c2 Merged in chore/next15 (pull request #1999)
chore (SW-834): Upgrade to Next 15

* wip: apply codemod and upgrade swc plugin

* wip: design-system to react 19, fix issues from async (search)params

* wip: fix remaining issues from codemod

serverClient is now async because context use headers()
getLang is now async because it uses headers()

* Minor cleanup

* Inline react-material-symbols package

Package is seemingly not maintained any more and doesn't support
React 19. This copies the package source into `design-system`,
makes the necessary changes for 19 and export it for others to use.

* Fix missing awaits

* Disable modal exit animations

Enabling modal exit animations via isExiting prop is causing
modals to be rendered in "hidden" state and never unmount.
Seems to be an issue with react-aria-components,
see https://github.com/adobe/react-spectrum/issues/7563.
Can probably be fixed by rewriting to a solution similar to
https://react-spectrum.adobe.com/react-aria/examples/framer-modal-sheet.html

* Remove unstable cache implementation and use in memory cache locally

* Fix ref type in SelectFilter

* Use cloneElement to add key prop to element


Approved-by: Linus Flood
2025-06-02 11:11:50 +00:00
Anton Gunnarsson
7e97b74c18 Merged in chore/remove-unused-code (pull request #2229)
Remove unused code

* Remove unused scandic-web files

* Remove unused exports


Approved-by: Joakim Jäderberg
2025-05-30 12:41:18 +00:00
Christian Andolf
8e1a83ee7d fix(SW-2172): update sidepeek buttons to use new ones for accessibility
updated enter details header overlay to match design

updated change room button to use new one for accessibility

other minor fixes to match design
2025-05-27 12:05:04 +02:00
Tobias Johansson
f77202f58b Merged in fix/SW-2249-missing-currency (pull request #2159)
fix(SW-2249): Added default currency to summary and price details modal

* fix(SW-2249): Added default currency to summary and price details modal


Approved-by: Hrishikesh Vaipurkar
2025-05-26 06:51:57 +00:00
Joakim Jäderberg
231ea05348 Merged in fix/refetching-availability-on-select (pull request #2204)
don't use rateCode to determine if bookingCode should come from the room or the 'big' input

* don't use rateCode to determine if bookingCode should come from the room or the 'big' input


Approved-by: Linus Flood
2025-05-23 09:55:35 +00:00
Simon Emanuelsson
5ca30d02a0 feat: keep inventory of bedselections 2025-05-22 09:37:52 +00:00
Joakim Jäderberg
39b89c5d51 Merged in fix/SW-2890-select-rate-not-updating (pull request #2190)
fix: select-rate didn't update results when switching back to a recent search SW-2890

* fix: select-rate didn't update results when switching back to a recent search


Approved-by: Linus Flood
2025-05-22 09:21:46 +00:00
Hrishikesh Vaipurkar
dfac13f9ad Merged in bug/SW-2881-mobile-browsers-select-rate- (pull request #2183)
bug: SW-2881 Fixed corporate cheques and redemption rate summary mobile

* bug: SW-2881 Fixed corporate cheques and redemption rate summary mobile


Approved-by: Niclas Edenvin
2025-05-21 13:52:45 +00:00
Niclas Edenvin
c55e28a2ac Merged in fix/SW-2651-scroll-multiroom (pull request #2174)
fix(SW-2651): now scrolling after choosing the last room

* fix(SW-2651): now scrolling after choosing the last room


Approved-by: Bianca Widstam
2025-05-21 08:43:49 +00:00
Michael Zetterberg
f3936f41d8 Merged in fix/label-sync (pull request #2163)
fix: english label sync

* fix: english label sync

* fix: sync from Lokalise


Approved-by: Linus Flood
2025-05-21 04:11:22 +00:00
Bianca Widstam
a560f49c21 Merged in fix/SW-2629-hotelCard-new-design-mobile (pull request #2132)
fix(SW-2629): add new design for mobile

* fix(SW-2629): add new design for mobile

* fix(SW-2629): remove redundant brackets

* fix(SW-2629): pr comments

* fix(SW-2629): hydration error


Approved-by: Christian Andolf
2025-05-20 13:33:17 +00:00
Joakim Jäderberg
3de4f9e406 Merged in fix/SW-2827-availability-for-old-dates (pull request #2158)
fix: add error handling for hotel room availability

* fix: add error handling for hotel room availability

* fix: update error codes

* fix: have one error message to rule them all. them as in permutations of invalid dates


Approved-by: Linus Flood
2025-05-20 12:25:36 +00:00
Tobias Johansson
f4ef5a342f Merged in fix/SW-2428-room-preferences-pageview (pull request #2095)
fix(SW-2428): read room packages from search param in select rate tracking

* fix(SW-2428): read room packages from search param in select rate tracking


Approved-by: Bianca Widstam
2025-05-20 07:15:53 +00:00
Matilda Landström
ccaf705015 Merged in feat/SW-2505-alternative-hotels-link (pull request #2080)
fix(SW-2505): alternative hotels link

* fix(SW-2505): handle no chosen room


Approved-by: Bianca Widstam
2025-05-13 13:09:54 +00:00
Matilda Landström
ccda1d6cad Merged in feat/SW-2505-alternative-hotels-link (pull request #2065)
fix(SW-2505): hide alternative hotels link when packages are added

* fix(SW-2505): hide alternative hotels link when packages are added


Approved-by: Bianca Widstam
2025-05-13 12:16:35 +00:00
Tobias Johansson
13261d425c Merged in feat/SW-2703-mobile-summary-improvements (pull request #2060)
Feat/SW-2703 mobile price summary improvements

* feat(SW-2703): fixes to select rate price summary

* feat(SW-2703): fixes enter details summary mobile

* fix: z-index issue related to booking widget popover

* fix

* fix: added accessibility props to overlay div

* fix: added button inside header

* fix: rename aria button


Approved-by: Michael Zetterberg
2025-05-13 09:22:34 +00:00
Simon.Emanuelsson
1108105580 Merged in feat/SW-1762 (pull request #2050)
feat: make enter details bottom sheet pixed, and add spacing at the bottom of page

* feat: make enter details bottom sheet pixed, and add spacing at the bottom of page


Approved-by: Arvid Norlin
2025-05-12 10:19:39 +00:00
Hrishikesh Vaipurkar
74a5b5748a Merged in fix/SW-2642-select-hotel-corporate-ch (pull request #2003)
fix: SW-2642 Fixed corporate chq and voucher rates city search

* fix: SW-2642 Fixed corporate chq and voucher rates city search

* fix: SW-2642 Fixed no availability alert for all hotels

* fix: SW-2642 Combined flags to suitable variable

* fix: SW-2642 Fixed map view to show prices


Approved-by: Arvid Norlin
2025-05-08 10:46:05 +00:00
Simon Emanuelsson
a99e434d84 feat: move room charge to top in price details modal 2025-05-08 10:38:44 +00:00
Christian Andolf
f681fa7675 Merged in chore/replace-corner-radius-variable-with-new (pull request #1943)
chore: replace old border-radius variables with new tokens

Approved-by: Erik Tiekstra
2025-05-05 11:24:48 +00:00
Hrishikesh Vaipurkar
d2bbc59f47 Merged in fix/SW-2602-select-hotel-page-booking-code (pull request #1941)
Fix/SW-2602 select hotel page booking code filtering

* fix: SW-2602 Fixed booking code filtering

* fix: SW-2602 Fixed lint issues


Approved-by: Niclas Edenvin
2025-05-05 09:17:44 +00:00
Christian Andolf
d6b70edfa3 chore: replace old border-radius variables with new tokens 2025-05-05 11:11:37 +02:00
Arvid Norlin
0c7836fa59 Merged in fix/SW-2553-sidepeeks (pull request #1919)
Fix/SW-2553 sidepeeks

* fix(SW-2553): apply sidepeek display logic

* chore: move convertToChildType and getPriceType utils

* fix: apply PR requested changes

* fix(SW-2553): fix roomNumber for multiroom

* fix(SW-2553): fix sidepeek for my-stay page


Approved-by: Michael Zetterberg
Approved-by: Bianca Widstam
Approved-by: Matilda Landström
2025-05-02 15:10:34 +00:00