From 762471649e693aefa2455e4cf0852979de4b6161 Mon Sep 17 00:00:00 2001 From: Llewellyn Marshall Date: Mon, 8 Aug 2022 14:39:50 -0400 Subject: [PATCH] allow display of source address and source location on transit slips Signed-off-by: Terran McCanna --- .../staff/share/print_templates/t_hold_transit_slip.tt2 | 7 +++++++ Open-ILS/web/js/ui/default/staff/admin/workstation/app.js | 2 ++ Open-ILS/web/js/ui/default/staff/circ/services/circ.js | 12 ++++++++++++ 3 files changed, 21 insertions(+) diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2 index 787c91c0d6..7690302540 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2 @@ -9,6 +9,13 @@ Template for printing hold transit slips. Fields include: * dest_address.state * dest_address.post_code * dest_courier_code - from lib.courier_code library setting +* source_location.name - name of source library +* source_location.shortname +* source_address.street1 +* source_address.street2 +* source_address.city +* source_address.state +* source_address.post_code * hold.behind_desk * copy.barcode * copy.status.name - Copy status diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index 29d880d4a2..d928ad89d8 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -653,6 +653,8 @@ function($scope , $q , egCore , ngToast) { dest_location : egCore.idl.toHash(egCore.org.get(egCore.auth.user().ws_ou())), dest_courier_code : 'ABC 123', dest_address : seed_addr, + source_address : seed_addr, + source_location : egCore.idl.toHash(egCore.org.get(egCore.auth.user().ws_ou())), hold : one_hold, holds : [ { diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index 33727770f5..9b13ed3f59 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -1779,6 +1779,13 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, egAddCopyAl .then(function(addr) { data.address = addr }) ); } + + if(evt.payload.transit){ + promises.push( + service.get_org_addr(evt.payload.transit.source().id(), 'holds_address') + .then(function(addr) { data.source_address = addr }) + ); + } if (evt.payload.hold) { promises.push( @@ -1848,8 +1855,13 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, egAddCopyAl if (data.address) { print_context.dest_address = egCore.idl.toHash(data.address); } + if (data.source_address) { + print_context.source_address = egCore.idl.toHash(data.source_address); + } print_context.dest_location = egCore.idl.toHash(egCore.org.get(data.transit.dest())); + print_context.source_location = + egCore.idl.toHash(egCore.org.get(data.transit.source())); print_context.copy.status = egCore.idl.toHash(print_context.copy.status); } -- 2.11.0