Commit Graph

163 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
Anton Gunnarsson
01ca2b4897 Merged in feat/sw-2867-move-user-router-to-trpc-package (pull request #2428)
Move user router to trpc package

* 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

* Move partners router to trpc package

* Move autocomplete router to trpc package

* Move booking router to trpc package

* Remove translations from My Pages navigation trpc procedure

* Move navigation router to trpc package

* Move user router to trpc package

* Merge branch 'master' into feat/sw-2862-move-booking-router-to-trpc-package

* Merge branch 'feat/sw-2862-move-booking-router-to-trpc-package' into feat/sw-2865-move-navigation-router-to-trpc-package

* Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package

* Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package

* Merge branch 'master' into feat/sw-2865-move-navigation-router-to-trpc-package

* Merge branch 'feat/sw-2865-move-navigation-router-to-trpc-package' into feat/sw-2867-move-user-router-to-trpc-package

* Merge branch 'master' into feat/sw-2867-move-user-router-to-trpc-package


Approved-by: Linus Flood
2025-06-27 07:07:49 +00:00
Anton Gunnarsson
e572d9e7e9 Merged in feat/sw-2862-move-booking-router-to-trpc-package (pull request #2421)
feat(SW-2861): Move booking router to trpc package

* 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

* Move partners router to trpc package

* Move autocomplete router to trpc package

* Move booking router to trpc package

* Merge branch 'master' into feat/sw-2862-move-booking-router-to-trpc-package


Approved-by: Linus Flood
2025-06-26 13:21:16 +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
ebc90a825d Merged in fix/SW-3020-tracking-card-type (pull request #2431)
fix(SW-3020)-tracking-card-type

* fix(SW-3020): add card type for guarantee success

* fix(SW-3020): fix pr comment


Approved-by: Tobias Johansson
2025-06-25 14:08:55 +00:00
Tobias Johansson
15adca9eb1 Merged in fix/SW-2707-no-availability-message (pull request #2420)
fix(SW-2707): Added new error code and set alert again when errorCode is changed

* fix(SW-2707): Added new error code and set alert again when errorCode is changed


Approved-by: Michael Zetterberg
2025-06-25 11:13:47 +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
Tobias Johansson
8c4715dd24 Merged in feat/SW-2680-tracking-fixes (pull request #2373)
fix(SW-2680): Added new properties used for tracking

* fix(SW-2680): Added new properties used for tracking


Approved-by: Michael Zetterberg
2025-06-25 08:56:37 +00:00
Bianca Widstam
5c3b30ea93 Merged in fix/SW-3020-paymentInfo-tracking (pull request #2403)
fix(SW-3020): add correct paymentInfo in booking flow and ancillary flow

* fix(SW-3020): add correct paymentInfo in booking flow and ancillary flow

* fix(SW-3020): fix pr comments


Approved-by: Tobias Johansson
2025-06-24 13:38:30 +00:00
Bianca Widstam
f08d3330b9 Merged in fix/SW-3093-checkbox-rewardnights-sms (pull request #2422)
fix(SW-3093): add sms checkbox for reward night on enter details

* fix(SW-3093): add sms checkbox for reward night on enter details


Approved-by: Linus Flood
Approved-by: Matilda Landström
2025-06-24 12:43:02 +00:00
Arvid Norlin
438de66a1f Merged in feat/SW-3076 (pull request #2416)
feat(SW-3076: change phone country code on country select)

* feat(SW-3076: change phone country code on country select)


Approved-by: Simon.Emanuelsson
2025-06-24 09:47:18 +00:00
Christian Andolf
59745dc61a fix(SW-3085): restore missing form id 2025-06-19 13:25:24 +02: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
2f553bb945 feat: change GLA to be more clear to the user 2025-06-18 11:43:53 +00:00
Christian Andolf
6ca79d6bab chore: replace old primary background token with new one 2025-06-17 15:37:26 +02:00
Christian Andolf
f559703de7 Merged in fix/parse-phonenumber-before-submit (pull request #2376)
fix: now parses phone number before submitting on edit profile and signup

Approved-by: Linus Flood
2025-06-17 09:03:22 +00:00
Christian Andolf
0b8e3edc15 fix: now parses phone number before submitting on edit profile and signup 2025-06-17 10:48:19 +02:00
Simon Emanuelsson
07a764211f feat: use correct description for beds in sidepeek 2025-06-16 13:43:29 +00:00
Hrishikesh Vaipurkar
698c424f21 Merged in fix/SW-2950-validation-rule-for-zipcode- (pull request #2360)
Fix: SW-2950 Updated zip code validation rule with regex

* Fix: SW-2950 Updated zip code validation rule with regex

* fix: SW-2950 Removed non-english characters from postal code regex


Approved-by: Christian Andolf
2025-06-16 08:32:46 +00:00
Christian Andolf
434b5dbdb2 Merged in fix/revert-numeric-inputmode-zipcode (pull request #2362)
fix: revert numeric inputmode zipcode

Approved-by: Linus Flood
2025-06-16 06:58:24 +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
8b5e8aecae Merged in fix/phone-country-code-fix (pull request #2357)
fix: remove country code from prefilled phone input

Approved-by: Simon.Emanuelsson
2025-06-13 11:01:40 +00:00
Christian Andolf
430cc6f644 fix: revert numeric inputmode zipcode 2025-06-13 11:33:04 +02: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
Christian Andolf
9da986f554 fix: extrapolate phone number parsing for re-usage in edit profile
move error messages to message handler
2025-06-13 10:46:15 +02:00
Christian Andolf
d01db033ae fix(LOY-251): numeric inputmode on inputs for mobile numeric keyboard 2025-06-12 11:10:27 +02:00
Tobias Johansson
ead822fa62 Merged in fix/SW-2679-tracking-signup-details-forms (pull request #2236)
feat(SW-2679): Added form tracking for checkout and signup

* feat(SW-2679): Added form tracking for checkout and signup

* fix(SW-2679): fixes from review


Approved-by: Michael Zetterberg
2025-06-10 06:35:13 +00:00
Linus Flood
0a1f1c5b5c Merged in feat/adobe-taget-ids (pull request #2307)
feat(adobe target): add some data-ids to section in enter detail

* feat(adobe target): add some data-ids to section in enter detail
2025-06-09 07:39:01 +00:00
Simon Emanuelsson
dea598d851 feat: use nationalnumber for valid phone numbers instead of international 2025-06-09 08:44:54 +02:00
Niclas Edenvin
d3ba9d4a99 Merged in fix/SW-2290-ui-for-signup (pull request #2224)
Fix/SW-2290 new ui for signup on enter details page

* fix(SW-2290): New UI for join card


Approved-by: Michael Zetterberg
Approved-by: Tobias Johansson
Approved-by: Bianca Widstam
2025-06-05 07:41:46 +00:00
Simon Emanuelsson
9580281421 fix: allow any type of phone number 2025-06-03 11:54:05 +00:00
Arvid Norlin
79e669020a wip: new PhoneCountryCode Select 2025-06-03 11:54:04 +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
Bianca Widstam
6df8c75d2d Merged in fix/SW-2189-trigger-email-on-blur (pull request #2223)
Fix/SW-2189 trigger on blur

* fix(SW-2189): do not trigger email when typing

* fix(SW-2189): use onblur on multiroom as well


Approved-by: Tobias Johansson
2025-06-02 11:03:36 +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
Niclas Edenvin
44e648e758 Merged in fix/SW-2292-new-hotel-header (pull request #2253)
fix(SW-2292): new design for hotel header on enter details

* fix(SW-2292): new design for hotel header on enter details


Approved-by: Michael Zetterberg
2025-05-28 12:19:11 +00:00
Niclas Edenvin
1d733c5ca3 Merged in fix/SW-2887-complete-booking-button-always-enabled (pull request #2227)
fix(SW-2887): don't disable the booking button
The complete button shouldn’t be disabled based on validation. This was already correct in desktop, but now it’s also correct in mobile.

* fix(SW-2887): don't disable the booking button


Approved-by: Tobias Johansson
Approved-by: Christian Andolf
2025-05-28 08:11:29 +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
Simon Emanuelsson
39855d3c8a fix: trigger memberPrice modal for membership number too 2025-05-27 10:22:31 +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
Simon Emanuelsson
2ddf31cbed fix: remove autofilldetector since rhf update caused watch to behave differently 2025-05-23 13:57:32 +00:00
Niclas Edenvin
c3e00327de Merged in fix/join-card-toc-link (pull request #2197)
fix: correct terms & conditions link in join card

* fix: correct terms & conditions link in join card


Approved-by: Linus Flood
2025-05-22 12:14:31 +00:00
Anton Gunnarsson
f46bc8f920 Update @hookform/resolvers
In v5 the zod resolver will automatically infer the type for `useForm`.
It's not recommended to manually specify types.
See https://github.com/react-hook-form/resolvers/releases/tag/v5.0.0
2025-05-22 14:00:39 +02:00
Simon Emanuelsson
5ca30d02a0 feat: keep inventory of bedselections 2025-05-22 09:37:52 +00:00
Linus Flood
2ec309354e Merged in fix/my-stay-webview-2 (pull request #2191)
fix: webview - mystay - check if we have webviewToken

* fix: webview - mystay - check if we have webviewToken

* Cleanup


Approved-by: Joakim Jäderberg
2025-05-22 08:38:20 +00:00