feat: billing

This commit is contained in:
David Nguyen
2025-05-19 12:38:50 +10:00
parent 7abfc9e271
commit 2805478e0d
221 changed files with 8436 additions and 5847 deletions

View File

@@ -1,5 +1,4 @@
import { Trans } from '@lingui/react/macro';
import { OrganisationMemberInviteStatus } from '@prisma/client';
import { Link } from 'react-router';
import { getOptionalSession } from '@documenso/auth/server/lib/utils/get-session';
@@ -53,19 +52,6 @@ export async function loader({ params, request }: Route.LoaderArgs) {
await acceptOrganisationInvitation({ token: organisationMemberInvite.token });
}
// For users who do not exist yet, set the team invite status to accepted, which is checked during
// user creation to determine if we should add the user to the team at that time.
if (!user && organisationMemberInvite.status !== OrganisationMemberInviteStatus.ACCEPTED) {
await prisma.organisationMemberInvite.update({
where: {
id: organisationMemberInvite.id,
},
data: {
status: OrganisationMemberInviteStatus.ACCEPTED,
},
});
}
if (!user) {
return {
state: 'LoginRequired',