Commit Graph

198 Commits

Author SHA1 Message Date
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
Joakim Jäderberg
9b491c5364 Merged in fix/resolve-entry-clearing-cache (pull request #2445)
fix: use shared cache key when revalidating urls

* fix: use shared cache key when revalidating urls


Approved-by: Linus Flood
2025-06-26 06:23:03 +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
Christian Andolf
372fcccbf1 Merged in feat/LOY-276-sas-hero-image (pull request #2411)
feat(LOY-276): add hero image to account page

Approved-by: Erik Tiekstra
2025-06-25 09:40:47 +00:00
Linus Flood
7a56d21a3e Merged in feat/SW-3050-webviews (pull request #2429)
Feat/SW-3050 webviews

Approved-by: Anton Gunnarsson
2025-06-25 07:44:33 +00:00
Christian Andolf
3f6127b861 feat(LOY-276): add hero image to account page 2025-06-24 14:54:54 +02:00
Erik Tiekstra
891108791c feat(SW-2264): Added campaign overview page
Approved-by: Matilda Landström
2025-06-19 15:19:56 +00:00
Bianca Widstam
46e7f33ab6 Merged in fix/SW-3083-alternative-hotels-page-not-found (pull request #2396)
fix(SW-3083): alternative hotels compare locations with cityIdentifier

* fix(SW-3083): alternative hotels compare locations with cityIdentifier

* fix(SW-3083): rename cityName

* fix(SW-3083): rename to cityIdentifier


Approved-by: Anton Gunnarsson
2025-06-19 08:08:33 +00:00
Hrishikesh Vaipurkar
64a56b7050 Merged in fix/SW-3026-prod---users-are-not-focused-on- (pull request #2379)
fix: SW-3026 Fixed scroll issue

* fix: SW-3026 Fixed scroll issue

* fix: SW-3026 Moved to global solution for scroll to top after page navigation


Approved-by: Tobias Johansson
Approved-by: Linus Flood
2025-06-18 12:27:58 +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
Chuma Mcphoy (We Ahead)
2101b79db1 Merged in feat/LOY-230-Microsoft-Entra-ID-Auth (pull request #2113)
Feat(LOY-230): DTMC Routes with Entra ID Auth & Error Page Handling

* feat(LOY-230): Link Scandic Friends and Azure accounts

* fix(LOY-230): remove employee id param setting

* fix(LOY-230): return token in jwt callback for auth.dtmc.ts


Approved-by: Michael Zetterberg
Approved-by: Christian Andolf
2025-06-18 10:22:04 +00:00
Erik Tiekstra
1e039febaf fix(SW-2933): Making the hotels/city listing render correctly with active filter on page load
Approved-by: Christian Andolf
Approved-by: Matilda Landström
2025-06-18 08:42:16 +00:00
Christian Andolf
6ca79d6bab chore: replace old primary background token with new one 2025-06-17 15:37:26 +02:00
Anton Gunnarsson
9f78dd69fe Merged in fix/sw-3035-secure-sas-cookie (pull request #2363)
Add secure to SAS flow cookies

* Add secure to SAS flow cookies

* Reverse NODE_ENV check


Approved-by: Linus Flood
2025-06-16 07:35:44 +00:00
Anton Gunnarsson
e6a15bd685 Merged in fix/3037-point-transfer-incorrect-result (pull request #2368)
Calculate transfered SAS points with exchange rate

* Calculate transfered SAS points with exchange rate


Approved-by: Linus Flood
2025-06-16 07:29:49 +00:00
Anton Gunnarsson
7a3ab92426 Merged in feat/sw-1948-point-transfer-endpoint (pull request #2353)
feat(SW-1948):Add SAS point transfer endpoint

* Add SAS point transfer endpoint


Approved-by: Joakim Jäderberg
2025-06-12 14:06:30 +00:00
Linus Flood
6bf7462ac7 Merged in fix/payment-error (pull request #2342)
Fix/payment error

* fix: dont show not found page when payment fails

* Show error message when payment fails


Approved-by: Anton Gunnarsson
2025-06-11 17:49:27 +00:00
Tobias Johansson
98983cb44a Merged in fix/SW-3018-payment-cancel-error (pull request #2339)
Fix/SW-3018 payment cancel error

* fix(SW-3018): cancel payment error when get booking in callback

* fix: wrong status code


Approved-by: Linus Flood
2025-06-11 15:22:39 +00:00
Anton Gunnarsson
048a477e52 Merged in feat/common-package (pull request #2333)
feat: Add common package

* Add isEdge, safeTry and dataCache to new common package

* Add eslint and move prettier config

* Fix yarn lock

* Clean up tests

* Add lint-staged config to common

* Add missing dependencies


Approved-by: Joakim Jäderberg
2025-06-11 13:08:39 +00:00
Linus Flood
3b9d01af9d Merged in feat/sw-3006-timeout-fetch (pull request #2335)
feat(SW-3006): added default timeout to all requests

* feat(sw-3006): added default timeout to all requests

* Fixed spreading


Approved-by: Joakim Jäderberg
2025-06-11 12:39:58 +00:00
Erik Tiekstra
b4a05dae0b feat(SW-2285): Added campaign essentials block on campaign page
Approved-by: Christian Andolf
Approved-by: Matilda Landström
2025-06-11 08:14:00 +00:00
Linus Flood
9eb15e232b Merged in feat/sw-2998-font-optimization (pull request #2323)
feat(SW-2998) - Optimize font loading

* feat(SW-2998) - Optimize font loading

* display swap on fonts


Approved-by: Anton Gunnarsson
2025-06-10 12:21:55 +00:00
Hrishikesh Vaipurkar
287a9ad6a3 Merged in fix/SW-2506-login-with-verification-link- (pull request #2316)
fix: SW-2506 Booking flow login with magic link fix

* fix: SW-2506 Booking flow login with magic link fix


Approved-by: Michael Zetterberg
2025-06-10 10:54:30 +00:00
Erik Tiekstra
ace5519869 feat(SW-2265): Added campaign-page
Approved-by: Matilda Landström
2025-06-10 06:35:43 +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
Erik Tiekstra
52d266b357 fix(SW-2934): Added all sitemap entries as their own url entry, not just as alternates
Approved-by: Linus Flood
2025-06-04 06:57:30 +00:00
Linus Flood
800b329998 Merged in fix/my-stay-webview-3 (pull request #2281)
feat/my-stay-webview - check if user else redirect to refresh page

* feat/my-stay-webview - check if user else redirect to refresh page


Approved-by: Joakim Jäderberg
2025-06-04 06:26:42 +00:00
Linus Flood
68763ee1fd Merged in fix/sitemap-fixes (pull request #2280)
fix:sitemap - added null check and correct content-type

* fix:sitemap - added null check and correct content-type

* Revert test code


Approved-by: Erik Tiekstra
2025-06-03 14:48:24 +00:00
Anton Gunnarsson
dd4ef527df Merged in chore/eslint9 (pull request #2029)
chore: Update to ESLint 9

* wip: apply codemod and upgrade swc plugin

* Update eslint to 9 in scandic-web

apply code mod to config
fix existing lint issues

* Remove uneccessary fixupConfigRules

* Update eslint to 9 in design-system

* Add lint turbo dependency

* Move redis-api to eslint and prettier instead of biome

* Simplify eslint configs

* Clean up

* Apply linting


Approved-by: Linus Flood
2025-06-03 14:26:44 +00:00
Simon Emanuelsson
9580281421 fix: allow any type of phone number 2025-06-03 11:54:05 +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
Joakim Jäderberg
ef3b29b9f1 Merged in fix/SW-2945-cache-timings-for-resolve-entry (pull request #2264)
Fix/SW-2945 cache timings for resolve entry

* fix: cache resolveentry() harder and revalidate on publish instead

* logging: use debug logging for requests and add logging when tll is invalid


Approved-by: Linus Flood
2025-06-02 08:35:55 +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
Joakim Jäderberg
26b005d72a Merged in fix/cache-graphql-data (pull request #2248)
fix: add missing cache for cms data

* fix: cache cms data


Approved-by: Linus Flood
2025-05-28 08:28:21 +00:00
Christian Andolf
88687c512f fix: set default text color on body 2025-05-26 16:56:27 +02:00
Erik Tiekstra
d73f8d844e feat(SW-1960): Improved scrolling and tabnavigation on hotel pages
Approved-by: Matilda Landström
2025-05-26 12:32:18 +00:00
Christian Andolf
aa06a0654d fix: cleanup profile pages in renaming to follow naming convention
cleanup profile page html to be valid

replace old temp design system components with new ones

divider is now correctly an hr element

less section elements to be valid html
2025-05-23 09:20:21 +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
Hrishikesh Vaipurkar
b3d5326adb Merged in feat/SW-1232-filter-improvements-select-hot (pull request #2168)
feat: SW-1232 Implemented disabling of filters and show hotel count

* feat: SW-1232 Implemented disabling of filters and show hotel count

* feat: SW-1232 Optimised code


Approved-by: Niclas Edenvin
2025-05-21 12:27:11 +00:00
Linus Flood
ad5ec80645 Merged in feat/sw-2855-urls (pull request #2177)
feat: sw-2855 urls

* feat: sw-2855 urls


Approved-by: Joakim Jäderberg
2025-05-21 09:11:02 +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
Hrishikesh Vaipurkar
2cc5574f52 Merged in feat/SW-2340-aa-tracking-my-stay-pageview- (pull request #2133)
feat: SW-2340 Implemented tracking on my-stay, webview my-stay and receipt page

* feat: SW-2340 Implemented tracking on my-stay, webview my-stay and receipt page

* feat: SW-2340 Updated webview tracking

* feat: SW-2340 Updated receipt tracking


Approved-by: Linus Flood
2025-05-19 08:05:43 +00:00
Joakim Jäderberg
4f0c61f68f Merged in revert-version (pull request #2128)
revert including version in layouts and api responses

* revert including version in layouts and api responses


Approved-by: Linus Flood
2025-05-16 12:57:17 +00:00
Joakim Jäderberg
f40a666170 Merged in feat/add-version-to-responses (pull request #2118)
feature: add a version tag to responses SW-2792

* feature: add a version tag to responses


Approved-by: Linus Flood
2025-05-16 11:38:41 +00:00
Linus Flood
96821c7a6f Merged in feat/my-stay-masking (pull request #2116)
Mask values on my-stay and receipt pages SW-2788

* Mask values on my-stay and receipt pages


Approved-by: Joakim Jäderberg
2025-05-16 09:30:04 +00:00