webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js in katello-4.3.0.rc2.1 vs webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js in katello-4.3.0.rc3

- old
+ new

@@ -1,7 +1,8 @@ import React, { useState, useEffect, useCallback } from 'react'; import useDeepCompareEffect from 'use-deep-compare-effect'; +import { lowerCase, upperFirst } from 'lodash'; import { useSelector, shallowEqual, useDispatch } from 'react-redux'; import { Bullseye, Split, SplitItem, @@ -32,11 +33,10 @@ import ContentCounts from './ContentCounts'; import LastSync from './LastSync'; import RepoIcon from './RepoIcon'; import AddedStatusLabel from '../../../../components/AddedStatusLabel'; import SelectableDropdown from '../../../../components/SelectableDropdown'; -import { capitalize } from '../../../../utils/helpers'; import { hasPermission } from '../../helpers'; const allRepositories = 'All repositories'; // Add any exceptions to the display names here @@ -127,12 +127,12 @@ if (repoTypesStatus === STATUS.RESOLVED && repoTypesResponse) { const allRepoTypes = {}; allRepoTypes[allRepositories] = 'all'; repoTypesResponse.forEach((type) => { const { name } = type; - const typeFullName = Object.prototype.hasOwnProperty.call(repoTypeNames, name) ? - repoTypeNames[name] : capitalize(name); + const typeFullName = name in repoTypeNames ? + repoTypeNames[name] : upperFirst(lowerCase(name)); allRepoTypes[`${typeFullName} Repositories`] = name; }); setRepoTypes(allRepoTypes); } }, [repoTypesResponse, repoTypesStatus]); @@ -207,13 +207,10 @@ const emptySearchBody = __('Try changing your search settings.'); const activeFilters = [typeSelected, statusSelected]; const defaultFilters = [allRepositories, ALL_STATUSES]; const dropdownItems = [ - <DropdownItem aria-label="bulk_add" key="bulk_add" isDisabled={!hasNotAddedSelected} component="button" onClick={addBulk}> - {__('Add')} - </DropdownItem>, <DropdownItem aria-label="bulk_remove" key="bulk_remove" isDisabled={!hasAddedSelected} component="button" onClick={removeBulk}> {__('Remove')} </DropdownItem>, ]; @@ -253,10 +250,10 @@ error={repoTypesStatus === STATUS.ERROR} /> </SplitItem> <SplitItem> <SelectableDropdown - items={[ADDED, NOT_ADDED, ALL_STATUSES]} + items={[ALL_STATUSES, ADDED, NOT_ADDED]} title={__('Status')} selected={statusSelected} setSelected={setStatusSelected} placeholderText={__('Status')} />