Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export type UserManagementTableProps = {
title: string;
addButtonLabel?: string;
addButtonTooltip?: string;
/** Header shown at the top of the invite/selector modal */
addModalTitle?: string;
/** Disable the add button */
disabled?: boolean;
/** Custom actions to be passed to PeopleTable */
Expand All @@ -45,6 +47,7 @@ const UserManagementTable = ({
title,
addButtonLabel = 'Add',
addButtonTooltip = 'Add a participant',
addModalTitle,
disabled = false,
onUserAction,
excludeUserIds = [],
Expand Down Expand Up @@ -78,7 +81,7 @@ const UserManagementTable = ({
const InviteComponent = (
<ProposalPeopleSelectorModal
modalOpen={modalOpen}
title="Add co-proposers"
title={addModalTitle}
onClose={() => setOpen(false)}
onAddParticipants={handleAddParticipants}
excludeUserIds={[...users.map((user) => user.id), ...excludeUserIds]}
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/src/components/proposal/CoProposers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const CoProposers = ({
{...props}
title="Co-Proposers"
addButtonTooltip="Add a co-proposer"
addModalTitle="Add co-proposers"
onUserAction={handleUserAction}
excludeUserIds={proposer ? [proposer.id] : []}
// QuickFix for material table changing immutable state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const DataAccessUsersModal = ({
setInvites={() => {}}
title="Data access users"
addButtonLabel="Add Data Access User"
addModalTitle="Add Data Access User"
excludeUserIds={excludeUserIds}
Comment on lines 88 to 91
/>
<ActionButtonContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function CreateUpdateVisit({ event, close }: CreateUpdateVisitProps) {
</Typography>
<UserManagementTable
title="Visitors"
addModalTitle="Add Visitors"
setInvites={setVisitInvites}
invites={visitInvites}
setUsers={(team: BasicUserDetails[]) => {
Expand Down
Loading