Commit Graph

15 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
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
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
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
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
Bianca Widstam
cdfcc3623b Merged in fix/SW-2837-tracking-pageType-enter-details (pull request #2157)
fix(SW-2837): change page type for enter details

* fix(SW-2837): change page type for enter details


Approved-by: Christian Andolf
2025-05-20 09:43:22 +00:00
Tobias Johansson
02b26e7965 Merged in fix/SW-2668-tracking-room-details-missing (pull request #2015)
fix(SW-2668): added search term and room details to tracking

* fix(SW-2668): added search term and room details to tracking

* fix: change to optional type


Approved-by: Christian Andolf
Approved-by: Matilda Landström
2025-05-08 14:13:51 +00:00
Tobias Johansson
25ae368210 Merged in fix/SW-1353-and-SW-2497-tracking-fixes (pull request #1977)
fix: tracking fixes SW-1353 and SW-2497

* fix: tracking fixes

* fix: remove console log and rename variable


Approved-by: Michael Zetterberg
Approved-by: Arvid Norlin
2025-05-06 11:15:52 +00:00
Matilda Landström
8bff7f2cf2 Merged in fix/SW-2440-breakfast-tracking (pull request #1967)
fix(SW-2440): correct total price

* fix(SW-2440): correct total price

* Merge branch 'fix/SW-2440-breakfast-tracking' of bitbucket.org:scandic-swap/web into fix/SW-2440-breakfast-tracking

* fix(SW-2440): multiply by number of nights for breakfast tracking


Approved-by: Niclas Edenvin
2025-05-06 08:52:20 +00:00
Matilda Landström
5c6f468bd6 Merged in fix/SW-2440-breakfast-tracking (pull request #1947)
Fix/SW-2440 breakfast tracking

* fix(SW-2440): fix confirmation ancillaries tracking

* fix(SW-2440): add breakfast ancillary when preselected


Approved-by: Bianca Widstam
2025-05-05 12:27:25 +00:00
Tobias Johansson
71f1e9fe2c Merged in fix/tracking-fixes (pull request #1930)
Fix/tracking fixes

* fix: remove hotelInfo and paymentInfo when user reloads page on confirmation page

* fix: clean session storage item on unmount

* fix: commented out hard navigation hook

* fix: update price calculation on room ancillary in tracking

* fix: update discount calculation

* fix: add space between fns

* fix: allow useSoftNavigation to fire pageview again on same pathname

* fix: prevent bedSelection and breakfastSelection from tracking twice


Approved-by: Hrishikesh Vaipurkar
2025-05-03 07:27:54 +00:00
Bianca Widstam
8931fe5312 Merged in fix/SW-2438-change-to-breakfast-buffet-remove-dash (pull request #1918)
fix(SW-2438): change to breakfast buffet always and replace dash with empty string

* fix(SW-2438): change to breakfast buffet always and replace dash with empty string

* fix(SW-2438): remove none from ageOfChildren


Approved-by: Tobias Johansson
Approved-by: Matilda Landström
2025-04-30 09:46:03 +00:00
Hrishikesh Vaipurkar
05c8be489f Merged in feat/SW-1355-reward-night-booking-track-3 (pull request #1913)
feat: SW-1355 Updated tracking to localPrice instead of requestedPrice


Approved-by: Michael Zetterberg
2025-04-29 20:53:49 +00:00
Bianca Widstam
03902da897 Merged in fix/SW-2438-remove-breakfast-tracking (pull request #1872)
fix(SW-2438): remove breakfast tracking on enter details

* fix(SW-2438): remove breakfast tracking on enter details

* fix(SW-2438): show breakfastOption if already chosen on page load

* fix(SW-2438): if breakfast option does not exists (scandic go) remove breakfastOption from tracking

* fix(SW-2438): fix merge conflicts

* fix(SW-2438): fix comment

* fix(SW-2438): fix comment

* fix(SW-2438): fix merge


Approved-by: Tobias Johansson
Approved-by: Matilda Landström
2025-04-29 10:46:52 +00:00