fix(invitations): Support both platform and staff invitation types
- Update useInvitationDetails to try platform tenant invitation first, then fall back to staff invitation - Update useAcceptInvitation to handle both invitation types - Update useDeclineInvitation to handle both invitation types - Pass invitation type from AcceptInvitePage to mutations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -68,6 +68,7 @@ const AcceptInvitePage: React.FC = () => {
|
||||
firstName: firstName.trim(),
|
||||
lastName: lastName.trim(),
|
||||
password,
|
||||
invitationType: invitation?.invitation_type,
|
||||
});
|
||||
|
||||
// Set auth tokens and redirect to dashboard
|
||||
@@ -89,7 +90,7 @@ const AcceptInvitePage: React.FC = () => {
|
||||
}
|
||||
|
||||
try {
|
||||
await declineInvitationMutation.mutateAsync(token!);
|
||||
await declineInvitationMutation.mutateAsync({ token: token!, invitationType: invitation?.invitation_type });
|
||||
setDeclined(true);
|
||||
} catch (err: any) {
|
||||
setFormError(err.response?.data?.error || t('acceptInvite.declineFailed', 'Failed to decline invitation'));
|
||||
|
||||
Reference in New Issue
Block a user