Commit Graph

101 Commits

Author SHA1 Message Date
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
Niclas Edenvin
1b1c7e6398 Fix response validation for get stays 2024-10-08 15:24:01 +02:00
Christel Westerberg
44747058d0 fix: loyalty levels fetch in rsc for mobile menu
fix: get loyalty level in rsc

fix: typo
2024-10-08 08:25:44 +02:00
Christel Westerberg
2886084a82 feat: add communication preferences
feat: add generatePreferencesLink

feat: add subscriberId endpoint
2024-10-08 08:25:44 +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
Christel Westerberg
df38a718b5 fix(SW-366): add nights to next level 2024-09-06 11:05:33 +02: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
46852a36a1 fix: default dob in zod schema 2024-08-29 09:42:05 +02: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
Arvid Norlin
5b6295779d fix: add apiResponse.text() to logging 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
Simon Emanuelsson
be620f18ba feat(SW-207): add expiring points and date when they will expire 2024-08-06 15:59:40 +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
Christel Westerberg
183e1cd6d2 fix: refactor tracking requests 2024-07-15 13:35:36 +02:00
Christel Westerberg
c96008fb78 fix: track user on page load 2024-07-15 13:35:36 +02:00
Matilda Landström
801a041404 Merged in feat/best-friend-hero (pull request #338)
Feat(SW-170): Update overview hero

Approved-by: Christel Westerberg
2024-07-12 06:45:44 +00:00
Christel Westerberg
9ede5e4210 fix: remove pagination from friends endpoints since it is no longer supported 2024-07-11 15:00:46 +02:00