diff --git a/CHANGELOG.md b/CHANGELOG.md
index 404cafc75..152eba806 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,8 +3,23 @@
## [11.1.0] In progress
* `useUserTenantRoles` supplies `tenantId` in all its queries. Refs UIU-3279.
* Leverage API supported sorting of columns on pre-registrations records list. Refs UIU-3249.
-* Add permission to access users-keycloak delete method. Refs UIU-3282.
* Fix issue with `Proxy borrower` field value. Refs UIU-3290.
+* Remove duplicates from the keyboard shortcut modal. Refs UIU-3026.
+* React v19: refactor away from default props for functional components. Refs. UIU-3141.
+* Hide Create block button for user without permission. Refs UIU-3300.
+* Add HTML page title to add/edit patron block page. Refs UIU-3302.
+* Update fee/fine actions column UX for accessibility. Refs UIU-3027.
+* Rename permission after BE changes. Refs UIU-3309.
+
+## [11.0.10](https://github.com/folio-org/ui-users/tree/v11.0.10) (2025-01-10)
+[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.9...v11.0.10)
+
+* Add sub permission `manual-block-templates.collection.get` to permission `Users: Can create, edit and remove patron blocks`. Refs UIU-3305.
+
+## [11.0.9](https://github.com/folio-org/ui-users/tree/v11.0.9) (2024-12-13)
+[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.8...v11.0.9)
+
+* Add permission to access users-keycloak delete method. Refs UIU-3282.
* Check if userId is present in withUserRoles HOC. Refs UIU-3273.
* Add missed permissions for endpoints used in withUserRoles HOC. UIU-3294.
* Add view/manage roles permissions. Refs UIU-3301.
@@ -20,6 +35,13 @@
* Update permissions for mod-patron. Ref UIU-3259.
* Update permission after BE permission changes. Refs UIU-3288.
+## [11.0.6](https://github.com/folio-org/ui-users/tree/v11.0.6) (2024-11-28)
+[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.5...v11.0.6)
+
+* `useUserTenantRoles` supplies `tenantId` in all its queries. Refs UIU-3279.
+* Leverage API supported sorting of columns on pre-registrations records list. Refs UIU-3249.
+* Show all patron notice print jobs (not just ten random ones), in correct order. Fixes UIU-3269.
+
## [11.0.5](https://github.com/folio-org/ui-users/tree/v11.0.5) (2024-11-20)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.3...v11.0.5)
diff --git a/package.json b/package.json
index 3338e4b66..4a8d9a4c3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@folio/users",
- "version": "11.0.5",
+ "version": "11.0.9",
"description": "User management",
"repository": "folio-org/ui-users",
"publishConfig": {
@@ -571,10 +571,10 @@
"comments.item.get",
"payments.collection.get",
"payments.item.get",
- "feesfines.accounts.check-pay.item.post",
- "feesfines.accounts-bulk.check-pay.item.post",
- "feesfines.accounts.pay.item.post",
- "feesfines.accounts-bulk.pay.item.post"
+ "feesfines.accounts.check-pay.post",
+ "feesfines.accounts-bulk.check-pay.post",
+ "feesfines.accounts.pay.post",
+ "feesfines.accounts-bulk.pay.post"
],
"visible": true
},
@@ -589,10 +589,10 @@
"comments.item.get",
"waives.collection.get",
"waives.item.get",
- "feesfines.accounts.check-waive.item.post",
- "feesfines.accounts-bulk.check-waive.item.post",
- "feesfines.accounts.waive.item.post",
- "feesfines.accounts-bulk.waive.item.post"
+ "feesfines.accounts.check-waive.post",
+ "feesfines.accounts-bulk.check-waive.post",
+ "feesfines.accounts.waive.post",
+ "feesfines.accounts-bulk.waive.post"
],
"visible": true
},
@@ -615,6 +615,7 @@
"replaces": ["ui-users.patron_blocks"],
"subPermissions": [
"manualblocks.collection.get",
+ "manual-block-templates.collection.get",
"manualblocks.item.delete",
"manualblocks.item.get",
"manualblocks.item.post",
@@ -722,12 +723,12 @@
"ui-users.manual-waive.execute",
"feesfines.accounts.check-transfer.post",
"feesfines.accounts.check-refund.post",
- "feesfines.accounts.transfer.item.post",
- "feesfines.accounts-bulk.transfer.item.post",
- "feesfines.accounts.cancel.item.post",
- "feesfines.accounts-bulk.cancel.item.post",
- "feesfines.accounts.refund.item.post",
- "feesfines.accounts-bulk.refund.item.post",
+ "feesfines.accounts.transfer.post",
+ "feesfines.accounts-bulk.transfer.post",
+ "feesfines.accounts.cancel.post",
+ "feesfines.accounts-bulk.cancel.post",
+ "feesfines.accounts.refund.post",
+ "feesfines.accounts-bulk.refund.post",
"circulation-storage.loans.item.get",
"inventory.items.item.get"
],
@@ -1008,8 +1009,8 @@
"displayName": "Users: Create and download Cash drawer reconciliation report",
"replaces": ["ui-users.cashDrawerReport"],
"subPermissions": [
- "feesfines.feefine-reports.cash-drawer-reconciliation.item.post",
- "feesfines.feefine-reports.cash-drawer-reconciliation-source.item.post"
+ "feesfines.feefine-reports.cash-drawer-reconciliation.post",
+ "feesfines.feefine-reports.cash-drawer-reconciliation-source.post"
],
"visible": true
},
diff --git a/src/commands.js b/src/commands.js
index b293c76f7..7230bcb03 100644
--- a/src/commands.js
+++ b/src/commands.js
@@ -36,6 +36,10 @@ const commands = [
name: 'openShortcutModal',
label: (),
shortcut: 'mod+alt+k',
+ },
+ {
+ label: (),
+ shortcut: 'spacebar'
}
];
diff --git a/src/commandsGeneral.js b/src/commandsGeneral.js
deleted file mode 100644
index 20d0655bc..000000000
--- a/src/commandsGeneral.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react';
-import { FormattedMessage } from 'react-intl';
-
-const commandsGeneral = [
- {
- label: (),
- shortcut: 'spacebar'
- },
- {
- label: (),
- shortcut: 'esc'
- },
- {
- label: (),
- shortcut: 'mod+c'
- },
- {
- label: (),
- shortcut: 'mod+x'
- },
- {
- label: (),
- shortcut: 'mod+v'
- },
- {
- label: (),
- shortcut: 'mod+f'
- }
-];
-
-export default commandsGeneral;
diff --git a/src/components/Accounts/ViewFeesFines/ViewFeesFines.js b/src/components/Accounts/ViewFeesFines/ViewFeesFines.js
index b75e32899..736b92588 100644
--- a/src/components/Accounts/ViewFeesFines/ViewFeesFines.js
+++ b/src/components/Accounts/ViewFeesFines/ViewFeesFines.js
@@ -249,7 +249,7 @@ class ViewFeesFines extends React.Component {
'callNumber': f => (f.callNumber ? f.callNumber : '-'),
'dueDate': f => (f.dueDate ? this.formatDateTime(f.dueDate) : '-'),
'returnedDate': f => (this.getLoan(f).returnDate ? this.formatDateTime(this.getLoan(f).returnDate) : '-'),
- ' ': f => this.renderActions(f, this.getLoan(f)),
+ 'actions': f => this.renderActions(f, this.getLoan(f)),
};
}
@@ -478,6 +478,7 @@ class ViewFeesFines extends React.Component {
'callNumber': intl.formatMessage({ id: 'ui-users.accounts.history.columns.number' }),
'dueDate': intl.formatMessage({ id: 'ui-users.accounts.history.columns.due' }),
'returnedDate': intl.formatMessage({ id: 'ui-users.accounts.history.columns.returned' }),
+ 'actions': intl.formatMessage({ id: 'ui-users.accounts.history.columns.actions' }),
};
return (
@@ -499,7 +500,7 @@ class ViewFeesFines extends React.Component {
'callNumber': 110,
'dueDate': 110,
'returnedDate': 110,
- ' ': 50
+ 'actions': 70
}}
visibleColumns={this.props.visibleColumns}
fullWidth
diff --git a/src/components/Accounts/ViewFeesFines/ViewFeesFines.test.js b/src/components/Accounts/ViewFeesFines/ViewFeesFines.test.js
index 414a446ff..81cebbf22 100644
--- a/src/components/Accounts/ViewFeesFines/ViewFeesFines.test.js
+++ b/src/components/Accounts/ViewFeesFines/ViewFeesFines.test.js
@@ -141,7 +141,7 @@ const defaultProps = {
match: { params: { id: 1 } },
history,
user: { id: '123' },
- visibleColumns: [' ', 'metadata.createdDate', 'metadata.updatedDate', 'feeFineType', 'amount', 'remaining', 'paymentStatus.name', 'feeFineOwner', 'title', 'barcode', 'callNumber', 'dueDate', 'returnedDate', ' '],
+ visibleColumns: [' ', 'metadata.createdDate', 'metadata.updatedDate', 'feeFineType', 'amount', 'remaining', 'paymentStatus.name', 'feeFineOwner', 'title', 'barcode', 'callNumber', 'dueDate', 'returnedDate', 'actions'],
intl: {
formatMessage: ({ id }) => id
},
@@ -184,17 +184,7 @@ describe('ViewFeesFines', () => {
const checkBox = screen.getAllByRole('checkbox', { name: '' });
userEvent.click(checkBox[1]);
await userEvent.click(screen.queryByText(/ui-users.accounts.history.button.pay/i));
- expect(mockOnChangeActions).toHaveBeenCalledWith({ pay: true }, accountsData);
- await userEvent.click(screen.queryByText(/ui-users.accounts.history.button.waive/i));
- expect(mockOnChangeActions).toHaveBeenCalledWith({ waiveModal: true }, accountsData);
- await userEvent.click(screen.queryByText(/ui-users.accounts.history.button.refund/i));
- expect(mockOnChangeActions).toHaveBeenCalledWith({ refundModal: true }, accountsData);
- await userEvent.click(screen.queryByText(/ui-users.accounts.history.button.transfer/i));
- expect(mockOnChangeActions).toHaveBeenCalledWith({ transferModal: true }, accountsData);
- await userEvent.click(screen.queryByText(/ui-users.accounts.button.error/i));
- expect(mockOnChangeActions).toHaveBeenCalledWith({ cancellation: true }, accountsData);
- await userEvent.click(screen.queryByText(/ui-users.accounts.history.button.loanDetails/i));
- expect(nav.onClickViewLoanActionsHistory).toBeCalled();
+ expect(mockOnChangeActions).toHaveBeenCalledWith({ 'refund': true, 'regularpayment': false, 'transfer': false, 'waive': false });
});
it('onClickViewLoanActionsHistory to be called when loanDetails clicked from DropDownMenu', async () => {
renderViewFeesFines(defaultProps);
diff --git a/src/components/AffiliationsManager/AffiliationsManager.js b/src/components/AffiliationsManager/AffiliationsManager.js
index 257609f4a..b0bb0368d 100644
--- a/src/components/AffiliationsManager/AffiliationsManager.js
+++ b/src/components/AffiliationsManager/AffiliationsManager.js
@@ -5,11 +5,11 @@ import { AffiliationsManagerModal } from './AffiliationsManagerModal';
import AffiliationsManagerTrigger from './AffiliationsManagerTrigger';
const AffiliationsManager = ({
- disabled,
+ disabled = false,
onUpdateAffiliations,
- renderTrigger,
+ renderTrigger = AffiliationsManagerTrigger,
userId,
- withTrigger,
+ withTrigger = true,
}) => {
const [isModalOpen, toggleModal] = useToggle(!withTrigger);
@@ -36,10 +36,4 @@ AffiliationsManager.propTypes = {
withTrigger: PropTypes.bool,
};
-AffiliationsManager.defaultProps = {
- disabled: false,
- renderTrigger: AffiliationsManagerTrigger,
- withTrigger: true,
-};
-
export default AffiliationsManager;
diff --git a/src/components/AffiliationsSelect/AffiliationsSelect.js b/src/components/AffiliationsSelect/AffiliationsSelect.js
index 18faab0b1..6dcde943f 100644
--- a/src/components/AffiliationsSelect/AffiliationsSelect.js
+++ b/src/components/AffiliationsSelect/AffiliationsSelect.js
@@ -13,7 +13,7 @@ import { Selection } from '@folio/stripes/components';
import { affiliationsShape } from '../../shapes';
const AffiliationsSelect = ({
- id,
+ id = 'user-assigned',
affiliations,
value,
onChange,
@@ -53,10 +53,6 @@ const AffiliationsSelect = ({
);
};
-AffiliationsSelect.defaultProps = {
- id: 'user-assigned',
-};
-
AffiliationsSelect.propTypes = {
affiliations: affiliationsShape,
onChange: PropTypes.func.isRequired,
diff --git a/src/components/AssignedUsers/AssignedUsersContainer.js b/src/components/AssignedUsers/AssignedUsersContainer.js
index 996a33385..54da168b6 100644
--- a/src/components/AssignedUsers/AssignedUsersContainer.js
+++ b/src/components/AssignedUsers/AssignedUsersContainer.js
@@ -24,7 +24,12 @@ import AssignUsers from './AssignUsers';
import AssignedUsersList from './AssignedUsersList';
import { getUpdatedUsersList } from './utils';
-const AssignedUsersContainer = ({ permissionSetId, expanded, onToggle, tenantId }) => {
+const AssignedUsersContainer = ({
+ permissionSetId,
+ expanded = true,
+ onToggle,
+ tenantId
+}) => {
const callout = useCallout();
const intl = useIntl();
@@ -123,8 +128,4 @@ AssignedUsersContainer.propTypes = {
tenantId: PropTypes.string,
};
-AssignedUsersContainer.defaultProps = {
- expanded: true,
-};
-
export default AssignedUsersContainer;
diff --git a/src/components/AssignedUsers/AssignedUsersList.js b/src/components/AssignedUsers/AssignedUsersList.js
index b4c7234a3..7e3b14d8f 100644
--- a/src/components/AssignedUsers/AssignedUsersList.js
+++ b/src/components/AssignedUsers/AssignedUsersList.js
@@ -12,7 +12,7 @@ import {
VISIBLE_COLUMNS,
} from './constants';
-const AssignedUsersList = ({ users, isFetching }) => (
+const AssignedUsersList = ({ users = [], isFetching = false }) => (
{
const {
failedRenewals,
successRenewals,
- height,
+ height = 300,
errorMessages,
requestCounts,
loanPolicies,
@@ -126,7 +122,6 @@ const BulkRenewedLoansList = (props) => {
);
};
-BulkRenewedLoansList.defaultProps = defaultProps;
BulkRenewedLoansList.propTypes = propTypes;
export default BulkRenewedLoansList;
diff --git a/src/components/EditSections/EditUserInfo/components/ChangeUserTypeModal/ChangeUserTypeModal.js b/src/components/EditSections/EditUserInfo/components/ChangeUserTypeModal/ChangeUserTypeModal.js
index dece42bc5..863d4e517 100644
--- a/src/components/EditSections/EditUserInfo/components/ChangeUserTypeModal/ChangeUserTypeModal.js
+++ b/src/components/EditSections/EditUserInfo/components/ChangeUserTypeModal/ChangeUserTypeModal.js
@@ -9,7 +9,7 @@ import {
import { USER_TYPES } from '../../../../../constants';
-const ChangeUserTypeModal = ({ onChange, initialUserType, open }) => {
+const ChangeUserTypeModal = ({ onChange, initialUserType, open = false }) => {
const userTypeModalFooter = (