From: Bill Erickson Date: Wed, 14 Jul 2021 21:18:37 +0000 (-0400) Subject: LP1936233 Recent circs tab X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2f036759865ad01f2cfeed97f0cae7ffaf0df05d;p=working%2FEvergreen.git LP1936233 Recent circs tab Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.html b/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.html index 24eb48abb1..44d09876e1 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.html @@ -1,2 +1,65 @@ -I have {{recentCircs.length}} recent circs + + + + + +
+
+ +
+
Check Out Date
+
+ {{circ.xact_start() | formatValue:'timestamp'}} +
+
Due Date
+
+ {{circ | egDueDate}} +
+
Stop Fines Time
+
+ {{circ.stop_fines_time() | formatValue:'timestamp'}} +
+
Checkin Time
+
+ {{circ.checkin_time() | formatValue:'timestamp'}} +
+
+
+
Check Out Library
+
+ {{circ.circ_lib().shortname()}} +
+
Renewal?
+
+ +
+
Stop Fines Reason
+
+ {{circ.stop_fines()}} +
+
Check In Library
+
+ + {{circ.checkin_lib().shortname()}} + +
+
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.ts index c754936a69..2a73bbe19a 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/circ-history.component.ts @@ -16,6 +16,9 @@ import {CircService, ItemCircInfo} from '@eg/staff/share/circ/circ.service'; import {CopyAlertsDialogComponent } from '@eg/staff/share/holdings/copy-alerts-dialog.component'; import {FormatService} from '@eg/core/format.service'; +import {AddBillingDialogComponent} from '@eg/staff/share/billing/billing-dialog.component'; +import {ToastService} from '@eg/share/toast/toast.service'; +import {StringService} from '@eg/share/string/string.service'; @Component({ selector: 'eg-item-circ-history', @@ -28,6 +31,7 @@ export class ItemCircHistoryComponent implements OnInit { recentCircs: IdlObject[] = []; loading = false; + @ViewChild('billingDialog') private billingDialog: AddBillingDialogComponent; constructor( private router: Router, @@ -43,15 +47,38 @@ export class ItemCircHistoryComponent implements OnInit { private cat: CatalogService, private holdings: HoldingsService, private circs: CircService, + private toast: ToastService, + private strings: StringService, public format: FormatService ) { } ngOnInit() { + this.load(); + } + + load(): Promise { this.loading = true; - this.circs.getRecentCircs(this.item) - .then(circs => this.recentCircs = circs) + return this.circs.getRecentCircs(this.item) + .then(circs => { + circs.forEach(circ => { + circ.circ_lib(this.org.get(circ.circ_lib())); + circ.checkin_lib(this.org.get(circ.checkin_lib())); + }); + this.recentCircs = circs; + }) .then(_ => this.loading = false); } + + addBilling(circId: number) { + this.billingDialog.xactId = circId; + this.billingDialog.open().subscribe(data => { + // No need to reload the data since money is not displayed. + if (data) { + this.strings.interpolate('staff.cat.item.circs.billing') + .then(str => this.toast.success(str)); + } + }); + } } diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/item.module.ts b/Open-ILS/src/eg2/src/app/staff/cat/item/item.module.ts index 5bad3bcc7b..28d527cb92 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/item.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/item.module.ts @@ -4,6 +4,7 @@ import {CommonWidgetsModule} from '@eg/share/common-widgets.module'; import {ItemRoutingModule} from './routing.module'; import {HoldingsModule} from '@eg/staff/share/holdings/holdings.module'; import {PatronModule} from '@eg/staff/share/patron/patron.module'; +import {BillingModule} from '@eg/staff/share/billing/billing.module'; import {MarkItemMissingPiecesComponent} from './missing-pieces.component'; import {ItemStatusComponent} from './status.component'; import {BarcodesModule} from '@eg/staff/share/barcodes/barcodes.module'; @@ -27,7 +28,8 @@ import {ItemCircHistoryComponent} from './circ-history.component'; HoldingsModule, BarcodesModule, CircModule, - PatronModule + PatronModule, + BillingModule ], providers: [ ] diff --git a/Open-ILS/src/eg2/src/app/staff/cat/item/recent-history.component.html b/Open-ILS/src/eg2/src/app/staff/cat/item/recent-history.component.html index e794e3a98e..39b30dcb47 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/item/recent-history.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/item/recent-history.component.html @@ -38,7 +38,7 @@
Last Renewed On
- {{circInfo.prevCircSummary.last_renewal_time() | formatValue:'timestamp'}} + {{circInfo.prevCircSummary.last_renewal_time() | formatValue:'timestamp'}}
@@ -105,7 +105,7 @@
Checkout Date
- {{circInfo.circSummary.start_time() | formatValue:'timestamp'}} + {{circInfo.circSummary.start_time() | formatValue:'timestamp'}}
@@ -117,7 +117,7 @@
Last Renewed On
- {{circInfo.circSummary.last_renewal_time() | formatValue:'timestamp'}} + {{circInfo.circSummary.last_renewal_time() | formatValue:'timestamp'}}