Fix onboarding process not getting the subcription plan

This commit is contained in:
Urtzi Alfaro
2025-10-01 21:56:38 +02:00
parent b93fb850c3
commit c9d8d1d071
10 changed files with 312 additions and 15 deletions

View File

@@ -29,7 +29,15 @@ export interface AuthState {
// Actions
login: (email: string, password: string) => Promise<void>;
register: (userData: { email: string; password: string; full_name: string; tenant_name?: string }) => Promise<void>;
register: (userData: {
email: string;
password: string;
full_name: string;
tenant_name?: string;
subscription_plan?: string;
use_trial?: boolean;
payment_method_id?: string;
}) => Promise<void>;
logout: () => void;
refreshAuth: () => Promise<void>;
updateUser: (updates: Partial<User>) => void;
@@ -93,7 +101,15 @@ export const useAuthStore = create<AuthState>()(
}
},
register: async (userData: { email: string; password: string; full_name: string; tenant_name?: string }) => {
register: async (userData: {
email: string;
password: string;
full_name: string;
tenant_name?: string;
subscription_plan?: string;
use_trial?: boolean;
payment_method_id?: string;
}) => {
try {
set({ isLoading: true, error: null });