-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UISACQCOMP-194 ECS - Support central ordering in the acq modules (#784)
* UISACQCOMP-194 ECS - Support central ordering in the acq modules * update part of components and hooks to support central ordering * update filters to support tenant id prop * update hooks and filters to support tenant id option * Updates tests according to changes * add unit test * fix issue with closing the lookup * update changelog * remove redundant code * update react query hook * adapt more hooks and components to work with central ordering * fix test * tests * remove unused imports * one more hook adapted to central ordering enabled * fix test * resolve code smells
- Loading branch information
1 parent
e6ed48a
commit 05f04cf
Showing
85 changed files
with
1,389 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,22 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import { stripesConnect } from '@folio/stripes/core'; | ||
|
||
import { acqUnitsManifest } from '../manifests'; | ||
import { useAcquisitionUnits } from '../hooks'; | ||
import AcqUnitFilter from './AcqUnitFilter'; | ||
|
||
const AcqUnitFilterContainer = ({ resources, ...rest }) => { | ||
const acqUnitsRecords = resources.acqUnits?.records; | ||
const AcqUnitFilterContainer = ({ tenantId, ...rest }) => { | ||
const { acquisitionsUnits } = useAcquisitionUnits({ tenantId }); | ||
|
||
return ( | ||
<AcqUnitFilter | ||
labelId="stripes-acq-components.filter.acqUnit" | ||
{...rest} | ||
acqUnits={acqUnitsRecords} | ||
acqUnits={acquisitionsUnits} | ||
/> | ||
); | ||
}; | ||
|
||
AcqUnitFilterContainer.manifest = Object.freeze({ | ||
acqUnits: acqUnitsManifest, | ||
}); | ||
|
||
AcqUnitFilterContainer.propTypes = { | ||
resources: PropTypes.object.isRequired, | ||
tenantId: PropTypes.string, | ||
}; | ||
|
||
export default stripesConnect(AcqUnitFilterContainer); | ||
export default AcqUnitFilterContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.