LP#1714566 - enable hold notes to display on dialogs user/cesardv/lp1714566_make_hold_request_notes_visible
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Tue, 3 Oct 2017 20:42:43 +0000 (16:42 -0400)
committerCesar Velez <cesar.velez@equinoxinitiative.org>
Tue, 3 Oct 2017 20:42:43 +0000 (16:42 -0400)
Also display all notes in the hold shelf dialog and other dialogs
so that staff is aware of any public notes that will
print.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2
Open-ILS/src/templates/staff/circ/share/t_transit_dialog.tt2
Open-ILS/src/templates/staff/share/print_templates/t_hold_shelf_slip.tt2
Open-ILS/web/js/ui/default/staff/circ/services/circ.js

index 90ae825..4e98cd2 100644 (file)
@@ -51,7 +51,7 @@
     </div>
     <div>
       <span>[% l('Request Notes:') %]</span>
-      <ul><li ng-repeat="n in holdslip_notes"><strong>{{n.title}}</strong>: {{n.body}}</li></ul>
+      <ul><li ng-repeat="n in hold_notes"><strong>{{n.title}}</strong>: {{n.body}} &nbsp;<span ng-if="n.slip =='t' || n.pub == 't'">[Patron-visible]</span></li></ul>
     </div>
     <div>
       <span>[% l('Slip Date:') %]</span>
index c04a606..87f251e 100644 (file)
           <span>[% l('Request Date:') %]</span>
           <span>{{hold.request_time | date:$root.egDateFormat}}</span>
         </div>
+        <div ng-if="hold_notes">
+          <span>[% l('Request Notes:') %]</span>
+          <ul>
+              <li ng-repeat="n in hold_notes"><strong>{{n.title}}</strong> - {{n.body}}&nbsp;<span ng-if="n.slip == 't' || n.pub == 't'">[Patron-visible]</span></li>
+          </ul>
+        </div>
       </div>
       <div>
         <div>
index 50aa191..6609224 100644 (file)
@@ -12,7 +12,7 @@ Template for printing hold request slips. Fields include:
 * hold.phone_notify
 * hold.sms_notify
 * hold.email_notify
-* holdslip_notes (array of slip-printable notes)
+* hold_notes (array of slip-printable notes)
 
 -->
 <div>
@@ -42,9 +42,9 @@ Template for printing hold request slips. Fields include:
   <div ng-if="hold.phone_notify">[% l('Notify by phone: [_1]', '{{hold.phone_notify}}') %]</div>
   <div ng-if="hold.sms_notify">[% l('Notify by text: [_1]', '{{hold.sms_notify}}') %]</div>
   <div ng-if="hold.email_notify == 't'">[% l('Notify by email: [_1]', '{{patron.email}}') %]</div>
-    <div ng-if="holdslip_notes">
+    <div ng-if="hold_notes">
       <ul>Notes:
-        <li ng-repeat="note in holdslip_notes">{{note}}</li>
+        <li ng-repeat="note in hold_notes | filter: {slip : 't'}"><strong>{{note.title}}</strong> - {{note.body}}</li>
       </ul>
     </div>
   <br/>
index 6d0383d..12be8d5 100644 (file)
@@ -1493,11 +1493,9 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
                 print_context.hold = egCore.idl.toHash(evt.payload.hold);
                 var notes = print_context.hold.notes;
                 if(notes.length > 0){
-                    print_context.holdslip_notes = [];
+                    print_context.hold_notes = [];
                     angular.forEach(notes, function(n){
-                        if (n.slip){
-                            print_context.holdslip_notes.push(n);
-                        }
+                        print_context.hold_notes.push(n);
                     });
                 }
                 print_context.patron = egCore.idl.toHash(data.patron);