From b1f4232984d544183d8c8cd011aba12813e5b947 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 9 Mar 2021 10:25:17 -0500 Subject: [PATCH] LP1904036 patron tab counts Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../eg2/src/app/staff/circ/patron/patron.component.html | 15 ++++++++++++--- .../src/eg2/src/app/staff/circ/patron/patron.component.ts | 8 ++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html index 53024df244..e92bdfd1c7 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html @@ -56,7 +56,9 @@
  • - Items Out + + Items Out ({{counts('checkouts', 'total_out')}}) +
    @@ -65,14 +67,21 @@
  • - Holds + + Holds ({{counts('holds', 'ready')}} / {{counts('holds', 'total')}}) +
  • - Bills + + Bills + + ({{counts('fines', 'balance_owed') | currency}}) + + diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts index 9c28ee7d4c..6c5eeba44f 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.ts @@ -178,5 +178,13 @@ export class PatronComponent implements OnInit, AfterViewInit { // show scary warning, etc. } + + counts(part: string, field: string): number { + if (this.context && this.context.patronStats) { + return this.context.patronStats[part][field]; + } else { + return 0; + } + } } -- 2.11.0