Siri Sudheeksha Vavila fix: CreateNewTeam actually submits form, assigns members, and redire…#5196
Open
sirisudheeksha wants to merge 2 commits intodevelopmentfrom
Open
Siri Sudheeksha Vavila fix: CreateNewTeam actually submits form, assigns members, and redire…#5196sirisudheeksha wants to merge 2 commits intodevelopmentfrom
sirisudheeksha wants to merge 2 commits intodevelopmentfrom
Conversation
…cts to /teams - Call postNewTeam action on submit instead of only logging - Assign each selected member via addTeamMember after team creation - Redirect to /teams on success; show toast error on failure - Fix useEffect deps for members list (empty [] -> [userProfilesBasicInfo]) - Show member names in assigned-member badges instead of raw IDs - Fix task badge remove handler (was calling handleRemoveMember(member) with undefined variable; now correctly calls handleRemoveTask(task)) Fixes: Create Team redirects to Dashboard instead of creating team (PR#3064)
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



#Description
Fixes the Priority High bug where the Create Team flow redirects the user away instead of completing team creation and returning them to the team experience.
Before this change, submitting the Create Team form did not actually create a team. The frontend only logged the form payload and reset local state, so the user never got a valid success flow. This made the experience look like it was bouncing back to the dashboard or otherwise abandoning the create flow.
This PR updates the Create Team flow so that submitting the form now:
Creates the team through the existing team API.
Assigns the selected members to the newly created team.
Redirects the user to the teams page on success.
Shows a toast error if the API returns an error instead of silently failing.
Fixes #(Priority High bug: Create Team redirect creates dashboard instead of team)
#Related PRs (if any)
This frontend PR is not paired with a backend PR.
It uses the existing backend team creation and team-member assignment endpoints.
#Main changes explained
Update src/components/BMDashboard/Team/CreateNewTeam/CreateNewTeam.jsx to replace the placeholder submit behavior with the real create flow.
#Update summary:
Submit now dispatches the existing postNewTeam action instead of only logging form data.
After successful team creation, the selected users are assigned to the new team using the existing addTeamMember action.
On success, the user is redirected to /teams instead of being left in a broken flow.
On failure, the UI now shows a toast error with the API/server message when available.
Member options now refresh correctly after async profile data loads.
Assigned member badges now display human-readable member names instead of raw IDs.
The task badge remove action was corrected to remove tasks properly.
##How to test
Check out the current branch:
Install dependencies:
Run the app locally:
Clear site data/cache for the local app.
Log in as an Owner or admin user.
Go to:
Team Management -> Team Locations -> Create Team
Fill in the required fields
Click Submit.
Verify:
Before:

After: