lp1739277 OrgSelect Class Callback Holdings Implementation
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / catalog / record / holdings.component.html
1
2 <!-- org unit selector -->
3
4 <div class="row mt-3">
5   <div class="col-lg-4">
6     <div class="input-group">
7       <div class="input-group-prepend">
8         <div class="input-group-text" i18n>Holdings Maintenance</div>
9       </div>
10       <eg-org-select [initialOrg]="contextOrg"
11         persistKey="catalog.holdings"
12         (onChange)="contextOrgChanged($event)"
13         [orgClassCallback]="orgClassCallback">
14       </eg-org-select>
15     </div>
16   </div>
17 </div>
18
19 <!-- Location / Barcode cell template -->
20
21 <ng-template #locationTemplate let-row="row" let-userContext="userContext">
22   <!-- pl-* is doubled for added impact -->
23   <div class="pl-{{row.locationDepth}}">
24     <span class="pl-{{row.locationDepth}}">
25       <a class="label-with-material-icon" (click)="userContext.toggleExpandRow(row)">
26         <!--  leave the icons in place for all node types, but make them
27               invisible when they are not needed. -->
28         <span *ngIf="row.treeNode.expanded"
29           [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
30           class="material-icons p-0 m-0">keyboard_arrow_down</span>
31         <span *ngIf="!row.treeNode.expanded"
32           [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
33           class="material-icons p-0 m-0">keyboard_arrow_right</span>
34         <span>{{row.locationLabel}}</span>
35       </a>
36     </span>
37   </div>
38 </ng-template>
39
40 <!-- Holdable true/false display -->
41
42 <ng-template #holdableTemplate let-row="row" let-userContext="userContext">
43   <ng-container *ngIf="row.copy">
44     <eg-bool [value]="userContext.copyIsHoldable(row.copy)">
45     </eg-bool>
46   </ng-container>
47 </ng-template>
48
49 <eg-mark-damaged-dialog #markDamagedDialog></eg-mark-damaged-dialog>
50 <eg-mark-missing-dialog #markMissingDialog></eg-mark-missing-dialog>
51 <eg-copy-alerts-dialog #copyAlertsDialog></eg-copy-alerts-dialog>
52 <eg-copy-tags-dialog #copyTagsDialog></eg-copy-tags-dialog>
53 <eg-copy-notes-dialog #copyNotesDialog></eg-copy-notes-dialog>
54 <eg-replace-barcode-dialog #replaceBarcode></eg-replace-barcode-dialog>
55 <eg-delete-holding-dialog #deleteHolding></eg-delete-holding-dialog>
56 <eg-bucket-dialog #bucketDialog></eg-bucket-dialog>
57 <eg-conjoined-items-dialog #conjoinedDialog></eg-conjoined-items-dialog>
58 <eg-make-bookable-dialog #makeBookableDialog></eg-make-bookable-dialog>
59 <eg-transfer-items #transferItems></eg-transfer-items>
60 <eg-transfer-holdings #transferHoldings></eg-transfer-holdings>
61 <eg-alert-dialog #transferAlert
62   i18n-dialogTitle i18n-dialogBody
63   dialogTitle="No Target Selected"
64   dialogBody="Please select a suitable transfer target"></eg-alert-dialog>
65
66 <!-- holdings grid -->
67 <div class='eg-copies w-100 mt-3'>
68   <eg-grid #holdingsGrid [dataSource]="gridDataSource"
69     (onRowActivate)="onRowActivate($event)" [disablePaging]="true"
70     [rowClassCallback]="rowClassCallback" [cellTextGenerator]="cellTextGenerator"
71     [sortable]="false" persistKey="cat.holdings">
72
73     <!-- checkboxes / filters -->
74
75     <eg-grid-toolbar-checkbox i18n-label label="Show Call Numbers"
76       #callNumsCheckbox (onChange)="toggleShowCallNums($event)">
77     </eg-grid-toolbar-checkbox> 
78     <eg-grid-toolbar-checkbox i18n-label label="Show Copies" 
79       #copiesCheckbox (onChange)="toggleShowCopies($event)">
80     </eg-grid-toolbar-checkbox> 
81     <eg-grid-toolbar-checkbox i18n-label label="Show Empty Call Numbers"
82       #emptyCallNumsCheckbox (onChange)="toggleShowEmptyCallNums($event)">
83     </eg-grid-toolbar-checkbox> 
84     <eg-grid-toolbar-checkbox i18n-label label="Show Empty Libs"            
85       #emptyLibsCheckbox (onChange)="toggleShowEmptyLibs($event)">
86     </eg-grid-toolbar-checkbox> 
87
88     <!-- row actions -->
89
90     <!-- row actions : Ungrouped -->
91
92     <eg-grid-toolbar-action
93       i18n-label label="Print Labels" (onClick)="openItemPrintLabels($event)">
94     </eg-grid-toolbar-action>
95
96     <eg-grid-toolbar-action
97       i18n-label label="Request Items" (onClick)="requestItems($event)">
98     </eg-grid-toolbar-action>
99
100     <eg-grid-toolbar-action
101       i18n-label label="Link as Conjoined to Marked Bib Record"
102       (onClick)="openConjoinedDialog($event)">
103     </eg-grid-toolbar-action>
104
105     <!-- row actions : Add -->
106
107     <eg-grid-toolbar-action
108       i18n-group group="Add" i18n-label label="Add Call Numbers"
109       (onClick)="openHoldingAdd($event, true, false)">
110     </eg-grid-toolbar-action>
111
112     <eg-grid-toolbar-action
113       i18n-group group="Add" i18n-label label="Add Items"
114       (onClick)="openHoldingAdd($event, false, true)">
115     </eg-grid-toolbar-action>
116
117     <eg-grid-toolbar-action
118       i18n-group group="Add" i18n-label label="Add Call Numbers and Items"
119       (onClick)="openHoldingAdd($event, true, true)">
120     </eg-grid-toolbar-action>
121
122     <eg-grid-toolbar-action
123       i18n-group group="Add" i18n-label label="Add Item Alerts"
124       (onClick)="openItemAlerts($event, 'create')">
125     </eg-grid-toolbar-action>
126
127     <eg-grid-toolbar-action
128       i18n-group group="Add" i18n-label label="Add/Manage Item Tags"
129       (onClick)="openItemTags($event)">
130     </eg-grid-toolbar-action>
131
132     <eg-grid-toolbar-action
133       i18n-group group="Add" i18n-label label="Add/Manage Item Notes"
134       (onClick)="openItemNotes($event)">
135     </eg-grid-toolbar-action>
136
137     <eg-grid-toolbar-action
138       i18n-group group="Add" i18n-label label="Add Items To Bucket"
139       (onClick)="openBucketDialog($event)">
140     </eg-grid-toolbar-action>
141
142     <!-- row actions: Booking -->
143
144     <eg-grid-toolbar-action
145       i18n-group group="Booking" i18n-label label="Book Item Now"
146       (onClick)="bookItems($event)">
147     </eg-grid-toolbar-action>
148
149     <eg-grid-toolbar-action
150       i18n-group group="Booking" i18n-label label="Make Items Bookable"
151       (onClick)="makeBookable($event)">
152     </eg-grid-toolbar-action>
153
154     <eg-grid-toolbar-action
155       i18n-group group="Booking" i18n-label label="Manage Reservations"
156       (onClick)="manageReservations($event)">
157     </eg-grid-toolbar-action>
158     
159     <!-- row actions: Edit -->
160
161     <eg-grid-toolbar-action
162       i18n-group group="Edit" i18n-label label="Edit Call Numbers"
163       (onClick)="openHoldingEdit($event, false, true)">
164     </eg-grid-toolbar-action>
165
166     <eg-grid-toolbar-action
167       i18n-group group="Edit" i18n-label label="Edit Call Numbers And Items"
168       (onClick)="openHoldingEdit($event, false, false)">
169     </eg-grid-toolbar-action>
170
171     <eg-grid-toolbar-action
172       i18n-group group="Edit" i18n-label label="Edit Items"
173       (onClick)="openHoldingEdit($event, true, false)">
174     </eg-grid-toolbar-action>
175     
176     <eg-grid-toolbar-action
177       i18n-group group="Edit" i18n-label label="Edit Item Alerts"
178       (onClick)="openItemAlerts($event, 'manage')">
179     </eg-grid-toolbar-action>
180
181     <eg-grid-toolbar-action
182       i18n-group group="Edit" i18n-label label="Replace Barcodes"
183       (onClick)="openReplaceBarcodeDialog($event)">
184     </eg-grid-toolbar-action>
185
186     <!-- row actions: Delete -->
187
188     <eg-grid-toolbar-action
189       i18n-group group="Delete" i18n-label label="Delete Empty Call Numbers"
190       (onClick)="deleteHoldings($event, 'callNums')">
191     </eg-grid-toolbar-action>
192
193     <eg-grid-toolbar-action
194      i18n-group group="Delete" i18n-label label="Delete Items"
195      (onClick)="deleteHoldings($event, 'copies')">
196     </eg-grid-toolbar-action>
197
198     <eg-grid-toolbar-action
199       i18n-group group="Delete" i18n-label label="Delete Call Numbers and Items"
200       (onClick)="deleteHoldings($event, 'both')">
201     </eg-grid-toolbar-action>
202     
203     <!-- row actions : Show -->
204
205     <eg-grid-toolbar-action
206       i18n-group group="Show" i18n-label label="Show Item Status (list)"
207       (onClick)="openItemStatusList($event)"></eg-grid-toolbar-action>
208
209     <eg-grid-toolbar-action
210       i18n-group group="Show" i18n-label label="Show Item Status (detail)"
211       (onClick)="openItemStatus($event)"></eg-grid-toolbar-action>
212
213     <eg-grid-toolbar-action
214       i18n-group group="Show" i18n-label label="Show Item Holds"
215       (onClick)="openItemHolds($event)"></eg-grid-toolbar-action>
216
217     <eg-grid-toolbar-action
218       i18n-group group="Show" i18n-label label="Show Triggered Events"
219       (onClick)="openItemTriggeredEvents($event)"></eg-grid-toolbar-action>
220
221     <!-- row actions : Mark -->
222
223     <eg-grid-toolbar-action
224       group="Mark" i18n-group i18n-label label="Mark Item Damaged"
225       (onClick)="showMarkDamagedDialog($event)"></eg-grid-toolbar-action>
226
227     <eg-grid-toolbar-action
228       i18n-group group="Mark" i18n-label label="Mark Item Missing"
229       (onClick)="showMarkMissingDialog($event)">
230     </eg-grid-toolbar-action>
231
232     <eg-grid-toolbar-action
233       i18n-group group="Mark" 
234       i18n-label label="Mark Library/Call Number as Transfer Destination"
235       (onClick)="markLibCnForTransfer($event)">
236     </eg-grid-toolbar-action>
237
238     <eg-grid-toolbar-action
239       i18n-group group="Transfer" 
240       i18n-label label="Transfer Items to Marked Destination"
241       (onClick)="transferSelectedItems($event)">
242     </eg-grid-toolbar-action>
243
244     <eg-grid-toolbar-action
245       i18n-group group="Transfer" 
246       i18n-label label="Transfer Holdings to Marked Destination"
247       (onClick)="transferSelectedHoldings($event)">
248     </eg-grid-toolbar-action>
249
250     <!-- fields -->
251     <!-- NOTE column names were added to match the names from the AngJS grid
252         so grid settings would propagate -->
253
254     <eg-grid-column path="index" [hidden]="true" [index]="true">
255     </eg-grid-column>
256     <eg-grid-column name="id" path="copy.id" [hidden]="true" label="Item ID" i18n-label>
257     </eg-grid-column>
258     <eg-grid-column path="callNum.id" [hidden]="true" label="Call Number ID" i18n-label>
259     </eg-grid-column>
260     <eg-grid-column name="owner_label" [flex]="4"
261       [cellTemplate]="locationTemplate" [cellContext]="gridTemplateContext" 
262       label="Location/Barcode" [disableTooltip]="true" i18n-label>
263     </eg-grid-column>
264     <eg-grid-column path="callNumCount" datatype="number" label="Call Numbers" i18n-label>
265     </eg-grid-column>
266     <eg-grid-column path="copyCount" datatype="number" label="Copies" i18n-label>
267     </eg-grid-column>
268     <eg-grid-column path="callNum._label" name="call_number.label" 
269       label="Call Number" i18n-label>
270     </eg-grid-column>
271     <eg-grid-column path="copy.barcode" name="barcode" label="Barcode" i18n-label>
272     </eg-grid-column>
273     <eg-grid-column i18n-label label="Circ Library" path="copy.circ_lib" 
274       name="circ_lib.name" datatype="org_unit"></eg-grid-column>
275     <eg-grid-column i18n-label label="Owning Library" path="callNum.owning_lib" 
276       datatype="org_unit"></eg-grid-column>
277     <eg-grid-column i18n-label label="Due Date" path="circ.due_date" 
278       datatype="timestamp"></eg-grid-column>
279     <eg-grid-column i18n-label label="Shelving Location" 
280       path="copy.location.name" name="location.name">
281     </eg-grid-column>
282     <eg-grid-column i18n-label label="Circulation Modifier" 
283       path="copy.circ_modifier" name="circ_modifier">
284     </eg-grid-column>
285     <eg-grid-column i18n-label label="Item Number" path="copy.copy_number" 
286       name="copy_number" [hidden]="true">
287     </eg-grid-column>
288
289     <eg-grid-column i18n-label label="Status" 
290       path="copy.status.name" name="status_name">
291     </eg-grid-column>
292     <eg-grid-column i18n-label label="Call Number Prefix" 
293       path="callNum.prefix.label" name="call_number.prefix.label" [hidden]="true">
294     </eg-grid-column>
295     <eg-grid-column i18n-label label="Call Number Suffix" 
296       path="callNum.suffix.label" name="call_number.suffix.label" [hidden]="true">
297     </eg-grid-column>
298     <eg-grid-column i18n-label label="Parts" path="copy._monograph_parts"
299       name="monograph_parts" [hidden]="true">
300     </eg-grid-column>
301     <eg-grid-column i18n-label label="Notes" path="copy.notes.length"
302       name="note_count" [hidden]="true">
303     </eg-grid-column>
304     <eg-grid-column i18n-label label="Tags" path="copy.tags.length"
305       name="tag_count" [hidden]="true">
306     </eg-grid-column>
307     <eg-grid-column i18n-label label="Alerts" path="copy.copy_alerts.length"
308       name="alert_count" [hidden]="true">
309     </eg-grid-column>
310     <eg-grid-column i18n-label label="Circulate As MARC Type"
311       path="copy.circ_as_type" [hidden]="true">
312     </eg-grid-column>
313     <eg-grid-column i18n-label label="Active/Create Date" 
314       path="copy.active_date" datatype="timestamp">
315     </eg-grid-column>
316     <eg-grid-column i18n-label label="Total Circ Count"
317       path="copy.total_circ_count.circ_count">
318     </eg-grid-column>
319     <eg-grid-column i18n-label label="Last Circ Date"
320       path="copy.last_circ.last_circ" datatype="timestamp">
321     </eg-grid-column>
322     <eg-grid-column i18n-label label="Age Hold Protection" 
323       path="copy.age_protect.name" name="age_protect.name"></eg-grid-column>
324     <eg-grid-column i18n-label label="Item Price" 
325       path="copy.price" name="price" [hidden]="true"></eg-grid-column>
326
327     <eg-grid-column i18n-label label="Circulate" path="copy.circulate" 
328       name="circulate" datatype="bool" [hidden]="true"></eg-grid-column>
329     <eg-grid-column i18n-label label="Deposit" path="copy.deposit" 
330       name="deposit" datatype="bool" [hidden]="true"></eg-grid-column>
331     <eg-grid-column i18n-label label="Deposit Amount" path="copy.deposit_amount" 
332       name="deposit_amount" datatype="money" [hidden]="true"></eg-grid-column>
333     <eg-grid-column i18n-label label="Holdable?" name="holdable" 
334       [cellTemplate]="holdableTemplate" [cellContext]="gridTemplateContext">
335     </eg-grid-column>
336     <eg-grid-column i18n-label label="Reference?" path="copy.ref" 
337       name="ref" datatype="bool" [hidden]="true"></eg-grid-column>
338     <eg-grid-column i18n-label label="Last Inventory Date" 
339       path="copy.latest_inventory.inventory_date" 
340       name="latest_inventory.inventory_date" datatype="timestamp" [hidden]="true">
341     </eg-grid-column>
342     <eg-grid-column i18n-label label="Last Inventory Workstation" 
343       path="copy.latest_inventory.inventory_workstation.name" 
344       name="latest_inventory.inventory_workstation.name" [hidden]="true">
345     </eg-grid-column>
346     <eg-grid-column i18n-label label="OPAC Visible?" path="copy.opac_visible" 
347       name="opac_visible" datatype="bool" [hidden]="true">
348     </eg-grid-column>
349   </eg-grid>
350 </div>
351