Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIU-2869: remove initial selected user types from filters #2561

Merged
merged 2 commits into from
Sep 27, 2023
Merged
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
10 changes: 0 additions & 10 deletions src/views/UserSearch/UserSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ import CashDrawerReconciliationReportPDF from '../../components/data/reports/cas
import CashDrawerReconciliationReportCSV from '../../components/data/reports/cashDrawerReconciliationReportCSV';
import FinancialTransactionsReport from '../../components/data/reports/FinancialTransactionsReport';
import LostItemsLink from '../../components/LostItemsLink';
import { getCentralTenantId, isConsortiumEnabled } from '../../components/util';
import { USER_TYPES } from '../../constants';
import Filters from './Filters';

import css from './UserSearch.css';
Expand Down Expand Up @@ -652,7 +650,6 @@ class UserSearch extends React.Component {
onNeedMoreData,
resources,
contentRef,
stripes,
mutator: { resultOffset, cashDrawerReportSources },
stripes: { timezone },
okapi: { currentUser },
Expand Down Expand Up @@ -719,12 +716,6 @@ class UserSearch extends React.Component {
email: user => get(user, ['personal', 'email']),
};

const { PATRON, SHADOW, STAFF, SYSTEM } = USER_TYPES;
const isCentralTenant = getCentralTenantId(stripes);
const isConsortium = isConsortiumEnabled(stripes);
const defaultSelectedUserTypes = isCentralTenant ? [STAFF, SHADOW, SYSTEM] : [STAFF, PATRON, SYSTEM];
const initialFilters = isConsortium ? { userType: defaultSelectedUserTypes } : {};

return (
<HasCommand commands={this.shortcuts}>
<div data-test-user-instances ref={contentRef}>
Expand All @@ -734,7 +725,6 @@ class UserSearch extends React.Component {
onComponentWillUnmount={onComponentWillUnmount}
initialSearch={initialSearch}
initialSearchState={{ query: '' }}
initialFilterState={initialFilters}
>
{
({
Expand Down
Loading