diff --git a/CHANGELOG.md b/CHANGELOG.md index 86cbd2609..6c2fe5950 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change history for ui-data-import +## [8.0.4] (IN PROGRESS) + +### Bugs fixed: +* Allow central tenant to create filed mapping profile for Orders and Invoices. (UIDATIMP-1685) + ## [8.0.3](https://github.com/folio-org/ui-data-import/tree/v8.0.3) (2024-12-04) ### Bugs fixed: diff --git a/src/settings/MappingProfiles/MappingProfilesForm.js b/src/settings/MappingProfiles/MappingProfilesForm.js index 7d976459a..95b8ecc7a 100644 --- a/src/settings/MappingProfiles/MappingProfilesForm.js +++ b/src/settings/MappingProfiles/MappingProfilesForm.js @@ -143,10 +143,11 @@ export const MappingProfilesFormComponent = ({ dispatch(change(formName, 'profile.mappingDetails', newMappingDetails)); }; - const MAPPING_PROFILES_FORM_FOLIO_RECORD_TYPES = isUserInCentralTenant ? pick(INITIAL_FOLIO_RECORD_TYPES, [ FOLIO_RECORD_TYPES.INSTANCE.type, + FOLIO_RECORD_TYPES.ORDER.type, + FOLIO_RECORD_TYPES.INVOICE.type, FOLIO_RECORD_TYPES.MARC_BIBLIOGRAPHIC.type, FOLIO_RECORD_TYPES.MARC_AUTHORITY.type, ]) : INITIAL_FOLIO_RECORD_TYPES; diff --git a/src/settings/MappingProfiles/tests/MappingProfilesForm.test.js b/src/settings/MappingProfiles/tests/MappingProfilesForm.test.js index 6d2c4c13c..b5de6a654 100644 --- a/src/settings/MappingProfiles/tests/MappingProfilesForm.test.js +++ b/src/settings/MappingProfiles/tests/MappingProfilesForm.test.js @@ -156,7 +156,7 @@ describe('MappingProfilesForm component', () => { }); describe('when user is in central tenant', () => { - it('should render "Instance", "MARC Bibliographic" and "MARC Authority" folio record types', () => { + it('should render "Instance", "Order", "Invoice", "MARC Bibliographic" and "MARC Authority" folio record types', () => { spyOnCheckIfUserInCentralTenant.mockReturnValue(true); const { container } = renderMappingProfilesForm(mappingProfilesFormProps); @@ -165,11 +165,11 @@ describe('MappingProfilesForm component', () => { expect(within(folioRecordTypesContainer).queryByText('Holdings')).not.toBeInTheDocument(); expect(within(folioRecordTypesContainer).queryByText('Item')).not.toBeInTheDocument(); - expect(within(folioRecordTypesContainer).queryByText('Order')).not.toBeInTheDocument(); - expect(within(folioRecordTypesContainer).queryByText('Invoice')).not.toBeInTheDocument(); expect(within(folioRecordTypesContainer).queryByText('MARC Holdings')).not.toBeInTheDocument(); expect(within(folioRecordTypesContainer).getByText('Instance')).toBeInTheDocument(); + expect(within(folioRecordTypesContainer).queryByText('Order')).toBeInTheDocument(); + expect(within(folioRecordTypesContainer).queryByText('Invoice')).toBeInTheDocument(); expect(within(folioRecordTypesContainer).getByText('MARC Bibliographic')).toBeInTheDocument(); expect(within(folioRecordTypesContainer).getByText('MARC Authority')).toBeInTheDocument(); });