Skip to content

Commit

Permalink
Show all patron notice print jobs, in correct order (#2806)
Browse files Browse the repository at this point in the history
We now show the top 100 patron notice print jobs, not 10.

More importantly, they are now sorted correctly (reverse
chronological) on the server side, so even if the list grows past 100
and so is truncated in the UI at the first hundred, they will be the
_right_ (most recent) first hundred.

Fixes UIU-3269.
  • Loading branch information
MikeTaylor authored Nov 21, 2024
1 parent 2358e9a commit 1eacdd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

* Review and cleanup Module Descriptors for ui-users. Refs UIU-3214.
* Change users interface to "16.3". Refs UIU-3275.
* Show all patron notice print jobs (not just ten random ones), in correct order. Fixes UIU-3269.

## [11.0.3](https://github.com/folio-org/ui-users/tree/v11.0.3) (2024-11-14)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.2...v11.0.3)
Expand Down
4 changes: 2 additions & 2 deletions src/routes/PatronNoticePrintJobsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ PatronNoticePrintJobsContainer.manifest = {
type: 'okapi',
path: 'print/entries',
params: {
query: 'type="BATCH"',
sortby: 'created/sort.descending'
query: 'type="BATCH" sortby created/sort.descending',
limit: '100',
},
records: 'items',
throwErrors: false,
Expand Down
3 changes: 1 addition & 2 deletions src/views/PatronNoticePrintJobs/PatronNoticePrintJobs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import { orderBy } from 'lodash';
import { Button, Pane, MenuSection, MultiColumnList, Checkbox, FormattedDate, FormattedTime, TextLink } from '@folio/stripes/components';
import { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -72,7 +71,7 @@ const PatronNoticePrintJobs = (props) => {

useEffect(() => {
const updatedRecords =
orderBy(records, (item) => item.created, sortOrder === DESC ? 'desc' : 'asc')
records
.map(record => ({
...record,
selected: !!record.selected,
Expand Down

0 comments on commit 1eacdd2

Please sign in to comment.