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

@@ -52,11 +52,17 @@ const AccountSetup: React.FC = () => {
trackMixpanelEvent(evt_account_setup_visit);
const verifyAuthStatus = async () => {
try {
const response = (await dispatch(verifyAuthentication()).unwrap())
.payload as IAuthorizeResponse;
const response = await dispatch(verifyAuthentication()).unwrap() as IAuthorizeResponse;
if (response?.authenticated) {
setSession(response.user);
dispatch(setUser(response.user));
// Prevent invited users from accessing account setup
if (response.user.invitation_accepted) {
navigate('/worklenz/home');
return;
}
if (response?.user?.setup_completed) {
navigate('/worklenz/home');
}