4542213374bd82ac1c6ba606875b0c062d00173b
[evergreen-equinox.git] / Open-ILS / src / eg2 / src / app / staff / circ / checkin / checkin.component.html
1 <eg-staff-banner *ngIf="!isHoldCapture" i18n-bannerText bannerText="Checkin Items">
2 </eg-staff-banner>
3
4 <eg-staff-banner *ngIf="isHoldCapture" i18n-bannerText bannerText="Capture Holds">
5 </eg-staff-banner>
6
7 <eg-mark-damaged-dialog #markDamagedDialog [handleCheckin]="true"></eg-mark-damaged-dialog>
8 <eg-circ-components></eg-circ-components>
9 <eg-progress-dialog #progressDialog></eg-progress-dialog>
10 <eg-barcode-select #barcodeSelect></eg-barcode-select>
11 <eg-copy-alerts-dialog #copyAlertsDialog></eg-copy-alerts-dialog>
12 <eg-bucket-dialog #bucketDialog></eg-bucket-dialog>
13 <eg-string #itemNeverCircedStr i18n-text 
14   text="Item CONC40000598 has never circulated."></eg-string>
15 <eg-backdate-dialog #backdateDialog></eg-backdate-dialog>
16 <eg-cancel-transit-dialog #cancelTransitDialog></eg-cancel-transit-dialog>
17 <eg-worklog-strings-components></eg-worklog-strings-components>
18
19 <div class="row" *ngIf="hasAlerts()">
20   <div class="col-lg-12">
21     <div class="alert alert-danger p-1 text-dark">
22
23       <span *ngIf="backdate" 
24         class="mr-3 pr-3 border-right border-info label-with-material-icon">
25         <span class="material-icons">history</span>
26         <span class="pl-2" i18n>Backdated Check In {{backdate | date:'shortDate'}}</span>
27       </span>
28
29       <span *ngIf="backdate && backdateUntilLogout"
30         class="mr-3 pr-3 border-right border-info label-with-material-icon">
31         <span class="material-icons">timeline</span>
32         <span class="pl-2" i18n>Use Effective Date Until Logout</span>
33       </span>
34
35       <span *ngIf="modifiers.no_precat_alert"
36         class="mr-3 pr-3 border-right border-info label-with-material-icon">
37         <span class="material-icons">edit</span>
38         <span class="pl-2" i18n>Ignore Pre-Cataloged Items</span>
39       </span>
40
41       <span *ngIf="modifiers.noop"
42         class="mr-3 pr-3 border-right border-info label-with-material-icon"> 
43         <span class="material-icons">block</span>
44         <span class="pl-2" i18n>Suppress Holds and Transits</span>
45       </span>
46
47       <span *ngIf="modifiers.void_overdues"
48         class="mr-3 pr-3 border-right border-info label-with-material-icon">
49         <span class="material-icons">monetization_on</span>
50         <span class="pl-2" i18n>Amnesty Mode</span>
51       </span>
52
53       <span *ngIf="modifiers.auto_print_holds_transits"
54         class="mr-3 pr-3 border-right border-info label-with-material-icon">
55         <span class="material-icons">print</span>
56         <span class="pl-2" i18n>Auto-Print Hold and Transit Slips</span>
57       </span>
58
59       <span class="mr-3 pr-3 border-right border-info" 
60         *ngIf="modifiers.clear_expired" i18n>Clear Holds Shelf</span>
61
62       <ng-container *ngIf="modifiers.retarget_holds">
63         <span class="mr-3 pr-3 border-right border-info" 
64           *ngIf="modifiers.retarget_holds_all" i18n>Always Retarget Local Holds</span>
65         <span class="mr-3 pr-3 border-right border-info" 
66           *ngIf="!modifiers.retarget_holds_all" i18n>Retarget Local Holds</span>
67       </ng-container>
68
69       <span *ngIf="modifiers.hold_as_transit"
70         class="mr-3 pr-3 border-right border-info label-with-material-icon">
71         <span class="material-icons">directions_transit</span>
72         <span class="pl-2" i18n>Capture Local Holds As Transits</span>
73       </span>
74
75       <span class="mr-3 pr-3 border-right border-info" 
76         *ngIf="modifiers.manual_float" i18n>Manual Floating Active</span>
77
78       <span class="mr-3 pr-3 border-right border-info" 
79         *ngIf="modifiers.do_inventory_update" i18n>Update Inventory</span>
80     </div>
81   </div>
82 </div>
83
84 <div class="row mb-3 pb-3 border-bottom">
85   <div class="col-lg-12 d-flex">
86     <div class="form-inline">
87       <div class="input-group">
88         <div class="input-group-prepend">
89           <span class="input-group-text" i18n>Barcode</span>
90         </div>
91         <input type="text" class="form-control" id="barcode-input"
92           placeholder="Barcode..." i18n-placeholder [(ngModel)]="barcode"
93           i18n-aria-label aria-label="Barcode Input" (keydown.enter)="checkin()" />
94         <div class="input-group-append">
95           <button class="btn btn-outline-dark" (keydown.enter)="checkin()" 
96             (click)="checkin()" i18n>Submit</button>
97         </div>
98       </div>
99     </div>
100     <div class="flex-1"></div>
101     <div class="mr-2">
102       <div class="form-check form-check-inline">
103         <input class="form-check-input" type="checkbox" 
104           id="use-date-cbox" [(ngModel)]="backdateUntilLogout"/>
105         <label class="form-check-label" 
106           for="use-date-cbox" i18n>Use effective date until logout</label>
107       </div>
108     </div>
109     <div class="mr-2" i18n>Effective Date:</div>
110     <eg-date-select [initialIso]="backdate" [(ngModel)]="backdateDate"
111       (onChangeAsIso)="backdate = $event"></eg-date-select>
112     <button class="btn btn-sm btn-outline-dark ml-1" 
113       (click)="backdateDate=null; backdate=null" i18n>Clear</button>
114   </div>
115 </div>
116
117 <div *ngIf="fineTally > 0">
118   <span class="mr-2" i18n>Fine Tally: </span>
119   <span class="badge badge-danger">{{fineTally | currency}}</span>
120 </div>
121
122 <!-- doc_id below because checkin returns an MVR -->
123 <ng-template #titleTemplate let-r="row">
124   <ng-container *ngIf="r.record">
125     <a routerLink="/staff/catalog/record/{{r.record.doc_id()}}">{{r.title}}</a>
126   </ng-container>
127   <ng-container *ngIf="!r.record">{{r.title}}</ng-container>
128 </ng-template>
129
130 <ng-template #barcodeTemplate let-r="row">
131   <ng-container *ngIf="r.copy">
132     <a href="/eg/staff/cat/item/{{r.copy.id()}}">{{r.copy.barcode()}}</a>
133   </ng-container>
134 </ng-template>
135
136 <div class="row">
137   <div class="col-lg-12">
138     <eg-grid #grid [dataSource]="gridDataSource" [sortable]="true"
139       [useLocalSort]="true" [cellTextGenerator]="cellTextGenerator"
140       [disablePaging]="true" [persistKey]="persistKey">
141
142       <eg-grid-toolbar-action
143         group="Mark" i18n-group i18n-label label="Mark Item Damaged"
144         (onClick)="markDamaged($event)"></eg-grid-toolbar-action>
145
146       <eg-grid-toolbar-action
147         group="Mark" i18n-group i18n-label label="Mark Missing Pieces"
148         (onClick)="markMissingPieces($event)"></eg-grid-toolbar-action>
149
150       <eg-grid-toolbar-action
151         i18n-group group="Edit" i18n-label label="Manage Item Alerts"
152         [disabled]="grid.context.rowSelector.selected().length !== 1"
153         (onClick)="manageItemAlerts($event)">
154       </eg-grid-toolbar-action>
155
156       <eg-grid-toolbar-action
157         i18n-group group="Edit" i18n-label label="Edit Holdings"
158         (onClick)="editHoldings($event)">
159       </eg-grid-toolbar-action>
160
161       <eg-grid-toolbar-action
162         i18n-group group="Edit" i18n-label label="Edit Items"
163         (onClick)="editItems($event)">
164       </eg-grid-toolbar-action>
165
166       <eg-grid-toolbar-action
167         i18n-group group="Print" i18n-label label="Print Labels"
168         (onClick)="openItemPrintLabels($event)">
169       </eg-grid-toolbar-action>
170
171       <eg-grid-toolbar-action
172         i18n-group group="Add" i18n-label label="Add Item Alerts"
173         (onClick)="addItemAlerts($event)">
174       </eg-grid-toolbar-action>
175
176       <eg-grid-toolbar-action
177         i18n-group group="Add" i18n-label label="Add Items To Bucket"
178         (onClick)="openBucketDialog($event)">
179       </eg-grid-toolbar-action>
180
181       <eg-grid-toolbar-action
182         i18n-group group="Circulation" i18n-label label="Backdate Post-Checkin"
183         (onClick)="backdatePostCheckin($event)">
184       </eg-grid-toolbar-action>
185
186       <eg-grid-toolbar-action
187         i18n-group group="Circulation" i18n-label label="Cancel Transits"
188         (onClick)="cancelTransits($event)">
189       </eg-grid-toolbar-action>
190
191       <eg-grid-toolbar-action
192         i18n-group group="Show" i18n-label 
193         label="Retrieve Last Patron Who Circulated Item"
194         [disabled]="grid.context.rowSelector.selected().length !== 1"
195         (onClick)="retrieveLastPatron($event)">
196       </eg-grid-toolbar-action>
197
198       <eg-grid-toolbar-action
199         i18n-group group="Show" i18n-label 
200         label="Show Record Holds"
201         [disabled]="grid.context.rowSelector.selected().length !== 1"
202         (onClick)="showRecordHolds($event)">
203       </eg-grid-toolbar-action>
204
205       <eg-grid-toolbar-action
206         i18n-group group="Show" i18n-label 
207         label="Show Last Few Circs"
208         [disabled]="grid.context.rowSelector.selected().length !== 1"
209         (onClick)="showRecentCircs($event)">
210       </eg-grid-toolbar-action>
211
212       <!-- COLUMNS -->
213
214       <eg-grid-column path="index" [index]="true" 
215         label="Row Index" i18n-label [hidden]="true"></eg-grid-column>
216
217       <eg-grid-column path="copy.alert_message" label="Alert Message"
218         i18n-label></eg-grid-column>
219
220       <eg-grid-column path="mbts.balance_owed" label="Balance Owed" 
221         datatype="money" i18n-label></eg-grid-column>
222
223       <eg-grid-column path="copy.barcode" label="Barcode" 
224         i18n-label [cellTemplate]="barcodeTemplate"></eg-grid-column>
225
226       <eg-grid-column i18n-label label="Call Number" path="volume.label">
227       </eg-grid-column>
228
229       <eg-grid-column path="copy.circ_lib.shortname"
230         label="Circulation Library" i18n-label></eg-grid-column>
231
232       <eg-grid-column path="title" label="Title" i18n-label 
233         [cellTemplate]="titleTemplate"></eg-grid-column>
234
235       <eg-grid-column path="patron.family_name" label="Last Name" i18n-label>
236       </eg-grid-column>
237
238       <eg-grid-column path="patron.first_given_name" label="First Name" i18n-label>
239       </eg-grid-column>
240
241       <eg-grid-column path="copy.location.name" label="Location" i18n-label [hidden]="true">
242       </eg-grid-column>
243
244       <eg-grid-column path="circ.id" label="Bill #" i18n-label [hidden]="true">
245       </eg-grid-column>
246
247       <eg-grid-column path="circ.checkin_time" label="Checkin Date" i18n-label
248         datatype="timestamp" [datePlusTime]="true" [hidden]="true"></eg-grid-column>
249
250       <eg-grid-column name="routeTo" label="Route To" i18n-label>
251       </eg-grid-column>
252
253       <eg-grid-column path="circ.xact_finish" label="Finish" i18n-label
254         [hidden]="true" datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
255
256       <eg-grid-column path="circ.xact_start" label="Start" i18n-label [hidden]="true" 
257         datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
258
259       <eg-grid-column path="copy.circ_modifier" [hidden]="true" 
260         label="Circulation Modifier" i18n-label></eg-grid-column>
261
262       <eg-grid-column path="copy.status.name" [hidden]="true"
263         label="Item Status" i18n-label></eg-grid-column>
264
265       <eg-grid-column path="circ.due_date" label="Due Date" i18n-label
266         timezoneContextOrg="circ.circ_lib" dateOnlyIntervalField="circ.duration"
267         [hidden]="true" datatype="timestamp"></eg-grid-column>
268
269       <eg-grid-column path="copy.*" idlClass="acp" [hidden]="true"></eg-grid-column>
270       <eg-grid-column path="volume.*" idlClass="acn" [hidden]="true"></eg-grid-column>
271       <eg-grid-column path="circ.*" idlClass="circ" [hidden]="true"></eg-grid-column>
272       <eg-grid-column path="mbts.*" idlClass="mbts" [hidden]="true"></eg-grid-column>
273       <eg-grid-column path="patron.*" idlClass="au" [hidden]="true"></eg-grid-column>
274       <eg-grid-column path="record.*" idlClass="mvr" [hidden]="true"></eg-grid-column>
275       <eg-grid-column path="hold.*" idlClass="ahr" [hidden]="true"></eg-grid-column>
276       <eg-grid-column path="transit.*" idlClass="atc" [hidden]="true"></eg-grid-column>
277
278     </eg-grid>
279   </div>
280 </div>
281
282 <div class="row mt-3 pt-3">
283   <div class="col-lg-12 d-flex">
284     <div class="flex-1"></div>
285     <div class="mr-3">
286       <button class="btn btn-outline-dark" 
287         (click)="printReceipt()" i18n>Print Receipt</button>
288     </div>
289     <div class="mr-3">
290       <div class="form-check form-check-inline">
291         <input class="form-check-input" type="checkbox" 
292           id="trim-list-cbox" [(ngModel)]="trimList"/>
293         <label class="form-check-label" 
294           for="trim-list-cbox" i18n>Trim List (20)</label>
295       </div>
296     </div>
297     <div class="mr-3">
298       <div class="form-check form-check-inline">
299         <input class="form-check-input" type="checkbox" 
300           (ngModelChange)="toggleStrictBarcode($event)"
301           id="strict-barcode-cbox" [(ngModel)]="strictBarcode"/>
302         <label class="form-check-label" 
303           for="strict-barcode-cbox" i18n>Strict Barcode</label>
304       </div>
305     </div>
306     <div>
307       <div ngbDropdown>
308         <button class="btn btn-outline-dark" 
309           ngbDropdownToggle i18n>Checkin Modifiers</button>
310         <div ngbDropdownMenu>
311           <a ngbDropdownItem (click)="toggleMod('no_precat_alert')">
312             <span *ngIf="modifiers.no_precat_alert" 
313               class="badge badge-success mr-2">&#x2713;</span>
314             <span *ngIf="!modifiers.no_precat_alert" 
315               class="badge badge-warning mr-2">&#x2717;</span>
316             <span i18n>Ignore Pre-cataloged Items</span>
317           </a>
318           <a ngbDropdownItem (click)="toggleMod('noop')">
319             <span *ngIf="modifiers.noop" 
320               class="badge badge-success mr-2">&#x2713;</span>
321             <span *ngIf="!modifiers.noop" 
322               class="badge badge-warning mr-2">&#x2717;</span>
323             <span i18n>Suppress Holds and Transits</span>
324           </a>
325           <a ngbDropdownItem (click)="toggleMod('void_overdues')">
326             <span *ngIf="modifiers.void_overdues" 
327               class="badge badge-success mr-2">&#x2713;</span>
328             <span *ngIf="!modifiers.void_overdues"
329               class="badge badge-warning mr-2">&#x2717;</span>
330             <span i18n>Amnesty Mode</span>
331           </a>
332           <a ngbDropdownItem (click)="toggleMod('auto_print_holds_transits')">
333             <span *ngIf="modifiers.auto_print_holds_transits" 
334               class="badge badge-success mr-2">&#x2713;</span>
335             <span *ngIf="!modifiers.auto_print_holds_transits"
336               class="badge badge-warning mr-2">&#x2717;</span>
337             <span>Auto-Print Hold and Transit Slips</span>
338           </a>
339           <a ngbDropdownItem (click)="toggleMod('clear_expired')">
340             <span *ngIf="modifiers.clear_expired" 
341               class="badge badge-success mr-2">&#x2713;</span>
342             <span *ngIf="!modifiers.clear_expired"
343               class="badge badge-warning mr-2">&#x2717;</span>
344             <span i18n>Clear Holds Shelf</span>
345           </a>
346           <a ngbDropdownItem (click)="toggleMod('retarget_holds')">
347             <span *ngIf="modifiers.retarget_holds" 
348               class="badge badge-success mr-2">&#x2713;</span>
349             <span *ngIf="!modifiers.retarget_holds"
350               class="badge badge-warning mr-2">&#x2717;</span>
351             <span i18n>Retarget Local Holds</span>
352           </a>
353           <a ngbDropdownItem (click)="toggleMod('retarget_holds_all')">
354             <span *ngIf="modifiers.retarget_holds_all" 
355               class="badge badge-success mr-2">&#x2713;</span>
356             <span *ngIf="!modifiers.retarget_holds_all"
357               class="badge badge-warning mr-2">&#x2717;</span>
358             <span i18n>Retarget All Statuses</span>
359           </a>
360           <a ngbDropdownItem (click)="toggleMod('hold_as_transit')">
361             <span *ngIf="modifiers.hold_as_transit" 
362               class="badge badge-success mr-2">&#x2713;</span>
363             <span *ngIf="!modifiers.hold_as_transit"
364               class="badge badge-warning mr-2">&#x2717;</span>
365             <span i18n>Capture Local Holds As Transits</span>
366           </a>
367           <a ngbDropdownItem (click)="toggleMod('manual_float')">
368             <span *ngIf="modifiers.manual_float"
369               class="badge badge-success mr-2">&#x2713;</span>
370             <span *ngIf="!modifiers.manual_float"
371               class="badge badge-warning mr-2">&#x2717;</span>
372             <span i18n>Manual Floating Active</span>
373           </a>
374           <a ngbDropdownItem (click)="toggleMod('do_inventory_update')">
375             <span *ngIf="modifiers.do_inventory_update"
376               class="badge badge-success mr-2">&#x2713;</span>
377             <span *ngIf="!modifiers.do_inventory_update"
378               class="badge badge-warning mr-2">&#x2717;</span>
379             <span i18n>Update Inventory</span>
380           </a>
381         </div>
382       </div>
383     </div>
384   </div>
385 </div>
386
387