Skip to content

fix: wrong Modal Header when adding users#1594

Open
shivoomiess wants to merge 3 commits into
developfrom
SWAP-5365-wrongheader
Open

fix: wrong Modal Header when adding users#1594
shivoomiess wants to merge 3 commits into
developfrom
SWAP-5365-wrongheader

Conversation

@shivoomiess

@shivoomiess shivoomiess commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes an issue where the modal header displayed incorrect text when adding users.

Motivation and Context

The change is required to enhance user experience and to avoid any confusion that might arise due to the wrong modal header. It ensures that the modal header correctly reflects the action being taken by the user.

Changes

  • Introduced a new prop addModalTitle in UserManagementTable to customize the title of the add modal.
  • Set the addModalTitle prop in CoProposers, DataAccessUsersModal, and CreateUpdateVisit components to display the correct modal title when adding users.

Please note that the above changes will not introduce any breaking changes and will only improve the user interface by resolving the incorrect modal header issue.

How Has This Been Tested?

Fixes Jira Issue

https://jira.ess.eu//browse/SWAP-5365

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@shivoomiess shivoomiess requested a review from a team as a code owner June 22, 2026 12:55
@shivoomiess shivoomiess requested review from ellen-wright, jekabs-karklins and yoganandaness and removed request for a team and ellen-wright June 22, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes incorrect modal header text shown when adding users by making the “add user” modal title configurable in UserManagementTable, then supplying context-appropriate titles from each caller.

Changes:

  • Added an addModalTitle prop to UserManagementTable and wired it to the underlying ProposalPeopleSelectorModal title.
  • Set addModalTitle for adding co-proposers, data access users, and visit visitors so the modal header matches the user action.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
apps/frontend/src/components/proposalBooking/CreateUpdateVisit.tsx Sets an explicit “Add Visitors” modal title when adding visit visitors.
apps/frontend/src/components/proposal/DataAccessUsersModal.tsx Sets an explicit “Add Data Access User” modal title for the data-access user picker.
apps/frontend/src/components/proposal/CoProposers.tsx Sets an explicit “Add co-proposers” modal title for the co-proposer picker.
apps/frontend/src/components/common/UserManagementTable.tsx Introduces addModalTitle and passes it to the people selector modal to control the header text.

Comment on lines 88 to 91
title="Data access users"
addButtonLabel="Add Data Access User"
addModalTitle="Add Data Access User"
excludeUserIds={excludeUserIds}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants