mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
[ bug fixed ]: removed user adding dropdown in all user page (#4091)
* removed user adding dropdown in all user page * removed dropdown in app tab , in admin page
This commit is contained in:
parent
e7553cd411
commit
bf011bebf7
1 changed files with 59 additions and 55 deletions
|
|
@ -386,36 +386,38 @@ class ManageGroupPermissionResourcesComponent extends React.Component {
|
|||
<div className="tab-content">
|
||||
{/* Apps Tab */}
|
||||
<div className={`tab-pane ${currentTab === 'apps' ? 'active show' : ''}`}>
|
||||
<div className="row">
|
||||
<div className="col-5" data-cy="select-search">
|
||||
<SelectSearch
|
||||
className={`${this.props.darkMode ? 'select-search-dark' : 'select-search'}`}
|
||||
options={appSelectOptions}
|
||||
closeOnSelect={false}
|
||||
multiple
|
||||
search={true}
|
||||
value={selectedAppIds}
|
||||
filterOptions={fuzzySearch}
|
||||
onChange={(value) => this.setSelectedApps(value)}
|
||||
printOptions="on-focus"
|
||||
placeholder={this.props.t(
|
||||
'header.organization.menus.manageGroups.permissionResources.addAppsToGroup',
|
||||
'Select apps to add to the group'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-auto">
|
||||
<div
|
||||
className={`btn btn-primary w-100 ${isAddingApps ? 'btn-loading' : ''} ${
|
||||
selectedAppIds.length === 0 ? 'disabled' : ''
|
||||
}`}
|
||||
onClick={() => this.addSelectedAppsToGroup(groupPermission.id, selectedAppIds)}
|
||||
data-cy="add-button"
|
||||
>
|
||||
{this.props.t('globals.add', 'Add')}
|
||||
{groupPermission?.group !== 'admin' && (
|
||||
<div className="row">
|
||||
<div className="col-5" data-cy="select-search">
|
||||
<SelectSearch
|
||||
className={`${this.props.darkMode ? 'select-search-dark' : 'select-search'}`}
|
||||
options={appSelectOptions}
|
||||
closeOnSelect={false}
|
||||
multiple
|
||||
search={true}
|
||||
value={selectedAppIds}
|
||||
filterOptions={fuzzySearch}
|
||||
onChange={(value) => this.setSelectedApps(value)}
|
||||
printOptions="on-focus"
|
||||
placeholder={this.props.t(
|
||||
'header.organization.menus.manageGroups.permissionResources.addAppsToGroup',
|
||||
'Select apps to add to the group'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-auto">
|
||||
<div
|
||||
className={`btn btn-primary w-100 ${isAddingApps ? 'btn-loading' : ''} ${
|
||||
selectedAppIds.length === 0 ? 'disabled' : ''
|
||||
}`}
|
||||
onClick={() => this.addSelectedAppsToGroup(groupPermission.id, selectedAppIds)}
|
||||
data-cy="add-button"
|
||||
>
|
||||
{this.props.t('globals.add', 'Add')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<br />
|
||||
<div>
|
||||
<div className="table-responsive">
|
||||
|
|
@ -536,35 +538,37 @@ class ManageGroupPermissionResourcesComponent extends React.Component {
|
|||
|
||||
{/* Users Tab */}
|
||||
<div className={`tab-pane ${currentTab === 'users' ? 'active show' : ''}`}>
|
||||
<div className="row">
|
||||
<div className="col-5">
|
||||
<SelectSearch
|
||||
className={`${this.props.darkMode ? 'select-search-dark' : 'select-search'}`}
|
||||
options={userSelectOptions}
|
||||
closeOnSelect={false}
|
||||
multiple
|
||||
search={true}
|
||||
filterOptions={fuzzySearch}
|
||||
value={selectedUserIds}
|
||||
onChange={(value) => this.setSelectedUsers(value)}
|
||||
printOptions="on-focus"
|
||||
placeholder={this.props.t(
|
||||
'header.organization.menus.manageGroups.permissionResources.addUsersToGroup',
|
||||
'Select users to add to the group'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-auto">
|
||||
<div
|
||||
className={`btn btn-primary w-100 ${isAddingUsers ? 'btn-loading' : ''} ${
|
||||
selectedUserIds.length === 0 ? 'disabled' : ''
|
||||
}`}
|
||||
onClick={() => this.addSelectedUsersToGroup(groupPermission.id, selectedUserIds)}
|
||||
>
|
||||
{this.props.t('globals.add', 'Add')}
|
||||
{groupPermission?.group === 'admin' && (
|
||||
<div className="row">
|
||||
<div className="col-5">
|
||||
<SelectSearch
|
||||
className={`${this.props.darkMode ? 'select-search-dark' : 'select-search'}`}
|
||||
options={userSelectOptions}
|
||||
closeOnSelect={false}
|
||||
multiple
|
||||
search={true}
|
||||
filterOptions={fuzzySearch}
|
||||
value={selectedUserIds}
|
||||
onChange={(value) => this.setSelectedUsers(value)}
|
||||
printOptions="on-focus"
|
||||
placeholder={this.props.t(
|
||||
'header.organization.menus.manageGroups.permissionResources.addUsersToGroup',
|
||||
'Select users to add to the group'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-auto">
|
||||
<div
|
||||
className={`btn btn-primary w-100 ${isAddingUsers ? 'btn-loading' : ''} ${
|
||||
selectedUserIds.length === 0 ? 'disabled' : ''
|
||||
}`}
|
||||
onClick={() => this.addSelectedUsersToGroup(groupPermission.id, selectedUserIds)}
|
||||
>
|
||||
{this.props.t('globals.add', 'Add')}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<br />
|
||||
<div>
|
||||
<div className="table-responsive">
|
||||
|
|
|
|||
Loading…
Reference in a new issue