hold / translit dialogs / printing repairs
authorBill Erickson <berick@esilibrary.com>
Mon, 23 Jun 2014 17:23:19 +0000 (13:23 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 23 Jun 2014 17:23:19 +0000 (13:23 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/admin/workstation/t_print_templates.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js
Open-ILS/web/js/ui/default/staff/circ/services/circ.js
Open-ILS/web/js/ui/default/staff/services/print.js

index 88ee018..b0856db 100644 (file)
@@ -16,6 +16,8 @@
       <option value="bills_historical">[% l('Bills, Historical') %]</option>
       <option value="bill_payment">[% l('Bills, Payment') %]</option>
       <option value="checkout">[% l('Checkout') %]</option>
+      <option value="hold_transit_slip">[% l('Hold Transit Slip') %]</option>
+      <option value="hold_shelf_slip">[% l('Hold Shelf Slip') %]</option>
       <option value="patron_address">[% l('Patron Address') %]</option>
       <option value="patron_note">[% l('Patron Note') %]</option>
       <option value="transit_slip">[% l('Transit Slip') %]</option>
index 1dcc683..3306f35 100644 (file)
@@ -303,7 +303,8 @@ function($scope , $q , egCore) {
     // print preview scope data
     // TODO: consider moving the template-specific bits directly
     // into the templates or storing template- specific script files
-    // alongside the templates
+    // alongside the templates.
+    // NOTE: A lot of this data can be shared across templates.
     var seed_user = {
         first_given_name : 'Slow',
         second_given_name : 'Joe',
@@ -376,7 +377,7 @@ function($scope , $q , egCore) {
         payment_type : 'cash_payment',
         payment_note : 'Here is a payment note',
         note : {
-            create_date : '2024-12-25T12:01:03',
+            create_date : new Date().toISOString(), 
             title : 'Test Note Title',
             usr : seed_user,
             value : 'This patron is super nice!'
@@ -393,7 +394,14 @@ function($scope , $q , egCore) {
         title : seed_record.title,
         author : seed_record.author,
         patron : egCore.idl.toHash(egCore.auth.user()),
-        address : seed_addr
+        address : seed_addr,
+        hold : {
+            behind_desk : 'f',
+            phone_notify : '111-222-3333',
+            sms_notify : '111-222-3333',
+            email_notify : 'user@example.org',
+            request_time : new Date().toISOString()
+        }
     }
 
     $scope.preview_scope.payments = [
@@ -406,7 +414,7 @@ function($scope , $q , egCore) {
     $scope.preview_scope.payments[1].xact.copy_barcode = seed_copy.barcode;
 
     // today, staff, current_location, etc.
-    egCore.print.fleshPrintScope($scope);
+    egCore.print.fleshPrintScope($scope.preview_scope);
 
     $scope.template_changed = function() {
         $scope.print.load_failed = false;
index 1c88249..5c8ea16 100644 (file)
@@ -598,6 +598,7 @@ function($modal , $q , egCore , egAlertDialog , egConfirmDialog) {
             }],
 
             resolve : {
+                // transit destination org unit address
                 destAddr : function() {
                     if (!evt.org || tmpl.match(/hold_shelf/))
                         return $q.when();
index 6fd313d..7c0ef05 100644 (file)
@@ -45,7 +45,7 @@ function($q , $window , $timeout , $http , egHatch , egAuth , egIDL , egOrg) {
     // add commonly used attributes to the print scope
     service.fleshPrintScope = function(scope) {
         if (!scope) scope = {};
-        scope.today = new Date();
+        scope.today = new Date().toISOString();
         scope.staff = egIDL.toHash(egAuth.user());
         scope.current_location = 
             egIDL.toHash(egOrg.get(egAuth.user().ws_ou()));