more work on to-be-staged tab
authorGalen Charlton <gmc@equinoxinitiative.org>
Wed, 27 May 2020 21:02:50 +0000 (17:02 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 27 May 2020 21:02:50 +0000 (17:02 -0400)
* implement hold list directive
* change button label

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/circ/curbside/t_holds_list.tt2 [new file with mode: 0644]
Open-ILS/src/templates/staff/circ/curbside/t_to_be_staged_manager.tt2
Open-ILS/web/js/ui/default/staff/circ/curbside/services/core.js

diff --git a/Open-ILS/src/templates/staff/circ/curbside/t_holds_list.tt2 b/Open-ILS/src/templates/staff/circ/curbside/t_holds_list.tt2
new file mode 100644 (file)
index 0000000..f7b9484
--- /dev/null
@@ -0,0 +1,9 @@
+<ul>
+  <li ng-repeat="hold in holds">
+    {{bibData[hold.id()].title()}} / {{bibData[hold.id()].author()}}<br>
+    <a href="./cat/item/{{hold.current_copy().id()}}" target="_blank">
+      {{hold.current_copy().barcode()}}
+      <span class="glyphicon glyphicon-new-window"></span>
+    </a>
+  </li>
+</ul>
index 635acaa..5f693d2 100644 (file)
     <eg-grid-field label="[% l('Patron') %]" path="slot.patron">
       <a href="./circ/patron/{{item.slot.patron().id()}}/holds" target="_blank">
         {{item.slot.patron().family_name()}} / {{item.slot.patron().card().barcode()}}
-        <span ng-show="item.id" class="glyphicon glyphicon-new-window"></span>
+        <span class="glyphicon glyphicon-new-window"></span>
       </a>
     </eg-grid-field>
     <eg-grid-field label="[% l('Appointment ID') %]" path="slot.id"></eg-grid-field>
-    <eg-grid-field label="[% l('Items for Pickup') %]" path="holds">
-       TODO
+    <eg-grid-field label="[% l('Items for Pickup') %]" path="holds" compiled>
+      <eg-curbside-holds-list holds="item.holds" bib-data="item.bib_data_by_hold"></eg-curbside-holds-list>
     </eg-grid-field>
     <eg-grid-field label="[% l('Action') %]">
-      <button class="btn btn-sm btn-primary">[% l('Staged') %]</button>
+      <button class="btn btn-sm btn-primary">[% l('Mark As Staged And Ready') %]</button>
     </eg-grid-field>
   </eg-grid>
 </div>
index d70e92b..49e5ec5 100644 (file)
@@ -16,4 +16,21 @@ function(egCore , orderByFilter , $q , $filter , $uibModal , ngToast , egConfirm
     };
 
     return service;
-}]);
+}])
+
+.directive('egCurbsideHoldsList', function() {
+    return {
+        restrict : 'E',
+        transclude: true,
+        templateUrl : './circ/curbside/t_holds_list',
+        scope : {
+            holds : '=',
+            bibData : '='
+        },
+        controller : [
+                    '$scope','egCore',
+            function($scope , egCore) {
+            }
+        ]
+    }
+});