LP1990968: Move Strict Barcode Checkbox in Angular Staff Client
[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="col-lg-2">
101       <div class="form-check form-check-inline">
102         <input class="form-check-input" type="checkbox" 
103           (ngModelChange)="toggleStrictBarcode($event)"
104           id="strict-barcode-cbox" [(ngModel)]="strictBarcode"/>
105         <label class="form-check-label" 
106           for="strict-barcode-cbox" i18n>Strict Barcode</label>
107       </div>
108     </div>
109     <div class="flex-1"></div>
110     <div class="mr-2">
111       <div class="form-check form-check-inline">
112         <input class="form-check-input" type="checkbox" 
113           id="use-date-cbox" [(ngModel)]="backdateUntilLogout"/>
114         <label class="form-check-label" 
115           for="use-date-cbox" i18n>Use effective date until logout</label>
116       </div>
117     </div>
118     <div class="mr-2" i18n>Effective Date:</div>
119     <eg-date-select [initialIso]="backdate" [(ngModel)]="backdateDate"
120       (onChangeAsIso)="backdate = $event"></eg-date-select>
121     <button class="btn btn-sm btn-outline-dark ml-1" 
122       (click)="backdateDate=null; backdate=null" i18n>Clear</button>
123   </div>
124 </div>
125
126 <div *ngIf="fineTally > 0">
127   <span class="mr-2" i18n>Fine Tally: </span>
128   <span class="badge badge-danger">{{fineTally | currency}}</span>
129 </div>
130
131 <!-- doc_id below because checkin returns an MVR -->
132 <ng-template #titleTemplate let-r="row">
133   <ng-container *ngIf="r.record">
134     <a routerLink="/staff/catalog/record/{{r.record.doc_id()}}">{{r.title}}</a>
135   </ng-container>
136   <ng-container *ngIf="!r.record">{{r.title}}</ng-container>
137 </ng-template>
138
139 <ng-template #barcodeTemplate let-r="row">
140   <ng-container *ngIf="r.copy">
141     <a href="/eg/staff/cat/item/{{r.copy.id()}}">{{r.copy.barcode()}}</a>
142   </ng-container>
143 </ng-template>
144
145 <div class="row">
146   <div class="col-lg-12">
147     <eg-grid #grid [dataSource]="gridDataSource" [sortable]="true"
148       [useLocalSort]="true" [cellTextGenerator]="cellTextGenerator"
149       [disablePaging]="true" [persistKey]="persistKey">
150
151       <eg-grid-toolbar-action
152         group="Mark" i18n-group i18n-label label="Mark Item Damaged"
153         (onClick)="markDamaged($event)"></eg-grid-toolbar-action>
154
155       <eg-grid-toolbar-action
156         group="Mark" i18n-group i18n-label label="Mark Missing Pieces"
157         (onClick)="markMissingPieces($event)"></eg-grid-toolbar-action>
158
159       <eg-grid-toolbar-action
160         i18n-group group="Edit" i18n-label label="Manage Item Alerts"
161         [disabled]="grid.context.rowSelector.selected().length !== 1"
162         (onClick)="manageItemAlerts($event)">
163       </eg-grid-toolbar-action>
164
165       <eg-grid-toolbar-action
166         i18n-group group="Edit" i18n-label label="Edit Holdings"
167         (onClick)="editHoldings($event)">
168       </eg-grid-toolbar-action>
169
170       <eg-grid-toolbar-action
171         i18n-group group="Edit" i18n-label label="Edit Items"
172         (onClick)="editItems($event)">
173       </eg-grid-toolbar-action>
174
175       <eg-grid-toolbar-action
176         i18n-group group="Print" i18n-label label="Print Labels"
177         (onClick)="openItemPrintLabels($event)">
178       </eg-grid-toolbar-action>
179
180       <eg-grid-toolbar-action
181         i18n-group group="Add" i18n-label label="Add Item Alerts"
182         (onClick)="addItemAlerts($event)">
183       </eg-grid-toolbar-action>
184
185       <eg-grid-toolbar-action
186         i18n-group group="Add" i18n-label label="Add Items To Bucket"
187         (onClick)="openBucketDialog($event)">
188       </eg-grid-toolbar-action>
189
190       <eg-grid-toolbar-action
191         i18n-group group="Circulation" i18n-label label="Backdate Post-Checkin"
192         (onClick)="backdatePostCheckin($event)">
193       </eg-grid-toolbar-action>
194
195       <eg-grid-toolbar-action
196         i18n-group group="Circulation" i18n-label label="Cancel Transits"
197         (onClick)="cancelTransits($event)">
198       </eg-grid-toolbar-action>
199
200       <eg-grid-toolbar-action
201         i18n-group group="Show" i18n-label 
202         label="Retrieve Last Patron Who Circulated Item"
203         [disabled]="grid.context.rowSelector.selected().length !== 1"
204         (onClick)="retrieveLastPatron($event)">
205       </eg-grid-toolbar-action>
206
207       <eg-grid-toolbar-action
208         i18n-group group="Show" i18n-label 
209         label="Show Record Holds"
210         [disabled]="grid.context.rowSelector.selected().length !== 1"
211         (onClick)="showRecordHolds($event)">
212       </eg-grid-toolbar-action>
213
214       <eg-grid-toolbar-action
215         i18n-group group="Show" i18n-label 
216         label="Show Last Few Circs"
217         [disabled]="grid.context.rowSelector.selected().length !== 1"
218         (onClick)="showRecentCircs($event)">
219       </eg-grid-toolbar-action>
220
221       <!-- COLUMNS -->
222
223       <eg-grid-column path="index" [index]="true" 
224         label="Row Index" i18n-label [hidden]="true"></eg-grid-column>
225
226       <eg-grid-column path="copy.alert_message" label="Alert Message"
227         i18n-label></eg-grid-column>
228
229       <eg-grid-column path="mbts.balance_owed" label="Balance Owed" 
230         datatype="money" i18n-label></eg-grid-column>
231
232       <eg-grid-column path="copy.barcode" label="Barcode" 
233         i18n-label [cellTemplate]="barcodeTemplate"></eg-grid-column>
234
235       <eg-grid-column i18n-label label="Call Number" path="volume.label">
236       </eg-grid-column>
237
238       <eg-grid-column path="copy.circ_lib.shortname"
239         label="Circulation Library" i18n-label></eg-grid-column>
240
241       <eg-grid-column path="title" label="Title" i18n-label 
242         [cellTemplate]="titleTemplate"></eg-grid-column>
243
244       <eg-grid-column path="patron.family_name" label="Last Name" i18n-label>
245       </eg-grid-column>
246
247       <eg-grid-column path="patron.first_given_name" label="First Name" i18n-label>
248       </eg-grid-column>
249
250       <eg-grid-column path="copy.location.name" label="Location" i18n-label [hidden]="true">
251       </eg-grid-column>
252
253       <eg-grid-column path="circ.id" label="Bill #" i18n-label [hidden]="true">
254       </eg-grid-column>
255
256       <eg-grid-column path="circ.checkin_time" label="Checkin Date" i18n-label
257         datatype="timestamp" [datePlusTime]="true" [hidden]="true"></eg-grid-column>
258
259       <eg-grid-column name="routeTo" label="Route To" i18n-label>
260       </eg-grid-column>
261
262       <eg-grid-column path="circ.xact_finish" label="Finish" i18n-label
263         [hidden]="true" datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
264
265       <eg-grid-column path="circ.xact_start" label="Start" i18n-label [hidden]="true" 
266         datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
267
268       <eg-grid-column path="copy.circ_modifier" [hidden]="true" 
269         label="Circulation Modifier" i18n-label></eg-grid-column>
270
271       <eg-grid-column path="copy.status.name" [hidden]="true"
272         label="Item Status" i18n-label></eg-grid-column>
273
274       <eg-grid-column path="circ.due_date" label="Due Date" i18n-label
275         timezoneContextOrg="circ.circ_lib" dateOnlyIntervalField="circ.duration"
276         [hidden]="true" datatype="timestamp"></eg-grid-column>
277
278       <eg-grid-column path="copy.*" idlClass="acp" [hidden]="true"></eg-grid-column>
279       <eg-grid-column path="volume.*" idlClass="acn" [hidden]="true"></eg-grid-column>
280       <eg-grid-column path="circ.*" idlClass="circ" [hidden]="true"></eg-grid-column>
281       <eg-grid-column path="mbts.*" idlClass="mbts" [hidden]="true"></eg-grid-column>
282       <eg-grid-column path="patron.*" idlClass="au" [hidden]="true"></eg-grid-column>
283       <eg-grid-column path="record.*" idlClass="mvr" [hidden]="true"></eg-grid-column>
284       <eg-grid-column path="hold.*" idlClass="ahr" [hidden]="true"></eg-grid-column>
285       <eg-grid-column path="transit.*" idlClass="atc" [hidden]="true"></eg-grid-column>
286
287     </eg-grid>
288   </div>
289 </div>
290
291 <div class="row mt-3 pt-3">
292   <div class="col-lg-12 d-flex">
293     <div class="flex-1"></div>
294     <div class="mr-3">
295       <button class="btn btn-outline-dark" 
296         (click)="printReceipt()" i18n>Print Receipt</button>
297     </div>
298     <div class="mr-3">
299       <div class="form-check form-check-inline">
300         <input class="form-check-input" type="checkbox" 
301           id="trim-list-cbox" [(ngModel)]="trimList"/>
302         <label class="form-check-label" 
303           for="trim-list-cbox" i18n>Trim List (20)</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