Skip to content

Commit

Permalink
revert unwanted changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed May 3, 2024
1 parent 45d111f commit 74b0b61
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 47 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[Full Changelog](https://github.com/folio-org/ui-plugin-find-user/compare/v7.1.0...v7.1.1)

* Fix Select User Modal with User Assignment Status Filters pagination issue. Refs UIPFU-87.
* Add `Cancel` and `New` button to support Routing list feature and fix select all toggle button issue. Refs UIPFU-89.
* Fix select all toggle button issue. Refs UIPFU-89.

## [7.1.0](https://github.com/folio-org/ui-plugin-find-user/tree/v7.1.0) (2024-03-20)
[Full Changelog](https://github.com/folio-org/ui-plugin-find-user/compare/v7.0.0...v7.1.0)
Expand Down
4 changes: 0 additions & 4 deletions src/UserSearchModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class UserSearchModal extends Component {
}),
}),
tenantId: PropTypes.string,
showCreateUserButton: PropTypes.bool,
}

static defaultProps = {
Expand Down Expand Up @@ -92,7 +91,6 @@ class UserSearchModal extends Component {
initialSelectedUsers,
tenantId,
stripes,
showCreateUserButton = false,
} = this.props;

return (
Expand All @@ -118,10 +116,8 @@ class UserSearchModal extends Component {
{...viewProps}
onSaveMultiple={this.passUsersOut}
onSelectRow={this.passUserOut}
onClose={this.closeModal}
isMultiSelect={Boolean(selectUsers)}
initialSelectedUsers={initialSelectedUsers}
showCreateUserButton={showCreateUserButton}
/>}
</UserSearchContainer>
</Modal>
Expand Down
56 changes: 17 additions & 39 deletions src/UserSearchView.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
SearchAndSortSearchButton as FilterPaneToggle,
} from '@folio/stripes/smart-components';

import { CREATE_USER_URL } from './constants';
import filterConfig, { filterConfigWithUserAssignedStatus } from './filterConfig';
import Filters from './Filters';

Expand Down Expand Up @@ -59,7 +58,6 @@ class UserSearchView extends React.Component {
idPrefix: PropTypes.string,
isMultiSelect: PropTypes.bool,
onSelectRow: PropTypes.func,
onClose: PropTypes.func,
onSaveMultiple: PropTypes.func,
onComponentWillUnmount: PropTypes.func,
queryGetter: PropTypes.func,
Expand All @@ -69,7 +67,6 @@ class UserSearchView extends React.Component {
data: PropTypes.object,
onNeedMoreData: PropTypes.func,
visibleColumns: PropTypes.arrayOf(PropTypes.string),
showCreateUserButton: PropTypes.bool,
resultOffset: PropTypes.shape({
replace: PropTypes.func.isRequired,
}),
Expand Down Expand Up @@ -199,8 +196,6 @@ class UserSearchView extends React.Component {
isMultiSelect,
resultOffset,
initialSelectedUsers,
onClose,
showCreateUserButton,
} = this.props;
const { checkedMap, isAllChecked } = this.state;

Expand Down Expand Up @@ -263,17 +258,6 @@ class UserSearchView extends React.Component {
email: user => get(user, ['personal', 'email']),
};

const createUserButton = (
<Button
data-test-find-users-modal-save-multiple
marginBottom0
to={CREATE_USER_URL}
buttonStyle="primary"
>
<FormattedMessage id="ui-plugin-find-user.modal.button.new" />
</Button>
);

return (
<>
<div
Expand Down Expand Up @@ -373,7 +357,6 @@ class UserSearchView extends React.Component {
paneSub={resultPaneSub}
defaultWidth="fill"
padContent={false}
lastMenu={showCreateUserButton && createUserButton}
>
<MultiColumnList
visibleColumns={builtVisibleColumns}
Expand Down Expand Up @@ -422,28 +405,23 @@ class UserSearchView extends React.Component {
{
isMultiSelect && (
<div className={css.UserSearchViewFooter}>
<Button
data-test-find-users-modal-save-multiple
marginBottom0
onClick={onClose}
>
<FormattedMessage id="ui-plugin-find-user.modal.button.cancel" />
</Button>
<div>
<FormattedMessage
id="ui-plugin-find-user.modal.total"
values={{ count: checkedUsersLength }}
/>
</div>
<Button
data-test-find-users-modal-save-multiple
marginBottom0
onClick={this.saveMultiple}
disabled={disabled}
buttonStyle="primary"
>
<FormattedMessage id="ui-plugin-find-user.modal.save" />
</Button>
<>
<div>
<FormattedMessage
id="ui-plugin-find-user.modal.total"
values={{ count: checkedUsersLength }}
/>
</div>
<Button
data-test-find-users-modal-save-multiple
marginBottom0
onClick={this.saveMultiple}
disabled={disabled}
buttonStyle="primary"
>
<FormattedMessage id="ui-plugin-find-user.modal.save" />
</Button>
</>
</div>
)
}
Expand Down
1 change: 0 additions & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export const UAS = 'uas';
export const ASSIGNED_FILTER_KEY = 'uas.Assigned';
export const UNASSIGNED_FILTER_KEY = 'uas.Unassigned';
export const ASSIGNED = 'Assigned';
export const CREATE_USER_URL = '/users/create';
2 changes: 0 additions & 2 deletions translations/ui-plugin-find-user/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"modal.close": "Close",
"modal.save": "Save",
"modal.total": "Total selected: {count}",
"modal.button.new": "New",
"modal.button.cancel": "Cancel",
"searchButton.title": "Find User",
"information.patronGroup": "Patron group",
"active": "Active",
Expand Down

0 comments on commit 74b0b61

Please sign in to comment.