From: Bill Erickson Date: Fri, 9 Apr 2021 21:29:00 +0000 (-0400) Subject: LP1904036 checkin; hold shelf slip X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7b37e668bf1a942d7095edcff2fa9c41edb20b4a;p=working%2FEvergreen.git LP1904036 checkin; hold shelf slip Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.css b/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.css new file mode 100644 index 0000000000..64d3930cbb --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/circ/checkin/checkin.component.css @@ -0,0 +1,4 @@ + +.badge { + font-size: 110%; +} diff --git a/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts index 9204bfcacc..36edfd59b6 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/circ/route-dialog.component.ts @@ -36,7 +36,7 @@ export class RouteDialogComponent extends DialogComponent { private org: OrgService, private circ: CircService, private audio: AudioService, - private print: PrintService, + private printer: PrintService, private serverStore: ServerStoreService) { super(modal); } @@ -46,11 +46,9 @@ export class RouteDialogComponent extends DialogComponent { // But in some cases we still have to collect the data // for printing. -console.warn('ROUTE DIALOG OPEN'); return from(this.applySettings()) .pipe(concatMap(exit => { -console.warn('ROUTE DIALOG 2'); if (exit) { return of(exit); } else { @@ -59,11 +57,9 @@ console.warn('ROUTE DIALOG 2'); })) .pipe(concatMap(exit => { -console.warn('ROUTE DIALOG 3'); if (exit) { return of(exit); } else { -console.warn('ROUTE DIALOG 4'); return super.open(ops); } })); @@ -110,7 +106,7 @@ console.warn('ROUTE DIALOG 4'); if (this.checkin.params.auto_print_hold_transits || this.circ.suppressCheckinPopups) { // Print and exit. - return this.printTransit().then(_ => true); // exit + return this.print().then(_ => true); // exit } return promise.then(_ => false); // keep going @@ -147,8 +143,17 @@ console.warn('ROUTE DIALOG 4'); .then(_ => this.noAutoPrint[this.slip]); } - printTransit(): Promise { - return null; + print(): Promise { + this.printer.print({ + templateName: this.slip, + contextData: {checkin: this.checkin}, + printContext: 'default' + }); + + this.close(); + + // TODO printer.print() should return a promise + return Promise.resolve(); } } diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.angular-patron.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.angular-patron.sql index 60e0512f2f..be025b89d0 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.angular-patron.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.angular-patron.sql @@ -19,7 +19,6 @@ eg.circ.patron.holds.prefetch eg.grid.circ.patron.holds holds_for_patron print template -*/ -- insert then update for easier iterative development tweaks @@ -283,6 +282,72 @@ UPDATE config.print_template SET template = $TEMPLATE$ $TEMPLATE$ WHERE name = 'patron_data'; + +INSERT INTO config.print_template + (name, label, owner, active, locale, content_type, template) +VALUES ('hold_shelf_slip', 'Hold Shelf Slip', 1, TRUE, 'en-US', 'text/html', ''); + +*/ + +UPDATE config.print_template SET template = $TEMPLATE$ +[% + USE date; + USE money = format('$%.2f'); + SET copy = template_data.checkin.copy; + SET hold = template_data.checkin.hold; + SET volume = template_data.checkin.volume; + SET hold = template_data.checkin.hold; + SET record = template_data.checkin.record; + SET patron = template_data.checkin.patron; +%] + +
+ [% IF hold.behind_desk == 't' %] + This item needs to be routed to the Private Holds Shelf. + [% ELSE %] + This item needs to be routed to the Public Holds Shelf. + [% END %] +
+
+ +
Barcode: [% copy.barcode %]
+
Title: [% record.title %]
+
Call Number: [% volume.prefix.label %] [% volume.label %] [% volume.suffix.label %]
+ +
+ +
Hold for patron: [% patron.family_name %], + [% patron.first_given_name %] [% patron.second_given_name %]
+
Barcode: [% patron.card.barcode %]
+ +[% IF hold.phone_notify %] +
Notify by phone: [% hold.phone_notify %]
+[% END %] +[% IF hold.sms_notify %] +
Notify by text: [% hold.sms_notify %]
+[% END %] +[% IF hold.email_notify %] +
Notify by email: [% patron.email %]
+[% END %] + +[% FOR note IN hold.notes %] +
    + [% IF note.slip == 't' %] +
  • [% note.title %] - [% note.body %]
  • + [% END %] +
+[% END %] +
+ +
Request Date: [% + date.format(helpers.format_date(hold.request_time, staff_org_timezone), '%x %r') %]
+
Slip Date: [% date.format(date.now, '%x %r') %]
+
Printed by [% staff.first_given_name %] at [% staff_org.shortname %]
+ + + +$TEMPLATE$ WHERE name = 'hold_shelf_slip'; + COMMIT;