feat(leaderboard): add Stripe subscription link to customer names

This commit enhances the leaderboard by adding a clickable link to each
customer's name, which directs to their Stripe subscription page. It also
removes the ID column and includes the planId in the signing volume data
for improved user experience and easier access to subscription details.
This commit is contained in:
Ephraim Atta-Duncan
2024-09-26 11:26:31 +00:00
parent 89154e6230
commit a274e9b75a
5 changed files with 38 additions and 15 deletions

View File

@ -64,6 +64,11 @@ export async function getSigningVolume({
id: true,
},
},
Subscription: {
select: {
planId: true,
},
},
},
},
team: {
@ -79,6 +84,11 @@ export async function getSigningVolume({
id: true,
},
},
subscription: {
select: {
planId: true,
},
},
},
},
},
@ -102,6 +112,8 @@ export async function getSigningVolume({
name,
signingVolume,
createdAt: subscription.createdAt,
planId:
subscription.User?.Subscription?.[0]?.planId || subscription.team?.subscription?.planId,
};
});