Merged in feat/LOY-421-Next-Stay (pull request #3026)

Feat(LOY-421): Next Stay

* feat(LOY-421): Next stay WIP

* fix(LOY-421): clean upp css and jsx

* chore(LOY-421): css cleanup

* fix(LOY-421): fix test

* only show button if isWebAppOrigin is true

* chore(LOY-421): update section header component

* chore(LOY-421): remove redundant test case


Approved-by: Matilda Landström
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-11-05 09:09:57 +00:00
parent 3a38e99a71
commit 94f6af563d
9 changed files with 678 additions and 0 deletions

View File

@@ -183,6 +183,26 @@ export const userQueryRouter = router({
}
return null
}),
next: languageProtectedProcedure.query(async ({ ctx }) => {
const data = await getUpcomingStays(
ctx.session.token.access_token,
1, // Only get the closest stay
ctx.lang
)
if (data && data.data.length > 0) {
const updatedData = await updateStaysBookingUrl(
data.data,
ctx.session,
ctx.lang
)
// Return only the first (closest) stay
return updatedData[0]
}
return null
}),
}),
transaction: router({
friendTransactions: languageProtectedProcedure

View File

@@ -14,6 +14,7 @@ export namespace DynamicContentEnum {
my_pages_overview_shortcuts: "my_pages_overview_shortcuts",
my_points: "my_points",
next_benefits: "next_benefits",
next_stay: "next_stay",
overview_table: "overview_table",
points_overview: "points_overview",
previous_stays: "previous_stays",