- 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 <khuckins@catalyte.io>/
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
<option value="item_status">[% l('Item Status') %]</option>
<option value="items_out">[% l('Items Out') %]</option>
<option value="patron_address">[% l('Patron Address') %]</option>
+ <option value="patron_data">[% l('Patron Data') %]</option>
<option value="patron_note">[% l('Patron Note') %]</option>
<option value="renew">[% l('Renew') %]</option>
<option value="transit_list">[% l('Transit List') %]</option>
<div class="flex-cell"></div>
<div>
<span class="pad-all-min">
+ <button type="button" class="btn btn-default"
+ ng-click="edit_passthru.print()">[% l('Print') %]</button>
+ </span>
+ <span class="pad-all-min">
<button type="button" class="btn btn-default"
ng-disabled="edit_passthru.hide_save_actions()"
ng-click="edit_passthru.save()">[% l('Save') %]</button>
--- /dev/null
+<!--
+Template for printing a patron's data, including addesses and statistical categories. Fields include:
+
+* patron.first_given_name
+* patron.second_given_name
+* patron.family_name
+-->
+<div>
+ <div>=-=-=-=</div>
+ <div>-------</div>
+ <div>Barcode: {{patron.card.barcode}}</div>
+ <div>-------</div>
+ <div>Patron's Username: {{patron.usrname}}</div>
+ <div>Prefix/Title: {{patron.prefix}}</div>
+ <div>First Name: {{patron.first_given_name}}</div>
+ <div>Middle Name: {{patron.second_given_name}}</div>
+ <div>Last Name: {{patron.family_name}}</div>
+ <div>Suffix: {{patron.suffix}}</div>
+ <div>Holds Alias: {{patron.alias}}</div>
+ <div>Date of Birth: {{patron.dob}}</div>
+ <div>Juvenile: {{patron.juvenile}}</div>
+ <div>Primary Identification Type: {{patron.ident_type.name()}}</div>
+ <div>Primary Identification: {{patron.ident_value}}</div>
+ <div>Secondary Identification: {{patron.ident_value2}}</div>
+ <div>Email Address: {{patron.email}}</div>
+ <div>Daytime Phone: {{patron.daytime_phone}}</div>
+ <div>Evening Phone: {{patron.evening_phone}}</div>
+ <div>Other Phone: {{patron.other_phone}}</div>
+ <div>Home Library: {{patron.home_ou.name()}}</div>
+ <div>Main (Profile) Permission Group: {{patron.profile.name()}}</div>
+ <div>Privilege Expiration Date: {{patron.expire_date}}</div>
+ <div>Internet Access Level: {{patron.net_access_level.name()}}</div>
+ <div>Active: {{patron.active}}</div>
+ <div>Barred: {{patron.barred}}</div>
+ <div>Is Group Lead Account: {{patron.master_account}}</div>
+ <div>Claims-returned Count: {{patron.claims_returned_count}}</div>
+ <div>Claims Never Checked Out Count: {{patron.claims_never_checked_out_count}}</div>
+ <div>Alert Message: {{patron.alert_message}}</div>
+
+ <div>
+ <!--
+ * address.street1
+ * address.street2
+ * address.city
+ * address.state
+ * address.post_code
+ -->
+ <div ng-repeat="address in patron.addresses">
+ <div>-------</div>
+ <div>Type: {{address.address_type}}</div>
+ <div>Postal Code: {{address.post_code}}</div>
+ <div>Street (1): {{address.street1}}</div>
+ <div>Street (2): {{address.street2}}</div>
+ <div>City: {{address.city}}</div>
+ <div>County: {{address.county}}</div>
+ <div>State: {{address.state}}</div>
+ <div>Contry: {{address.country}}</div>
+ <div>Valid Address?: {{address.valid}}</div>
+ <div>Within City Limits?: {{address.within_city_limits}}</div>
+ </div>
+ <div>-------</div>
+ <!-- Stat Cats
+ * entry.stat_cat_entry
+ * entry.stat_cat.name
+ -->
+ <div ng-repeat="entry in patron.stat_cat_entries">{{entry.stat_cat.name}} : {{entry.stat_cat_entry}}</div>
+ <div>=-=-=-=</div>
+ </div>
+</div>
\ No newline at end of file
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',
}
});
}
+
+ $scope.edit_passthru.print = function() {
+ var print_data = {patron : $scope.patron}
+
+ return egCore.print.print({
+ context : 'default',
+ template : 'patron_data',
+ scope : print_data
+ });
+ }
}])