]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/staff/circ/curbside/t_schedule_pickup.tt2
LP#1879983: AngularJS staff interface for curbside pickup
[Evergreen.git] / Open-ILS / src / templates / staff / circ / curbside / t_schedule_pickup.tt2
1 <div class="row">
2   <form ng-submit="submitBarcode(args)" role="form" class="form-inline" name="patronLookup">
3     <div class="input-group">
4
5       <label class="input-group-addon" 
6         for="patron-curbside-barcode" >[% l('Patron Barcode') %]</label>
7
8       <input select-me="selectMe" class="form-control"
9         ng-model="args.barcode" 
10         placeholder="[% l('Patron Barcode') %]"
11         id="patron-curbside-barcode" type="text"/> 
12
13     </div>
14     <input class="btn btn-primary" type="submit" value="[% l('Submit') %]"/>
15     <button ng-click="patron_search()" class="btn btn-success">[% l('Patron Search') %]</button>
16     <button ng-click="clear()" class="btn btn-default">[% l('Clear') %]</button>
17   </form>
18 </div>
19
20 <br/>
21 <div class="alert alert-warning" ng-show="bcNotFound">
22   [% l('Barcode Not Found: [_1]', '{{bcNotFound}}') %]
23 </div>
24 <div class="alert alert-warning" ng-show="optInRestricted">
25   [% l("This patron's record is not viewable at your library.") %]
26 </div>
27
28 <span ng-if="user_id">
29
30   <div class="row">
31     [% l('Patron: [_1] [_2], [_3] [_4] [_5]',
32           '{{patron().pref_prefix() || patron().prefix()}}',
33           '{{patron().pref_family_name() || patron().family_name()}}',
34           '{{patron().pref_first_given_name() || patron().first_given_name()}}',
35           '{{patron().pref_second_given_name() || patron().second_given_name()}}',
36           '{{patron().pref_suffix() || patron().suffix()}}')
37     %]
38   </div>
39   <div class="row">
40     [% l('Patron has [_1] ready holds at this location.', '{{readyHolds}}') %]
41   </div>
42
43   <div class="row">
44     <button ng-disabled="openAppointments.length > 0" ng-click="startNewAppointment()" class="btn btn-success">[% l('Make New Appointment') %]</button>
45   </div>
46   <br>
47   <div class="form-inline" ng-repeat="appt in openAppointments">
48     <ng-form name="forms['curbside' + appt.id]">
49       <div class="row">
50         <div class="col-md-1">
51           <label for="appointment-id">[% l('Appointment') %]</label>
52           <div id="appointment-id">{{appt.id}}</div>
53         </div>
54         <div class="col-md-2">
55           <label for="appointment-day">[% l('Date') %]</label>
56           <eg-date-input id="appointment-day" hide-time-picker ng-model="appt.slot_date"
57                          required min-date="minDate">
58           </eg-date-input>
59         </div>
60         <div class="col-md-2">
61           <label for="appointment-time">[% l('Time') %]</label>
62           <select class="form-control" id="appointment-time" ng-model="appt.slot_time"
63                   name="slot_time" style="display: block;"
64                   required ng-focus="refreshAvailableTimes(appt)">
65             <option value=""></option>
66             <option ng-repeat="t in appt.available_times track by t.time" value="{{t.time}}"
67                     ng-disabled="t.available === 0 && appt.original_slot_time !== t.time">
68               [% l('[_1] (Available: [_2])', '{{t.time_fmt}}', '{{t.available}}') %]
69           </option>
70           </select>
71         </div>
72         <div class="col-md-2">
73           <label for="appointment-notes">[% l('Notes') %]</label>
74           <input class="form-control" type="text" id="appointment-notes" ng-model="appt.notes" style="display: block;"></input>
75         </div>
76         <div class="col-md-2">
77           <label for="appointment-actions">[% l('Actions') %]</label>
78           <div id="appointment-actions">
79             <button ng-click="updateAppointment(appt)" ng-disabled="!forms['curbside' + appt.id].$valid" class="btn btn-primary">[% l('Save') %]</button>
80             <button ng-click="cancelAppointment(appt.id)" ng-disabled="!appt.id" class="btn btn-danger">[% l('Cancel Appointment') %]</button>
81           </div>
82         </div>
83       </div>
84       <div class="row pad-vert">
85         <div ng-if="appt.is_past" class="col-md-offset-1 col-md-4 alert alert-warning">
86           [% l('Appointment is in the past and may need to be rescheduled.') %]
87         </div>
88       </div>
89     </ng-form>
90   </div>
91 </span>