Skip to content

Commit 41a2eac

Browse files
authored
fix: wrong Modal Header when adding users (#1594)
1 parent cdf7a19 commit 41a2eac

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

apps/frontend/src/components/common/UserManagementTable.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export type UserManagementTableProps = {
2727
title: string;
2828
addButtonLabel?: string;
2929
addButtonTooltip?: string;
30+
/** Header shown at the top of the invite/selector modal */
31+
addModalTitle?: string;
3032
/** Disable the add button */
3133
disabled?: boolean;
3234
/** Custom actions to be passed to PeopleTable */
@@ -45,6 +47,7 @@ const UserManagementTable = ({
4547
title,
4648
addButtonLabel = 'Add',
4749
addButtonTooltip = 'Add a participant',
50+
addModalTitle,
4851
disabled = false,
4952
onUserAction,
5053
excludeUserIds = [],
@@ -78,7 +81,7 @@ const UserManagementTable = ({
7881
const InviteComponent = (
7982
<ProposalPeopleSelectorModal
8083
modalOpen={modalOpen}
81-
title="Add co-proposers"
84+
title={addModalTitle}
8285
onClose={() => setOpen(false)}
8386
onAddParticipants={handleAddParticipants}
8487
excludeUserIds={[...users.map((user) => user.id), ...excludeUserIds]}

apps/frontend/src/components/proposal/CoProposers.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const CoProposers = ({
4141
{...props}
4242
title="Co-Proposers"
4343
addButtonTooltip="Add a co-proposer"
44+
addModalTitle="Add co-proposers"
4445
onUserAction={handleUserAction}
4546
excludeUserIds={proposer ? [proposer.id] : []}
4647
// QuickFix for material table changing immutable state

apps/frontend/src/components/proposal/DataAccessUsersModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const DataAccessUsersModal = ({
8787
setInvites={() => {}}
8888
title="Data access users"
8989
addButtonLabel="Add Data Access User"
90+
addModalTitle="Add Data Access User"
9091
excludeUserIds={excludeUserIds}
9192
/>
9293
<ActionButtonContainer>

apps/frontend/src/components/proposalBooking/CreateUpdateVisit.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function CreateUpdateVisit({ event, close }: CreateUpdateVisitProps) {
9393
</Typography>
9494
<UserManagementTable
9595
title="Visitors"
96+
addModalTitle="Add Visitors"
9697
setInvites={setVisitInvites}
9798
invites={visitInvites}
9899
setUsers={(team: BasicUserDetails[]) => {

0 commit comments

Comments
 (0)