Feat(SW-3708): refactor contentstack fetching (removing all refs) and cache invalidation
* Remove all REFS
* Revalidate correct language
* PR fixes
* PR fixes
* Throw when errors from contentstack api
Approved-by: Joakim Jäderberg
Include more details when throwing errors for debugging in Sentry
* WIP throw errors with more details for debugging in Sentry
* Fix throwing response-data
* Clearer message when a response fails
* Add message to errors
* better typings
* .
* Try to send profileID and membershipNumber to Sentry when we fail to parse the apiResponse
* rename notFound -> notFoundError
* Merge branch 'master' of bitbucket.org:scandic-swap/web into chore/add-error-details-for-sentry
Approved-by: Linus Flood
Counter name is now searchable and add counter for redirects
* refactor: createCounter() only takes one argument, the name of the counter. Makes it easier to search for
* feat: add counter when we do a redirect from redirect-service
Approved-by: Linus Flood
Feat/LOY-430 reward nights
* chore(LOY-430): add reward nights request and dynamic content
* chore(LOY-430): fix Reward Night component
* Refactor: use existing endpoint and add rewardNight data to that response instead
Approved-by: Linus Flood
feat(redis): include git hash when deleting without fuzzy
* feat(redis): include git hash when deleting without fuzzy
* Refactor
Approved-by: Joakim Jäderberg
Chore/remove enrichHotel call
* chore: remove enrichHotel api call
* include cityId when errors happen
* remove unused funciton and cleanup code
* tests no longer expect us to have called a function that is not used
* remove commented code
Approved-by: Linus Flood
Feat/redis fix
* feat(redis): delete multiple keys in one partition scan
* fix(BOOK-603): make it possible to do multiple deletes in redis at once using one partition scan
Approved-by: Linus Flood
SW-3572 API route for listing hotels per city or country
* wip hotel data endpoint
* Correct route params type
* wip
* skip static paths call
* timeout when getting destinations take too long
* call noStore when we get a timeout
* add cache-control headers
* .
* .
* .
* wip
* wip
* wip
* wip
* add route for getting hotels per country
* include city when listing by country
* fix distance SI unit
* fix sorting
* Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/SW-3572-hotel-data-endpoint
* packages/tracking passWithNoTests
* revalidate must be static value
* remove oxc reference
* cleanup
* cleanup hotel api route
* feat(SW-3572): cleanup error handling
Approved-by: Anton Gunnarsson
fix: include service token in the debug route
* fix: include service token in the debug route
Approved-by: Bianca Widstam
Approved-by: Hrishikesh Vaipurkar
Feature/wrap logging
* feat: change all logging to go through our own logger function so that we can control log levels
* move packages/trpc to using our own logger
* merge
Approved-by: Linus Flood
Fix: destination city page invalidate cache in webhook
* Fix: destination city page invalidate cache in webhook
* Use correct uid
Approved-by: Joakim Jäderberg
feat(LOY-232): DTMC API Integration
* feat(LOY-232): DTMC API Integration
* feat(LOY-232): use employment data in team member card
* refactor(LOY-232): remove static data, return employment details in parsed response & fix tests
* refactor(LOY-232): improve DTMC API Linking error control flow + make res type safe
* fix(LOY-232): remove unused utils
* fix(LOY-232): error vars
Approved-by: Christian Andolf
Approved-by: Erik Tiekstra
feat(SW-2859): Create trpc package
* Add isEdge, safeTry and dataCache to new common package
* Add eslint and move prettier config
* Clean up tests
* Create trpc package and move initialization
* Move errors and a few procedures
* Move telemetry to common package
* Move tokenManager to common package
* Add Sentry to procedures
* Clean up procedures
* Fix self-referencing imports
* 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
* Fix lang imports
Approved-by: Linus Flood
Feat(LOY-230): DTMC Routes with Entra ID Auth & Error Page Handling
* feat(LOY-230): Link Scandic Friends and Azure accounts
* fix(LOY-230): remove employee id param setting
* fix(LOY-230): return token in jwt callback for auth.dtmc.ts
Approved-by: Michael Zetterberg
Approved-by: Christian Andolf
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
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
Fix/SW-2945 cache timings for resolve entry
* fix: cache resolveentry() harder and revalidate on publish instead
* logging: use debug logging for requests and add logging when tll is invalid
Approved-by: Linus Flood
fix: site-config - use correct cache keys and invalidate them
* fix: site-config - use correct cache keys and invalidate them
Approved-by: Joakim Jäderberg
Feat/warmup cache function
* WIP
* Fix warmup for all languages
* Cleanup
* Added env flag so we can disable warmup
* Changed time to 04.00 UTC since backend updates their data at 03.00 UTC
* Add return statements
* Merge branch 'master' into feat/warmup-cache-function
Approved-by: Anton Gunnarsson
Migrate to a monorepo setup - step 1
* Move web to subfolder /apps/scandic-web
* Yarn + transitive deps
- Move to yarn
- design-system package removed for now since yarn doesn't
support the parameter for token (ie project currently broken)
- Add missing transitive dependencies as Yarn otherwise
prevents these imports
- VS Code doesn't pick up TS path aliases unless you open
/apps/scandic-web instead of root (will be fixed with monorepo)
* Pin framer-motion to temporarily fix typing issue
https://github.com/adobe/react-spectrum/issues/7494
* Pin zod to avoid typ error
There seems to have been a breaking change in the types
returned by zod where error is now returned as undefined
instead of missing in the type. We should just handle this
but to avoid merge conflicts just pin the dependency for
now.
* Pin react-intl version
Pin version of react-intl to avoid tiny type issue where formatMessage
does not accept a generic any more. This will be fixed in a future
commit, but to avoid merge conflicts just pin for now.
* Pin typescript version
Temporarily pin version as newer versions as stricter and results in
a type error. Will be fixed in future commit after merge.
* Setup workspaces
* Add design-system as a monorepo package
* Remove unused env var DESIGN_SYSTEM_ACCESS_TOKEN
* Fix husky for monorepo setup
* Update netlify.toml
* Add lint script to root package.json
* Add stub readme
* Fix react-intl formatMessage types
* Test netlify.toml in root
* Remove root toml
* Update netlify.toml publish path
* Remove package-lock.json
* Update build for branch/preview builds
Approved-by: Linus Flood