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
This commit is contained in:
Tobias Johansson
2024-09-05 09:28:25 +00:00
parent 650b38b409
commit 238de4cd3a
20 changed files with 260 additions and 234 deletions

View File

@@ -357,7 +357,16 @@ export const userQueryRouter = router({
lastName: verifiedData.data.lastName,
}
}),
membershipLevel: safeProtectedProcedure.query(async function ({ ctx }) {
membershipLevel: protectedProcedure.query(async function ({ ctx }) {
const verifiedData = await getVerifiedUser({ session: ctx.session })
if (!verifiedData || "error" in verifiedData) {
return null
}
const membershipLevel = getMembership(verifiedData.data.memberships)
return membershipLevel
}),
safeMembershipLevel: safeProtectedProcedure.query(async function ({ ctx }) {
if (!ctx.session) {
return null
}