diff --git a/CHANGELOG.md b/CHANGELOG.md index 364c8ac35..b06f699be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ ### Features added: * `React v19`: refactor away from default props for functional components. (UIDATIMP-1634) +## [8.0.3] (IN PROGRESS) + +### Bugs fixed: +* Allow central tenant to create action profile for Orders and Invoices. (UIDATIMP-1679) + ## [8.0.2](https://github.com/folio-org/ui-data-import/tree/v8.0.2) (2024-11-21) ### Bugs fixed: diff --git a/src/settings/ActionProfiles/ActionProfilesForm.js b/src/settings/ActionProfiles/ActionProfilesForm.js index c17a84b86..e942d8d61 100644 --- a/src/settings/ActionProfiles/ActionProfilesForm.js +++ b/src/settings/ActionProfiles/ActionProfilesForm.js @@ -131,6 +131,8 @@ export const ActionProfilesFormComponent = ({ const RECORD_TYPES = isUserInCentralTenant ? pick(ACTION_PROFILES_FORM_FOLIO_RECORD_TYPES, [ ACTION_PROFILES_FORM_FOLIO_RECORD_TYPES.INSTANCE.type, + ACTION_PROFILES_FORM_FOLIO_RECORD_TYPES.INVOICE.type, + ACTION_PROFILES_FORM_FOLIO_RECORD_TYPES.ORDER.type, ACTION_PROFILES_FORM_FOLIO_RECORD_TYPES.MARC_BIBLIOGRAPHIC.type, ACTION_PROFILES_FORM_FOLIO_RECORD_TYPES.MARC_AUTHORITY.type, ]) diff --git a/src/settings/ActionProfiles/ActionProfilesForm.test.js b/src/settings/ActionProfiles/ActionProfilesForm.test.js index 6c3782d60..93243dfcb 100644 --- a/src/settings/ActionProfiles/ActionProfilesForm.test.js +++ b/src/settings/ActionProfiles/ActionProfilesForm.test.js @@ -161,19 +161,19 @@ describe('ActionProfilesForm component', () => { }); describe('when user is in central tenant', () => { - it('should render "Instance", "MARC Bibliographic" and "MARC Authority" record types', () => { + it('should render "Instance", "Order", "Invoice", "MARC Bibliographic" and "MARC Authority" record types', () => { spyOnCheckIfUserInCentralTenant.mockReturnValue(true); const { container } = renderActionProfilesForm(actionProfilesFormProps()); expect(container.querySelector('[value="INSTANCE"]')).toBeDefined(); + expect(container.querySelector('[value="ORDER"]')).toBeDefined(); + expect(container.querySelector('[value="INVOICE"]')).toBeDefined(); expect(container.querySelector('[value="MARC_BIBLIOGRAPHIC"]')).toBeDefined(); expect(container.querySelector('[value="MARC_HOLDINGS"]')).toBeDefined(); expect(container.querySelector('[value="HOLDINGS"]')).not.toBeInTheDocument(); expect(container.querySelector('[value="ITEM"]')).not.toBeInTheDocument(); - expect(container.querySelector('[value="ORDER"]')).not.toBeInTheDocument(); - expect(container.querySelector('[value="INVOICE"]')).not.toBeInTheDocument(); }); });