From e313d8ae78d6c00f99e7c881328f00ba5fbf8807 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 5 Mar 2021 11:22:42 -0500 Subject: [PATCH] LP1904036 Bills wireframing Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../src/app/staff/circ/patron/bills.component.css | 6 ++ .../src/app/staff/circ/patron/bills.component.html | 102 +++++++++++++++++++++ .../src/app/staff/circ/patron/bills.component.ts | 85 +++++++++++++++++ .../app/staff/circ/patron/patron.component.html | 3 +- .../eg2/src/app/staff/circ/patron/patron.module.ts | 4 +- 5 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.css create mode 100644 Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.css b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.css new file mode 100644 index 0000000000..9b8b24f293 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.css @@ -0,0 +1,6 @@ + + +.payment-form input[type="text"], .payment-form input[type="number"] { + width: 8em; +} + diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html new file mode 100644 index 0000000000..5b80429a37 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html @@ -0,0 +1,102 @@ + + +
+
+
+
Total Owed:
+
{{(summary.total_paid() || 0) | currency}}
+
+
+
Total Billed:
+
{{(summary.total_owed() || 0) | currency}}
+
+
+
Total Paid/Credited:
+
{{(summary.total_paid() || 0) | currency}}
+
+
+ +
+
+
Owed for Selected:
+
{{owedSelected() | currency}}
+
+
+
Billed for Selected:
+
{{billedSelected() | currency}}
+
+
+
Paid/Credited for Selected:
+
{{paidSelected() | currency}}
+
+
+ +
+
+
Refunds Available:
+
{{refundsAvailable() | currency}}
+
+
+
Credit Available:
+
{{patron().credit_forward_balance() | currency}}
+
+
+
Session Voided:
+
{{sessionVoided | currency}}
+
+
+ +
+
+
 
+
 
+
+
+
Pending Payment:
+
{{pendingPayment() | currency}}
+
+
+
Pending Change:
+
{{pendingChange() | currency}}
+
+
+
+
+ +
+
+
Pay Bill:
+
+
+ +
+
+
+ +
+
+
+ +
+
+ + +
+
+ +
+
+
+ + diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts new file mode 100644 index 0000000000..6f60f61f85 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts @@ -0,0 +1,85 @@ +import {Component, Input, OnInit, AfterViewInit} from '@angular/core'; +import {Router, ActivatedRoute, ParamMap} from '@angular/router'; +import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap'; +import {IdlObject} from '@eg/core/idl.service'; +import {NetService} from '@eg/core/net.service'; +import {PcrudService} from '@eg/core/pcrud.service'; +import {AuthService} from '@eg/core/auth.service'; +import {ServerStoreService} from '@eg/core/server-store.service'; +import {PatronService} from '@eg/staff/share/patron/patron.service'; +import {PatronContextService} from './patron.service'; + +@Component({ + templateUrl: 'bills.component.html', + selector: 'eg-patron-bills', + styleUrls: ['bills.component.css'] +}) +export class BillsComponent implements OnInit, AfterViewInit { + + @Input() patronId: number; + summary: IdlObject; + sessionVoided = 0; + paymentType = 'cash_payment'; + checkNumber: string; + annotatePayment = false; + + constructor( + private router: Router, + private route: ActivatedRoute, + private net: NetService, + private pcrud: PcrudService, + private auth: AuthService, + private store: ServerStoreService, + public patronService: PatronService, + public context: PatronContextService + ) {} + + ngOnInit() { + this.load(); + } + + ngAfterViewInit() { + const node = document.getElementById('pay-amount'); + if (node) { node.focus(); } + } + + load() { + + this.pcrud.retrieve('mous', this.patronId, {}, {authoritative : true}) + .subscribe(sum => this.summary = sum); + } + + patron(): IdlObject { + return this.context.patron; + } + + // TODO + refundsAvailable(): number { + return 0; + } + + // TODO + paidSelected(): number { + return 0; + } + + // TODO + owedSelected(): number { + return 0; + } + + // TODO + billedSelected(): number { + return 0; + } + + pendingPayment(): number { + return 0; + } + + pendingChange(): number { + return 0; + } + +} + 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 8ccfd34ddc..53024df244 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 @@ -74,8 +74,7 @@
  • Bills -
    -
    +
  • diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.module.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.module.ts index 8f4ed17998..dc451b2dcd 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/patron.module.ts @@ -19,6 +19,7 @@ import {EditToolbarComponent} from './edit-toolbar.component'; import {BcSearchComponent} from './bcsearch.component'; import {BarcodesModule} from '@eg/staff/share/barcodes/barcodes.module'; import {ItemsComponent} from './items.component'; +import {BillsComponent} from './bills.component'; @NgModule({ declarations: [ @@ -30,7 +31,8 @@ import {ItemsComponent} from './items.component'; EditComponent, EditToolbarComponent, BcSearchComponent, - ItemsComponent + ItemsComponent, + BillsComponent ], imports: [ StaffCommonModule, -- 2.11.0