diff --git a/.github/workflows/build-npm-release.yml b/.github/workflows/build-npm-release.yml index bb707639..50632ef7 100644 --- a/.github/workflows/build-npm-release.yml +++ b/.github/workflows/build-npm-release.yml @@ -154,7 +154,7 @@ jobs: comment_title: Jest Unit Test Statistics - name: Publish Jest coverage report - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: always() with: name: jest-coverage-report @@ -162,7 +162,7 @@ jobs: retention-days: 30 - name: Publish yarn.lock - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: yarn.lock diff --git a/.github/workflows/build-npm.yml b/.github/workflows/build-npm.yml index eec206a7..2f59de8c 100644 --- a/.github/workflows/build-npm.yml +++ b/.github/workflows/build-npm.yml @@ -97,7 +97,7 @@ jobs: comment_title: Jest Unit Test Statistics - name: Publish Jest coverage report - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: always() with: name: jest-coverage-report @@ -105,7 +105,7 @@ jobs: retention-days: 30 - name: Publish yarn.lock - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: failure() with: name: yarn.lock diff --git a/CHANGELOG.md b/CHANGELOG.md index 376b4002..931a8203 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change history for ui-oa +## 2.0.2 2024-09-12 +* UIOA-229 UI uses non-existent permission oa.work.manage +* Payers' amounts lose decimal separator with non-English locale + ## 2.0.1 2024-04-26 * UIOA-222 Charges - Decimal separator ignored when saving with non-english locale * UIOA-215 Calculations on OA charges can result in invalid values diff --git a/package.json b/package.json index 225412ca..218201ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@folio/oa", - "version": "2.0.1", + "version": "2.0.2", "description": "FOLIO app for Open Access management", "main": "src/index.js", "repository": "folio/ui-oa", @@ -58,7 +58,11 @@ { "permissionName": "module.oa.enabled", "displayName": "UI: ui-oa module is enabled", - "visible": false + "visible": false, + "subPermissions": [ + "oa.refdata.read", + "oa.settings.read" + ] }, { "permissionName": "settings.oa.enabled", @@ -81,41 +85,142 @@ "visible": true }, { - "permissionName": "ui-oa.oa.view", - "displayName": "Open Access Requests: Search & view all", - "description": "A user with this permission can search and view existing Open Access publication requests and related information including checklists. This includes the permission to see and access the OA app in the Folio interface", + "permissionName": "ui-oa.publicationRequest.view", + "displayName": "Open Access: Search & view publication requests", + "description": "A user with this permission can search and view existing publication requests. This includes the permission to see and access the Open Access app in the Folio interface", + "visible": false, "subPermissions": [ "module.oa.enabled", "oa.publicationRequest.view", - "oa.scholarlyWork.view", - "oa.works.view", - "oa.titleInstances.view", "oa.correspondence.view", - "oa.party.view", "oa.charges.view", - "oa.checklistItems.view", - "oa.refdata.read", - "oa.reports.get" + "oa.reports.item.get" + ] + }, + { + "permissionName": "ui-oa.publicationRequest.edit", + "displayName": "Open Access: Edit publication requests", + "description": "Grants all permissions included in 'Open Access: Search & view publication requests' plus the ability to edit publication requests", + "visible": false, + "subPermissions": [ + "ui-oa.publicationRequest.view", + "oa.publicationRequest.edit", + "oa.correspondence.edit", + "oa.charges.edit" + ] + }, + { + "permissionName": "ui-oa.publicationRequest.manage", + "displayName": "Open Access: Manage publication requests", + "description": "Grants all permissions included in 'Open Access: Edit publication requests' plus the ability to delete publication requests", + "visible": false, + "subPermissions": [ + "ui-oa.publicationRequest.edit", + "oa.publicationRequest.manage", + "oa.correspondence.manage", + "oa.charges.manage" + ] + }, + { + "permissionName": "ui-oa.party.view", + "displayName": "Open Access: Search & view people", + "description": "A user with this permission can search and view existing people. This includes the permission to see and access the Open Access app in the Folio interface", + "visible": false, + "subPermissions": [ + "module.oa.enabled", + "oa.party.view" + ] + }, + { + "permissionName": "ui-oa.party.edit", + "displayName": "Open Access: Edit people", + "description": "Grants all permissions included in 'Open Access: Search & view people' plus the ability to edit people", + "visible": false, + "subPermissions": [ + "ui-oa.party.view", + "oa.party.edit" + ] + }, + { + "permissionName": "ui-oa.party.manage", + "displayName": "Open Access: Manage people", + "description": "Grants all permissions included in 'Open Access: Edit people' plus the ability to delete people records", + "visible": false, + "subPermissions": [ + "ui-oa.party.edit", + "oa.party.manage" + ] + }, + { + "permissionName": "ui-oa.journal.view", + "displayName": "Open Access: Search & view journals", + "description": "A user with this permission can search and view existing journals. This includes the permission to see and access the Open Access app in the Folio interface", + "visible": false, + "subPermissions": [ + "module.oa.enabled", + "oa.works.view" + ] + }, + { + "permissionName": "ui-oa.checklist.view", + "displayName": "Open Access: View checklists", + "description": "A user with this permission can view checklist items", + "visible": false, + "subPermissions": [ + "oa.checklistItems.view" + ] + }, + { + "permissionName": "ui-oa.journal.edit", + "displayName": "Open Access: Edit journals", + "description": "Grants all permissions included in 'Open Access: Search & view journals' plus the ability to edit journals", + "visible": false, + "subPermissions": [ + "ui-oa.journal.view", + "oa.works.edit" + ] + }, + { + "permissionName": "ui-oa.view", + "displayName": "Open Access Requests: Search & view all", + "description": "A user with this permission can search and view existing Open Access publication requests and related information including checklists. This includes the permission to see and access the OA app in the Folio interface", + "subPermissions": [ + "module.oa.enabled", + "ui-oa.publicationRequest.view", + "ui-oa.party.view", + "ui-oa.journal.view", + "ui-oa.checklist.view" + ], + "replaces": [ + "ui-oa.oa.view" ], "visible": true }, { - "permissionName": "ui-oa.oa.manage", + "permissionName": "ui-oa.edit", "displayName": "Open Access Requests: Edit all", "description": "A user with this permission can search, view and edit Open Access publication requests and related information including checklists. This includes the permission to create and edit new requests, parties (people), works, charges as well as to change the status and visibility of checklist items on a request", "subPermissions": [ - "oa.publicationRequest.manage", - "oa.scholarlyWork.manage", - "oa.works.manage", - "oa.titleInstances.manage", - "oa.correspondence.manage", - "oa.party.manage", - "oa.charges.manage", - "oa.checklistItems.manage", - "oa.refdata.read", - "oa.reports.get" + "ui-oa.view", + "ui-oa.publicationRequest.edit", + "ui-oa.party.edit", + "ui-oa.journal.edit" + ], + "replaces": [ + "ui-oa.oa.manage" ], "visible": true + }, + { + "permissionName": "ui-oa.manage", + "displayName": "Open Access Requests: Manage all", + "description": "A user with this permission can search, view, edit and delete Open Access publication requests and related information with the exception of journal records.", + "subPermissions": [ + "ui-oa.edit", + "ui-oa.publicationRequest.manage", + "ui-oa.party.manage" + ], + "visible": false } ] }, diff --git a/src/components/ChargeFormSections/PayersFieldArray/PayersFieldArray.js b/src/components/ChargeFormSections/PayersFieldArray/PayersFieldArray.js index 9f21d552..7a71065d 100644 --- a/src/components/ChargeFormSections/PayersFieldArray/PayersFieldArray.js +++ b/src/components/ChargeFormSections/PayersFieldArray/PayersFieldArray.js @@ -130,9 +130,9 @@ const PayersField = ({ fields: { name } }) => { + {stripes.hasPerm('ui-oa.journal.edit') && ( + + )} ); }; diff --git a/src/components/PublicationRequestSections/Charges/Charges.js b/src/components/PublicationRequestSections/Charges/Charges.js index 888ab2e7..36be2c59 100644 --- a/src/components/PublicationRequestSections/Charges/Charges.js +++ b/src/components/PublicationRequestSections/Charges/Charges.js @@ -104,7 +104,7 @@ const Charges = ({ request }) => { const renderAddChargesButton = () => { return ( <> - + - +