From 121900d3bdd9e1e30261d5a34d63597e9fb4e20e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 16 Jun 2021 18:19:45 -0400 Subject: [PATCH] LPXXX Item Status Angular WIP Signed-off-by: Bill Erickson --- .../eg2/src/app/staff/cat/item/status.component.ts | 20 +- .../src/app/staff/cat/item/summary.component.html | 231 ++++++++++++++++++++- .../src/app/staff/cat/item/summary.component.ts | 19 +- 3 files changed, 258 insertions(+), 12 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts index 0d0fa46003..531d1b026d 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/status.component.ts @@ -120,11 +120,21 @@ export class ItemStatusComponent implements OnInit, AfterViewInit { getItemById(id: number): Promise { const flesh = { - flesh: 3, - flesh_fields: { - acp: ['call_number'], - acn: ['record'], - bre: ['flat_display_entries'] + flesh : 4, + flesh_fields : { + acp : [ + 'call_number','location','status','floating','circ_modifier', + 'age_protect','circ_lib','copy_alerts', 'creator', + 'editor', 'circ_as_type', 'latest_inventory', 'floating' + ], + acn : ['record','prefix','suffix','label_class', 'owning_lib'], + bre : ['simple_record','creator','editor'], + alci : ['inventory_workstation'] + }, + select : { + // avoid fleshing MARC on the bre + // note: don't add simple_record.. not sure why + bre : ['id','tcn_value','creator','editor', 'create_date', 'edit_date'], } }; diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.html b/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.html index ac3fd698f4..47c18a4e3e 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.html @@ -1 +1,230 @@ -summary +
+ This item has been marked as Deleted. +
+ +
+ +
+
Precat Title
+
{{item.dummy_title()}}
+ +
Precat Author
+
{{item.dummy_author()}}
+
+ +
+
Barcode
+
{{item.barcode()}}
+ +
Circ Library
+
{{item.circ_lib().shortname()}}
+ +
Call # Prefix
+
+ {{item.call_number().prefix().label()}} +
+ +
Status
+
{{item.status().name()}}
+
+ +
+
Price
+
{{item.price()}}
+ +
Owning Library
+
{{item.call_number().owning_lib().shortname()}}
+ +
Call #
+
{{item.call_number().label()}}
+ +
Due Date
+
{{circ.due_date() | date:'shortDate'}}
+
+ +
+
Acquisition Cost
+
{{item.cost()}}
+ +
Shelving Location
+
{{item.location().name()}}
+ +
Call # Suffix
+
+ {{item.call_number().suffix().label()}} +
+ +
Checkout Date
+
{{circSummary.start_time() | date:'shortDate'}}
+
+ +
+
ISBN
+
+ {{item.call_number().record().simple_record().isbn() || item.dummy_isbn()}} +
+ +
Loan Duration
+
+
Short
+
Normal
+
Long
+
+ +
Renewal Type
+
+
OPAC
+
Desk
+
Phone
+
Automatic
+
+ +
Checkout Workstation
+
{{circSummary.checkout_workstation()}}
+
+ +
+
Date Created
+
{{item.create_date() | date:'shortDate'}}
+
Fine Level
+
+
Low
+
Normal
+
High
+
+ +
Total Circs
+
{{total_circs}}
+ +
Duration Rule
+
{{circ.duration_rule().name()}}
+
+ +
+
Date Active
+
{{item.active_date() | date:'shortDate'}}
+ +
Reference
+
{{item.ref()}}
+ +
Total Circs - Current Year
+
{{total_circs_this_year}}
+ +
Recurring Fine Rule
+
{{circ.recurring_fine_rule().name()}}
+
+ +
+
Status Changed
+
{{item.status_changed_time() | date:'shortDate'}}
+ +
OPAC Visible
+
{{item.opac_visible()}}
+ +
Total Circs - Prev Year
+
{{total_circs_prev_year}}
+ +
Max Fine Rule
+
{{circ.max_fine_rule().name()}}
+
+ +
+
Item ID
+
{{item.id()}}
+ +
Holdable
+
{{item.holdable()}}
+ +
In-House Uses
+
{{item._inHouseUseCount}}
+ +
Checkin Time
+
+ {{circ.checkin_time() || + circSummary.last_checkin_time() | date:'shortDate'}} +
+
+ +
+
Circulate
+
{{item.circulate()}}
+ +
Renewal Workstation
+
{{circSummary.last_renewal_workstation()}}
+ +
Remaining Renewals
+
{{circ.renewal_remaining()}}
+ +
Checkin Scan Time
+
+ {{circ.checkin_scan_time() || + circSummary.last_checkin_scan_time() | date:'shortDate'}} +
+
+ +
+
Floating
+
+ + {{item.floating().name()}} + +
+ +
Circ Modifier
+
+ + {{item.circ_modifier().name()}} + +
+ +
Age-based Hold Protection
+
+ + {{item.age_protect().name()}} + +
+ +
Checkin Workstation
+
+ {{circ.checkin_workstation().name() || + circSummary.last_checkin_workstation().name()}} +
+
+ +
+
Inventory Date
+
{{item.latest_inventory().inventory_date() | date:'shortDate'}}
+ +
Inventory Workstation
+
{{item.latest_inventory().inventory_workstation().name()}}
+ +
+
+
+
+
+ +
+
Item Alerts
+
+ + +
+ +
+
+
+
+
+
+
+ +
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.ts index 6fac2c1da7..ea9e6db15f 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/summary.component.ts @@ -1,6 +1,6 @@ import {Component, Input, OnInit, AfterViewInit, ViewChild} from '@angular/core'; import {Router, ActivatedRoute, ParamMap} from '@angular/router'; -import {IdlObject} from '@eg/core/idl.service'; +import {IdlService, IdlObject} from '@eg/core/idl.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {AuthService} from '@eg/core/auth.service'; import {NetService} from '@eg/core/net.service'; @@ -10,7 +10,6 @@ import {EventService} from '@eg/core/event.service'; import {PatronPenaltyDialogComponent} from '@eg/staff/share/patron/penalty-dialog.component'; import {BarcodeSelectComponent} from '@eg/staff/share/barcodes/barcode-select.component'; import {CatalogService} from '@eg/share/catalog/catalog.service'; -import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'eg-item-summary', @@ -21,6 +20,9 @@ export class ItemSummaryComponent implements OnInit { @Input() item: IdlObject; + circ: IdlObject; + circSummary: IdlObject; + constructor( private router: Router, private route: ActivatedRoute, @@ -28,18 +30,23 @@ export class ItemSummaryComponent implements OnInit { private printer: PrintService, private pcrud: PcrudService, private auth: AuthService, + private idl: IdlService, private evt: EventService, private cat: CatalogService, private holdings: HoldingsService - ) {} + ) { + // Create dummy objects so we can avoid a lot of *ngIf's in the template + this.circ = this.idl.create('circ'); + this.circSummary = this.idl.create('accs'); + this.circ.duration_rule(this.idl.create('crcd')); + this.circ.recurring_fine_rule(this.idl.create('crrf')); + this.circ.max_fine_rule(this.idl.create('crmf')); + } ngOnInit() { } - tabChange(evt: NgbNavChangeEvent) { - this.router.navigate([`/staff/cat/item/${this.item.id()}/${evt.nextId}`]); - } } -- 2.11.0