From: Dan Pearl Date: Fri, 7 Sep 2018 17:18:56 +0000 (-0400) Subject: LP 1772053: Add Missing Fields to Print Templates X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e145d8d8006f1d94a6bb8a8563ac4eef91a7fd43;p=evergreen%2Fpines.git LP 1772053: Add Missing Fields to Print Templates Almost complete implementation for LP1772053. To be done: items relating to call numbers, prefixes and suffixes for Hold Pull Lists and Transit Slips. Signed-off-by: Daniel Pearl Signed-off-by: Terran McCanna Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 index 2a91759737..16c6a46ba4 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_checkout.tt2 @@ -3,6 +3,22 @@ {{current_location.name}}

Checkout Receipt

You checked out the following items:
+
+
[% l('Welcome to [_1]', '{{current_location.name}}') %]
+
[% l('You checked out the following items:') %]
+
+
    +
  1. +
    {{checkout.title}}
    +
    [% l('Barcode: [_1] Due: [_2]', + '{{checkout.copy.barcode}}', + '{{checkout.circ.due_date | egDueDate:$root.egDateAndTimeFormat:checkout.circ.circ_lib:checkout.circ.duration}}') %]
    +
  2. +
+
+
{{current_location.shortname}} {{today | date:$root.egDateAndTimeFormat}}
+
[% l('You were helped by [_1]', '{{staff.first_given_name}}') %]
+>>>>>>> 058c331b02... LP 1772053: Add Missing Fields to Print Templates
    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 ffa0b01a2a..49234278cd 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 @@ -457,16 +457,28 @@ function($scope , $q , egCore , ngToast) { simple_record : { 'title' : 'Test Title' } + }, + owning_lib : { + name : 'Ankers Memorial Library', + shortname : 'Ankers' } }, + circ_modifier : { + name : 'Book' + }, location : { name : 'General Collection' }, + status : { + name : 'In Transit' + }, // flattened versions for item status template // TODO - make this go away 'call_number.label' : '636.8 JON', 'call_number.record.simple_record.title' : 'Test Title', - 'location.name' : 'General Colleciton' + 'location.name' : 'General Collection', + 'call_number.owning_lib.name' : 'Ankers Memorial Library', + 'call_number.owning_lib.shortname' : 'Ankers' } var one_hold = { @@ -501,6 +513,15 @@ function($scope , $q , egCore , ngToast) { id : 1, xact_start : new Date().toISOString(), xact_finish : new Date().toISOString(), + call_number : { + label : "spindler", + prefix : "biography", + suffix : "Closed Stacks", + owning_lib : { + name : "Mineola Public Library", + shortname : "Mineola" + } + }, summary : { xact_type : 'circulation', last_billing_type : 'Overdue materials', @@ -515,6 +536,15 @@ function($scope , $q , egCore , ngToast) { id : 2, xact_start : new Date().toISOString(), xact_finish : new Date().toISOString(), + call_number : { + label : "796.6 WEI", + prefix : "", + suffix : "REF", + owning_lib : { + name : "Rogers Reading Room", + shortname : "Rogers" + } + }, summary : { xact_type : 'circulation', last_billing_type : 'Overdue materials', @@ -548,12 +578,13 @@ function($scope , $q , egCore , ngToast) { circ : { due_date : new Date().toISOString(), circ_lib : 1, - duration : '7 days' + duration : '7 days', + renewal_remaining : 2 }, copy : seed_copy, title : seed_record.title, author : seed_record.author - }, + } ], patron_money : { diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index b741359a4e..2ccac2314a 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -573,7 +573,7 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, 'mbt' : ['summary', 'circulation'], 'circ' : ['target_copy'], 'acp' : ['call_number'], - 'acn' : ['record'], + 'acn' : ['record','owning_lib','prefix','suffix'], 'bre' : ['simple_record'] } }, @@ -624,8 +624,18 @@ function($scope , $q , $routeParams , egCore , egConfirmDialog , $location, } if (xact.circulation()) { newXact.copy_barcode = xact.circulation().target_copy().barcode(), - newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title() + newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title(); + newXact.call_number = { + label : xact.circulation().target_copy().call_number().label(), + prefix : xact.circulation().target_copy().call_number().prefix().label(), + suffix : xact.circulation().target_copy().call_number().suffix().label(), + owning_lib : { + name : xact.circulation().target_copy().call_number().owning_lib().name(), + shortname : xact.circulation().target_copy().call_number().owning_lib().shortname() + } + } } + xacts.push(newXact); } ); @@ -1097,7 +1107,7 @@ function($scope, $q , egCore , patronSvc , billSvc , egPromptDialog , $location 'mbt' : ['summary', 'circulation'], 'circ' : ['target_copy'], 'acp' : ['call_number'], - 'acn' : ['record'], + 'acn' : ['record','owning_lib','prefix','suffix'], 'bre' : ['simple_record'] } }, @@ -1149,6 +1159,15 @@ function($scope, $q , egCore , patronSvc , billSvc , egPromptDialog , $location if (xact.circulation()) { newXact.copy_barcode = xact.circulation().target_copy().barcode(), newXact.title = xact.circulation().target_copy().call_number().record().simple_record().title() + newXact.call_number = { + label : xact.circulation().target_copy().call_number().label(), + prefix : xact.circulation().target_copy().call_number().prefix().label(), + suffix : xact.circulation().target_copy().call_number().suffix().label(), + owning_lib : { + name : xact.circulation().target_copy().call_number().owning_lib().name(), + shortname : xact.circulation().target_copy().call_number().owning_lib().shortname() + } + } } xacts.push(newXact); } diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js index 7984b795e9..fb9072bbbe 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/checkout.js @@ -315,14 +315,18 @@ function($scope , $q , $routeParams , egCore , egUser , patronSvc , print_data.circulations.push({ circ : egCore.idl.toHash(co.circ), copy : egCore.idl.toHash(co.acp), - call_number : egCore.idl.toHash(co.acn), title : co.title, author : co.author - }) + }); + // Flesh selected fields of this circulation + print_data.circulations[0].copy.call_number = + egCore.idl.toHash(co.acn); + print_data.circulations[0].copy.owning_lib = + egCore.ils.toHash(co.aou); }; }); - // This is repeated in patron.* so everyting is in one place but left here so existing templates don't break. + // This is repeated in patron.* so everything is in one place but left here so existing templates don't break. print_data.patron_money = patronSvc.patron_stats.fines; print_data.patron = { prefix : cusr.prefix(), diff --git a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js index e15dd5e7be..b5cdfd194b 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/renew/app.js +++ b/Open-ILS/web/js/ui/default/staff/circ/renew/app.js @@ -249,6 +249,11 @@ function($scope , $window , $location , egCore , egGridDataProvider , egCirc) { title : egCore.idl.toHash(renewal.title), author : egCore.idl.toHash(renewal.author) }); + // Flesh selected fields of this circulation + print_data.circulations[0].copy.call_number = + egCore.idl.toHash(renewal.acn); + print_data.circulations[0].copy.owning_lib = + egCore.idl.toHash(renewal.aou); } }); 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 64a68e14d7..15849f6e02 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 @@ -713,7 +713,6 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, egAddCopyAl return egCore.pcrud.retrieveAll('ccs', {}, {atomic : true}).then( function(list) { egCore.env.absorbList(list, 'ccs'); - copy.status(egCore.env.ccs.map[copy.status()]); } ); } @@ -1826,6 +1825,7 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, egAddCopyAl } print_context.dest_location = egCore.idl.toHash(egCore.org.get(data.transit.dest())); + print_context.copy.status = egCore.idl.toHash(print_context.copy.status); } if (data.patron) {