Commit Graph

80 Commits

Author SHA1 Message Date
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
Hrishikesh Vaipurkar
15b9523611 feat: WEB-210 Update env path & try catch handling 2024-07-10 11:37:31 +02:00
Hrishikesh Vaipurkar
88a7f57349 feat: WEB-210 Fallback booking URL if encryption fails 2024-07-10 11:37:31 +02:00
Hrishikesh Vaipurkar
3f69eda17f feat: WEB-210 Updated lang type 2024-07-10 11:37:30 +02:00
Hrishikesh Vaipurkar
1f53b29a69 feat: WEB-210 Updated .map to avoid mutation 2024-07-10 11:37:30 +02:00
Hrishikesh Vaipurkar
cbd634144e feat: WEB-210 Updated types as review comments 2024-07-10 11:37:29 +02:00
Hrishikesh Vaipurkar
d33e038703 feat: WEB-210 Updated as per review comments 2024-07-10 11:37:29 +02:00
Hrishikesh Vaipurkar
83cb76be65 feat: WEB-210 Fixed API response 2024-07-10 11:37:28 +02:00
Hrishikesh Vaipurkar
b57860ddfe feat: (Web-210) Added encryption for my-booking Urls 2024-07-10 11:37:25 +02:00
Christel Westerberg
da343f45da feat: new "safe" procedure without unauth throwing 2024-07-08 14:56:11 +02:00
Christel Westerberg
6f15afd8f9 fix: default to empty string instead of undefined 2024-06-24 17:10:34 +02:00
Chuma McPhoy
352ca6b755 fix: make zip code and phone nr optional 2024-06-24 16:53:25 +02:00
Matilda Landström
3e54d3c29e chore: add memberships "endoint" 2024-06-19 17:36:50 +02:00
Simon Emanuelsson
d84efcbb0f feat(WEB-162): final design edit profile page 2024-06-19 14:51:00 +02:00
Simon Emanuelsson
5f3e417593 feat(WEB-162): final design for my profile page 2024-06-19 14:51:00 +02:00
Matilda Landström
ba0b00832d Merged in feat/creditCards-api (pull request #240)
feat(WEB-295): Add creditCards profile endpoint

Approved-by: Michael Zetterberg
2024-06-19 07:49:32 +00:00
Christel Westerberg
d50df09436 fix: pagination for stays 2024-06-18 16:21:05 +02:00
Matilda Landström
fa5638aaed feat: add credit cards endpoint 2024-06-18 15:48:50 +02:00
Matilda Landström
9931d9edef Merged in feat/membership-information (pull request #233)
Feat(WEB-307) Display correct membership information

* fix: fix typo

* chore: update fetch of user membership

* chore: update components to use api data

* chore: remove lang as static value

* fix: adapt to dev updates

* fix: adapt to code from dev

* fix: break out MembershipLevel into its a React component

* fix: add enum to zod validation

* refactor: rename tier to level

* refactor: remove unnecessary casts

* refactor: change toString() to hideEmpty=false

* refactor: remove toString()

* refactor: remove hideEmpty from title and subtitle

* fix: update currentLevel with data

* fix: fix from rebase


Approved-by: Michael Zetterberg
2024-06-18 13:14:09 +00:00
Simon Emanuelsson
aca9221ea6 feat: loosen up the zod validations and return null instead of throwing 2024-06-18 12:28:05 +02:00
Arvid Norlin
04dfad95ec fix: make membershipLevel since not present on all membership types 2024-06-14 11:43:00 +02:00
Arvid Norlin
24810eaee6 implement logic to select compared levels based on membershipLevel 2024-06-10 10:49:57 +02:00