From 98b862c04877d8bfaf28cf17a4b48e7acbcb7ff1 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Thu, 4 Dec 2025 08:58:00 +0000 Subject: [PATCH] fix: form issues in QA for onboarding (#25581) ## What does this PR do? Fixes the issue where form state wasnt corectly recorded in QA ## Visual Demo (For contributors especially) A visual demonstration is strongly recommended, for both the original and new change **(video / image - any one)**. #### Video Demo (if applicable): - Show screen recordings of the issue or feature. - Demonstrate how to reproduce the issue, the behavior before and after the change. #### Image Demo (if applicable): - Add side-by-side screenshots of the original and updated change. - Highlight any significant change(s). ## Mandatory Tasks (DO NOT REMOVE) - [ ] I have self-reviewed the code (A decent size PR without self-review might be rejected). - [ ] I have updated the developer docs in /docs if this PR makes changes that would require a [documentation change](https://cal.com/docs). If N/A, write N/A here and check the checkbox. - [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works. ## How should this be tested? - Are there environment variables that should be set? - What are the minimal test data to have? - What is expected (happy path) to have (input and output)? - Any other important info that could help to test that PR ## Checklist - I haven't read the [contributing guide](https://github.com/calcom/cal.com/blob/main/CONTRIBUTING.md) - My code doesn't follow the style guidelines of this project - I haven't commented my code, particularly in hard-to-understand areas - I haven't checked if my changes generate no new warnings --- .../teams/details/team-details-view.tsx | 150 +++++++++--------- .../invite/email/team-invite-email-view.tsx | 58 +++---- 2 files changed, 108 insertions(+), 100 deletions(-) diff --git a/apps/web/modules/onboarding/teams/details/team-details-view.tsx b/apps/web/modules/onboarding/teams/details/team-details-view.tsx index 6098424302..bbc55295f5 100644 --- a/apps/web/modules/onboarding/teams/details/team-details-view.tsx +++ b/apps/web/modules/onboarding/teams/details/team-details-view.tsx @@ -1,7 +1,7 @@ "use client"; import { useRouter } from "next/navigation"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useRef, useState, type FormEvent } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; @@ -65,7 +65,9 @@ export const TeamDetailsView = ({ userEmail }: TeamDetailsViewProps) => { setTeamLogo(newLogo); }; - const handleContinue = async () => { + const handleContinue = async (e?: FormEvent) => { + e?.preventDefault(); + if (!isSlugValid) { return; } @@ -81,7 +83,8 @@ export const TeamDetailsView = ({ userEmail }: TeamDetailsViewProps) => { }); // Create the team (will handle payment redirect if needed) - await createTeam(store); + // Don't pass store - let createTeam read the latest state from the store + await createTeam(); }; return ( @@ -89,82 +92,87 @@ export const TeamDetailsView = ({ userEmail }: TeamDetailsViewProps) => { {/* Left column - Main content */}
- - - -
- }> -
- {/* Team Profile Picture */} -
- -
-
- + + + +
+ }> +
+ {/* Team Profile Picture */} +
+ +
+
+ +
+ +
- - + {t("onboarding_logo_size_hint")} +

+
+ + {/* Team Name */} +
+ + setTeamName(e.target.value)} + placeholder="Acme Inc." + className="border-default h-7 rounded-[10px] border px-2 py-1.5 text-sm" />
-

{t("onboarding_logo_size_hint")}

-
- {/* Team Name */} -
- - setTeamName(e.target.value)} - placeholder="Acme Inc." - className="border-default h-7 rounded-[10px] border px-2 py-1.5 text-sm" + {/* Team Slug */} + -
- {/* Team Slug */} - - - {/* Team Bio */} -
- -