Skip to content

Commit

Permalink
Merge pull request #384 from NYPL-Simplified/SIMPLY-3945/bug-fix
Browse files Browse the repository at this point in the history
Simply 3945/bug fix
  • Loading branch information
oliviawongnyc authored Feb 11, 2022
2 parents b5773f5 + 98c31c0 commit 2a8d6ac
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog


### v0.5.15

#### Updated/Bugfix

- Fixed two bugs: one in which an error message in the List Manager didn't reset when a user moved to a new list, and another in which the updated entry count would not come through for a new list that the user added books to, navigated away from, and then navigated back to.

### 2/1/22

#### Updated
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplified-circulation-web",
"version": "0.5.14",
"version": "0.5.15",
"description": "Web Front-end for Library Simplified Circulation Manager Admin Interface",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions src/components/CustomListEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default function CustomListEditor({
setDraftEntries([]);
}
setTotalListEntries(entryCount ? parseInt(entryCount, 10) : 0);
setShowSaveError(false);
}, [list]);

React.useEffect(() => {
Expand Down
10 changes: 2 additions & 8 deletions src/components/CustomListEntries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,8 @@ export default function CustomListEntries({

React.useEffect(() => {
if (totalListEntries) {
let displayTotal;
if (totalListEntries > 50) {
displayTotal = `1 - ${entries.length} of ${totalListEntries}`;
} else {
displayTotal = `1 - ${entries.length} of ${entries.length}`;
}

const booksText = entries.length === 1 ? "Book" : "Books";
const displayTotal = `1 - ${entries.length} of ${totalListEntries}`;
const booksText = totalListEntries === 1 ? "Book" : "Books";
setEntryListDisplay(`Displaying ${displayTotal} ${booksText}`);
} else {
setEntryListDisplay("No books in this list");
Expand Down
1 change: 1 addition & 0 deletions src/components/CustomLists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export class CustomLists extends React.Component<
nextProps.fetchCustomListDetails &&
nextProps.identifier !== this.props.identifier
) {
nextProps.fetchCustomLists();
nextProps.fetchCustomListDetails(nextProps.identifier);
}
}
Expand Down

0 comments on commit 2a8d6ac

Please sign in to comment.