Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-remove Total Patrons from the patron stats group. (PP-1776) #138

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/components/LibraryStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const LibraryStats = ({ stats, library }: LibraryStatsProps) => {
<ul className={`stats ${statsLayoutClass}`}>
<li className="stat-group stat-patrons-group">
<StatsPatronGroup
total={patrons.total}
withActiveLoan={patrons.withActiveLoan}
withActiveLoanOrHold={patrons.withActiveLoanOrHold}
heading="Current Circulation Activity"
Expand Down
11 changes: 6 additions & 5 deletions src/components/StatsPatronGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ const StatsPatronGroup = ({
label="Total Patrons"
value={total}
tooltip={`
Total number of patrons in the Palace System.
Please note:
this number could be artificially inflated if you have an
Aspen integration. We are working to address the issue and
will update you when it’s resolved.
Total number of patron records currently cached in the Palace System.

Please note: This value does not necessarily reflect direct patron
interaction with the Palace applications. Use of external discovery
systems that interact with Palace on a patron's behalf may inflate
this number.
`
.replace(/(?:\s|\r\n|\r|\n)+/g, " ")
.trim()}
Expand Down
6 changes: 2 additions & 4 deletions src/components/__tests__/LibraryStats-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,12 @@ describe("LibraryStats", () => {
/* Patrons */
expect(groups.at(0).text()).to.contain("Current Circulation Activity");
statItems = groups.at(0).find("SingleStatListItem");
expectStats(statItems.at(0).props(), "Total Patrons", 132);
expectStats(statItems.at(1).props(), "Patrons With Active Loans", 21);
expectStats(statItems.at(0).props(), "Patrons With Active Loans", 21);
expectStats(
statItems.at(2).props(),
statItems.at(1).props(),
"Patrons With Active Loans or Holds",
23
);
expect(groups.at(0).text()).to.contain("132Total Patrons");
expect(groups.at(0).text()).to.contain("21Patrons With Active Loans");
expect(groups.at(0).text()).to.contain(
"23Patrons With Active Loans or Holds"
Expand Down