Commit Graph

96 Commits

Author SHA1 Message Date
Linus Flood
66649ba6af feat/user: use our wrapped cache instead of reacts cache 2024-12-17 17:22:50 +01:00
Linus Flood
431ab477eb Fixes bookingwidget skeleton and memoize fetching of creditcards 2024-12-17 14:31:52 +01:00
Linus Flood
1862b16c8c feat/membershipcard: utilize memoiozed function to fetch membership cards 2024-12-16 13:06:27 +01:00
Linus Flood
742a2820d1 Merge remote-tracking branch 'origin' into feature/tracking 2024-12-13 09:02:37 +01:00
Michael Zetterberg
594a279186 fix(DELIGHT-11001): do not require address key in user profile 2024-12-09 15:13:30 +01:00
Tobias Johansson
9b90e99adf Merged in feat/SW-1007-saved-cards-filtering (pull request #980)
Feat/SW-1007 saved payment cards now shown based on supported cards by hotel

* fix(SW-1007): refactored savedCards to only show supported payment cards

* fix(SW-1007): show error message even if metadata is null

* fix: merge changes that were missed

* fix: remove use server


Approved-by: Christel Westerberg
2024-11-28 08:08:39 +00:00
Michael Zetterberg
ee8f1def20 fix(SW-1079): add apiResponse to validation error logs 2024-11-27 11:22:22 +01:00
Tobias Johansson
a70f8a3b97 Merged in feat/SW-618-payment-non-happy-path (pull request #874)
Feat/SW-618 payment non happy path

* feat(SW-618): filter out expired saved cards

* feat(SW-618): Added payment error codes and way of showing messages based on code

* feat(SW-618): show error message if max retries has been reached and remove search param after showing toast

* fix(SW-618): move fallback error codes

* fix(SW-618): remove ref from stopping useEffect to run twice

* fix(SW-618): refactored logic for toast message and minor fixes

* fix(SW-618): remove error message enum due to static analysis problems


Approved-by: Christian Andolf
Approved-by: Arvid Norlin
2024-11-18 14:10:11 +00:00
Simon Emanuelsson
62f549e85d feat: get breakfast package from API 2024-10-29 15:39:21 +01:00
Linus Flood
687a110a39 Utilizing memoized requests 2024-10-25 15:33:06 +02:00
Tobias Johansson
b33381d1b4 Merged in feat/SW-588-payment-saved-card (pull request #697)
feat(SW-588): Added saved card to payment step

* feat(SW-588): Added saved card to payment step

* feat(SW-588): Add proper label for saved card

* feat(SW-588): fix from PR feedback

* feat(SW-588): Add preloading of data

* feat(SW-588): remove onChange logic for PaymentOption

* feat(SW-588): moved payment files to correct folder

* feat(SW-588): moved preload to layout

* fix: remove unused prop


Approved-by: Simon.Emanuelsson
2024-10-21 10:39:19 +00:00
Christel Westerberg
c9684dee11 feat: add validation to enter details flow 2024-10-10 16:48:38 +02:00
Christel Westerberg
71b03143ce fix: refactor scopes for service token 2024-10-09 16:46:53 +02:00
Simon Emanuelsson
451d461c7f feat: guest information form enter details 2024-10-07 08:12:07 +02:00
Simon Emanuelsson
af850c90e7 feat(SW-66, SW-348): search functionality and ui 2024-09-24 09:47:31 +02:00
Niclas Edenvin
b9dbcf7d90 Merged in feat/booking-flow-submit (pull request #580)
This implements the actual call to the API to create a booking. That’s the only thing it does, it doesn’t handle the response in any way.

This PR is just to get it there and the new booking sub team will handle it further, with payment etc.

Approved-by: Michael Zetterberg
Approved-by: Fredrik Thorsson
Approved-by: Simon.Emanuelsson
2024-09-20 13:05:23 +00:00
Tobias Johansson
238de4cd3a Merged in feat/CJ-17-points-expiration-table (pull request #527)
Feat/CJ-17 points expiration table

* feat(CJ-17): Added point expiration table and refactored to use Table component

* feat(CJ-17): Use Table component inside Row

* fix(CJ-117): Added missing css class and update date formatting

* fix(CJ-117): Added copy of membershipLevel route with a protectedProcedure


Approved-by: Christel Westerberg
2024-09-05 09:28:25 +00:00
Michael Zetterberg
ce3248562b feat: mask date of birth 2024-08-27 10:55:46 +02:00
Michael Zetterberg
68aa6e565d Merged in fix/profile-data-error-logging (pull request #513)
fix: log api response for profile data errors
2024-08-27 06:19:02 +00:00
Michael Zetterberg
2f628aa41f fix: log api response for profile data errors 2024-08-27 08:16:27 +02:00
Michael Zetterberg
2ea6a2d242 fix: allow any membership level 2024-08-27 07:41:59 +02:00
Michael Zetterberg
f8d60afb49 debug: debug profile calls 2024-08-26 15:30:50 +02:00
Arvid Norlin
b56069e009 fix: remove toString() in metric attributes to avooid silly data like Object: Object 2024-08-26 13:30:07 +02:00
Arvid Norlin
0b2936159f feat: add metrics 2024-08-26 11:50:35 +02:00
Simon.Emanuelsson
388060086e Merged in feat/masked-values (pull request #489)
feat: handle masked values only based on MFA

Approved-by: Michael Zetterberg
Approved-by: Arvid Norlin
2024-08-26 09:19:02 +00:00
Simon Emanuelsson
61b722d9ad feat: handle masked values only based on MFA 2024-08-26 11:06:01 +02:00
Christel Westerberg
231edbe944 fix: default language if missing in profile 2024-08-26 10:52:13 +02:00
Matilda Landström
f46207a308 feat: improve handling of stays 2024-08-23 15:45:15 +02:00
Tobias Johansson
b3ba4edd69 fix: revert back filtering of reward nights with operaId ORS 2024-08-23 12:49:59 +02:00
Arvid Norlin
9497e8eef3 fix: add apiResponse.text() to logging 2024-08-23 12:33:28 +02:00
Arvid Norlin
7cd6367c15 fix: change bad JSON.stringify:s 2024-08-23 09:47:45 +02:00
Arvid Norlin
8340f1ff6c fix: structure logged data 2024-08-23 09:47:43 +02:00
Arvid Norlin
7de8a184b7 fix: improve logging for api requests 2024-08-23 09:46:17 +02:00
Tobias Johansson
dbb55c3d33 Merged in feat/SW-165-fix (pull request #467)
fix(SW-165): fix issue with pagination now showing

Approved-by: Michael Zetterberg
2024-08-23 07:35:30 +00:00
Simon Emanuelsson
2337d37f1a feat(SW-160): update profile 2024-08-23 09:09:55 +02:00
Tobias Johansson
88a23c590d fix(SW-165): fix issue with pagination now showing 2024-08-23 09:07:10 +02:00
Tobias Johansson
159114a082 Merged in feat/SW-165-fixes (pull request #460)
Feat/SW-165 fixes

* fix(SW-165): update translations for reward labels

* fix(SW-165): Fix sorting and filtering of transactions and hide fields when BALFWD

* fix(SW-165): update condition


Approved-by: Michael Zetterberg
2024-08-22 14:34:55 +00:00
Michael Zetterberg
a33a69fb58 fix: improve auth handling and logging 2024-08-22 14:07:36 +02:00
Tobias Johansson
e9a6499086 feat(SW-245): Delete credit card 2024-08-21 16:24:39 +02:00
Tobias Johansson
1ec1033267 Merged in feat/SW-165-correct-labels (pull request #427)
Feat/SW-165 correct labels

* feat(SW-165): sort friend transactions and return additional properties

* feat(SW-165): Added points being calculated label

* feat(SW-165): added transactionDate for transactions without checkinDate

* feat(SW-165): Updated description copy for various reward types

* feat(SW-165): filter out expired transactions

* feat(SW-165): removed Mobile table and unified them into Table instead

* feat(SW-165): Added bookingUrl to friend transactions

* fix(SW-165): style fixes

* fix(SW-165): fix issues from merge

* fix(SW-165): remove comment

* fix(SW-165): fixed booking urls not being set and smaller fixes

* fix(SW-165): added comment regarding 'BALFWD'


Approved-by: Michael Zetterberg
Approved-by: Christel Westerberg
2024-08-21 13:54:55 +00:00
Michael Zetterberg
63ce8a2dfb fix(SW-104): use relative url for initiation 2024-08-21 15:25:37 +02:00
Arvid Norlin
f96712538e refactor: implement trpc client pattern for EarnAndBurn Journey 2024-08-21 09:44:28 +02:00
Arvid Norlin
1bcd3b81e1 chore: move totalPages to meta 2024-08-21 09:44:28 +02:00
Arvid Norlin
8c75b9bcd7 wip: initial stab trpc pagination 2024-08-21 09:44:25 +02:00
Arvid Norlin
6f293be3a7 feat(SW-164): Add pagination for friendship transactions 2024-08-21 09:43:51 +02:00
Tobias Johansson
84f5e74f00 Merged in feat/SW-104-add-card (pull request #410)
Feat/SW-104 add card

* feat: add api endpoints for adding and removing credit card

* feat(SW-104): Added Sonner toast lib

* feat(SW-104): Add route handlers for add card flow

* feat(SW-104): Added link to route handler and trigger toast when query params from callback is set

* feat(SW-104): Added translations for add card success toast

* feat(SW-104): Refactored to use client request for initiate save card

* fix(SW-104): Return proper status codes when initiating save card fails

* fix(SW-104): remove delete card endpoint because it was added in SW-245

* fix(SW-104): remove console.log

* fix(SW-104): Use api.post for save card request

* fix(SW-104): move function declaration above export

* fix(SW-104): handle response of save card and use Lang enum

* fix(SW-104): added comment for why setTimeout is needed for toast and also removed lang prop

* fix(SW-104): added type for AddCreditCardButton props

* feat: add toasts

* fix(SW-104): start using toasts from ToastHandler and fix problem with duplicate toasts

* fix(SW-104): remove unnecessary wrapping div


Approved-by: Michael Zetterberg
2024-08-20 15:04:02 +00:00
Niclas Edenvin
819ac454b0 Merged in feature/refresh-token (pull request #401)
feat: SW-101 Proactively refresh tokens

Approved-by: Michael Zetterberg
2024-08-16 13:56:09 +00:00
Michael Zetterberg
bc84122a40 fix(SW-236): properly handle expired token in webviews
Trying out a new pattern for errors in data fetching.

Next.js is not a fan of throwing errors. Instead it recommends returning
different shapes for each state. Ref:
https://nextjs.org/docs/app/building-your-application/routing/error-handling#handling-expected-errors-from-server-components

It requires some more detailing and a bit more refactoring in non webview part,
but it is a start. This webview specific implementation should not break web.
2024-08-13 16:54:33 +02:00
Michael Zetterberg
71dcf30719 fix: make sure all logged errors are preceeded with a message
Just logging an error makes it difficult to relate the error log to code in the
codebase. Error logging a message right before the error itself makes it easier
to search the codebase for that error log.
2024-07-24 11:32:15 +02:00
Christel Westerberg
d8f7e4157a fix: add correct properties to tracking 2024-07-16 10:39:22 +02:00