Commit Graph

86 Commits

Author SHA1 Message Date
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
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
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
Anton Gunnarsson
879a383b61 Merged in fix/make-city-optional-in-parseSelectHotelSearchParams (pull request #2309)
fix: Make city optional in parseSelectHotelSearchParams

* Make city optional in parseSelectHotelSearchParams


Approved-by: Linus Flood
2025-06-09 09:06:26 +00:00
Hrishikesh Vaipurkar
d626e0f7ae Merged in feat/SW-2653-aa-tracking-click-tracking-on-se (pull request #2301)
feat: SW-2653 Implemented click tracking on Search btn and lang switch

* feat: SW-2653 Implemented click tracking on Search btn and lang switch


Approved-by: Erik Tiekstra
2025-06-09 08:49:39 +00:00
Anton Gunnarsson
4831982e14 Merged in fix/correct-booking-url-array-syntax (pull request #2294)
Fix correct array types in booking flow urls

* Fix correct array types in booking flow urls


Approved-by: Joakim Jäderberg
2025-06-05 07:50:01 +00:00
Simon Emanuelsson
9580281421 fix: allow any type of phone number 2025-06-03 11:54:05 +00:00
Erik Tiekstra
be98c2faf6 feat(SW-1409): Synced tabnavigation headings and section headings on hotel pages
* feat(SW-2409): Added same headings to relevant sidepeeks


Approved-by: Christian Andolf
Approved-by: Matilda Landström
2025-06-03 09:22:28 +00:00
Hrishikesh Vaipurkar
f9e838e77a Merged in fix/SW-2838-in-select-hotel-lang-switch- (pull request #2261)
fix: SW-2838 Use of city identifier instead of city name

* fix: SW-2838 Updated selection to city identifier instead of city name


Approved-by: Christian Andolf
Approved-by: Linus Flood
2025-06-03 07:58:00 +00:00
Joakim Jäderberg
a95ef65d02 Merged in feat/use-hash-for-graphql-cache (pull request #2251)
Feature: Use hash of query+variables for graphql cache instead of gitsha

* feature: use a hash of query+variables as part of the cache key instead of gitsha

* .

* Merge branch 'master' of bitbucket.org:scandic-swap/web into feat/use-hash-for-graphql-cache

* use correct json stringify

* merge

* remove edgeRequest in favor of request

* add more indicative logging


Approved-by: Linus Flood
2025-06-03 06:39:04 +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
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
Joakim Jäderberg
b20c8ce42b Merged in fix/warmup-autocomplete-data-2 (pull request #2218)
fix: chunked data overwrote it self

* fix: chunked data overwrote it self


Approved-by: Linus Flood
2025-05-26 09:39:48 +00:00
Erik Tiekstra
c963891ca7 fix(SW-2758): Using ?s queryparameter again to handle sidepeeks on hotel pages
Approved-by: Matilda Landström
2025-05-26 09:09:52 +00:00
Joakim Jäderberg
196ea2994f Merged in fix/warmup-autocomplete-data (pull request #2212)
warmup autocomplete data

* warmup autocomplete data


Approved-by: Anton Gunnarsson
2025-05-26 08:23:20 +00:00
Anton Gunnarsson
41aa4f26ad Update libphonenumber-js 2025-05-22 14:00:38 +02:00
Joakim Jäderberg
cc34cdcf74 Merged in fix/SW-2848-RTE-with-copied-divs (pull request #2173)
fix: handle when content has copied divs from episervers RTE

* fix: handle when content has copied divs from episervers RTE


Approved-by: Matilda Landström
2025-05-22 11:03:29 +00:00
Bianca Widstam
c4229c2dd2 Merged in fix/SW-2853-tracking-breakfast-ancillaries (pull request #2188)
fix(SW-2853): tracking for breakfast ancillaries

* fix(SW-2853): tracking for breakfast ancillaries

* fix(SW-2853): viewAncillary event fix for breakfast

* fix(SW-2853): pr comment spread room facilities


Approved-by: Tobias Johansson
2025-05-22 10:05:54 +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
Simon Emanuelsson
1f1bcd480b feat: prevent users from selecting the same room when there is no vacancy for it 2025-05-16 13:04:45 +00:00
Bianca Widstam
24e7ab4b71 Merged in fix/SW-2764-remove-ancillaries-breakfast-selection (pull request #2122)
fix(SW-2764): Tracking - remove ancillaries array if no breakfast selected

* fix(SW-2764): remove ancillaries array if no breakfast selected


Approved-by: Tobias Johansson
Approved-by: Joakim Jäderberg
2025-05-16 11:42:56 +00:00
Erik Tiekstra
2401615caa fix(SW-2754): Fixed issue where server rendered html included faulty links
Approved-by: Matilda Landström
2025-05-16 06:21:09 +00:00
Simon Emanuelsson
e082bf2e50 feat: make sure correct data is sent to tracking 2025-05-14 15:10:18 +00:00
Linus Flood
d5b77ae61f Merged in hotfix/gtm (pull request #2070)
Hotfix/gtm

* hotfix: gtm

* wip


Approved-by: Joakim Jäderberg
2025-05-14 05:53:48 +00:00
Joakim Jäderberg
aceb88cb1a Merged in fix/seo-whitelist-scandic-friends (pull request #2071)
fix: SEO whitelist /scandic-friends

* fix: SEO whitelist /scandic-friends

* fix: SEO whitelist /scandic-friends


Approved-by: Linus Flood
2025-05-13 09:35:28 +00:00
Joakim Jäderberg
45d474385c Merged in fix/noindex-contentpages (pull request #2066)
fix: add noindex+nofollow to contentpages

* fix: add noindex+nofollow to contentpages

* fix: move no-index/no-follow to the shared generateMetadata function instead

* remove comment


Approved-by: Erik Tiekstra
2025-05-13 08:29:49 +00:00
Anton Gunnarsson
60af31762b Merged in fix/make-user-loyalty-optional (pull request #2044)
fix: Make loyalty optional on user

* Optional user loyalty

* merge


Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
2025-05-12 09:00:11 +00:00
Michael Zetterberg
8cb63c4947 fix(SW-2116): add compatibility with RefId from Current Web 2025-05-08 11:52:31 +00:00
Michael Zetterberg
baee0ee40c fix(SW-2116): add compatibility with unencoded RefId as input 2025-05-08 11:52:31 +00:00
Michael Zetterberg
b8e9ed2a58 fix(SW-2116): do not replace + with - for encrypted output result 2025-05-08 11:52:31 +00:00
Michael Zetterberg
b910b6a313 feat(SW-2116): Use refId instead of confirmationNumber 2025-05-05 12:26:37 +00:00
Linus Flood
6979ac0c3b Merged in revert-pr-1925 (pull request #1927)
Revert "Feat/sw 2323 find booking (pull request #1925)"

Approved-by: Anton Gunnarsson
2025-05-02 13:05:42 +00:00
Arvid Norlin
7eeb0bbcac feat(SW-2116): avoid passing entire booking object to Room client component 2025-05-02 11:47:14 +02: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
6520bc5bc5 Merged in fix/SW-1879-aa-track-bed-breakfast-pay-3 (pull request #1900)
fix: SW-1879 Updated values in tracking

* fix: SW-1879 Updated bed type value in tracking

* fix: SW-1879 Updated breakfast price to indicate total price


Approved-by: Michael Zetterberg
2025-04-29 10:00:58 +00:00
Bianca Widstam
972d530be8 Merged in fix/SW-1997-tracking-ancillaries-adjust-total (pull request #1893)
fix(SW-1997): productPoints and productPrice should be the total

* fix(SW-1997): productPoints and productPrice should be the total


Approved-by: Matilda Landström
2025-04-29 09:01:02 +00:00
Hrishikesh Vaipurkar
e34d75969a Merged in fix/SW-1879-aa-bed-breakfastpayment- (pull request #1888)
fix: SW-1879 Updated breakfast price to 0 and removed paymentSectionOpen tracking

* fix: SW-1879 Updated breakfast price to 0 and removed paymentSectionOpen tracking


Approved-by: Michael Zetterberg
2025-04-29 07:07:40 +00:00
Joakim Jäderberg
c1505ce50e Merged in feature/warmup (pull request #1887)
* unified warmup function

Approved-by: Linus Flood
2025-04-29 06:18:14 +00:00
Bianca Widstam
416a95d592 Merged in fix/SW-1997-tracking-correct-price-or-points (pull request #1869)
fix(SW-1997): only add points or card if payed with

* fix(SW-1997): only add points or card if payed with

* fix(SW-1997): use buildAncillaries function


Approved-by: Michael Zetterberg
2025-04-28 09:05:55 +00:00
Matilda Landström
d097547ec7 Merged in feat/SW-1755-facility-cards (pull request #1847)
fix(SW-1755): Handle facility card images left or right side

* fix(SW-1755): handle facility card images


Approved-by: Erik Tiekstra
Approved-by: Christian Andolf
2025-04-24 14:42:46 +00:00
Bianca Widstam
77eff2b49c Merged in fix/SW-1997-gla-tracking (pull request #1852)
fix(SW-1997): add price and currency

* fix(SW-1997): add price and currency

* fix(SW-1997): wrap lateArrivalGuaranteee and guaranteedProduct in hotelInfo


Approved-by: Niclas Edenvin
2025-04-24 13:41:29 +00:00
Erik Tiekstra
d827bf04d0 fix(SW-2210): Checking for session inside MyPagesMenu to sync session state 2025-04-24 00:48:42 +02:00
Chuma Mcphoy (We Ahead)
27aef3982e Merged in fix/LOY-222-find-my-booking-urls-for-prod (pull request #1817)
Fix(LOY-222): Find my booking url handling

* fix(LOY-222): adapt findMyBooking url based on HIDE_FOR_NEXT_RELEASE

* feat(LOY-222): add current web paths for findMyBooking in multiple languages

* refactor(LOY-222): better env and new url constructions

* refactor(LOY-222): decouple env var handling from getCurrentWebUrl

* fix(LOY-222): update findMyBooking URL construction to use baseUrl

* fix(LOY-222): simplify findMyBooking URL handling for new web urls

* fix(LOY-222): Update Finnish path for hotel reservation lookup

* refactor(LOY-222): rename PUBLIC_URL to NEXT_PUBLIC_PUBLIC_URL for consistency


Approved-by: Christian Andolf
Approved-by: Linus Flood
2025-04-22 07:03:23 +00:00
Hrishikesh Vaipurkar
8c0597727b Merged in feat/SW-1879-aa-tracking-bed-breakfastpayment (pull request #1789)
feat: SW-1879 Tracking enter-details sections

* feat: SW-1879 Tracking enter-details sections

* feat: SW-1879 removed onSelect to trigger in onSubmit

* feat: SW-1879 Removed onSelect and triggered inside onSubmit

* feat: SW-1879 Optimized to remove unnecessary useEffect triggers in every re-render

* feat: SW-1879 Updated breakfast package typings

* feat: SW-1879 Reverted RadioCardProps

* feat: SW-1879 Optimised code


Approved-by: Tobias Johansson
Approved-by: Christian Andolf
2025-04-16 14:06:15 +00:00
Michael Zetterberg
440e1f92df feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass 2025-04-14 11:30:06 +00:00
Bianca Widstam
77c03905e4 Merged in fix/hide-payment-if-only-points (pull request #1741)
Feat(SW-1943): add new design for pay ancillaries with points

* fix: hide card and payment info if only quantity with points is selected

* feat(SW-1943): add new design for pay ancillaries with points

* feat(SW-1943): add missing translation

* feat(SW-1943): fix rebase

* feat(SW-1943): remove console log


Approved-by: Linus Flood
Approved-by: Matilda Landström
2025-04-10 06:18:02 +00:00
Bianca Widstam
c41dea4118 Merged in feat/SW-1414-guarantee-enter-details-tracking (pull request #1744)
Feat/SW-1414 guarantee enter details tracking

* feat(SW-1414): add tracking for gla enter details

* feat(SW-1414): add tracking for gla

* feat(SW-1414): add tracking for gla in enter details

* feat(SW-1414): fix pr comments

* feat(SW-1414): fix pr comment client only

* feat(SW-1414): fix pr comments

* feat(SW-1414): add tracking on load


Approved-by: Christian Andolf
2025-04-09 06:26:19 +00:00
Hrishikesh Vaipurkar
73cb423c95 Merged in feat/SW-2078-update-confirmation-page-vouchers (pull request #1731)
Feat/SW-2078 update confirmation page vouchers and Corp Cheques rate

* feat: SW-2078 Tablet bookingCode ref forward issue fix

(cherry picked from commit 16a6a00fd99b6b6220a98ad74de062d67d35e1c0)

* feat: SW-2078 Display Vouchers and Cheques prices on confirmation page

(cherry picked from commit a76494de497a7d5e7641cb0036bd7055acf875c1)

* feat: SW-2078 Rebase issue fix

* feat: SW-2079 Updated rate title in terms modal

* feat: SW-2078 Optimized code

* feat: SW-2078 Removed extra tags


Approved-by: Christian Andolf
2025-04-08 07:27:40 +00:00
Anton Gunnarsson
c56a0b8ce9 Merged in feat/sw-1975-get-profile-v2 (pull request #1651)
Use get Profile V2 endpoint

Approved-by: Linus Flood
2025-04-08 06:26:00 +00:00