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