]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/share/holds/detail.component.html
LP1910145 Angular Hold Detail Notes & Notifications
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / holds / detail.component.html
1 <eg-hold-note-dialog #noteDialog [holdId]="holdId"></eg-hold-note-dialog>
2 <eg-hold-notify-dialog #notifyDialog [holdId]="holdId"></eg-hold-notify-dialog>
3
4 <div class="row">
5   <div class="col-lg-2">
6     <button (click)="showListView()" class="btn btn-info" i18n>List View</button>
7   </div>
8   <div class="col-lg-3 font-weight-bold" i18n><h4>Hold #{{holdId}}</h4></div>
9 </div>
10
11 <div class="well-table">
12   <div class="well-row">
13     <div class="well-label" i18n>Request Date</div>
14     <div class="well-value">{{hold.request_time | formatValue:'timestamp'}}</div>
15     <div class="well-label" i18n>Capture Date</div>
16     <div class="well-value">{{hold.capture_time | formatValue:'timestamp'}}</div>
17     <div class="well-label" i18n>Available On</div>
18     <div class="well-value">{{hold.shelf_time | formatValue:'timestamp'}}</div>
19   </div>
20   <div class="well-row">
21     <div class="well-label" i18n>hold Type</div>
22     <div class="well-value">
23       {{hold.hold_type}}
24       <!-- TODO: add part data to wide holds 
25       <span *ngIf="hold.hold_type == 'P'">&nbsp;-&nbsp;{{hold.part_label}}</span>
26       -->
27     </div>
28     <div class="well-label" i18n>Current Item</div>
29     <div class="well-value">
30       <a href="/eg/staff/cat/item/{{hold.cp_id}}">{{hold.cp_barcode}}</a>
31     </div>
32     <div class="well-label" i18n>Call Number</div>
33     <div class="well-value">{{hold.cn_full_label}}</div>
34   </div>
35   <div class="well-row">
36     <div class="well-label" i18n>Pickup Lib</div>
37     <div class="well-value">{{hold.pl_shortname}}</div>
38     <div class="well-label" i18n>Status</div>
39     <div class="well-value">
40       <ng-container [ngSwitch]="hold.hold_status">
41         <div *ngSwitchCase="-1" i18n>Unknown Error</div>
42         <div *ngSwitchCase="1" i18n>Waiting for Item</div>
43         <div *ngSwitchCase="2" i18n>Waiting for Capture</div>
44         <div *ngSwitchCase="3" i18n>In Transit</div>
45         <div *ngSwitchCase="4" i18n>Ready for Pickup</div>
46         <div *ngSwitchCase="5" i18n>Hold Shelf Delay</div>
47         <div *ngSwitchCase="6" i18n>Canceled</div>
48         <div *ngSwitchCase="7" i18n>Suspended</div>
49         <div *ngSwitchCase="8" i18n>Wrong Shelf</div>
50         <div *ngSwitchCase="9" i18n>Fulfilled</div>
51       </ng-container>
52     </div>
53     <div class="well-label" i18n>Behind Desk</div>
54     <div class="well-value">{{hold.behind_desk == '1'}}</div>
55   </div>
56   <div class="well-row">
57     <div class="well-label" i18n>Current Shelf Lib</div>
58     <div class="well-value">{{getOrgName(hold.current_shelf_lib)}}</div>
59     <div class="well-label" i18n>Current Shelving Location</div>
60     <div class="well-value">{{hold.acpl_name}}</div>
61     <div class="well-label" i18n>Force Item Quality</div>
62     <div class="well-value">{{hold.mint_condition == '1'}}</div>
63   </div>
64   <div class="well-row">
65     <div class="well-label" i18n>Email Notify</div>
66     <div class="well-value">{{hold.email_notify == '1'}}</div>
67     <div class="well-label" i18n>Phone Notify</div>
68     <div class="well-value">{{hold.phone_notify}}</div>
69     <div class="well-label" i18n>SMS Notify</div>
70     <div class="well-value">{{hold.sms_notify}}</div>
71   </div>
72   <div class="well-row">
73     <div class="well-label" i18n>Cancel Cause</div>
74     <div class="well-value">{{hold.cancel_cause}}</div><!-- TODO: label -->
75     <div class="well-label" i18n>Cancel Time</div>
76     <div class="well-value">{{hold.cancel_time | formatValue:'timestamp'}}</div>
77     <div class="well-label" i18n>Cancel Note</div>
78     <div class="well-value">{{hold.cancel_note}}</div>
79   </div>
80   <div class="well-row">
81     <div class="well-label" i18n>Patron Name</div>
82     <div class="well-value">
83       <a href="/eg/staff/circ/patron/{{hold.usr_id}}/checkout">
84         {{hold.usr_display_name}}
85       </a>
86     </div>
87     <!-- force consistent width -->
88     <div class="well-label" i18n>Patron Barcode</div>
89     <div class="well-value">
90       <a href="/eg/staff/circ/patron/{{hold.usr_id}}/checkout">
91         {{hold.ucard_barcode}}
92       </a>
93     </div>
94     <div class="well-label" i18n>Hopeless Date</div>
95     <div class="well-value">{{hold.hopeless_date | formatValue:'timestamp'}}</div>
96   </div>
97 </div>
98
99 <div class="row mt-2">
100   <div class="col-lg-12">
101     <ul ngbNav #detailNav="ngbNav" class="nav-tabs" [activeId]="detailTab">
102       <li ngbNavItem="notes">
103         <a ngbNavLink i18n>Notes</a>
104         <ng-template ngbNavContent>
105           <button class="btn btn-outline-dark mt-3" (click)="newNote()" i18n>New Note</button>
106           <div class="mt-3" *ngFor="let note of notes">
107             <div class="d-flex">
108               <div class="font-weight-bold">{{note.title()}}</div>
109               <div class="flex-1"></div>
110               <div>
111                 <span *ngIf="note.slip() == 't'" 
112                   class="ml-2 badge badge-info p-1">Print on Slip</span>
113                 <span *ngIf="note.pub() == 't'" 
114                   class="ml-2 badge badge-warning p-1">Patron Visible</span>
115                 <span *ngIf="note.staff() == 't'" 
116                   class="ml-2 badge badge-info p-1">Staff Create</span>
117               </div>
118             </div>
119             <div class="well-table">
120               <div class="well-row">
121                 <div class="well-value">{{note.body()}}</div>
122                 <div class="well-label-no-flex">
123                   <button class="btn btn-warning" 
124                     (click)="deleteNote(note)" i18n>Delete</button>
125                 </div>
126               </div>
127             </div>
128           </div>
129         </ng-template>
130       </li>
131       <li ngbNavItem="notifications">
132         <a ngbNavLink i18n>Staff Notifications</a>
133         <ng-template ngbNavContent>
134           <button class="btn btn-outline-dark mt-3" 
135             (click)="newNotify()" i18n>Add Record of Notification</button>
136           <div class="mt-3" *ngFor="let notify of notifies">
137             <div class="d-flex">
138               <div class="font-weight-bold">{{notify.method()}}</div>
139               <div class="flex-1"></div>
140               <div>
141                 <span>{{notify.notify_time() | date:'short'}}</span>
142                 <span class="ml-2" i18n>
143                   Created by {{notify.notify_staff().usrname()}}</span>
144               </div>
145               <div>
146               </div>
147             </div>
148             <div class="well-table">
149               <div class="well-row">
150                 <div class="well-value">{{notify.note()}}</div>
151               </div>
152             </div>
153           </div>
154         </ng-template>
155       </li>
156     </ul>
157     <div [ngbNavOutlet]="detailNav"></div>
158   </div>
159 </div>