diff --git a/CHANGELOG.md b/CHANGELOG.md index e150a2c0e..c8db6149d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change history for ui-users +## 3.0.5 (IN PROGRESS) + +* Fee/Fine Details is not refreshing, which may result in user entering duplicate actions. Fixes UIU-1644. + ## [3.0.4](https://github.com/folio-org/ui-users/tree/v3.0.4) (2020-04-28) [Full Changelog](https://github.com/folio-org/ui-users/compare/v3.0.3...v3.0.4) diff --git a/src/views/AccountDetails/AccountDetails.js b/src/views/AccountDetails/AccountDetails.js index 2f1c6f3c6..9d89982d5 100644 --- a/src/views/AccountDetails/AccountDetails.js +++ b/src/views/AccountDetails/AccountDetails.js @@ -119,7 +119,7 @@ class AccountDetails extends React.Component { resources, } = props; - const accountActivity = (resources.accountActions || {}).records || []; + const accountActivity = _.uniqBy(resources?.accountActions?.records || [], action => action.id); const sortData = _.orderBy(accountActivity, ['dateAction'], ['desc']); const balance = (sortData[0] || {}).balance; let paymentStatus; @@ -527,6 +527,7 @@ class AccountDetails extends React.Component { // perfectly well without them. ¯\_(ツ)_/¯ // this.getAccountActions(); // handleAddRecords(); + this.props.mutator.accountActions.GET(); }} />