From: Jason Etheridge Date: Thu, 10 Nov 2022 21:01:23 +0000 (-0500) Subject: lp1959010 toward Staff View tab X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=48dd28874074bde28ba63d1ca377545ad3f0716e;p=Evergreen.git lp1959010 toward Staff View tab * link searches for listed genres * s/Abstract:/Summary:/ * link to View all Formats and Editions * remove border from staff view * tweaking what goes where * add metabib record count next to View all Formats and Editions link * remove links for what boils down to marc 508 and 511 * made the count off-by-one trying to not make it off-by-one :) * remove the creator field * keep just Subject: * remove the Record is or is not holdable information as it doesn't present the whole truth * refresh interface on tab change Signed-off-by: Jason Etheridge Signed-off-by: Mary Llewellyn Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html index c4384a0bae..114ebcaa87 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html @@ -41,7 +41,7 @@
  • Staff View - +
  • diff --git a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html index 65cbc4df59..e69032d263 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.html @@ -1,4 +1,4 @@ -
    +
    @@ -38,29 +38,13 @@
    - -
    -
    Creator:
    -
    - -
    -
    -
    Performer:
    @@ -88,9 +72,7 @@
    @@ -116,55 +98,7 @@
    - -
    -
    General Note:
    -
    -
      -
    • - {{_note}} -
    • -
    -
    -
    - - -
    -
    Bibliography:
    -
    -
      -
    • - {{_bibliography}} -
    • -
    -
    -
    - - -
    -
    Table of Contents:
    -
    - {{summary.display.toc}} -
    -
    - - -
    -
    Thesis:
    -
    -
      -
    • - {{_thesis}} -
    • -
    -
    -
    - - - -
    - - +
    ISBN:
    @@ -176,7 +110,7 @@
    -
    +
    @@ -206,129 +140,94 @@
    - -
    -
    Hold and Copy Counts:
    -
    -
      -
    • {{summary.holdCount}} hold requests
    • -
    • - Record is holdable. - Record is not holdable. -
    • -
    • - {{_count.available}} of {{_count.count}} copies available at {{orgName(_count.org_unit)}}. -
    • -
    -
    -
    - - -
    -
    Formats and Editions:
    -
    - -
    -
    - - + -
    + +
    - +
    -
    Abstract:
    +
    Summary:
    {{summary.display.abstract}}
    -
    +
    - -
    -
    Subject:
    + +
    +
    General Note:
    -
    +
    - -
    -
    Subject Name:
    + +
    +
    Bibliography:
    -
    +
    + + +
    +
    Table of Contents:
    +
    + {{summary.display.toc}} +
    +
    - -
    -
    Subject Topic:
    + +
    +
    Thesis:
    -
    +
    + +
    + +
    - -
    -
    Subject Geographic:
    + +
    +
    Hold and Copy Counts:
      -
    • - - {{_subj}} - +
    • {{summary.holdCount}} hold requests
    • +
    • + {{_count.available}} of {{_count.count}} copies available at {{orgName(_count.org_unit)}}.
    -
    +
    + - -
    -
    Subject Temporal:
    + +
    +
    Subject:
    -
    +
    @@ -336,12 +235,45 @@
    + +
    +
    Formats and Editions:
    +
    + +
    +
    +
    diff --git a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts index 21657057f5..f0418d1192 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/bib-staff-view/bib-staff-view.component.ts @@ -12,6 +12,7 @@ import {CatalogService} from '@eg/share/catalog/catalog.service'; }) export class BibStaffViewComponent implements OnInit { + recId: number; initDone = false; // True / false if the display is vertically expanded @@ -24,8 +25,14 @@ export class BibStaffViewComponent implements OnInit { } get expand(): boolean { return this._exp; } - // If provided, the record will be fetched by the component. - @Input() recordId: number; + @Input() set recordId(id: number) { + this.recId = id; + // Only force new data collection when recordId() + // is invoked after ngInit() has already run. + if (this.initDone) { + this.loadSummary(); + } + } // Otherwise, we'll use the provided bib summary object. summary: BibRecordSummary; @@ -49,12 +56,9 @@ export class BibStaffViewComponent implements OnInit { .then(value => this.expand = !value) .then(_ => this.cat.fetchCcvms()) .then(_ => { - if (this.summary) { - return this.summary.getBibCallNumber(); - } else { - if (this.recordId) { - return this.loadSummary(); - } + if (this.recId) { + // ignore any existing this.summary, always refetch + return this.loadSummary(); } }).then(_ => this.initDone = true); } @@ -65,7 +69,7 @@ export class BibStaffViewComponent implements OnInit { loadSummary(): Promise { return this.bib.getBibSummary( - this.recordId, + this.recId, this.org.root().id(), true // isStaff ).toPromise()