feat(invitation-signup): optimize user registration process and enhance localization

- Introduced a new SQL migration to optimize the invitation signup process, allowing invited users to skip organization and team creation.
- Updated the `register_user` and `register_google_user` functions to handle invitation signups effectively.
- Enhanced the `deserialize_user` function to include an `invitation_accepted` flag.
- Added new localization keys for creating organizations and related messages in multiple languages, improving user experience across the application.
- Updated the SwitchTeamButton component to support organization creation and improved styling for better usability.
This commit is contained in:
chamiakJ
2025-07-09 07:28:02 +05:30
parent 6c620d6878
commit cab1273e9c
13 changed files with 702 additions and 58 deletions

View File

@@ -41,6 +41,17 @@ const AuthenticatingPage: React.FC = () => {
setSession(session.user);
dispatch(setUser(session.user));
// Check if user joined via invitation
if (session.user.invitation_accepted) {
// For invited users, redirect directly to their team
// They don't need to go through setup as they're joining an existing team
setTimeout(() => {
handleSuccessRedirect();
}, REDIRECT_DELAY);
return;
}
// For regular users (team owners), check if setup is needed
if (!session.user.setup_completed) {
return navigate('/worklenz/setup');
}