Commit Graph

140 Commits

Author SHA1 Message Date
Anton Gunnarsson
800dc5c3c1 Merged in feat/sw-3225-move-parking-information-to-booking-flow (pull request #2614)
feat(SW-3225): Move ParkingInformation to design-system

* Inline ParkingInformation types to remove trpc dependency

* Move ParkingInformation to design-system

* Move numberFormatting to common package

* Add deps to external

* Fix imports and i18n script

* Add common as dependency

* Merge branch 'master' into feat/sw-3225-move-parking-information-to-booking-flow


Approved-by: Linus Flood
2025-08-12 12:36:31 +00:00
Bianca Widstam
3262a71184 Merged in fix/SW-3198-strikethrough-price-mobile (pull request #2622)
fix(SW-3198): show strikethrough price only if price is higher than regular price

* fix(SW-3198): show strikethrough price only if price is higher than regular price

* fix(SW-3198): reverse logic


Approved-by: Hrishikesh Vaipurkar
2025-08-12 12:19:02 +00:00
Hrishikesh Vaipurkar
54e57843d5 Merged in feat/SW-3224-move-bookingcode-filter-to-booking-flow (pull request #2608)
feat(SW-3224): Move bookingcode filter to the booking-flow package

* feat(SW-3224): Moved bookingcode filter to the booking-flow package


Approved-by: Anton Gunnarsson
2025-08-11 12:10:59 +00:00
Bianca Widstam
a80df428cf Merged in fix/SW-2368-change-ui-modify-button (pull request #2609)
fix(SW-2368): change ui for modify button until chip component created

* fix(SW-2368): change ui for modify button until chip component created


Approved-by: Matilda Landström
2025-08-11 06:13:46 +00:00
Bianca Widstam
329debf115 Merged in fix/SW-2523-filter-select-rate-small-screen (pull request #2607)
fix(SW-2523): filter scrollable for desktop with small height

* fix(SW-2523): filter scrollable for desktop with small height


Approved-by: Hrishikesh Vaipurkar
2025-08-08 11:37:46 +00:00
Hrishikesh Vaipurkar
6dd95d4a4a Merged in fix/SW-2367-mobile-ui-correction- (pull request #2603)
Fix/SW-2367 mobile ui correction

* fix(SW-2367): UI updates

* fix(SW-2367): Optimised code


Approved-by: Bianca Widstam
2025-08-07 13:00:11 +00:00
Hrishikesh Vaipurkar
d391076125 Merged in fix/SW-3213-select-rate-page-public-prices (pull request #2596)
fix(SW-3213): Fixed booking code rates shown after removing the booking code via chip close icon

* fix(SW-3213): Fixed booking code rates shown after removing the booking code via chip close icon

* fix(SW-3213): Fixed multiroom room scenario


Approved-by: Anton Gunnarsson
2025-08-06 10:56:12 +00:00
Anton Gunnarsson
41efb3a7b3 Merged in feat/sw-3207-refactor-select-hotel-tracking (pull request #2587)
feat(SW-3207): Refactor select-hotel tracking

* Refactor select-hotel tracking


Approved-by: Bianca Widstam
2025-08-06 08:35:48 +00:00
Anton Gunnarsson
1bd8fe6821 Merged in feat/sw-2879-booking-widget-to-booking-flow-package (pull request #2532)
feat(SW-2879): Move BookingWidget to booking-flow package

* Fix lockfile

* Fix styling

* a tiny little booking widget test

* Tiny fixes

* Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package

* Remove unused scripts

* lint:fix

* Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package

* Tiny lint fixes

* update test

* Update Input in booking-flow

* Clean up comments etc

* Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package

* Setup tracking context for booking-flow

* Add missing use client

* Fix temp tracking function

* Pass booking to booking-widget

* Remove comment

* Add use client to booking widget tracking provider

* Add use client to tracking functions

* Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package

* Move debug page

* Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package

* Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package

* Merge branch 'master' into feat/sw-2879-booking-widget-to-booking-flow-package


Approved-by: Bianca Widstam
2025-08-05 09:20:20 +00:00
Anton Gunnarsson
6b43022c7d Merged in feat/sw-2873-move-tripadvisorchip-to-booking-flow (pull request #2591)
feat(SW-2873): Move TripAdvisorChip to booking-flow

* Move TripAdvisorChip to booking-flow


Approved-by: Hrishikesh Vaipurkar
2025-08-05 08:39:48 +00:00
Hrishikesh Vaipurkar
33c274bce1 Merged in fix/SW-2926-hotel-special-alerts- (pull request #2580)
fix(SW-2926): Display alerts in booking flow if date range matches search dates and in hotel page if current date is in date range

* fix(SW-2926): Display alerts in booking flow if date range matches search dates and in hotel page if current date is in date range

* fix(SW-2926) Updated hotel alerts with respect to booking dates

* fix(SW-2926): Optimized code


Approved-by: Matilda Landström
2025-08-01 08:26:32 +00:00
Hrishikesh Vaipurkar
eca29fb540 Merged in fix/SW-3091-the-strikethrough-price- (pull request #2567)
fix(SW-3091): Fixed strikethrough price for logged-in user

* fix(SW-3091): Fixed strikethrough price for logged-in user


Approved-by: Anton Gunnarsson
Approved-by: Matilda Landström
2025-07-28 11:20:49 +00:00
Hrishikesh Vaipurkar
5d77be3f0e Merged in fix/SW-3144-prod-mobile-hotel-card-select-rate- (pull request #2560)
fix(SW-3144): Make hotel alert visible bydefault in mobile view on select-rate page

* fix(SW-3144): Make hotel alert visible bydefault in mobile view on select-rate page

* fix: spacing
fix:  show 'all ameneties' button without expanding text

* Merge branch 'master' of bitbucket.org:scandic-swap/web into fix/SW-3144-prod-mobile-hotel-card-select-rate-


Approved-by: Joakim Jäderberg
2025-07-23 09:49:56 +00:00
Hrishikesh Vaipurkar
3356523cb2 Merged in fix/SW-3091-the-strikethrough-price- (pull request #2562)
fix(SW-3091): Fixed strike through price shown same as original price

* fix(SW-3091): Fixed strike through price shown same as original price

* fix(SW-3091): Optimized code

* fix(3091): Strikethrough visibility on mobile booking code


Approved-by: Erik Tiekstra
2025-07-18 10:41:14 +00:00
Hrishikesh Vaipurkar
71c6f4cab3 Merged in chore/SW-3145-move-button (pull request #2527)
chore: SW-3145 Moved tempdesign button to design-system

* chore: SW-3145 Moved tempdesign button to design-system


Approved-by: Anton Gunnarsson
2025-07-07 07:11:18 +00:00
Anton Gunnarsson
923206ee4c Merged in chore/sw-3145-move-subtitle (pull request #2516)
chore(SW-3145): Move Title and Subtitle to design-system

* Move Title and Subtitle to design-system

* Fix export


Approved-by: Linus Flood
2025-07-04 06:22:28 +00:00
Anton Gunnarsson
7ff8fee20e Merged in chore/sw-3145-move-skeleton-shimmer (pull request #2509)
chore(SW-3145): Move SkeletonShimmer to design-system

* Move SkeletonShimmer to design-system


Approved-by: Joakim Jäderberg
2025-07-03 13:10:23 +00:00
Joakim Jäderberg
daf765f3d5 Merged in feature/wrap-logging (pull request #2511)
Feature/wrap logging

* feat: change all logging to go through our own logger function so that we can control log levels

* move packages/trpc to using our own logger

* merge


Approved-by: Linus Flood
2025-07-03 12:37:04 +00:00
Anton Gunnarsson
0ffb40e94b Merged in chore/sw-3145-move-footnote (pull request #2506)
chore(SW-3145): Move Footnote to design-system

* Move Footnote to design-system


Approved-by: Joakim Jäderberg
2025-07-03 08:14:18 +00:00
Anton Gunnarsson
75a377b59e Merged in chore/sw-3145-move-body (pull request #2505)
chore(SW-3145): Move Body component to design-system

* Move Body component to design-system


Approved-by: Joakim Jäderberg
2025-07-03 08:04:36 +00:00
Anton Gunnarsson
a7ac79e429 Merged in chore/sw-3145-move-caption (pull request #2503)
chore(SW-3145): Move Caption to design-system

* Move Caption to design-system

* Mark Caption as deprecated


Approved-by: Linus Flood
Approved-by: Joakim Jäderberg
2025-07-03 07:48:24 +00:00
Anton Gunnarsson
be25be7bb5 Merged in feat/sw-3125-move-client-trpc-setup (pull request #2493)
feat(SW-3125): Move client trpc setup

* Move client trpc to package

* Client setup in partner-sas

* Add todo


Approved-by: Linus Flood
2025-07-01 12:41:28 +00:00
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