Skip to content

Adithya - Fix Edit Existing Team Button#4458

Merged
one-community merged 6 commits intodevelopmentfrom
Adithya_fix_edit_existing_team_redirect
Mar 21, 2026
Merged

Adithya - Fix Edit Existing Team Button#4458
one-community merged 6 commits intodevelopmentfrom
Adithya_fix_edit_existing_team_redirect

Conversation

@adithya-6101
Copy link
Copy Markdown
Contributor

@adithya-6101 adithya-6101 commented Nov 26, 2025

Description

Fixes the "Edit Existing Team" redirect issue on the Building Management Dashboard. Previously, clicking "Edit Existing Team" redirected the user to the main dashboard or a global list, causing confusion.

image

This PR implements a dedicated ProjectTeams view that:

  1. Fetches and displays only the teams assigned to the specific building.
  2. Filters out "zombie" data (deleted teams that still have ID references).
  3. Allows users to edit team details via a modal without navigating away.
  4. Includes data validation and navigation fixes.

Related PRS (if any):

This frontend PR utilizes existing backend endpoints. No new backend PR is required.


Main changes explained:

  • New Component: Created ProjectTeams.jsx to render the building-specific team list.
  • Data Integration: Implemented Redux logic (getAllUserTeams) to map Team IDs to readable names and statuses.
  • Data Integrity: Added filtering logic to handle "zombie" IDs (deleted teams) to prevent the dashboard from crashing.
  • Edit Functionality: Integrated CreateNewTeamPopup to handle team updates.
  • Validation: Added client-side validation to prevent users from saving empty team names.
  • UX Improvements: - Added "Back to Dashboard" navigation

How to test:

  1. Checkout the current branch.

  2. Run npm install and npm start.

  3. Clear site data/cache.

  4. Log in as an Owner or Admin.

  5. Navigate to BM Dashboard -> Select a Building (e.g., Building 1). http://localhost:5173/bmdashboard

  6. Click the "Edit Existing Team" icon/button.

  7. Verify the following:

    • You are redirected to the new "Teams working on [Building Name]" page (not the main dashboard).
    • The list shows active teams (e.g., "Vishala_PR_Test_Team").
    • Click "Edit Team": The modal should open with pre-filled data.
    • Test Validation: Delete the team name and try to save. Verify the error toast appears.
    • Test Success: Enter a valid name and save. Verify the success toast appears.
    • Click "Back to Dashboard" and verify it returns you to the correct building view.
  8. Verify this new feature works in dark mode.


Screenshots or videos of changes:

Screenshot 2025-12-10 145513 Screenshot 2025-12-10 145807 Screenshot 2025-12-10 150249 Screenshot 2025-12-10 150338

Note:

While implementing this, I discovered that the main dashboard's "Members working on site" table currently displays hardcoded dummy data. This PR ensures the new edit view displays real data from the database, creating a temporary discrepancy with the main dashboard (which I have proposed a separate Action Item to fix).

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 26, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 7e9a6cb
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69bdd6e0e73cda00081d532a
😎 Deploy Preview https://deploy-preview-4458--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@adithya-6101 adithya-6101 added the do not review Do not review or look at code without full context label Nov 26, 2025
@sonarqubecloud
Copy link
Copy Markdown

@adithya-6101 adithya-6101 removed the do not review Do not review or look at code without full context label Jan 7, 2026
@beblicarl
Copy link
Copy Markdown
Contributor

This feature works as intended and the code is great

image image image

@beblicarl beblicarl self-requested a review January 15, 2026 10:08
beblicarl
beblicarl previously approved these changes Jan 15, 2026
@sonarqubecloud
Copy link
Copy Markdown

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit 187539d into development Mar 21, 2026
10 checks passed
@one-community one-community changed the title Adithya_Fix_Edit_Existing_Team_Button Adithya - Fix Edit Existing Team Button Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants