Commit Graph

65 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
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
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
Simon Emanuelsson
2f553bb945 feat: change GLA to be more clear to the user 2025-06-18 11:43:53 +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
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
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
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
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
Tobias Johansson
fe1f4b063d Merged in fix/paymentFail-event-fix (pull request #2189)
fix: infinite loop when bookingStatus isTimeout occurs

* fix: infinite loop when bookingStatus isTimeout occurs


Approved-by: Linus Flood
2025-05-22 07:33:13 +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
Linus Flood
ac892726e0 Merged in fix/enter-details-footer-margin (pull request #2150)
fix: margin to footer on enter details

* fix: margin to footer on enter details
2025-05-19 14:35:48 +00:00
Niclas Edenvin
9e0332ba8a Merged in fix/SW-2625 (pull request #1980)
fix(SW-2625): set correct submitting status when validation fails

* fix(SW-2625): set correct submitting status when validation fails


Approved-by: Bianca Widstam
2025-05-06 12:51:41 +00:00
Michael Zetterberg
c6a0ce86df feat(SW-2605): confirmation page only valid for 1 minute for the session 2025-05-06 11:01:32 +00:00
Michael Zetterberg
b910b6a313 feat(SW-2116): Use refId instead of confirmationNumber 2025-05-05 12:26:37 +00:00
Christian Andolf
d6b70edfa3 chore: replace old border-radius variables with new tokens 2025-05-05 11:11:37 +02:00
Niclas Edenvin
4191441f32 Merged in fix/submit-booking-disabled (pull request #1936)
Don't disable payment based on room forms

* Don't disable payment based on room forms


Approved-by: Arvid Norlin
Approved-by: Tobias Johansson
2025-05-05 07:55:25 +00:00
Simon Emanuelsson
91933f47cf feat: comment updates 2025-05-03 22:43:09 +02:00
Tobias Johansson
f56a1ece0f feat(SW-1255): Added loading state to submit button in enter details 2025-05-03 22:18:50 +02:00
Niclas Edenvin
fb44990777 Merged in fix/SW-2501-validation-trigger (pull request #1924)
fix(SW-2501): validation trigger

* fix(SW-2501): validation trigger

On enter details, when submitting we want to trigger the validation for
the details forms for each room. This will display error messages for
the form fields with errors if they are not already displayed, so the
user knows which fields has errors.


Approved-by: Tobias Johansson
2025-05-02 13:59:23 +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
74d37dad93 feat(SW-2116): RefId instead of confirmationNumber 2025-05-02 12:44:07 +02:00
Tobias Johansson
bf79168216 Merged in fix/SW-2462-room-availability-error (pull request #1920)
Fix/SW-2462 room availability error

* fix: added toast error when availability fails and you get redirect to select-rate

* fix: added support for showing alert when availability error happens

* fix: rename PaymentAlert -> BookingAlert


Approved-by: Erik Tiekstra
2025-05-02 08:35:29 +00:00
Niclas Edenvin
d7708b682a Merged in fix/sw-2543-toc-text (pull request #1921)
fix(SW-2543): Change terms and conditions text for flex

* fix(SW-2543): Change terms and conditions text for flex

Approved-by: Michael Zetterberg
2025-05-02 07:45:37 +00:00
Christian Andolf
0cd2e9c89f fix(SW-2463): scroll to payment error 2025-05-02 06:37:37 +00:00
Michael Zetterberg
efb7219b6d fix: copy fixes for English labels 2025-04-30 09:37:54 +00:00
Niclas Edenvin
341be43a53 Merged in fix/sw-2501-remove-continue-button-light (pull request #1892)
fix(sw-2501): remove the continue buttons on enter details

This removes the continue buttons on the enter details page.

This is only that, not the refactoring of the whole enter details page with changing to one form etc. Since I just didn’t complete that refactor today I decided to do this light variant for now.

A quick explanation is that the continue buttons are removed and instead the form is submitted (meaning saving the form data to the store) on blur on the input elements IF the form is valid. If it’s invalid we change the isComplete flag in the store to false. This will hopefully also fix a bug where you were able to submit old data if the new data is invalid.

When clicking the submit button and a room is incomplete/invalid the browser scrolls to the first invalid room.

Approved-by: Erik Tiekstra
2025-04-30 08:56:16 +00:00
Arvid Norlin
96c1912d63 Merged in fix/SW-2177 (pull request #1907)
fix: combine radiogroups on payment step

* fix: combine radiogroups on payment step


Approved-by: Christian Andolf
2025-04-29 14:08:40 +00:00
Bianca Widstam
bfc25453c7 Merged in fix/SW-1415-my-stay-tracking-hotelId (pull request #1880)
fix(SW-1415): add hotelId in tracking for my stay

* fix(SW-1415): add hotelId in tracking for my stay

* fix: remove toast if cancel guarantee

* fix(SW-1415): rebase master

* fix(SW-1415): fix comment shorthand hotelId


Approved-by: Christian Andolf
2025-04-28 13:20:18 +00:00
Simon Emanuelsson
ec087a3d15 feat: refactor of my stay 2025-04-28 12:40:52 +00:00
Matilda Landström
5c189da123 Merged in feat/SW-2495-card-type-tracking (pull request #1868)
fix(SW-2495): add saved card type to payment tracking

* fix(SW-2495): add saved card type to tracking


Approved-by: Michael Zetterberg
2025-04-27 14:47:04 +00:00
Chuma Mcphoy (We Ahead)
169094fc37 Merged in refactor/SW-2476-use-react-aria-radio-group-for-payment-options (pull request #1849)
Refactor(SW-2177): Use react aria RadioGroup & Radio for payment options

* fix(SW-SW-2177): enhance accessibility for payment options

* Added keyboard navigation support to payment options.
* Updated CSS to improve focus styles for payment option labels.

* refactor: use RadioGroup & Radio from react aria for payment options

* refactor(SW-2177): replace setValue and watch with useController for payment method handling

* fix(SW-2177): remove comment and use cx for styles on PaymentOption

* fix(SW-2177): Add keyboard focus indicator to payment option


Approved-by: Michael Zetterberg
Approved-by: Erik Tiekstra
2025-04-24 11:22:36 +00:00
Bianca Widstam
2f0a196b49 Merged in fix/SW-1414-tracking-gla (pull request #1837)
fix(SW-1414): add hotelId to tracking for gla

* fix(SW-1414): add hotelId to tracking for gla


Approved-by: Niclas Edenvin
2025-04-23 11:05:43 +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
Hrishikesh Vaipurkar
8961cbd9d5 Merged in feat/SW-2322-update-booking-status-polling- (pull request #1778)
feat: SW-2322 Added handling of confirmed booking in polling

* feat: SW-2322 Added handling of confirmed booking in polling

* feat: SW-2322 Removed unnecessary startTransition


Approved-by: Michael Zetterberg
2025-04-11 13:41:19 +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
Matilda Landström
1239f0c662 Merged in feat/SW-1711-SW-2077-icons (pull request #1709)
Fix(SW-1711)/(SW-2077): Export icons individually

* fix(SW-1711): export icons individually


Approved-by: Michael Zetterberg
Approved-by: Erik Tiekstra
2025-04-07 07:25:25 +00:00
Simon Emanuelsson
4e36fecd6e fix: initial fix of modify dates 2025-04-03 04:25:05 +00:00
Bianca Widstam
e6c9e25222 Merged in fix/my-stay-ancillaries (pull request #1663)
fix: small design fix, fix bug that redirects to planet, add translations

* fix: small design fix, fix bug that redirects to planet, add translations

* fix: if user does not have enough points, default quantitywithcard to 1

* fix: fix pr comment


Approved-by: Linus Flood
Approved-by: Matilda Landström
2025-04-01 09:05:42 +00:00
Hrishikesh Vaipurkar
03deea1102 feat: SW-2028 Updated Guarantee notification 2025-04-01 08:18:22 +00:00
Arvid Norlin
5cff2e5f36 Merged in feat/SW-1889 (pull request #1670)
Feat/SW-1889

* fix: remove download invoice from confirmation page

* feat: remove EnterDetails Accordions


Approved-by: Simon.Emanuelsson
2025-03-31 13:14:11 +00:00
Simon Emanuelsson
9d584887ad fix: add bookingCode to product 2025-03-31 13:53:29 +02:00
Simon Emanuelsson
81f579bbfe fix: publicpromotion needs to be handled differently since api use the same label for different thing 2025-03-31 09:21:54 +00:00