From 6b44a066e098aae251fa7496fe01fc6b0cbce8e7 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Thu, 15 Feb 2018 23:03:20 +0000 Subject: [PATCH] lp1693036 Patron Editor Print Data - Add Print button to Patron Editor. - Add Patron Data print template. - Add additional print template dummy data needed for Patron Data template. - Implement print functionality for Patron registration/edit data. Signed-off-by: Kyle Huckins / Signed-off-by: Terran McCanna Signed-off-by: Galen Charlton Signed-off-by: Remington Steed Signed-off-by: Dan Wells --- .../staff/admin/workstation/t_print_templates.tt2 | 1 + .../templates/staff/circ/patron/reg_actions.tt2 | 4 + .../staff/share/print_templates/t_patron_data.tt2 | 69 ++++++++++++++++++++ .../js/ui/default/staff/admin/workstation/app.js | 39 +++++++++++- .../web/js/ui/default/staff/circ/patron/regctl.js | 10 +++ 5 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/templates/staff/share/print_templates/t_patron_data.tt2 diff --git a/Open-ILS/src/templates/staff/admin/workstation/t_print_templates.tt2 b/Open-ILS/src/templates/staff/admin/workstation/t_print_templates.tt2 index 12eccfb..239ec26 100644 --- a/Open-ILS/src/templates/staff/admin/workstation/t_print_templates.tt2 +++ b/Open-ILS/src/templates/staff/admin/workstation/t_print_templates.tt2 @@ -29,6 +29,7 @@ + diff --git a/Open-ILS/src/templates/staff/circ/patron/reg_actions.tt2 b/Open-ILS/src/templates/staff/circ/patron/reg_actions.tt2 index c5aabcb..76414f9 100644 --- a/Open-ILS/src/templates/staff/circ/patron/reg_actions.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/reg_actions.tt2 @@ -23,6 +23,10 @@
+ + + diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_patron_data.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_patron_data.tt2 new file mode 100644 index 0000000..052fdcc --- /dev/null +++ b/Open-ILS/src/templates/staff/share/print_templates/t_patron_data.tt2 @@ -0,0 +1,69 @@ + +
+
=-=-=-=
+
-------
+
Barcode: {{patron.card.barcode}}
+
-------
+
Patron's Username: {{patron.usrname}}
+
Prefix/Title: {{patron.prefix}}
+
First Name: {{patron.first_given_name}}
+
Middle Name: {{patron.second_given_name}}
+
Last Name: {{patron.family_name}}
+
Suffix: {{patron.suffix}}
+
Holds Alias: {{patron.alias}}
+
Date of Birth: {{patron.dob}}
+
Juvenile: {{patron.juvenile}}
+
Primary Identification Type: {{patron.ident_type.name()}}
+
Primary Identification: {{patron.ident_value}}
+
Secondary Identification: {{patron.ident_value2}}
+
Email Address: {{patron.email}}
+
Daytime Phone: {{patron.daytime_phone}}
+
Evening Phone: {{patron.evening_phone}}
+
Other Phone: {{patron.other_phone}}
+
Home Library: {{patron.home_ou.name()}}
+
Main (Profile) Permission Group: {{patron.profile.name()}}
+
Privilege Expiration Date: {{patron.expire_date}}
+
Internet Access Level: {{patron.net_access_level.name()}}
+
Active: {{patron.active}}
+
Barred: {{patron.barred}}
+
Is Group Lead Account: {{patron.master_account}}
+
Claims-returned Count: {{patron.claims_returned_count}}
+
Claims Never Checked Out Count: {{patron.claims_never_checked_out_count}}
+
Alert Message: {{patron.alert_message}}
+ +
+ +
+
-------
+
Type: {{address.address_type}}
+
Postal Code: {{address.post_code}}
+
Street (1): {{address.street1}}
+
Street (2): {{address.street2}}
+
City: {{address.city}}
+
County: {{address.county}}
+
State: {{address.state}}
+
Contry: {{address.country}}
+
Valid Address?: {{address.valid}}
+
Within City Limits?: {{address.within_city_limits}}
+
+
-------
+ +
{{entry.stat_cat.name}} : {{entry.stat_cat_entry}}
+
=-=-=-=
+
+
\ No newline at end of file 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 de6e94f..45294e5 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 @@ -371,17 +371,52 @@ function($scope , $q , egCore , ngToast) { expire_date : '2020-12-31', alias : 'the dude', has_email : true, - has_phone : false + has_phone : false, + dob : '1984-11-07T00:00:00-8:00', + juvenile : 'f', + usrname : '30393830393', + daytime_phone : '111-222-3333', + evening_phone : '222-333-1111', + other_phone : '333-111-2222', + email : 'user@example.com', + ident_value2 : 'Carol', + home_ou : {name: function() {return 'BR1'}}, + profile : {name: function() {return 'Patrons'}}, + net_access_level : {name: function() {return 'Filtered'}}, + active : 't', + barred : 'f', + master_account : 'f', + claims_returned_count : '0', + claims_never_checked_out_count : '0', + alert_message : 'Very slow', + ident_type: {name: function() {return 'Other'}}, + ident_value: '11332445', + addresses : [], + stat_cat_entries : [ + { + stat_cat : {'name' : 'Favorite Donut'}, + 'stat_cat_entry' : 'Maple' + }, { + stat_cat : {'name' : 'Favorite Book'}, + 'stat_cat_entry' : 'Beasts Made of Night' + } + ] } + var seed_addr = { + address_type : 'MAILING', street1 : '123 Apple Rd', street2 : 'Suite B', city : 'Anywhere', state : 'XX', country : 'US', - post_code : '12345' + post_code : '12345', + valid : 't', + within_city_limits: 't' } + seed_user.addresses.push(seed_addr); + var seed_record = { title : 'Traveling Pants!!', author : 'Jane Jones', diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js index 8716184..bd83888 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js @@ -1945,4 +1945,14 @@ function($scope , $routeParams , $q , $uibModal , $window , egCore , } }); } + + $scope.edit_passthru.print = function() { + var print_data = {patron : $scope.patron} + + return egCore.print.print({ + context : 'default', + template : 'patron_data', + scope : print_data + }); + } }]) -- 1.7.2.5